/* ==========================================================================
   Virginia Winery Rides — style.css
   Palette: sage / cream / charcoal with a deep merlot accent
   Type: Playfair Display (display) + Rubik (text)
   ========================================================================== */

:root {
  /* Primitive palette (OKLCH) */
  --cream:        oklch(0.965 0.012 95);
  --paper:        oklch(0.99 0.005 95);
  --sage:         oklch(0.77 0.032 125);
  --sage-soft:    oklch(0.92 0.02 125);
  --ink:          oklch(0.27 0.015 80);
  --ink-soft:     oklch(0.4 0.015 85);
  --merlot:       oklch(0.44 0.095 18);
  --merlot-deep:  oklch(0.36 0.08 18);
  --line:         oklch(0.27 0.015 80 / 0.16);

  /* Semantic */
  --bg: var(--paper);
  --text: var(--ink);
  --accent: var(--merlot);

  --font-display: "Playfair Display", Georgia, serif;
  --font-text: "Rubik", -apple-system, "Segoe UI", sans-serif;

  --container: 1180px;
  --radius-pill: 999px;
  --shadow-card: 0 24px 60px -24px oklch(0.27 0.015 80 / 0.25);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; color: var(--ink); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; max-width: 68ch; }
a { color: var(--accent); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--cream); padding: 0.6rem 1.2rem;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--merlot); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 3rem, var(--container)); margin-inline: auto; }
.container.narrow { max-width: 840px; }
.center { text-align: center; }
.center p { margin-inline: auto; }
.center-block { margin-inline: auto; text-align: center; }

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-cream { background: var(--cream); }
.section-white { background: var(--paper); }
.section-sage { background: var(--sage-soft); }
.section-dark { background: var(--ink); color: var(--cream); }
.section-dark h2, .section-dark h3 { color: var(--cream); }

.eyebrow {
  font-family: var(--font-text);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.9rem;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-family: var(--font-text); font-weight: 600; font-size: 0.92rem;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  padding: 1rem 2.1rem; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary { background: var(--merlot); color: var(--cream); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--merlot-deep); color: var(--cream); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { border-color: var(--merlot); color: var(--merlot); background: transparent; }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--merlot); color: var(--cream); transform: translateY(-2px); }
.btn-block { width: 100%; }

.link-underline {
  font-weight: 500; color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--merlot); padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.link-underline:hover, .link-underline:focus-visible { color: var(--merlot); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: oklch(0.965 0.012 95 / 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: 0 1px 0 var(--line), 0 12px 32px -20px oklch(0.27 0.015 80 / 0.35); }
.header-inner {
  width: min(100% - 3rem, 1280px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 0.8rem 0;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-logo { height: 44px; width: auto; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 2rem; }
.nav-list { display: flex; gap: 1.8rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-list a:hover, .nav-list a:focus-visible { color: var(--merlot); border-bottom-color: var(--merlot); }
.nav-cta { padding: 0.7rem 1.5rem; font-size: 0.82rem; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 6px;
  width: 48px; height: 48px; padding: 10px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%; background: var(--ink);
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, oklch(0.965 0.012 95 / 0.55) 0%, oklch(0.965 0.012 95 / 0.25) 40%, oklch(0.965 0.012 95 / 0.85) 100%),
    url("../img/hero-vineyard.jpg") center / cover no-repeat;
}
.hero-content { position: relative; padding: 7rem 1.5rem 5rem; max-width: 900px; }
.hero-eyebrow {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--merlot); margin: 0 auto 1.2rem;
}
.hero-title {
  font-size: clamp(3rem, 8vw, 6rem); font-weight: 700; line-height: 1.02;
  letter-spacing: -0.01em; margin-bottom: 1.2rem;
}
.hero-sub {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem); color: var(--ink); margin: 0 auto 2.2rem;
}
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  color: var(--ink); opacity: 0.75; animation: bob 2.4s ease-in-out infinite;
}
.hero-scroll:hover { opacity: 1; color: var(--merlot); }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Stats ---------- */
.stats { background: var(--sage); padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.stats-inner {
  width: min(100% - 3rem, var(--container)); margin-inline: auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; text-align: center;
}
.stat-num {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label { display: block; margin-top: 0.6rem; font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); max-width: 26ch; margin-inline: auto; }

/* ---------- Intro ---------- */
.intro .lead { margin-bottom: 1.1rem; }
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  margin-top: 3.5rem; text-align: center;
}
.feature-icon { width: 56px; height: 56px; color: var(--merlot); margin: 0 auto 1rem; }
.feature h3 { margin-bottom: 0.35rem; }
.feature p { color: var(--ink-soft); margin: 0 auto; }

