/* ===========================================================
   Basalt Coffee Roasters, cinematic dark rebuild
   Espresso black + amber, Bodoni Moda over Manrope.
   Image-led, heavy scroll choreography.
   =========================================================== */

:root {
  --espresso: #0F0B08;
  --bean: #191510;
  --bean-2: #241B14;
  --crema: #EFE6D6;
  --crema-dim: rgba(239, 230, 214, 0.60);
  --crema-faint: rgba(239, 230, 214, 0.34);
  --amber: #C87A3E;
  --amber-bright: #E2965A;
  --line: rgba(239, 230, 214, 0.14);
  --line-soft: rgba(239, 230, 214, 0.07);

  --display: "Bodoni Moda", Georgia, serif;
  --body: "Manrope", "Helvetica Neue", sans-serif;

  --container: 1280px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, figure, figcaption, fieldset, legend { margin: 0; }
fieldset { border: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--espresso);
  color: var(--crema);
  font-family: var(--body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--amber); color: var(--espresso); padding: 0.6rem 1rem; }
.skip:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 26px; }
@media (min-width: 760px) { .wrap { padding-inline: 52px; } }

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.02; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 2rem;
  font-family: var(--body); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: 999px;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-amber { background: var(--amber); color: var(--espresso); }
.btn-amber:hover { background: var(--amber-bright); }
.btn-line { border-color: var(--line); color: var(--crema); }
.btn-line:hover { border-color: var(--crema); background: rgba(239, 230, 214, 0.06); }
.btn-sm { min-height: 44px; padding: 0 1.3rem; font-size: 0.7rem; }
.btn-full { width: 100%; margin-top: 0.4rem; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; border-bottom: 1px solid transparent; transition: background 0.4s var(--ease), border-color 0.4s var(--ease); }
.nav.is-scrolled { background: rgba(15, 11, 8, 0.8); backdrop-filter: blur(12px); border-bottom-color: var(--line-soft); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.nav.is-scrolled .nav-inner { height: 66px; transition: height 0.4s var(--ease); }
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.01em; color: var(--crema); }
.wordmark svg { color: var(--amber); }
.nav-links { display: none; gap: 2.4rem; }
.nav-links a { position: relative; font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--crema-dim); transition: color 0.3s var(--ease); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform 0.32s var(--ease); }
.nav-links a:hover { color: var(--crema); }
.nav-links a:hover::after { transform: scaleX(1); }
@media (min-width: 900px) { .nav-links { display: flex; } }

/* ---------- hero (video, centered, clip-wipe title) ---------- */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: center; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; clip-path: inset(0 0 0 0); }
.hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; z-index: 1; background: radial-gradient(130% 100% at 22% 46%, rgba(15,11,8,0.32), rgba(15,11,8,0.9) 90%), linear-gradient(0deg, var(--espresso) 1%, transparent 42%); }
.hero-grain { position: absolute; inset: 0; z-index: 2; 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'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero-content { position: relative; z-index: 3; }
.hero-title { font-family: var(--display); font-weight: 500; font-size: clamp(3.2rem, 1.3rem + 9.4vw, 9.5rem); line-height: 0.96; letter-spacing: -0.015em; }
.hero-title .line { display: block; padding-bottom: 0.04em; }
.hero-title .line span { display: inline-block; clip-path: inset(0 101% -12% -2%); }
.hero-title .line:nth-child(2) span { font-style: italic; color: var(--amber); }
.hero-sub { max-width: 30rem; margin-top: 1.8rem; font-size: 1.1rem; color: var(--crema); }
.hero-actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line-soft); padding-block: 1.6rem; background: var(--bean); }
.marquee-track { white-space: nowrap; will-change: transform; }
.marquee-track span { display: inline-block; font-family: var(--display); font-style: italic; font-size: clamp(2rem, 1rem + 4vw, 4rem); color: var(--crema); animation: marquee 26s linear infinite; }
.marquee-track i { color: var(--amber); font-style: normal; padding-inline: 1.2rem; font-size: 0.6em; vertical-align: middle; }
@media (prefers-reduced-motion: reduce) { .marquee-track span { animation: none; } }

/* ---------- statement ---------- */
.statement { padding-block: clamp(6rem, 14vw, 12rem); }
.lead { font-family: var(--display); font-weight: 500; font-size: clamp(1.7rem, 1.05rem + 2.8vw, 3.2rem); line-height: 1.26; max-width: 24ch; margin-inline: auto; text-align: center; }

