/* Kite landing — interactive experience */
:root {
  --teal: #0f7a8a;
  --teal-mid: #1494a8;
  --teal-deep: #0a5561;
  --teal-night: #062428;
  --orange: #f0a35e;
  --orange-hot: #ffb56b;
  --ink: #0e1b1e;
  --muted: #5a7379;
  --paper: #e8f4f6;
  --foam: #f4fbfc;
  --line: rgba(15, 122, 138, 0.18);
  --radius: 18px;
  --font-display: "Syne", "Avenir Next", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
}
body.sound-on { cursor: default; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ----- ambient field ----- */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(240, 163, 94, 0.22), transparent 60%),
    radial-gradient(700px 480px at 88% 8%, rgba(20, 148, 168, 0.28), transparent 55%),
    radial-gradient(600px 400px at 50% 100%, rgba(10, 85, 97, 0.12), transparent 50%),
    linear-gradient(180deg, #d5eef2 0%, var(--paper) 38%, #f7fbfc 100%);
}
.ambient-orb {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.55;
  animation: drift 18s ease-in-out infinite alternate;
}
.ambient-orb.a { width: 280px; height: 280px; background: #f0a35e; top: 12%; left: 8%; }
.ambient-orb.b { width: 360px; height: 360px; background: #1494a8; top: 40%; right: 4%; animation-delay: -6s; }
.ambient-orb.c { width: 220px; height: 220px; background: #0a5561; bottom: 10%; left: 40%; animation-delay: -11s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, -30px, 0) scale(1.12); }
}

/* ----- sound dock ----- */
.sound-dock {
  position: fixed; z-index: 40; right: 18px; bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.sound-btn {
  appearance: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  padding: 12px 16px; border-radius: 999px;
  background: var(--teal-night); color: #eaf6f7;
  box-shadow: 0 12px 32px rgba(6, 36, 40, 0.35);
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.sound-btn:hover { transform: translateY(-2px); background: var(--teal-deep); }
.sound-btn .eq {
  width: 14px; height: 12px; display: inline-block; position: relative;
}
.sound-btn .eq::before,
.sound-btn .eq::after {
  content: ""; position: absolute; bottom: 0; width: 3px; border-radius: 2px;
  background: currentColor;
}
.sound-btn .eq::before { left: 1px; height: 6px; box-shadow: 5px 0 0 currentColor; }
.sound-btn .eq::after { left: 9px; height: 11px; }
.sound-btn .eq.off::before { height: 4px; opacity: 0.45; }
.sound-btn .eq.off::after { height: 4px; opacity: 0.45; }
.sound-hint {
  font-size: 12px; color: var(--muted); background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px); padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line); max-width: 180px;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.sound-dock.show-hint .sound-hint { opacity: 1; transform: none; }

/* ----- header ----- */
header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(6, 36, 40, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav { display: flex; align-items: center; gap: 14px; height: 62px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.02em;
}
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.brand:hover { text-decoration: none; }
.nav .spacer { flex: 1; }
.nav a.link { color: #c5e4e8; font-size: 14px; font-weight: 600; }
.nav a.link:hover { color: #fff; text-decoration: none; }
.nav .gh-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange); color: #2a1a05;
  font-weight: 800; font-size: 13px;
  padding: 8px 14px; border-radius: 999px;
}
.nav .gh-btn:hover { background: var(--orange-hot); text-decoration: none; }

/* ----- hero ----- */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex; align-items: center;
  padding: 72px 0 88px;
  color: #eaf6f7;
  overflow: hidden;
}
.hero-panel {
  position: absolute; inset: 0;
  background:
    linear-gradient(125deg, rgba(6,36,40,0.92) 0%, rgba(10,85,97,0.78) 48%, rgba(15,122,138,0.55) 100%),
    url("assets/screenshot-voucher.png") center / cover no-repeat;
  transform: scale(1.04);
  transition: transform 2.8s ease;
}
.hero.is-ready .hero-panel { transform: scale(1); }
.hero-grain {
  position: absolute; inset: 0; opacity: 0.12; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.hero .wrap { position: relative; z-index: 1; text-align: center; }
.hero .logo {
  width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.4);
  animation: floaty 5s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.pill {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  color: #d7f0f3; border: 1px solid rgba(215,240,243,0.35);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 18px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.98; color: #fff; letter-spacing: -0.03em;
  font-weight: 800;
}
.hero h1 .accent {
  display: block; color: var(--orange-hot);
  font-size: 0.42em; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 10px; font-weight: 700;
}
.hero p.sub {
  max-width: 620px; margin: 20px auto 28px;
  font-size: clamp(16px, 2.1vw, 19px); color: #cde9ec;
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 800; font-size: 15px;
  padding: 14px 26px; border-radius: 14px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--orange); color: #2a1a05;
  box-shadow: 0 10px 28px rgba(240,163,94,0.4);
}
.btn-primary:hover { background: var(--orange-hot); }
.btn-ghost { color: #eaf6f7; border-color: rgba(234,246,247,0.4); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.shields { margin-top: 28px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.shields img { height: 22px; }

/* ----- stage carousel (Steam-ish) ----- */
.stage-section { padding: 88px 0 40px; }
.stage-section h2,
section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em; text-align: center; font-weight: 800;
}
.lead { text-align: center; color: var(--muted); max-width: 640px; margin: 12px auto 0; font-size: 16px; }
.stage {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  min-height: 380px;
}
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr 1fr; min-height: auto; }
}
@media (max-width: 560px) {
  .stage { grid-template-columns: 1fr; }
}
.stage-card {
  position: relative; overflow: hidden; border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--teal-night); color: #eaf6f7;
  min-height: 360px; cursor: pointer;
  transition: flex 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s ease, box-shadow 0.35s ease;
  isolation: isolate;
}
.stage-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: 0.35; transition: opacity 0.4s ease, transform 0.6s ease;
  transform: scale(1.08);
}
.stage-card[data-shot="voucher"]::before { background-image: url("assets/screenshot-voucher.png"); }
.stage-card[data-shot="invoice"]::before { background-image: url("assets/screenshot-invoice.png"); }
.stage-card[data-shot="reports"]::before { background-image: url("assets/screenshot-reports.png"); }
.stage-card[data-shot="enterprise"]::before {
  background-image: linear-gradient(145deg, #0a5561, #083038 60%, #1a3a40);
}
.stage-card .veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(6,36,40,0.15) 0%, rgba(6,36,40,0.88) 70%);
}
.stage-card .body {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px;
}
.stage-card .tag {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--orange-hot); margin-bottom: 8px;
}
.stage-card h3 {
  font-family: var(--font-display); font-size: 22px; color: #fff;
  letter-spacing: -0.02em; margin-bottom: 8px;
}
.stage-card p { font-size: 14px; color: #c5e4e8; max-width: 28ch; opacity: 0.92; }
.stage-card .note {
  margin-top: 14px; font-size: 12px; font-weight: 700; color: #9ec9cf;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.stage-card:hover,
.stage-card:focus-visible,
.stage-card.is-active {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(6, 36, 40, 0.35);
  outline: none;
}
.stage-card:hover::before,
.stage-card:focus-visible::before,
.stage-card.is-active::before {
  opacity: 0.55; transform: scale(1);
}
.stage-card:hover .note,
.stage-card:focus-visible .note,
.stage-card.is-active .note {
  opacity: 1; transform: none;
}

.stage-rail {
  display: flex; justify-content: center; gap: 8px; margin-top: 22px;
}
.stage-dot {
  width: 10px; height: 10px; border-radius: 999px; border: none;
  background: rgba(15,122,138,0.25); cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.stage-dot[aria-current="true"] { width: 28px; background: var(--teal); }

/* ----- rest ----- */
section { padding: 72px 0; }
h3 { font-size: 18px; color: var(--teal-deep); margin-bottom: 6px; font-family: var(--font-display); }
.version-line { text-align: center; margin-top: 10px; font-size: 14px; color: var(--muted); }
.version-line b { color: var(--teal-deep); }

.video-grid {
  display: grid; gap: 28px; margin-top: 36px; grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .video-grid { grid-template-columns: 1.35fr 0.75fr; align-items: start; }
}
.video-card h3 { text-align: left; }
.video-card p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.video-frame {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(10,85,97,.16);
  background: #000;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.video-frame:hover { transform: translateY(-3px); box-shadow: 0 22px 50px rgba(10,85,97,.22); }
.video-frame.desktop video { width: 100%; display: block; aspect-ratio: 16 / 9; }
.video-frame.mobile { max-width: 320px; margin: 0 auto; }
.video-frame.mobile video { width: 100%; display: block; aspect-ratio: 390 / 844; background: #111; }

.grid { display: grid; gap: 16px; margin-top: 36px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  --mx: 50%; --my: 40%;
  position: relative;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 6px;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  transform-style: preserve-3d;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(240,163,94,0.18), transparent 45%);
  opacity: 0; transition: opacity 0.25s ease;
}
.card:hover::after { opacity: 1; }
.card:hover { box-shadow: 0 18px 36px rgba(10,85,97,0.14); border-color: rgba(240,163,94,0.45); }
.card.detected { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(240,163,94,.35); }
.card .os { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; font-family: var(--font-display); }
.card .os svg { width: 24px; height: 24px; fill: var(--teal-deep); }
.card .meta { font-size: 13px; color: var(--muted); min-height: 18px; }
.card .dl {
  margin-top: 12px; text-align: center; position: relative; z-index: 1;
  background: var(--teal); color: #fff; font-weight: 800; font-size: 14px;
  padding: 11px 14px; border-radius: 12px;
}
.card .dl:hover { background: var(--teal-deep); text-decoration: none; }
.card .alt { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; position: relative; z-index: 1; }
.card.pwa { background: linear-gradient(150deg, rgba(255,255,255,0.9), rgba(254,244,234,0.95)); }
.card.enterprise { background: linear-gradient(150deg, rgba(255,255,255,0.9), rgba(232,244,246,0.95)); }
.section-label {
  margin-top: 48px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--teal-deep); text-align: center;
}
.fineprint {
  margin-top: 26px; font-size: 13.5px; color: var(--muted);
  background: rgba(255,255,255,0.75); border: 1px dashed var(--line);
  border-radius: 14px; padding: 14px 18px;
}
.fineprint b { color: var(--ink); }

.feat { display: grid; gap: 14px; margin-top: 36px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feat .f {
  background: rgba(255,255,255,0.72); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feat .f:hover { transform: translateY(-3px); border-color: rgba(15,122,138,0.35); }
.feat .f h3 { font-size: 16px; margin-bottom: 6px; color: var(--teal-deep); }
.feat .f p { font-size: 14px; color: var(--muted); }

.caveats {
  margin-top: 32px; background: rgba(255,255,255,0.8);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 12px;
}
.caveats details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.caveats details:last-child { border-bottom: none; }
.caveats summary {
  cursor: pointer; font-weight: 800; color: var(--teal-deep); list-style: none;
  font-family: var(--font-display);
}
.caveats summary::-webkit-details-marker { display: none; }
.caveats summary::before { content: "+ "; color: var(--orange); }
.caveats details[open] summary::before { content: "− "; }
.caveats ul { margin: 10px 0 6px 1.1rem; color: var(--muted); font-size: 14px; }
.caveats li { margin: 4px 0; }

.fork-banner {
  background: linear-gradient(145deg, var(--teal-night), var(--teal-deep) 55%, #0f7a8a);
  color: #eaf6f7; border-radius: 28px; padding: 52px 32px; text-align: center;
  position: relative; overflow: hidden;
}
.fork-banner::before {
  content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: rgba(240,163,94,0.2); top: -80px; right: -40px; filter: blur(10px);
}
.fork-banner h2 { color: #fff; position: relative; }
.fork-banner p { max-width: 540px; margin: 12px auto 26px; color: #cde9ec; position: relative; }
.fork-banner .btn-primary { font-size: 16px; position: relative; }
.fork-banner .star-link { display: inline-block; margin-top: 14px; color: #bfe6ea; font-size: 14px; position: relative; }

footer { padding: 36px 0 100px; text-align: center; color: var(--muted); font-size: 13.5px; }
footer .links { display: flex; gap: 18px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }

.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .ambient-orb, .hero .logo { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .stage-card, .card, .btn, .video-frame { transition: none !important; }
}
