/* ==========================================================================
   Coffee — a theme for Sangharsh OS
   Palette: espresso roast, crema, caramel. Type: Fraunces + Inter + JetBrains Mono
   ========================================================================== */

:root {
  --espresso: #150d09;
  --roast: #221510;
  --bean: #33211a;
  --coffee: #5c3a28;
  --mocha: #7a5238;
  --caramel: #b5793f;
  --amber: #d99a52;
  --latte: #e2c39a;
  --crema: #f4e6cf;
  --paper: #faf4ea;
  --paper-2: #f3e7d6;
  --ink: #241812;
  --ink-soft: #5c4739;
  --line: rgba(92, 58, 40, 0.16);
  --line-dark: rgba(244, 230, 207, 0.14);
  --shadow-sm: 0 8px 24px -14px rgba(43, 24, 12, 0.5);
  --shadow: 0 26px 60px -28px rgba(43, 24, 12, 0.55);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1140px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--coffee); text-decoration: none; }
a:hover { color: var(--caramel); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 1.1em; }

code, kbd, pre { font-family: var(--font-mono); font-size: 0.9em; }

pre { max-width: 100%; overflow-x: auto; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--espresso);
  color: var(--crema);
  padding: 12px 18px;
  z-index: 200;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--caramel);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- top bar ------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px -24px rgba(43, 24, 12, 0.7);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.16rem;
  letter-spacing: 0.01em;
  font-weight: 600;
  flex: 0 0 auto;
}
.brand:hover { color: var(--coffee); }
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line), 0 6px 16px -10px rgba(43, 24, 12, 0.8);
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mocha);
  opacity: 0.78;
  font-weight: 500;
  margin-top: 2px;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--ink-soft);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 999px;
  transform-origin: center;
  will-change: transform;
  transition:
    transform 0.24s cubic-bezier(0.22, 1.3, 0.36, 1),
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.24s ease;
}
/* the nav pill lifts and grows under the cursor */
.nav a:hover,
.nav a:focus-visible {
  transform: translateY(-2px) scale(1.09);
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 10px 20px -12px rgba(92, 58, 40, 0.75);
}
.nav a[aria-current="page"] {
  color: var(--crema);
  background: var(--bean);
}
.nav a[aria-current="page"]:hover {
  color: var(--crema);
  background: var(--coffee);
}