/* ---------- craft: horizontal scroll ---------- */
.craft-runway { position: relative; height: 360vh; }
.craft-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.craft-track { display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 3rem); padding-inline: clamp(26px, 6vw, 120px); will-change: transform; }
.craft-intro { flex: 0 0 auto; width: min(78vw, 460px); }
.craft-intro h2 { font-size: clamp(2.6rem, 1.6rem + 4vw, 5rem); font-weight: 500; }
.craft-intro p { margin-top: 1.2rem; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.panel { position: relative; flex: 0 0 auto; width: min(74vw, 560px); height: min(72vh, 640px); overflow: hidden; }
.panel img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.92) saturate(0.95); }
.panel figcaption { position: absolute; left: 1.4rem; bottom: 1.3rem; font-family: var(--display); font-style: italic; font-size: 1.5rem; color: var(--crema); text-shadow: 0 2px 20px rgba(0,0,0,0.6); }
.panel figcaption b { font-family: var(--body); font-style: normal; font-weight: 500; font-size: 0.72rem; letter-spacing: 0.14em; color: var(--amber); display: block; margin-bottom: 0.3rem; }

/* ---------- origins ---------- */
.origins { padding-block: clamp(5rem, 10vw, 9rem); }
.origins-h { font-size: clamp(2rem, 1.3rem + 3vw, 3.8rem); font-weight: 500; max-width: 20ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.origin-grid { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 780px) { .origin-grid { grid-template-columns: repeat(3, 1fr); } }
.origin-media { overflow: hidden; margin-bottom: 1.4rem; }
.origin-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 0.7s var(--ease); filter: brightness(0.9); }
.origin:hover .origin-media img { transform: scale(1.05); }
.origin h3 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); }
.origin-place { margin-top: 0.4rem; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.origin-note { margin-top: 0.9rem; color: var(--crema-dim); }
.origin-alt { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); font-size: 0.85rem; color: var(--crema-dim); }
.origin-alt .count { font-family: var(--display); font-size: 1.7rem; color: var(--crema); margin-right: 0.3rem; }

/* ---------- roast: sticky scrub ---------- */
.roast-runway { position: relative; height: 320vh; }
.roast-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.roast-media { position: absolute; inset: 0; z-index: 0; }
.roast-media img { width: 100%; height: 100%; object-fit: cover; }
.roast-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(15,11,8,0.92) 30%, rgba(15,11,8,0.55)); }
.roast-inner { position: relative; z-index: 2; width: 100%; }
.roast-kicker { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); margin-bottom: 2rem; }
.roast-steps { display: grid; gap: 1.6rem; max-width: 40rem; }
.rstep { opacity: 0.28; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); transform: translateX(-10px); }
.rstep.is-active { opacity: 1; transform: none; }
.rstep .rnum { font-family: var(--display); font-size: 0.9rem; color: var(--amber); }
.rstep h3 { font-size: clamp(2rem, 1.4rem + 3vw, 4rem); font-weight: 500; font-style: italic; }
.rstep p { margin-top: 0.5rem; color: var(--crema-dim); max-width: 34rem; }
.roast-bar { margin-top: 3rem; height: 2px; background: var(--line-soft); max-width: 40rem; }
.roast-bar span { display: block; height: 100%; width: 0; background: var(--amber); }

/* ---------- shop ---------- */
.shop { padding-block: clamp(5rem, 10vw, 9rem); }
.shop-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.shop-head h2 { font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem); font-weight: 500; }
.shop-head p { margin-top: 1rem; color: var(--crema-dim); max-width: 40ch; }
.shop-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .shop-grid { grid-template-columns: repeat(4, 1fr); } }
.product { border: 1px solid var(--line-soft); background: var(--bean); display: flex; flex-direction: column; transition: transform 0.3s var(--ease), border-color 0.3s var(--ease); }
.product:hover { transform: translateY(-6px); border-color: rgba(200, 122, 62, 0.5); }
.product-media { overflow: hidden; aspect-ratio: 4 / 3; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); filter: brightness(0.88); }
.product:hover .product-media img { transform: scale(1.06); }
.product-body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.product-line { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.product-line h3 { font-size: 1.5rem; }
.price { font-family: var(--display); font-size: 1.2rem; color: var(--amber); }
.product-meta { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--crema-faint); }
.product-note { font-size: 0.9rem; color: var(--crema-dim); flex: 1; }

