/* ═══════════════════════════════════════════════
   CAOJ — California Orange Juice
   Soft Nectar Design System
   ═══════════════════════════════════════════════ */

/* ─── Self-hosted DM Serif Display ─── */
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/assets/fonts/dm-serif-display-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/assets/fonts/dm-serif-display-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url('/assets/fonts/dm-serif-display-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url('/assets/fonts/dm-serif-display-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #F6F4F1;
  --surface: rgba(255, 255, 255, 0.55);
  --surface-solid: #FFFFFF;
  --surface-hover: rgba(255, 255, 255, 0.75);
  --border: rgba(0, 0, 0, 0.06);
  --border-focus: rgba(0, 0, 0, 0.1);
  --orange-soft: #E8985A;
  --orange-muted: #D4885A;
  --peach: #F0C8A0;
  --peach-light: #F5DCC4;
  --blush: #F2D8C8;
  --cream: #FAF5EF;
  --warm-gray: #EDE9E4;
  --sky: #C8D8E4;
  --sky-light: #DFE8EF;
  --text: #2C2926;
  --text-secondary: #6B635A;
  --text-tertiary: #9E958C;
  --text-quaternary: #C4BBB2;
  --radius: 10px;
  --radius-lg: 14px;
  --transition: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Top Bar ─── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 52px;
  background: rgba(246, 244, 241, 0.82);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.topbar-logo-mark {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--orange-soft);
  letter-spacing: 0.12em;
}

.topbar-logo-sub {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
}


.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.topbar-link {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.topbar-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.topbar-link.active {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  font-weight: 500;
}

/* ─── Nav Groups / Dropdowns ─── */
.nav-group {
  position: relative;
}

.nav-group-trigger {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  background: none;
  font-family: inherit;
}

.nav-group-trigger:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.nav-group-trigger.has-active {
  color: var(--text);
  font-weight: 500;
}

.nav-group-trigger .chevron {
  width: 10px;
  height: 6px;
  opacity: 0.55;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.nav-group.open .chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.nav-group.open .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-dropdown a:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.nav-dropdown a.active {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  font-weight: 500;
}

/* ─── Main Stage ─── */
.stage {
  max-width: 756px;
  margin: 0 auto;
  padding: 76px 2rem 4rem;
}

/* ─── Page Animation ─── */
.page > * {
  opacity: 0;
  transform: translateY(14px);
  animation: staggerIn 0.55s var(--transition) both;
}

.page > *:nth-child(1)  { animation-delay: 0.04s; }
.page > *:nth-child(2)  { animation-delay: 0.09s; }
.page > *:nth-child(3)  { animation-delay: 0.14s; }
.page > *:nth-child(4)  { animation-delay: 0.19s; }
.page > *:nth-child(5)  { animation-delay: 0.24s; }
.page > *:nth-child(6)  { animation-delay: 0.29s; }
.page > *:nth-child(7)  { animation-delay: 0.34s; }
.page > *:nth-child(8)  { animation-delay: 0.39s; }
.page > *:nth-child(9)  { animation-delay: 0.44s; }
.page > *:nth-child(10) { animation-delay: 0.49s; }
.page > *:nth-child(11) { animation-delay: 0.54s; }
.page > *:nth-child(12) { animation-delay: 0.59s; }

@keyframes staggerIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Typography ─── */
.section-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-quaternary);
  margin-bottom: 1rem;
  text-align: center;
}

.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 300;
  line-height: 1.12;
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
  color: var(--text);
  white-space: nowrap;
  text-align: center;
}

.page-title em {
  font-style: italic;
  color: var(--orange-soft);
}

.divider {
  width: 32px;
  height: 1.5px;
  background: var(--orange-soft);
  border-radius: 1px;
  margin: 0 auto 1.75rem;
  animation: divGrow 0.6s var(--transition) 0.2s both;
}

@keyframes divGrow {
  from { width: 0; opacity: 0; }
  to   { width: 32px; opacity: 1; }
}

.page-body {
  font-size: 0.94rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 546px;
  font-weight: 300;
  margin: 0 auto 2rem;
  text-align: justify;
  text-wrap: pretty;
}

.page-body strong {
  font-weight: 500;
  color: var(--text);
}

/* ─── Card — frosted glass ─── */
.card {
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  background: var(--surface-hover);
  border-color: var(--border-focus);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* ─── Illustration — watercolor ─── */
.illus-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.illus {
  width: 100%;
  aspect-ratio: 2 / 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    168deg,
    var(--sky-light) 0%,
    var(--sky) 25%,
    var(--blush) 50%,
    var(--peach-light) 70%,
    var(--cream) 100%
  );
}

.illus .wc {
  position: absolute;
  border-radius: 50%;
  filter: blur(35px);
  animation: wcDrift 18s ease-in-out infinite alternate;
}