.nav-cta {
  margin-left: 10px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  width: 42px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- buttons ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(180deg, var(--amber), #b9762f);
  color: #22120a;
  box-shadow: 0 16px 34px -18px rgba(217, 154, 82, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:hover { color: #1b0f08; box-shadow: 0 20px 40px -16px rgba(217, 154, 82, 0.95); }

.btn-ghost {
  border-color: rgba(226, 195, 154, 0.4);
  color: var(--crema);
  background: rgba(244, 230, 207, 0.05);
}
.btn-ghost:hover { background: rgba(244, 230, 207, 0.13); color: #fff; }

.btn-dark {
  background: var(--bean);
  color: var(--crema);
  box-shadow: var(--shadow-sm);
}
.btn-dark:hover { color: #fff; background: var(--coffee); }

.btn-lg { padding: 18px 34px; font-size: 1.03rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

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

.hero {
  position: relative;
  background:
    radial-gradient(1200px 620px at 78% -8%, rgba(217, 154, 82, 0.22), transparent 62%),
    radial-gradient(900px 520px at 8% 8%, rgba(122, 82, 56, 0.4), transparent 60%),
    linear-gradient(178deg, #1c110c 0%, #150d09 58%, #1a100b 100%);
  color: var(--crema);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  /* coffee ring stain */
  content: "";
  position: absolute;
  right: -140px;
  top: -160px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  border: 26px solid rgba(217, 154, 82, 0.055);
  box-shadow: inset 0 0 0 2px rgba(217, 154, 82, 0.05);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(244, 230, 207, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 104px) 24px clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--latte);
  margin: 0 0 22px;
  padding: 7px 14px 7px 12px;
  border: 1px solid rgba(226, 195, 154, 0.28);
  border-radius: 999px;
  background: rgba(244, 230, 207, 0.04);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px 2px rgba(217, 154, 82, 0.8);
}

.hero h1 { color: #fffaf3; }
.hero h1 em {
  font-style: italic;
  color: var(--amber);
  font-variation-settings: "SOFT" 60, "WONK" 1;
}

.lede {
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  color: rgba(244, 230, 207, 0.82);
  max-width: 46ch;
  margin-bottom: 30px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(226, 195, 154, 0.16);
  font-size: 0.84rem;
  color: rgba(244, 230, 207, 0.62);
}
.hero-meta strong { color: var(--crema); font-weight: 600; }

/* steam wisps */
.steam {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 0;
  width: 220px;
  height: 320px;
  pointer-events: none;
  opacity: 0.5;
}
.steam i {
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(244, 230, 207, 0.5);
  filter: blur(7px);
  animation: rise 9s ease-in infinite;
}
.steam i:nth-child(1) { left: 20%; animation-delay: 0s; }
.steam i:nth-child(2) { left: 45%; animation-delay: 2.2s; }
.steam i:nth-child(3) { left: 68%; animation-delay: 4.1s; }
.steam i:nth-child(4) { left: 33%; animation-delay: 6.4s; }

@keyframes rise {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0; }
  18%  { opacity: 0.75; }
  100% { transform: translate3d(-26px, -300px, 0) scale(6); opacity: 0; }
}

/* ---------- display stage (scroll / swipe driven) ----------------------- */

.stage-wrap {
  position: relative;
  height: 270vh;
  background:
    radial-gradient(900px 520px at 50% 12%, rgba(122, 82, 56, 0.36), transparent 66%),
    linear-gradient(180deg, #1a100b 0%, #120b07 45%, #1a100b 100%);
  color: var(--crema);
}

.stage-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage-head {
  position: relative;
  text-align: center;
  padding: 0 20px 10px;
  z-index: 6;
  pointer-events: none;
  flex: 0 0 auto;
}
.stage-head p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(226, 195, 154, 0.7);
  font-weight: 600;
}

.scene {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  perspective: 1600px;
  perspective-origin: 50% 34%;
  padding-bottom: 4vh;
}

.monitor-scale {
  position: relative;
  width: calc(900px * var(--lscale, 1));
  height: calc(650px * var(--lscale, 1));
  transform: scale(var(--lscale, 1));
  transform-origin: 0 0;
  transition: transform 0.15s linear;
}

.monitor {
  position: relative;
  width: 900px;
  height: 650px;
  transform-style: preserve-3d;
  transform-origin: 50% 100%;
  /* rises, straightens and settles as you swipe down */
  transform:
    translateY(calc(30px - 30px * var(--open, 0)))
    rotateX(calc(11deg - 11deg * var(--open, 0)))
    scale(calc(0.94 + 0.06 * var(--open, 0)));
  will-change: transform;
}

/* the white bezel */
.mon-frame {
  position: relative;
  width: 100%;
  height: 540px;
  padding: 12px 12px 30px;
  border-radius: 20px;
  background: linear-gradient(158deg, #ffffff 0%, #efeae2 54%, #fbf8f3 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -18px 26px -20px rgba(120, 100, 80, 0.4),
    0 34px 60px -34px rgba(0, 0, 0, 0.85);
}

.mon-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  overflow: hidden;
  background: #05060a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.85);
}

.mon-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(calc(0.12 + 0.88 * var(--on, 0))) saturate(calc(0.35 + 0.65 * var(--on, 0)));
  transition: filter 0.08s linear;
}

.screen-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(190, 220, 255, 0.16), transparent 62%),
    linear-gradient(112deg, rgba(255, 255, 255, 0.13) 0%, transparent 34%, transparent 62%, rgba(255, 255, 255, 0.07) 100%);
  opacity: calc(var(--on, 0) * 0.9);
  pointer-events: none;
}

.screen-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0 1px,
    transparent 1px 3px
  );
  opacity: calc(var(--on, 0) * 0.7);
  pointer-events: none;
}

.mon-led {
  position: absolute;
  left: 50%;
  bottom: 11px;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e8b071;
  box-shadow: 0 0 10px 2px rgba(217, 154, 82, 0.65);
  opacity: calc(0.22 + 0.78 * var(--on, 0));
}

.mon-neck {
  width: 96px;
  height: 82px;
  margin: 0 auto;
  background: linear-gradient(180deg, #f3eee6 0%, #ddd6ca 100%);
  border-radius: 0 0 10px 10px;
  box-shadow: inset -16px 0 22px -16px rgba(120, 100, 80, 0.45);
}

.mon-base {
  width: 320px;
  height: 18px;
  margin: -2px auto 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #f8f4ed 0%, #d8d0c3 100%);
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.7);
}

.monitor-shadow {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  width: min(80vw, 700px);
  height: 40px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.72), transparent 76%);
  filter: blur(10px);
  z-index: -1;
}

