:root {
  --stone-deep: #17140F;
  --stone: #221E19;
  --stone-2: #2C2620;
  --stone-3: #3A3025;
  --stone-4: #4A3C2C;
  --stone-5: #5C4931;

  --parchment: #F1E4C8;
  --ember: #E8A33D;
  --ember-dim: #A9743A;
  --wine: #8A2332;
  --mineral: #9AA79C;
  --cork: #C9A87C;
  --bottle-glass: #302821;

  --display: 'Bodoni Moda', serif;
  --body: 'Jost', sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--stone-deep);
  color: var(--parchment);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0 0 18px; color: var(--parchment); }
h1 em { font-style: italic; color: var(--ember); }
p { color: rgba(241, 228, 200, 0.68); margin: 0 0 12px; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  color: var(--ember); margin: 0 0 14px; text-transform: uppercase;
}

/* ---------- iris intro ---------- */

.iris {
  position: fixed;
  top: 42%; left: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 9999px var(--stone-deep);
  z-index: 200;
  animation: irisGrow 1.5s cubic-bezier(0.65, 0, 0.2, 1) forwards;
  animation-delay: 0.2s;
  pointer-events: none;
}
@keyframes irisGrow {
  from { width: 10px; height: 10px; }
  to { width: 2800px; height: 2800px; }
}

