/* ========================================
   Karen Cox — Author Website
   Cinematic, literary, warm, mysterious
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --charcoal: #2a2a2a;
  --ink: #1a1a1a;
  --ivory: #f5f0e8;
  --ivory-light: #faf7f2;
  --burnt-orange: #c4622d;
  --burnt-orange-hover: #d4722e;
  --burgundy: #7a2e3a;
  --gold: #b8955a;
  --gold-muted: #c4a46d;
  --teal: #4a7a7a;
  --teal-muted: #5a8a88;
  --text-dark: #2a2a2a;
  --text-medium: #5a5a5a;
  --text-light: #8a8a8a;
  --white: #ffffff;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  color: var(--text-dark);
  background-color: var(--ivory-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.3;
}

.section-heading {
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
  position: relative;
  letter-spacing: -0.01em;
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin-top: 0.75rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 3px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  letter-spacing: 0.02em;
}

.btn-primary {
  background-color: var(--burnt-orange);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--burnt-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196, 98, 45, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--ink);
  border: 1.5px solid var(--charcoal);
}

.btn-secondary:hover {
  background-color: var(--charcoal);
  color: var(--white);
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* --- Navigation --- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: all 0.4s ease;
  padding: 1.25rem 0;
}

#navbar.scrolled {
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  transition: color var(--transition);
  letter-spacing: 0.01em;
}

#navbar.scrolled .nav-logo {
  color: var(--ink);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--gold-muted);
}

#navbar.scrolled .nav-links a {
  color: var(--text-medium);
}

#navbar.scrolled .nav-links a:hover {
  color: var(--burnt-orange);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  position: relative;
  transition: background var(--transition);
}

#navbar.scrolled .hamburger,
#navbar.scrolled .hamburger::before,
#navbar.scrolled .hamburger::after {
  background: var(--ink);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--ink) 0%, #2d2520 50%, #3a2820 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(196, 98, 45, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-headline {
  font-size: 2.6rem;
  color: var(--ivory);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-copy {
  font-size: 1.05rem;
  color: rgba(245, 240, 232, 0.75);
  line-height: 1.8;
  margin-bottom: 2.25rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-buttons .btn-secondary {
  color: var(--ivory);
  border-color: rgba(245, 240, 232, 0.3);
}

.hero-buttons .btn-secondary:hover {
  background-color: var(--ivory);
  color: var(--ink);
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.hero-image::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 80px;
  height: 80px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  border-radius: 0 0 4px 0;
  opacity: 0.4;
}

/* --- Intro Section --- */
.intro {
  padding: 4.5rem 0;
  background-color: var(--ivory-light);
  text-align: center;
}

.intro .section-heading::after {
  margin: 0.75rem auto 0;
}

.intro-copy {
  font-size: 1.1rem;
  color: var(--text-dark);
  max-width: 680px;
  margin: 0 auto 1rem;
  line-height: 1.85;
}

/* --- Stories Section --- */
.stories {
  padding: 7rem 0;
  background-color: var(--white);
}

.stories .section-intro {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 3rem;
  max-width: none;
}

.story-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.story-card {
  background: linear-gradient(145deg, #faf5ec 0%, #f5ede0 100%);
  border-radius: 4px;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(184, 149, 90, 0.18);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.story-card::before,
.story-card::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.story-card::before {
  top: 12px;
  left: 12px;
  border-top: 1.5px solid var(--gold);
  border-left: 1.5px solid var(--gold);
}

.story-card::after {
  bottom: 12px;
  right: 12px;
  border-bottom: 1.5px solid var(--gold);
  border-right: 1.5px solid var(--gold);
}

.story-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--burnt-orange), var(--gold));
  opacity: 0;
  transition: opacity var(--transition);
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--gold);
}

.story-card:hover::before,
.story-card:hover::after {
  opacity: 0.5;
}

.story-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--burnt-orange);
  background: rgba(196, 98, 45, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  margin-bottom: 1.25rem;
}

.story-title {
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.story-subtitle {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--burgundy);
  margin-bottom: 1rem;
}

.story-description {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.75;
}

/* --- Recognition Section --- */
.recognition {
  padding: 7rem 0;
  background: linear-gradient(135deg, var(--ink) 0%, #2d2520 100%);
  color: var(--ivory);
}

.recognition .section-heading {
  color: var(--ivory);
}

.recognition .section-heading::after {
  background: var(--gold-muted);
}

.recognition-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}

.recognition-text p {
  font-size: 1.05rem;
  color: rgba(245, 240, 232, 0.85);
  line-height: 1.85;
  margin-bottom: 1rem;
}

.recognition-text em {
  color: var(--gold-muted);
  font-style: italic;
}

.recognition-date {
  font-size: 0.88rem;
  color: rgba(196, 164, 109, 0.7);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.03em;
  margin-top: 0.5rem;
}

.recognition-image img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  opacity: 0.92;
  border: 1px solid rgba(184, 149, 90, 0.2);
}

/* --- About Section --- */
.about {
  padding: 7rem 0;
  background-color: var(--ivory-light);
}

.about-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

.about-image img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* --- Story Worlds Section --- */
.worlds {
  padding: 7rem 0;
  background-color: var(--white);
  text-align: center;
}

.worlds .section-heading::after {
  margin: 0.75rem auto 0;
}

.worlds-copy {
  font-size: 1.1rem;
  color: var(--text-dark);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.85;
}

.worlds-copy em {
  color: var(--burgundy);
  font-family: var(--serif);
  font-style: italic;
}

/* --- Contact Section --- */
.contact {
  padding: 7rem 0;
  background: linear-gradient(135deg, #f5f0e8 0%, #ede6d8 100%);
}

.contact-copy {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.contact-form-wrapper {
  max-width: 520px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
  border: 1px solid rgba(42, 42, 42, 0.15);
  border-radius: 3px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--burnt-orange);
  box-shadow: 0 0 0 3px rgba(196, 98, 45, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

/* --- Footer --- */
.footer {
  padding: 2.5rem 0;
  background-color: var(--ink);
  text-align: center;
}

.footer-text {
  font-size: 0.82rem;
  color: rgba(245, 240, 232, 0.4);
  letter-spacing: 0.03em;
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
    padding: 7rem 2rem 3rem;
  }

  .hero-headline {
    font-size: 2rem;
  }

  .hero-copy {
    margin: 0 auto 2rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    max-width: 400px;
    margin: 0 auto;
  }

  .story-cards {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .recognition-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .recognition-image {
    max-width: 400px;
    margin: 0 auto;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-image {
    max-width: 400px;
    margin: 0 auto;
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(42, 42, 42, 0.06);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    color: var(--text-dark);
    font-size: 0.9rem;
  }

  .nav-toggle {
    display: block;
  }

  .section-heading {
    font-size: 1.65rem;
  }

  .hero-headline {
    font-size: 1.75rem;
  }

  .intro,
  .stories,
  .recognition,
  .about,
  .worlds,
  .contact {
    padding: 5rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero-content {
    padding: 6rem 1.25rem 2.5rem;
  }

  .hero-headline {
    font-size: 1.5rem;
  }

  .hero-copy {
    font-size: 0.95rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }
}