.stage-hint {
  position: absolute;
  bottom: clamp(18px, 5vh, 46px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 7;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.stage-hint span {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(226, 195, 154, 0.78);
  font-weight: 600;
}
.stage-hint svg { animation: nudge 1.9s ease-in-out infinite; color: var(--amber); }
@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(7px); opacity: 1; }
}

.stage-meter {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 120px;
  border-radius: 3px;
  background: rgba(244, 230, 207, 0.12);
  overflow: hidden;
  z-index: 7;
}
.stage-meter i {
  display: block;
  width: 100%;
  height: calc(var(--open, 0) * 100%);
  background: linear-gradient(180deg, var(--amber), var(--caramel));
  border-radius: 3px;
}

/* ---------- generic sections ------------------------------------------- */

.section { padding: clamp(64px, 9vw, 110px) 0; }

section[id] { scroll-margin-top: 84px; }
.section--tint { background: var(--paper-2); }
.section--dark {
  background: linear-gradient(180deg, #1a100b, #150d09);
  color: var(--crema);
}

.section-head { max-width: 62ch; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 0; }
.section--dark .section-head p { color: rgba(244, 230, 207, 0.72); }

.kicker {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--caramel);
  margin-bottom: 14px;
}

/* ---------- feature grid ------------------------------------------------ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 20px;
}

.feature-card {
  position: relative;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}
.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 120px at 100% 0%, rgba(217, 154, 82, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(181, 121, 63, 0.4);
}
.feature-card:hover::after { opacity: 1; }

.feature-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff8ee;
  background: linear-gradient(150deg, var(--mocha), var(--bean));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 20px -14px rgba(43, 24, 12, 0.9);
  margin-bottom: 18px;
}

.feature-card h3 { margin-bottom: 8px; font-size: 1.16rem; }
.feature-card p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.feature-tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--caramel);
}

/* ---------- page head (inner pages) ------------------------------------- */

.page-head {
  position: relative;
  background:
    radial-gradient(900px 420px at 82% -10%, rgba(217, 154, 82, 0.2), transparent 60%),
    linear-gradient(172deg, #1e120c, #150d09);
  color: var(--crema);
  padding: clamp(52px, 8vw, 92px) 0 clamp(46px, 6vw, 74px);
  overflow: hidden;
}
.page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(244, 230, 207, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}
.page-head .container { position: relative; z-index: 2; }
.page-head h1 { color: #fffaf3; margin-bottom: 14px; max-width: 20ch; }
.page-head p {
  color: rgba(244, 230, 207, 0.76);
  font-size: 1.06rem;
  max-width: 62ch;
  margin-bottom: 0;
}
.page-head--wide h1 { max-width: none; }

.crumbs {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 195, 154, 0.6);
  margin-bottom: 18px;
  font-weight: 600;
}
.crumbs a { color: rgba(226, 195, 154, 0.85); }
.crumbs span { opacity: 0.5; margin: 0 8px; }

/* ---------- download page ---------------------------------------------- */

.dl-card {
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(26px, 4vw, 44px);
  box-shadow: var(--shadow);
  margin-top: -56px;
  position: relative;
  z-index: 5;
}

.dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: center;
  justify-content: space-between;
}
.dl-name {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 8px 0 0;
  word-break: break-all;
}
.dl-row h2 { margin-bottom: 6px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.dl-sub { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

.dl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.chip {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--coffee);
}

.cred {
  margin-top: 30px;
  border: 1px dashed rgba(181, 121, 63, 0.55);
  background: linear-gradient(180deg, #fdf4e6, #fbeedb);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px 46px;
  align-items: center;
}
.cred-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--caramel);
  margin: 0 0 4px;
  width: 100%;
}
.cred-item { display: flex; flex-direction: column; gap: 2px; }
.cred-item span.k {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.cred-item span.v {
  font-family: var(--font-mono);
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 12px;
}
.cred-note {
  width: 100%;
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-top: 1px solid rgba(181, 121, 63, 0.22);
  padding-top: 14px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.media-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
}
.media-card header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.media-card h3 { margin: 0; }
.media-card .os {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--caramel);
}
.media-card > p { color: var(--ink-soft); font-size: 0.95rem; }