.hero-copy, .pour-scene {
  opacity: 0;
  transform: scale(1.08);
  animation: sceneZoomIn 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-copy { animation-delay: 0.35s; }
.pour-scene { animation-delay: 0.5s; }
@keyframes sceneZoomIn { to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .iris { display: none; }
  .hero-copy, .pour-scene { animation: none; opacity: 1; transform: none; }
}

/* ---------- grain ---------- */

.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- custom cursor (dot only, subtle) ---------- */

.cursor-dot { display: none; }
@media (pointer: fine) {
  .cursor-dot {
    display: block; position: fixed; top: 0; left: 0; z-index: 999;
    width: 7px; height: 7px; border-radius: 50%; background: var(--ember);
    pointer-events: none; transform: translate(-50%, -50%);
    mix-blend-mode: difference;
  }
}

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
  background: rgba(23, 20, 15, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(241, 228, 200, 0.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 32px; height: 32px; border: 1px solid var(--ember); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-style: italic; font-size: 17px; color: var(--ember);
}
.logo-mark.small { width: 24px; height: 24px; font-size: 13px; }
.logo-text { font-family: var(--display); font-size: 20px; letter-spacing: 0.02em; }
.main-nav { display: flex; gap: 32px; }
.main-nav a { font-size: 13px; letter-spacing: 0.04em; color: rgba(241, 228, 200, 0.7); transition: color 0.15s ease; }
.main-nav a:hover { color: var(--ember); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--parchment); display: block; }

/* ---------- hero ---------- */

.hero { position: relative; padding: 90px 0 60px; overflow: hidden; min-height: 640px; display: flex; align-items: center; }

.arches { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; align-items: center;
  width: 100%;
}

.hero-copy h1 { font-size: clamp(36px, 4.6vw, 54px); line-height: 1.12; }
.hero-lede { max-width: 44ch; font-size: 16.5px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; padding: 14px 26px;
  border-radius: 2px; font-size: 13px; letter-spacing: 0.05em; font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn-primary { background: var(--ember); color: var(--stone-deep); }
.btn-primary:hover { background: #f4b256; transform: translateY(-1px); }
.btn-ghost { border: 1px solid rgba(241, 228, 200, 0.3); color: var(--parchment); }
.btn-ghost:hover { border-color: var(--ember); color: var(--ember); }

/* ---------- pour scene ---------- */

.pour-scene { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pour-svg { width: 100%; max-width: 340px; height: auto; display: block; }

.label-word { font-family: var(--display); font-style: italic; font-size: 20px; fill: var(--stone-deep); }
.label-sub { font-family: var(--mono); font-size: 7px; letter-spacing: 0.08em; fill: var(--ember-dim); }

.pour-stream { stroke-dasharray: 1; stroke-dashoffset: 1; }
.pour-scene.is-pouring .pour-stream {
  animation: drawStream 0.55s ease-out forwards;
}
@keyframes drawStream { to { stroke-dashoffset: 0; } }

.drop { opacity: 0; }
.pour-scene.is-pouring .drop-1 { animation: dropFall 0.5s ease-in 0.05s forwards; }
.pour-scene.is-pouring .drop-2 { animation: dropFall 0.5s ease-in 0.16s forwards; }
.pour-scene.is-pouring .drop-3 { animation: dropFall 0.5s ease-in 0.27s forwards; }
@keyframes dropFall {
  0% { opacity: 0; transform: translateY(-6px); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

#glassLiquid {
  transform-box: fill-box; transform-origin: bottom;
  transform: scaleY(0);
}
.pour-scene.is-pouring #glassLiquid,
.pour-scene.is-filled #glassLiquid {
  animation: fillGlass 0.9s cubic-bezier(0.3, 0.9, 0.4, 1) 0.4s forwards;
}
@keyframes fillGlass { to { transform: scaleY(1); } }

#glassWave { animation: wave 4.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2.5px); } }

.pour-replay {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid rgba(241, 228, 200, 0.25);
  color: var(--parchment); padding: 8px 16px; border-radius: 999px;
  font-family: var(--body); font-size: 12.5px; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.pour-replay:hover { border-color: var(--ember); color: var(--ember); background: rgba(232,163,61,0.08); }

@media (prefers-reduced-motion: reduce) {
  .pour-stream, .drop, #glassLiquid { animation: none !important; }
  .pour-scene.is-filled #glassLiquid, .pour-scene.is-pouring #glassLiquid { transform: scaleY(1); }
  #glassWave { animation: none; }
}

/* ---------- cellar board ---------- */

.board { padding: 64px 0; border-top: 1px solid rgba(241, 228, 200, 0.1); border-bottom: 1px solid rgba(241, 228, 200, 0.1); }
.board-head { margin-bottom: 24px; text-align: left; }
.board-head h2 { font-size: 30px; }

.menu-list { list-style: none; margin: 0; padding: 0; }

.menu-row {
  position: relative; display: grid;
  grid-template-columns: 16px 220px 1fr auto;
  align-items: center; gap: 20px; padding: 22px 24px; margin: 0 -24px;
  border-top: 1px solid rgba(241, 228, 200, 0.1);
  transition: background 0.2s ease;
}
.menu-row:last-child { border-bottom: 1px solid rgba(241, 228, 200, 0.1); }
.menu-row:hover { background: rgba(232, 163, 61, 0.05); }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.menu-name { font-family: var(--display); font-size: 22px; font-style: italic; }
.menu-note { color: rgba(241, 228, 200, 0.55); font-size: 14px; }
.menu-meta { font-family: var(--mono); font-size: 11px; color: var(--ember); white-space: nowrap; text-align: right; letter-spacing: 0.04em; }

.grape-peek {
  position: absolute; left: 260px; top: 50%; width: 22px; height: 22px;
  transform: translateY(-50%) translateX(-6px) scale(0.85); opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.menu-row:hover .grape-peek { opacity: 1; transform: translateY(-50%) translateX(0) scale(1); }

/* ---------- terroir niches ---------- */

.niches { padding: 76px 0; }
.niche-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 12px; }

.niche {
  background: var(--stone); border: 1px solid rgba(241, 228, 200, 0.08);
  border-radius: 4px; padding: 24px 22px 26px; text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.niche:hover { transform: translateY(-4px); border-color: rgba(232, 163, 61, 0.4); background: var(--stone-2); }

.niche-arch { width: 100px; height: auto; margin: 0 auto 16px; display: block; }
.niche-flame { transition: opacity 0.3s ease, transform 0.3s ease; opacity: 0.65; animation: flicker 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.niche:hover .niche-flame { opacity: 1; }
@keyframes flicker {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  30% { transform: scale(1.06); opacity: 0.8; }
  50% { transform: scale(0.95); opacity: 0.55; }
  75% { transform: scale(1.03); opacity: 0.75; }
}
@media (prefers-reduced-motion: reduce) { .niche-flame { animation: none; } }

.niche h3 { font-size: 21px; font-style: italic; margin-bottom: 10px; }
.niche p { font-size: 13.5px; margin: 0; }

/* ---------- signup ---------- */

.signup { padding: 70px 0 96px; border-top: 1px solid rgba(241, 228, 200, 0.1); }
.signup-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.signup h2 { font-size: 28px; }
.signup-lede { max-width: 42ch; }

.signup-form { display: flex; gap: 12px; background: var(--stone); padding: 8px; border-radius: 2px; border: 1px solid rgba(241, 228, 200, 0.12); }
.signup-form input { flex: 1; background: none; border: none; padding: 12px 16px; color: var(--parchment); font-family: var(--body); font-size: 14px; }
.signup-form input:focus { outline: 2px solid var(--ember); outline-offset: 2px; }
.signup-form input::placeholder { color: rgba(241, 228, 200, 0.4); }
.signup-form button { border: none; cursor: pointer; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid rgba(241, 228, 200, 0.1); padding: 32px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 13px; color: rgba(241, 228, 200, 0.5); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: rgba(241, 228, 200, 0.5); }
.footer-links a:hover { color: var(--ember); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  .hero-inner, .signup-inner { grid-template-columns: 1fr; }
  .pour-scene { order: -1; }
  .pour-svg { max-width: 260px; }

  .niche-row { grid-template-columns: 1fr; }

  .menu-row {
    grid-template-columns: 12px 1fr;
    grid-template-areas: "dot name" ".   note" ".   meta";
    row-gap: 6px; margin: 0; padding: 22px 0;
  }
  .dot { grid-area: dot; }
  .menu-name { grid-area: name; }
  .menu-note { grid-area: note; }
  .menu-meta { grid-area: meta; text-align: left; }
  .grape-peek { display: none; }

  .signup-form { flex-direction: column; }
}