/* ---------- subscription ---------- */
.sub { position: relative; overflow: hidden; padding-block: clamp(6rem, 12vw, 10rem); }
.sub-media { position: absolute; inset: -10% 0; z-index: 0; will-change: transform; }
.sub-media img { width: 100%; height: 100%; object-fit: cover; }
.sub-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(15,11,8,0.9), rgba(15,11,8,0.8)); }
.sub-grid { position: relative; z-index: 2; display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 920px) { .sub-grid { grid-template-columns: 1fr 0.9fr; } }
.sub-copy h2 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.6rem); font-weight: 500; font-style: italic; }
.sub-copy p { margin-top: 1.2rem; color: var(--crema-dim); max-width: 42ch; }
.builder { background: rgba(9, 7, 5, 0.7); border: 1px solid var(--line); padding: clamp(1.6rem, 3vw, 2.2rem); backdrop-filter: blur(6px); }
.builder fieldset { margin-bottom: 1.3rem; }
.builder legend { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--crema-dim); margin-bottom: 0.6rem; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg-btn { font-size: 0.82rem; padding: 0.55rem 1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--crema-dim); transition: all 0.2s var(--ease); }
.seg-btn:hover { border-color: var(--crema); color: var(--crema); }
.seg-btn.is-active { background: var(--amber); color: var(--espresso); border-color: var(--amber); }
.builder-summary { margin-block: 1.4rem 1.2rem; padding-top: 1.3rem; border-top: 1px dashed var(--line); }
.builder-price { font-family: var(--display); font-size: 2.2rem; color: var(--amber); }
.builder-unit { font-size: 0.82rem; color: var(--crema-dim); margin-left: 0.4rem; }
.builder-read { margin-top: 0.4rem; font-size: 0.8rem; color: var(--crema-dim); }
.fine { margin-top: 0.9rem; font-size: 0.72rem; color: var(--crema-faint); text-align: center; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line-soft); padding-top: clamp(4rem, 8vw, 7rem); }
.foot-big { font-family: var(--display); font-weight: 500; font-size: clamp(2.6rem, 1.6rem + 5vw, 6rem); line-height: 0.98; margin-bottom: clamp(3rem, 6vw, 5rem); }
.foot-grid { display: grid; gap: 2.4rem; grid-template-columns: 1fr; padding-bottom: 3.5rem; }
.foot-grid > * { min-width: 0; }
.foot-text { overflow-wrap: break-word; }
@media (min-width: 560px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 820px) { .foot-grid { grid-template-columns: repeat(4, 1fr); } }
.foot-h { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 1rem; }
.foot-text { color: var(--crema-dim); line-height: 1.9; }
.news-row { display: flex; gap: 0.5rem; }
.news-input { flex: 1; min-width: 0; min-height: 44px; padding: 0 0.9rem; background: rgba(239,230,214,0.04); border: 1px solid var(--line); color: var(--crema); border-radius: 999px; font-size: 0.85rem; }
.news-input::placeholder { color: var(--crema-faint); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.8rem; border-top: 1px solid var(--line-soft); font-size: 0.76rem; color: var(--crema-faint); letter-spacing: 0.04em; }

/* ===========================================================
   Motion
   =========================================================== */
@keyframes wipe { to { clip-path: inset(0 -2% -12% -2%); } }
@keyframes mediaOpen { from { clip-path: inset(9% 14% 9% 14%); opacity: 0.35; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }

.reveal, .reveal-lines { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible, .reveal-lines.is-visible { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.1s; }
.reveal[data-d="2"] { transition-delay: 0.2s; }
.reveal[data-d="3"] { transition-delay: 0.3s; }

@media (prefers-reduced-motion: no-preference) {
  .hero-media { animation: mediaOpen 1.5s var(--ease) forwards; }
  .hero-title .line span { animation: wipe 1.15s var(--ease) forwards; }
  .hero-title .line:nth-child(1) span { animation-delay: 0.55s; }
  .hero-title .line:nth-child(2) span { animation-delay: 0.78s; }
  .reveal-load { opacity: 0; animation: fadeUp 0.9s var(--ease) forwards; }
  .hero-sub.reveal-load { animation-delay: 1.15s; }
  .hero-actions.reveal-load { animation-delay: 1.3s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-lines { opacity: 1; transform: none; transition: none; }
  .hero-title .line span { clip-path: none; }
  .hero-media { clip-path: none; }
  .craft-runway, .roast-runway { height: auto; }
  .craft-sticky, .roast-sticky { position: static; height: auto; }
  .craft-track { flex-wrap: wrap; }
  .rstep { opacity: 1; transform: none; }
  * { animation: none !important; }
}
