/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f3e6d6;
  --bg-2: #ead6c0;
  --panel: rgba(255, 250, 243, .65);
  --line: rgba(160, 82, 45, .22);
  --cream: #2b1a10;
  --muted: #6b5141;
  --copper: #b5562b;
  --copper-2: #c0602f;
  --cherry: #e0242f;
  --leaf: #2f9e52;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 22px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cream);
  background:
    radial-gradient(1000px 700px at 75% 15%, rgba(215, 160, 120, .35), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, rgba(224, 36, 47, .07), transparent 60%),
    radial-gradient(900px 700px at 110% 90%, rgba(47, 158, 82, .08), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; }
ul, ol { list-style: none; }
::selection { background: var(--copper); color: var(--bg); }
:focus-visible { outline: 2px solid var(--copper-2); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg); border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* Ambient layers */
.beans-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .45; }
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
  opacity: .35;
}
main, .footer, .nav { position: relative; z-index: 1; }

/* =============================================================
   3. Components
   ============================================================= */
.hud-label {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em;
  color: var(--copper-2); display: inline-flex; align-items: center; gap: .6rem;
}
.hud-label .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--cherry);
  box-shadow: 0 0 12px var(--cherry); animation: pulse 1.8s infinite;
}

.btn {
  --g1: var(--copper); --g2: var(--cherry);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: 999px; font-weight: 600; letter-spacing: .01em;
  background: linear-gradient(120deg, var(--g1), var(--g2));
  color: #fff; box-shadow: 0 10px 30px -10px rgba(224, 36, 47, .6), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), filter .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(224, 36, 47, .8), inset 0 1px 0 rgba(255,255,255,.3); filter: brightness(1.08); }
.btn-ghost { background: transparent; border: 1px solid var(--line); box-shadow: none; color: var(--cream); }
.btn-ghost:hover { border-color: var(--copper-2); box-shadow: 0 0 24px -6px var(--copper-2); }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; }
.btn-lg { padding: 1.05rem 1.8rem; font-size: 1.05rem; }

/* =============================================================
   4. Nav
   ============================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem var(--gutter);
  background: rgba(243, 230, 214, .78);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-brand { display: flex; align-items: center; gap: .65rem; font-family: var(--serif); font-weight: 900; font-size: 1.25rem; }
.nav-brand img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--copper); box-shadow: 0 0 18px -4px var(--copper); }
.nav-brand em { font-style: normal; color: var(--copper-2); }
.nav-links { display: none; gap: 2rem; font-size: .95rem; color: var(--muted); }
.nav-links a { position: relative; transition: color .3s; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: var(--copper-2); transition: width .4s var(--ease-out); }
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { width: 100%; }

/* =============================================================
   5. Hero
   ============================================================= */
.hero {
  position: relative;
  display: grid; gap: 3rem; align-items: center;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  max-width: 1320px; margin: 0 auto;
  min-height: calc(100svh - 70px);
}
.hero-copy { position: relative; z-index: 2; }
.hero h1 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  margin: 1rem 0 1.25rem;
}
.glow {
  background: linear-gradient(100deg, var(--copper-2), var(--cherry) 60%, var(--copper-2));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
  filter: drop-shadow(0 0 22px rgba(224, 36, 47, .35));
}
.lead { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 52ch; }
.lead strong { color: var(--cream); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-stats { display: flex; gap: clamp(1.25rem, 4vw, 2.5rem); margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.hero-stats b { display: block; font-family: var(--mono); font-size: 1.6rem; color: var(--cream); }
.hero-stats span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }

.hero-branch { position: absolute; width: 150px; height: 315px; opacity: .9; z-index: 1; pointer-events: none; filter: drop-shadow(0 10px 16px rgba(90,40,15,.25)); }
.hero-branch--l { left: -40px; bottom: 0; transform: rotate(-14deg); }
.hero-branch--r { right: -30px; top: 30px; transform: rotate(160deg); opacity: .55; }

/* Reactor (logo + orbit rings) */
.reactor {
  position: relative; width: min(84vw, 520px); aspect-ratio: 1; margin: 0 auto;
  display: grid; place-items: center;
}
.ring { position: absolute; border-radius: 50%; }
.ring-1 { inset: 0; border: 1px dashed rgba(255, 154, 92, .45); animation: spin 40s linear infinite; }
.ring-2 { inset: 9%; border: 2px solid transparent; border-top-color: var(--cherry); border-right-color: rgba(224,36,47,.3); animation: spin 9s linear infinite reverse; filter: drop-shadow(0 0 8px var(--cherry)); }
.ring-3 { inset: 18%; border: 1px solid var(--line); box-shadow: 0 0 80px -10px rgba(200,103,58,.45), inset 0 0 60px -10px rgba(200,103,58,.35); }
.orbit { position: absolute; inset: 4%; border-radius: 50%; animation: spin 14s linear infinite; }
.orbit-b { inset: 13%; animation-duration: 20s; animation-direction: reverse; }
.orbit-c { inset: -2%; animation-duration: 26s; }
.cherry {
  position: absolute; top: -12px; left: 50%; width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff7b7b, var(--cherry) 45%, #6e0a12);
  box-shadow: 0 0 18px rgba(224, 36, 47, .9);
}
.cherry-sm { width: 16px; height: 16px; top: auto; bottom: -8px; }
.orbit-bean { position: absolute; left: -10px; top: 50%; width: 24px; height: 34px; filter: drop-shadow(0 0 10px rgba(255,154,92,.6)); }
.reactor-core {
  position: relative; width: 64%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--copper);
  box-shadow: 0 0 0 8px rgba(200,103,58,.08), 0 0 60px -6px rgba(255,154,92,.55);
  animation: float 6s ease-in-out infinite;
}
.reactor-core img { width: 100%; height: 100%; object-fit: cover; }
.hud-tag {
  position: absolute; font-family: var(--mono); font-size: .65rem; letter-spacing: .14em;
  padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 6px;
  background: rgba(255,250,243,.85); color: var(--copper-2); backdrop-filter: blur(6px);
}
.hud-tag--1 { top: 8%; left: -2%; }
.hud-tag--2 { bottom: 12%; right: -4%; }
.hud-tag--3 { bottom: 2%; left: 8%; color: var(--leaf); }

