/* 
  John B. Cowan — Literary static site
  Custom styles layered on Tailwind for refined, timeless feel.
*/

:root {
  --cream: #F7F3EB;
  --cream-dark: #F0E9DF;
  --ink: #1F1C1A;
  --ink-light: #3F3832;
  --warm-gray: #6B6157;
  --accent: #8B5E3C;       /* Warm leather-brown / old gold */
  --accent-dark: #6B4730;
  --border: #D9D0C3;
}

/* Base typography polish */
body {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, .display-font {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Elegant section dividers */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* Nav */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--accent);
}
.nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent);
  transition: width 0.25s ease;
}
.nav-link:hover:after {
  width: 100%;
}

/* Hero overlay text */
.hero-content {
  text-shadow: 0 2px 4px rgba(31, 28, 26, 0.35);
}

/* Buttons */
.btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.01em;
}
.btn-primary {
  background-color: var(--accent);
  color: #F7F3EB;
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}
.btn-outline {
  background-color: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background-color: var(--cream-dark);
  border-color: var(--accent);
  color: var(--accent);
}

/* Card styles for essays / writing */
.essay-card {
  background-color: #FBF7F0;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.essay-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  border-color: var(--accent);
}
.essay-card .date {
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--warm-gray);
}

/* About prose */
.prose-literary p {
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 65ch;
}

/* Newsletter emphasis */
.newsletter-box {
  background-color: #FBF7F0;
  border: 1px solid var(--border);
}

/* Footer */
footer {
  font-size: 0.9rem;
  color: var(--warm-gray);
}

/* Mobile nav */
#mobile-menu {
  transition: max-height 0.3s ease-out, opacity 0.2s ease;
}
#mobile-menu.hidden {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Small utility */
.gold-accent {
  color: var(--accent);
}

/* Make sure images are crisp */
img {
  image-rendering: -webkit-optimize-contrast;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}