/* numbered steps */
.steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 20px 0 0;
}
.steps > li {
  counter-increment: s;
  position: relative;
  padding-left: 42px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.steps > li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -1px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--crema);
  background: var(--coffee);
}
.steps > li:last-child { margin-bottom: 0; }

/* ---------- prose / docs ----------------------------------------------- */

.docs-layout {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: clamp(40px, 6vw, 68px) 0 90px;
}

.docs-side {
  position: sticky;
  top: 96px;
  border-right: 1px solid var(--line);
  padding-right: 22px;
}
.docs-side h4 {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--caramel);
  font-weight: 700;
  margin: 0 0 12px;
}
.docs-side ul { list-style: none; margin: 0 0 26px; padding: 0; }
.docs-side li { margin-bottom: 2px; }
.docs-side a {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 7px 10px;
  border-radius: 8px;
  line-height: 1.35;
}
.docs-side a:hover { background: var(--paper-2); color: var(--ink); }
.docs-side a[aria-current="page"] {
  background: var(--bean);
  color: var(--crema);
  font-weight: 600;
}

.prose { max-width: 76ch; }
.prose > h2 {
  font-size: clamp(1.38rem, 2.1vw, 1.78rem);
  margin-top: 2.2em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 92px;
}
.prose > h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: clamp(1.06rem, 1.5vw, 1.2rem);
  margin-top: 1.9em;
  scroll-margin-top: 92px;
}
.prose h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-top: 1.6em;
}
.prose p, .prose li { color: #3a2c22; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--caramel); }
.prose strong { color: var(--ink); }
.prose code {
  background: rgba(92, 58, 40, 0.09);
  border: 1px solid rgba(92, 58, 40, 0.12);
  border-radius: 6px;
  padding: 1px 6px;
  color: #4a2c1d;
  white-space: nowrap;
}
.prose pre {
  background: linear-gradient(180deg, #241813, #1a110d);
  color: #f2e3cd;
  padding: 18px 20px;
  border-radius: 14px;
  overflow-x: auto;
  margin: 0 0 1.4em;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.35);
  line-height: 1.55;
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  white-space: pre;
  font-size: 0.86rem;
}
.prose pre .c { color: #9d8a78; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.6em;
  font-size: 0.92rem;
  background: #fffdf8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.prose th, .prose td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th {
  background: var(--paper-2);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coffee);
}
.prose tr:last-child td { border-bottom: 0; }
.prose td code { white-space: nowrap; }

.callout {
  border-left: 4px solid var(--caramel);
  background: #fdf5e8;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 0 0 1.5em;
  font-size: 0.95rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--coffee); }