/* ---------- Vine divider ---------- */
.vine-divider { background: var(--cream); color: var(--sage); line-height: 0; padding-bottom: 1rem; }
.vine-divider svg { width: min(600px, 80%); height: 60px; margin-inline: auto; display: block; }
.vine-path { stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 2s ease; }
.vine-divider.animate .vine-path { stroke-dashoffset: 0; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; margin: 3rem 0 4rem; }
.step { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.step-num {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 0.95rem; letter-spacing: 0.2em; color: var(--merlot); margin-bottom: 0.8rem;
}
.step p { color: var(--ink-soft); margin: 0; }

/* ---------- Image reveal ---------- */
.img-reveal img {
  width: 100%; object-fit: cover;
  clip-path: inset(0 50%);
  transition: clip-path 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.img-reveal.revealed img { clip-path: inset(0 0); }
.img-reveal.wide img { aspect-ratio: 21 / 9; }

/* ---------- Winery list ---------- */
.winery-list {
  list-style: none; margin: 3rem auto 1.5rem; padding: 0;
  columns: 3; column-gap: 3.5rem; max-width: 980px;
}
.winery-list li {
  break-inside: avoid; padding: 0.55rem 0 0.55rem 1.4rem; position: relative;
  font-weight: 500; font-size: 1.02rem; border-bottom: 1px solid var(--line);
}
.winery-list li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem;
  width: 7px; height: 7px; border-radius: 50%; background: var(--merlot);
}
.winery-note { text-align: center; color: var(--ink-soft); font-style: italic; margin-inline: auto; }

/* ---------- Booking ---------- */
.booking-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 4.5rem; align-items: start; }
.booking-points { list-style: none; margin: 1.2rem 0 2.2rem; padding: 0; }
.booking-points li { position: relative; padding-left: 1.6rem; margin-bottom: 0.7rem; font-weight: 500; }
.booking-points li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--merlot);
}
.booking-copy .img-reveal img { aspect-ratio: 16 / 9; }

.booking-form {
  background: var(--paper); border: 1px solid var(--line);
  padding: clamp(1.8rem, 4vw, 3rem); box-shadow: var(--shadow-card);
}
.form-title { font-size: 1.35rem; margin-bottom: 1.8rem; }
.field { margin-bottom: 1.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.35rem; }
.field label span { color: var(--merlot); }
.field label .optional { color: var(--ink-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--line);
  border-radius: 0; padding: 0.55rem 0.1rem; outline: none;
  transition: border-color 0.25s ease;
  appearance: none; -webkit-appearance: none;
}
.field textarea { border: 1.5px solid var(--line); padding: 0.7rem 0.8rem; resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--merlot); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23722F37' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.2rem center; background-size: 18px;
  padding-right: 1.8rem; cursor: pointer;
}
.field.invalid input, .field.invalid select { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: 0.85rem; margin: 0.35rem 0 0; }

.btn-spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid oklch(0.965 0.012 95 / 0.4); border-top-color: var(--cream);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.booking-form.loading .btn-spinner { display: inline-block; }
.booking-form.loading .btn-label { opacity: 0.8; }
.booking-form.loading button[type="submit"] { pointer-events: none; }