/* =============================================================
   6. Marquee
   ============================================================= */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(200,103,58,.1), rgba(224,36,47,.08));
  padding: 1rem 0;
}
.marquee-track { display: flex; align-items: center; gap: 2rem; width: max-content; animation: marquee 30s linear infinite; }
.marquee span { font-family: var(--serif); font-size: clamp(1.2rem, 2.6vw, 1.8rem); font-weight: 700; color: var(--cream); white-space: nowrap; }
.marquee i { width: 12px; height: 12px; border-radius: 50%; background: var(--cherry); box-shadow: 0 0 12px var(--cherry); flex: none; }

/* =============================================================
   7. Products
   ============================================================= */
.products, .process { max-width: 1240px; margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) var(--gutter); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(2.5rem, 6vw, 4.5rem); }
.section-head h2 { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.6rem); margin: .6rem 0 .8rem; }
.section-head p:not(.hud-label) { color: var(--muted); }

.product {
  position: relative;
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(160deg, rgba(255, 250, 243, .8), rgba(236, 216, 194, .65));
  box-shadow: 0 30px 60px -40px rgba(110, 50, 20, .45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
.product::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(500px circle at var(--mx, 30%) var(--my, 20%), rgba(255,154,92,.14), transparent 45%);
}
.product-media { position: relative; }
.product-index {
  position: absolute; top: -.6rem; left: -.2rem; z-index: 2;
  font-family: var(--mono); font-size: 3.4rem; font-weight: 600; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(255,154,92,.55);
}
.frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 4.2;
  background: radial-gradient(circle at 50% 40%, #fffdf9, #f6e9da 75%);
  border: 1px solid rgba(181,86,43,.3);
  box-shadow: 0 30px 60px -30px rgba(90,40,15,.45), 0 0 40px -18px rgba(200,103,58,.5);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease-out);
}
.frame--light { background: #fff; }
.frame img {
  width: 100%; height: 100%; object-fit: contain; padding: 6%;
  filter: drop-shadow(0 18px 24px rgba(90, 40, 15, .22));
  transition: transform .8s var(--ease-out), opacity .3s;
}
.frame--light { background: #fff; }
.product:hover .frame img { transform: scale(1.02); }
.frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.12) 50%, transparent 60%);
  background-size: 250% 100%; background-position: 120% 0; transition: background-position 1s var(--ease-out);
}
.product:hover .frame::after { background-position: -20% 0; }

.thumbs { display: flex; gap: .6rem; margin-top: .8rem; }
.thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); opacity: .6; transition: opacity .3s, border-color .3s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover, .thumb.is-active { opacity: 1; border-color: var(--copper-2); }

.product-info h3 { font-family: var(--serif); font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin: .7rem 0 1.2rem; }
.specs { display: grid; gap: .7rem; color: var(--muted); }
.specs li { position: relative; padding-left: 1.6rem; }
.specs li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff7b7b, var(--cherry) 50%, #6e0a12);
  box-shadow: 0 0 8px rgba(224,36,47,.7);
}
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.spec-grid div { padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,250,243,.7); }
.spec-grid dt { font-family: var(--mono); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--copper-2); }
.spec-grid dd { font-weight: 500; }

.buy {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px dashed var(--line);
}
.price {
  font-family: var(--mono); font-weight: 600; font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1;
  color: var(--cream); text-shadow: 0 0 24px rgba(200,103,58,.35);
}
.price span { font-size: .5em; vertical-align: top; color: var(--copper-2); margin-right: .1em; }
.price--ask { font-size: clamp(1.3rem, 3vw, 1.7rem); color: var(--copper-2); }

/* =============================================================
   8. Process
   ============================================================= */