.callout--warn { border-left-color: #c4552f; background: #fdf0e7; }
.callout--warn strong { color: #a8431f; }
.callout--tip { border-left-color: #6f8f5e; background: #f2f6ec; }
.callout--tip strong { color: #4d6a3f; }

.toc-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  margin-top: 46px;
  padding-top: 18px;
}

.pager {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  font-weight: 600;
  font-size: 0.94rem;
  box-shadow: var(--shadow-sm);
  min-width: 190px;
}
.pager a small {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--caramel);
  font-weight: 700;
}
.pager a:hover { border-color: rgba(181, 121, 63, 0.5); }

/* doc hub cards */
.doc-groups { display: grid; gap: 40px; }
.doc-group h2 { font-size: 1.35rem; margin-bottom: 18px; }
.doc-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.doc-link {
  display: block;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.doc-link:hover { transform: translateY(-3px); border-color: rgba(181, 121, 63, 0.45); }
.doc-link strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.06rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.doc-link span { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.5; display: block; }

/* ---------- about ------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 42px;
}
.about-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.about-card h3 { font-size: 1.1rem; }
.about-card p:last-child { margin-bottom: 0; }
.about-card p { color: var(--ink-soft); font-size: 0.95rem; }

.quote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.45;
  color: var(--coffee);
  border-left: 3px solid var(--amber);
  padding-left: 24px;
  margin: 44px 0;
  font-style: italic;
}

.maker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  background: linear-gradient(150deg, #23160f, #170f0b);
  color: var(--crema);
  border-radius: 20px;
  padding: 30px 32px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}
.maker .ring {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid rgba(217, 154, 82, 0.55);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--amber);
  flex: 0 0 auto;
}
.maker h3 { margin: 0 0 3px; color: #fff; font-size: 1.2rem; }
.maker p { margin: 0; color: rgba(244, 230, 207, 0.68); font-size: 0.92rem; }

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

.site-footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #170f0b, #0f0906);
  color: rgba(244, 230, 207, 0.72);
  padding: 56px 0 34px;
  border-top: 1px solid rgba(226, 195, 154, 0.12);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(226, 195, 154, 0.12);
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; max-width: 330px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 50%; }
.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  color: var(--crema);
  font-size: 1.08rem;
  margin-bottom: 4px;
}
.footer-brand p { font-size: 0.86rem; margin: 0; line-height: 1.55; }

.footer-nav { display: flex; gap: 52px; flex-wrap: wrap; }
.footer-nav h5 {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--latte);
  opacity: 0.75;
  margin: 0 0 12px;
  font-weight: 700;
}
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { color: rgba(244, 230, 207, 0.72); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--amber); }

.legal {
  margin: 26px 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(244, 230, 207, 0.55);
}
.legal--tm {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 195, 154, 0.1);
  font-size: 0.78rem;
  color: rgba(244, 230, 207, 0.42);
}
.stamp {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: rgba(244, 230, 207, 0.3);
}

/* ---------- reveal on scroll ------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }

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

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero-inner .hero-visual { display: none; }
  .docs-layout { grid-template-columns: 1fr; gap: 28px; }
  .docs-side {
    position: static;
    border: 0;
    padding: 0 0 18px;
  }
  .docs-side ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
  }
  .docs-side li { margin: 0; }
  .docs-side a { background: rgba(255, 253, 248, 0.75); border: 0; font-size: 0.82rem; padding: 6px 12px; }
}

@media (max-width: 820px) {
  body { font-size: 16px; }
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fffdf8;
    box-shadow: 0 24px 40px -24px rgba(43, 24, 12, 0.55);
    padding: 12px 18px 22px;
    border-bottom: 0;
    transform: translateY(-120%);
    will-change: transform;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .nav.open { transform: none; }
  .nav a { padding: 13px 14px; border-radius: 10px; font-size: 1rem; }
  .nav a:hover, .nav a:focus-visible { transform: none; box-shadow: none; background: var(--paper-2); }
  .nav a[aria-current="page"] { background: var(--bean); color: var(--crema); }
  .nav-cta { margin: 10px 0 0; }
  .nav-toggle { display: flex; }
  .brand small { display: none; }
  .dl-row { flex-direction: column; align-items: flex-start; }
  .dl-card { margin-top: -34px; }
  .footer-nav { gap: 32px; }
  .pager a { min-width: 0; flex: 1 1 100%; }
}

@media (max-width: 760px) {
  .prose { min-width: 0; }
  .prose table { font-size: 0.86rem; }
  .prose th, .prose td { padding: 9px 10px; }
  .prose td code, .prose th code, .prose li code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .prose pre code { font-size: 0.78rem; }
  .cred { gap: 16px 28px; }
  .eyebrow { font-size: 0.64rem; letter-spacing: 0.14em; padding: 6px 12px; }
  .page-head h1 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .steam i, .stage-hint svg { animation: none; }
  .btn:hover, .feature-card:hover, .doc-link:hover { transform: none; }
  .nav a:hover { transform: none; }
  .ambient i, .ambient b, .aurora i, .logo-mark img, .logo-glow { animation: none; }
}

/* ==========================================================================
   White hardware, ambient coffee motion
   ========================================================================== */

main { position: relative; z-index: 1; }

/* ---- drifting beans and warm light, behind every page ------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient i {
  position: absolute;
  bottom: -12%;
  width: 20px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(65% 65% at 34% 28%, #b9814f 0%, #5c3a28 62%, #33211a 100%);
  opacity: 0;
  animation-name: beanDrift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}
.ambient i::after {
  content: "";
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 46%;
  width: 8%;
  border-radius: 999px;
  background: rgba(250, 244, 234, 0.8);
}
.ambient i:nth-child(1) { left: 4%;  width: 18px; height: 26px; animation-duration: 52s; animation-delay: -4s; }
.ambient i:nth-child(2) { left: 18%; width: 26px; height: 36px; animation-duration: 68s; animation-delay: -26s; }
.ambient i:nth-child(3) { left: 31%; width: 14px; height: 20px; animation-duration: 44s; animation-delay: -14s; }
.ambient i:nth-child(4) { left: 47%; width: 22px; height: 30px; animation-duration: 74s; animation-delay: -40s; }
.ambient i:nth-child(5) { left: 62%; width: 16px; height: 22px; animation-duration: 58s; animation-delay: -8s; }
.ambient i:nth-child(6) { left: 76%; width: 24px; height: 34px; animation-duration: 64s; animation-delay: -34s; }
.ambient i:nth-child(7) { left: 88%; width: 15px; height: 21px; animation-duration: 48s; animation-delay: -20s; }
.ambient i:nth-child(8) { left: 55%; width: 12px; height: 17px; animation-duration: 80s; animation-delay: -52s; }

@keyframes beanDrift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  12%  { opacity: 0.075; }
  50%  { transform: translate3d(26px, -58vh, 0) rotate(150deg); }
  88%  { opacity: 0.075; }
  100% { transform: translate3d(-14px, -116vh, 0) rotate(320deg); opacity: 0; }
}

.ambient b {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
  background: radial-gradient(circle, rgba(217, 154, 82, 0.55), rgba(217, 154, 82, 0) 70%);
  animation: orbFloat 30s ease-in-out infinite alternate;
  will-change: transform;
}
.ambient b:nth-child(9)  { width: 460px; height: 460px; left: -140px; top: 4%; }
.ambient b:nth-child(10) {
  width: 380px; height: 380px; right: -120px; top: 44%;
  animation-delay: -12s;
  background: radial-gradient(circle, rgba(122, 82, 56, 0.45), transparent 70%);
}
.ambient b:nth-child(11) { width: 520px; height: 520px; left: 32%; bottom: -240px; animation-delay: -22s; opacity: 0.16; }

@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, -40px, 0) scale(1.15); }
}

/* ---- slow aurora inside the dark sections ------------------------------ */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.aurora i {
  position: absolute;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
  background: radial-gradient(circle, rgba(217, 154, 82, 0.85), rgba(217, 154, 82, 0) 68%);
  animation: auroraDrift 32s ease-in-out infinite alternate;
  will-change: transform;
}
.aurora i:nth-child(1) { left: -12%; top: -34%; }
.aurora i:nth-child(2) {
  right: -16%; top: -14%;
  animation-delay: -11s;
  background: radial-gradient(circle, rgba(122, 82, 56, 0.9), transparent 68%);
}
.aurora i:nth-child(3) { left: 28%; bottom: -46%; animation-delay: -21s; opacity: 0.13; }

@keyframes auroraDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(7%, 9%, 0) scale(1.2); }
}

/* ---- the mark, where the cup used to be --------------------------------- */
.logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 300px;
}
.logo-mark img {
  position: relative;
  z-index: 2;
  width: clamp(170px, 19vw, 250px);
  height: auto;
  filter: drop-shadow(0 22px 38px rgba(0, 0, 0, 0.55));
  animation: logoFloat 7s ease-in-out infinite alternate;
  will-change: transform;
}
.logo-glow {
  position: absolute;
  width: min(70vw, 420px);
  height: min(70vw, 420px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 154, 82, 0.3), rgba(217, 154, 82, 0) 66%);
  filter: blur(38px);
  animation: glowPulse 9s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