.wc-1 { width: 40%; height: 55%; background: rgba(232,152,90,0.1); top: 10%; left: 15%; }
.wc-2 { width: 30%; height: 40%; background: rgba(200,216,228,0.2); top: 20%; right: 15%; animation-delay: -4s; }
.wc-3 { width: 35%; height: 45%; background: rgba(245,220,196,0.25); bottom: 5%; left: 30%; animation-delay: -8s; }
.wc-4 { width: 20%; height: 25%; background: rgba(240,200,160,0.15); top: 30%; left: 50%; animation-delay: -2s; filter: blur(25px); }

.wc-glass { width: 28px; height: 48px; background: rgba(240,200,160,0.4); bottom: 20%; right: 28%; border-radius: 30% 30% 6% 6%; filter: blur(10px); animation-delay: -1s; }
.wc-fizz { width: 4px; height: 4px; background: rgba(255,255,255,0.6); border-radius: 50%; filter: blur(1px); }
.fizz-1 { position: absolute; bottom: 34%; right: 29%; animation: fizz 2.8s ease-in-out infinite; }
.fizz-2 { position: absolute; bottom: 38%; right: 27.5%; animation: fizz 2.8s ease-in-out infinite 0.5s; }
.fizz-3 { position: absolute; bottom: 42%; right: 28.8%; animation: fizz 2.8s ease-in-out infinite 1.1s; }

@keyframes wcDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(8px, -5px) scale(1.02); }
  100% { transform: translate(-4px, 3px) scale(0.99); }
}

@keyframes fizz {
  0%, 100% { transform: translateY(0); opacity: 0.2; }
  50%      { transform: translateY(-10px); opacity: 0.8; }
}

.illus-img {
  width: 100%;
  height: 500px;
  display: block;
  object-fit: cover;
  object-position: center 0%;
  will-change: object-position;
}

/* ─── Illustration Variant: Grove ─── */
.illus--grove {
  background: linear-gradient(168deg, #EDE9E4 0%, #F0E4D4 30%, #F5DCC4 60%, #FAF5EF 100%);
}

/* ─── Stats Row ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.stat {
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--border);
  transition: background 0.3s;
  cursor: default;
  text-align: center;
}

.stat:last-child { border-right: none; }
.stat:hover { background: rgba(232, 152, 90, 0.04); }

.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--orange-soft);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* ─── Quote Card ─── */
.quote-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.quote-text {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.55;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 0.85rem;
}

.quote-attr {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-quaternary);
  text-align: center;
  font-family: inherit;
  font-weight: 400;
  font-style: normal;
}

/* ─── Varietal / Feature Card ─── */
.varietal-card {
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.varietal-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-focus);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.varietal-card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--orange-soft);
  margin-bottom: 0.5rem;
  text-align: center;
}

.varietal-card-body {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.55;
  text-align: justify;
  text-wrap: pretty;
}

/* ─── Curiosity Link ─── */
.curiosity-link {
  display: block;
  text-decoration: none;
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin-top: 2.5rem;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
  text-align: center;
}

.curiosity-link:hover {
  background: var(--surface-hover);
  border-color: var(--border-focus);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.curiosity-link-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-quaternary);
  margin-bottom: 0.75rem;
}

.curiosity-link-question {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
  color: var(--orange-soft);
}

/* ─── Reference Links ─── */
a.ref {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--text-tertiary);
  transition: border-color 0.15s, color 0.15s;
}

a.ref:hover {
  color: var(--orange-muted);
  border-bottom: 1px solid var(--orange-soft);
}

a.ref::after {
  content: ' ↗';
  font-size: 0.72em;
  opacity: 0.45;
  font-style: normal;
}

/* ─── Footer ─── */
.site-footer {
  max-width: 756px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  text-align: center;
}

.site-footer p {
  font-size: 0.65rem;
  color: var(--text-quaternary);
  letter-spacing: 0.06em;
}

.site-footer a {
  color: var(--text-quaternary);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-quaternary);
  transition: color 0.15s, border-color 0.15s;
}

.site-footer a:hover {
  color: var(--text-tertiary);
  border-color: var(--text-tertiary);
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .topbar { padding: 0 1rem; }
  .topbar-nav { gap: 0; }
  .topbar-link,
  .nav-group-trigger { font-size: 0.72rem; padding: 0.35rem 0.5rem; }
  .topbar-logo-sub { display: none; }
  .stats-row { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .stage { padding: 68px 1rem 3rem; }
  .nav-dropdown { left: 0; transform: translateX(0); }
  .nav-group.open .nav-dropdown { transform: translateX(0) translateY(0); }
  .page-title { white-space: normal; }
}