.steps { display: grid; gap: 1.25rem; counter-reset: s; }
.step {
  position: relative; padding: 2rem 1.6rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); overflow: hidden;
}
.step::after { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--cherry), var(--copper-2), var(--leaf)); opacity: .7; }
.step-icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; margin-bottom: 1.2rem; background: #fff8ef; border: 1px solid var(--line); box-shadow: 0 0 30px -8px rgba(224,36,47,.35); }
.step-icon svg { height: 64px; width: auto; }
.step-icon--bean svg { height: 46px; }
.step-icon--grinder { color: var(--copper-2); }
.step-icon--grinder svg { height: 46px; }
.step h3 { font-family: var(--serif); font-size: 1.5rem; margin-bottom: .5rem; }
.step p { color: var(--muted); }

/* =============================================================
   9. Contact & footer
   ============================================================= */
.contact { position: relative; padding: 2rem var(--gutter) clamp(4rem, 9vw, 7rem); max-width: 1100px; margin: 0 auto; }
.contact-branch { position: absolute; right: 0; top: -40px; width: 120px; height: 252px; transform: rotate(18deg); opacity: .8; pointer-events: none; }
.contact-card {
  position: relative; display: grid; gap: 1.6rem; align-items: center; justify-items: center; text-align: center;
  padding: clamp(2rem, 5vw, 3.5rem); border-radius: calc(var(--radius) + 10px);
  border: 1px solid rgba(255,154,92,.35);
  background: linear-gradient(135deg, rgba(200,103,58,.22), rgba(224,36,47,.12) 50%, rgba(47,158,82,.12));
  box-shadow: 0 0 80px -30px rgba(255,154,92,.6);
}
.contact-card img { width: 140px; height: 140px; border-radius: 50%; border: 2px solid var(--copper); }
.contact-card h2 { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3rem); margin: .5rem 0 .6rem; }
.contact-card p:not(.hud-label) { color: var(--muted); margin-bottom: 1.5rem; }

.location {
  display: inline-flex; align-items: center; gap: .7rem; margin: -.4rem 0 1.4rem;
  padding: .6rem 1rem .6rem .7rem; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255,250,243,.6);
  transition: border-color .3s, transform .4s var(--ease-out);
}
.location:hover { border-color: var(--copper); transform: translateY(-2px); }
.location svg { width: 26px; height: 26px; color: var(--cherry); filter: drop-shadow(0 0 6px rgba(224,36,47,.45)); }
.location b { display: block; line-height: 1.2; }
.location small { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; color: var(--copper-2); text-transform: uppercase; }
.contact-card .btn { display: flex; width: fit-content; }
@media (max-width: 719px) { .contact-card .btn { margin-inline: auto; } }

.industrial { padding: 0 var(--gutter) clamp(4rem, 9vw, 6rem); max-width: 1100px; margin: 0 auto; }
.industrial-card {
  display: grid; gap: 1.4rem; justify-items: center; text-align: center;
  padding: clamp(2rem, 5vw, 3rem); border-radius: calc(var(--radius) + 10px);
  background: linear-gradient(135deg, #2b1a10, #4a2a18);
  color: #f3e6d6;
  box-shadow: 0 30px 70px -35px rgba(60, 25, 10, .8), 0 0 0 1px rgba(255,154,92,.25) inset;
  position: relative; overflow: hidden;
}
.industrial-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,154,92,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,154,92,.08) 1px, transparent 1px);
  background-size: 32px 32px;
}
.industrial-card > * { position: relative; }
.industrial-icon { width: 72px; height: 72px; color: #ff9a5c; filter: drop-shadow(0 0 14px rgba(255,154,92,.6)); }
.industrial-card .hud-label { color: #ff9a5c; }
.industrial-card h2 { font-family: var(--serif); font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: .5rem 0 .6rem; }
.industrial-card p:not(.hud-label) { color: #d8c3ae; max-width: 48ch; }
@media (min-width: 960px) {
  .industrial-card { grid-template-columns: auto 1fr auto; text-align: left; justify-items: start; align-items: center; }
}

.footer { text-align: center; padding: 2rem var(--gutter) 6rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer .mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; margin-top: .4rem; color: var(--copper-2); }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 30px -6px rgba(37,211,102,.7);
  transition: transform .4s var(--ease-out);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08); }

/* =============================================================
   10. Effects
   ============================================================= */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes shine { to { background-position: 200% center; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =============================================================
   11. Responsive
   ============================================================= */
@media (min-width: 720px) {
  .nav-links { display: flex; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .contact-card { grid-template-columns: auto 1fr; text-align: left; justify-items: start; }
  .contact-card img { width: 160px; height: 160px; }
  .hero-branch { width: 190px; height: 400px; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.1fr 1fr; }
  .product { grid-template-columns: .9fr 1.1fr; }
  .product--flip { grid-template-columns: 1.1fr .9fr; }
  .product--flip .product-media { order: 2; }
  .hero-branch--l { left: -20px; bottom: -40px; }
}
@media (max-width: 539px) {
  .hud-tag { font-size: .55rem; }
  .hud-tag--1 { left: 0; }
  .hud-tag--2 { right: 0; }
  .hero-branch { width: 110px; height: 230px; opacity: .45; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .buy .btn { width: 100%; }
}

/* =============================================================
   12. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation-duration: 90s; }
}