@keyframes logoFloat {
  from { transform: translateY(-6px); }
  to   { transform: translateY(8px); }
}
@keyframes glowPulse {
  from { transform: scale(1); opacity: 0.72; }
  to   { transform: scale(1.12); opacity: 1; }
}

@media (max-width: 980px) {
  .hero-inner .hero-visual { display: grid; place-items: center; margin-top: 6px; }
  .logo-mark { min-height: 180px; }
  .logo-mark img { width: 148px; }
  .logo-glow { width: 260px; height: 260px; filter: blur(30px); }
  .ambient b:nth-child(9), .ambient b:nth-child(11) { opacity: 0.12; }
}

/* ==========================================================================
   Seamless: no borders anywhere, no card shadows, flat cream buttons,
   and a light that follows the cursor across the top bar
   ========================================================================== */

.topbar {
  background: rgba(252, 247, 240, 0.92);
  border-bottom: 0;
}
.topbar-inner { position: relative; z-index: 1; }

/* the glow that trails the cursor across the panel */
.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(
    190px 190px at var(--mx, 50%) var(--my, 50%),
    #ffffff 0%,
    rgba(255, 255, 255, 0.78) 30%,
    rgba(226, 195, 154, 0.22) 64%,
    rgba(255, 255, 255, 0) 82%
  );
}
.topbar.is-lit::after { opacity: 1; }

