/* =========================================================
   Coalescence — Shared Design System
   ========================================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Lato:wght@300;400;700&display=swap');

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Lato', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: #2C1810;
  background: #FAF7F2;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* --- Design Tokens --- */
:root {
  /* Primary */
  --terracotta:        #B85C38;
  --terracotta-hover:  #9E4E30;
  --terracotta-light:  #EDD9D0;
  --terracotta-lighter:#F7EFEC;

  /* Warm neutrals */
  --warm-50:  #FAF7F2;
  --warm-100: #F5EFE6;
  --warm-200: #EDE3D8;

  /* Neutral scale */
  --neutral-300: #C9AFA6;
  --neutral-500: #8C6B5E;
  --neutral-700: #5E3D2F;
  --neutral-900: #2C1810;

  /* Wine (admin / dark sections) */
  --wine:       #7C2D36;
  --wine-dark:  #2C1810;

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Lato', sans-serif;

  /* Radius */
  --radius-sm:   4px;
  --radius-base: 8px;
  --radius-lg:   12px;
  --radius-xl:   16px;

  /* Shadows */
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.05);
  --shadow-base: 0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg:   0 10px 15px -3px rgba(0,0,0,0.10), 0 4px 6px -2px rgba(0,0,0,0.05);

  /* Layout */
  --max-w: 1120px;
  --gutter: clamp(20px, 5vw, 80px);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--neutral-900);
}

.display    { font-size: clamp(40px, 6vw, 72px); font-weight: 700; letter-spacing: -1.5px; line-height: 1.08; }
.title-1    { font-size: clamp(28px, 4vw, 48px); font-weight: 700; letter-spacing: -0.8px; }
.title-2    { font-size: clamp(22px, 3vw, 36px); font-weight: 600; letter-spacing: -0.5px; }
.title-3    { font-size: clamp(18px, 2.5vw, 24px); font-weight: 600; letter-spacing: -0.3px; }
.eyebrow    { font-family: var(--font-sans); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--terracotta); }
.lead       { font-size: clamp(17px, 2vw, 20px); line-height: 1.65; color: var(--neutral-700); }
.body-sm    { font-size: 15px; line-height: 1.55; }
.caption    { font-size: 13px; color: var(--neutral-500); letter-spacing: 0.01em; }

/* --- Layout Helpers --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(64px, 10vw, 120px) 0;
}

.section--sm {
  padding: clamp(40px, 6vw, 72px) 0;
}

/* --- Nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--warm-200);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--neutral-700);
  transition: color 150ms ease-out;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--terracotta);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__sign-in-wrapper {
  position: relative;
}

.nav__sign-in-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-700);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-base);
  transition: background 150ms ease-out, color 150ms ease-out;
  background: none;
  border: none;
}

.nav__sign-in-btn:hover {
  background: var(--warm-100);
  color: var(--neutral-900);
}

.nav__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--warm-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  overflow: hidden;
  z-index: 200;
}

.nav__sign-in-wrapper:hover .nav__dropdown,
.nav__sign-in-wrapper:focus-within .nav__dropdown {
  display: block;
}

.nav__dropdown a {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  border-bottom: 1px solid var(--warm-200);
  transition: background 150ms ease-out;
}

.nav__dropdown a:last-child { border-bottom: none; }

.nav__dropdown a:hover { background: var(--warm-50); }

.nav__dropdown-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--neutral-900);
}

.nav__dropdown-sub {
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 2px;
}

/* Chevron icon */
.nav__sign-in-btn svg { transition: transform 150ms ease-out; }
.nav__sign-in-wrapper:hover .nav__sign-in-btn svg { transform: rotate(180deg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--radius-base);
  padding: 14px 24px;
  min-height: 48px;
  cursor: pointer;
  border: none;
  transition: background 150ms ease-out, color 150ms ease-out, transform 50ms ease-out, box-shadow 150ms ease-out;
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--terracotta);
  color: #fff;
}
.btn--primary:hover {
  background: var(--terracotta-hover);
  box-shadow: 0 4px 12px rgba(184, 92, 56, 0.3);
}

.btn--secondary {
  background: transparent;
  color: var(--neutral-900);
  border: 1.5px solid var(--warm-200);
}
.btn--secondary:hover {
  background: var(--warm-100);
  border-color: var(--neutral-300);
}

.btn--ghost {
  background: transparent;
  color: var(--terracotta);
  padding-left: 0;
  padding-right: 0;
}
.btn--ghost:hover { color: var(--terracotta-hover); }

.btn--sm { font-size: 13px; padding: 10px 18px; min-height: 40px; }
.btn--lg { font-size: 17px; padding: 18px 32px; min-height: 56px; }