.form-status { margin-top: 1.2rem; font-weight: 500; }
.form-status.success { color: oklch(0.45 0.1 150); }
.form-status.error { color: #b3261e; }
.form-fineprint { font-size: 0.85rem; color: var(--ink-soft); margin: 1rem 0 0; }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: center; }
.split-media { display: grid; gap: 1.6rem; }
.split-media img { width: 100%; }
.split-media.single img { aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Testimonial ---------- */
.testimonial { padding: clamp(5rem, 10vw, 8rem) 0; }
.quote-mark { width: 46px; height: 36px; color: var(--merlot); margin: 0 auto 1.6rem; opacity: 0.9; }
.testimonial blockquote { margin: 0; }
.testimonial blockquote p {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1.5; color: var(--cream);
  margin: 0 auto 1.4rem; max-width: 30ch;
}
.testimonial blockquote footer { font-family: var(--font-text); font-style: normal; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.9rem; color: var(--sage); }

/* ---------- FAQ accordion ---------- */
.accordion { margin-top: 2.5rem; }
.acc-item { border-top: 1px solid var(--line); }
.acc-item:last-child { border-bottom: 1px solid var(--line); }
.acc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.3rem 0.2rem; background: none; border: 0; cursor: pointer;
  font-family: var(--font-text); font-size: 1.08rem; font-weight: 600; color: var(--ink); text-align: left;
  transition: color 0.2s ease;
}
.acc-head:hover, .acc-head:focus-visible { color: var(--merlot); }
.acc-head svg { flex: 0 0 auto; transition: transform 0.3s ease; color: var(--merlot); }
.acc-head[aria-expanded="true"] svg { transform: rotate(45deg); }
.acc-body {
  max-height: 0; overflow: hidden; transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.acc-body p { padding: 0 0.2rem 1.4rem; margin: 0; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--cream); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 3.5rem;
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 3rem;
}
.footer-logo { height: 64px; width: auto; margin-bottom: 1.2rem; background: var(--cream); border-radius: 8px; padding: 6px 10px; }
.footer-tag { color: oklch(0.965 0.012 95 / 0.75); font-size: 0.95rem; }
.footer-myr { font-size: 0.95rem; color: oklch(0.965 0.012 95 / 0.75); }
.footer-myr a { color: var(--sage); }
.footer-col h4 { color: var(--cream); font-family: var(--font-text); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.8rem; }
.footer-col a { color: oklch(0.965 0.012 95 / 0.8); text-decoration: none; transition: color 0.2s ease; }
.footer-col a:hover, .footer-col a:focus-visible { color: var(--sage); }
.social-list a { display: inline-flex; align-items: center; gap: 0.6rem; }
.footer-bottom {
  border-top: 1px solid oklch(0.965 0.012 95 / 0.15);
  padding: 1.6rem 0; text-align: center;
}
.copyright { margin: 0; font-size: 0.9rem; color: oklch(0.965 0.012 95 / 0.65); max-width: none; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .booking-grid, .split { grid-template-columns: 1fr; gap: 3rem; }
  .split-media { max-width: 640px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .winery-list { columns: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  /* backdrop-filter would turn the header into a containing block for the
     fixed nav overlay — use a solid background on mobile instead */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--cream); }
  .brand, .nav-toggle { position: relative; z-index: 101; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 0; left: 0; width: 100%; height: 100dvh; z-index: -1;
    flex-direction: column; justify-content: center; gap: 2.5rem;
    background: var(--cream);
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  }
  .main-nav.open { opacity: 1; pointer-events: auto; z-index: 99; }
  .nav-list { flex-direction: column; align-items: center; gap: 1.6rem; }
  .nav-list a { font-size: 1.25rem; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .feature-row { grid-template-columns: 1fr; gap: 2.5rem; }
  .field-row { grid-template-columns: 1fr; }
  .winery-list { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-actions { flex-direction: column; gap: 1.4rem; }
  .brand-name { font-size: 1rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .img-reveal img { clip-path: none; }
  .vine-path { stroke-dashoffset: 0; }
  .hero-scroll { animation: none; }
}