.brand img { box-shadow: none; }
.nav-toggle { border: 0; background: rgba(92, 58, 40, 0.07); }
.eyebrow { border: 0; }
.hero-meta { border-top: 0; padding-top: 0; margin-top: 26px; }

/* buttons: flat, no elevation */
.btn { border: 0; }
.btn-primary,
.btn-primary:hover {
  background: var(--crema);
  color: #2a1a12;
  box-shadow: none;
  transform: none;
}
.btn-primary:hover { background: #fdf5e6; }
.btn-ghost { background: rgba(244, 230, 207, 0.1); }
.btn-ghost:hover { background: rgba(244, 230, 207, 0.2); }
.btn-dark { box-shadow: none; }

/* cards lose their outline and their shadow */
.feature-card,
.media-card,
.about-card,
.doc-link,
.dl-card,
.pager a {
  border: 0;
  box-shadow: none;
}
.feature-card { background: rgba(255, 253, 248, 0.72); }
.feature-card:hover {
  background: #fffdf8;
  border-color: transparent;
  box-shadow: none;
}
.media-card,
.about-card,
.doc-link { background: rgba(255, 253, 248, 0.72); }
.doc-link:hover { background: #fffdf8; }
.dl-card { background: #fffdf8; }

.section--tint { background: transparent; }

.chip { border: 0; background: rgba(92, 58, 40, 0.07); }
.cred { border: 0; }

.docs-side { border-right: 0; padding-right: 0; }
.prose > h2 { border-bottom: 0; }
.prose code { border: 0; }
.prose pre { border: 0; }
.prose table { box-shadow: none; }
.prose th,
.prose td { border-bottom: 0; }
.prose tbody tr:nth-child(even) { background: rgba(92, 58, 40, 0.04); }

.callout { border-left: 0; border-radius: 12px; }
.quote { border-left: 0; padding-left: 0; }
.toc-note,
.pager,
.footer-top,
.legal--tm,
.site-footer { border: 0; }
.legal--tm { padding-top: 0; }

.cred-item span.v { border: 0; background: rgba(255, 255, 255, 0.85); }
.cred-note { border-top: 0; padding-top: 0; }


.made-in {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: rgba(244, 230, 207, 0.66);
}
.made-in .flag {
  position: relative;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    #ff9933 0 33.34%,
    #ffffff 33.34% 66.67%,
    #138808 66.67% 100%
  );
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.made-in .flag::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: radial-gradient(circle, #000080 0 42%, #ffffff 42% 100%);
}