/* Arrow decoration on ghost/link buttons */
.btn--arrow::after {
  content: '→';
  margin-left: 4px;
  transition: margin-left 150ms ease-out;
}
.btn--arrow:hover::after { margin-left: 8px; }

/* --- Cards --- */
.card {
  background: var(--warm-100);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card--white {
  background: #fff;
}

.card--bordered {
  background: transparent;
  border: 1.5px solid var(--warm-200);
}

/* --- Divider --- */
.divider {
  height: 1px;
  background: var(--warm-200);
  margin: 0;
}

/* --- Badge / Tag --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 9999px;
  background: var(--terracotta-lighter);
  color: var(--terracotta);
}

/* --- Stat Block --- */
.stat-block { text-align: center; }
.stat-block__number {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  color: var(--terracotta);
  line-height: 1;
  letter-spacing: -1px;
}
.stat-block__label {
  font-size: 14px;
  color: var(--neutral-500);
  margin-top: 6px;
  line-height: 1.4;
}

/* --- Step / How it works --- */
.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--terracotta-lighter);
  color: var(--terracotta);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --- Blockquote / Pull quote --- */
.pull-quote {
  font-family: var(--font-serif);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  color: var(--neutral-900);
  border-left: 3px solid var(--terracotta);
  padding-left: 24px;
}

/* --- Dark section (wine/terracotta bg) --- */
.section--dark {
  background: var(--wine-dark);
  color: #FAF7F2;
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark .display,
.section--dark .title-1,
.section--dark .title-2 {
  color: #FAF7F2;
}
.section--dark .lead,
.section--dark p {
  color: rgba(250,247,242,0.75);
}
.section--dark .eyebrow { color: #DA7450; }

.section--wine {
  background: var(--wine);
  color: #FAF7F2;
}
.section--wine h1,
.section--wine h2,
.section--wine .display,
.section--wine .title-1,
.section--wine .title-2 { color: #FAF7F2; }
.section--wine .lead,
.section--wine p { color: rgba(250,247,242,0.80); }
.section--wine .eyebrow { color: #DA7450; }

.section--warm {
  background: var(--warm-100);
}

/* --- Grid helpers --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* --- Testimonial --- */
.testimonial {
  background: var(--warm-100);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius-xl);
  padding: 32px;
}
.testimonial__text {
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  line-height: 1.55;
  color: var(--neutral-900);
  margin-bottom: 20px;
}
.testimonial__source {
  font-size: 13px;
  font-weight: 700;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Accordion / FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--warm-200);
  padding: 20px 0;
}
.faq-item:first-child { border-top: 1px solid var(--warm-200); }
.faq-question {
  font-weight: 700;
  font-size: 16px;
  color: var(--neutral-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  list-style: none;
}
.faq-question::marker { display: none; }
.faq-question::-webkit-details-marker { display: none; }
.faq-toggle {
  font-size: 20px;
  color: var(--terracotta);
  flex-shrink: 0;
  line-height: 1;
  transition: transform 200ms ease-out;
}
details[open] .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  padding-top: 12px;
  font-size: 15px;
  color: var(--neutral-700);
  line-height: 1.65;
}

/* --- Footer --- */
.footer {
  background: var(--wine-dark);
  color: rgba(250,247,242,0.6);
  padding: 56px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 32px;
}
.footer__brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: #FAF7F2;
  margin-top: 14px;
  margin-bottom: 10px;
}
.footer__tagline { font-size: 14px; line-height: 1.55; }
.footer__col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250,247,242,0.4);
  margin-bottom: 16px;
}
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__links a {
  font-size: 14px;
  color: rgba(250,247,242,0.65);
  transition: color 150ms ease-out;
}
.footer__links a:hover { color: #FAF7F2; }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__legal { font-size: 13px; }

/* --- Two-column content grid --- */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* --- Mobile nav toggle --- */
.nav__mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--neutral-700);
}

.nav__mobile-menu {
  display: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__mobile-toggle { display: flex; }
  .nav__actions .btn { display: none; }

  .nav__mobile-menu {
    border-top: 1px solid var(--warm-200);
    padding: 16px var(--gutter) 24px;
    background: var(--warm-50);
  }
  .nav__mobile-menu.is-open { display: block; }
  .nav__mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
  .nav__mobile-menu a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--neutral-700);
    border-bottom: 1px solid var(--warm-200);
  }
  .nav__mobile-menu .mobile-ctas { display: flex; flex-direction: column; gap: 10px; }
  .nav__mobile-menu .btn { width: 100%; justify-content: center; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .two-col-grid { grid-template-columns: 1fr; gap: 40px; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-terracotta { color: var(--terracotta); }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-2  { margin-bottom: 8px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.mb-8  { margin-bottom: 32px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.max-w-prose { max-width: 640px; }
.max-w-sm { max-width: 480px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.opacity-60 { opacity: 0.6; }
