/* Figtree (SIL Open Font License), self-hosted: no third-party requests */
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #16140F;          /* brand ink, matches the lockup */
  --bg-2: #1F1C16;
  --fg: #F2EEE6;          /* brand cream */
  --fg-2: #A8A296;
  --line: #ffffff14;
  --orange: #FF4A1C;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 18px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 999px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
h1 { font-size: clamp(48px, 8vw, 104px); }
h2 { font-size: clamp(40px, 5.6vw, 72px); }
h3 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.015em; line-height: 1.15; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 10;
  transition: background-color .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.solid { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-logo img { height: 22px; width: auto; }
.nav nav { display: flex; gap: clamp(20px, 3vw, 40px); }
.nav nav a { font-size: 15px; font-weight: 500; color: var(--fg-2); transition: color .2s ease; }
.nav nav a:hover { color: var(--fg); }

/* ---------- hero ---------- */
.hero {
  position: relative; height: 100svh; min-height: 640px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-top: clamp(120px, 18vh, 190px);
  background: radial-gradient(60% 50% at 50% 100%, #ff4a1c1f 0%, transparent 70%);
}
.hero-text { position: relative; padding: 0 var(--gutter); }
.hero-text p { margin: 22px 0 0; font-size: clamp(18px, 2vw, 24px); font-weight: 500; color: var(--fg-2); }
.hero-phone {
  position: absolute; left: 50%; bottom: 0; translate: -50% 38%;
  width: clamp(240px, 26vw, 340px); aspect-ratio: 9 / 16;
  border-radius: 44px; padding: 11px; background: #050505;
  box-shadow: 0 0 0 1.5px #3a362c, 0 -20px 120px -20px #ff4a1c40;
}
.hero-phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; background: #1C2440; }
.hero-phone.reveal { transform: translateY(80px); transition-duration: 1.2s; transition-delay: .15s; }
.hero-phone.reveal.in { transform: none; }

/* ---------- castle jump showcase ---------- */
.showcase { padding: clamp(100px, 14vw, 180px) 0 clamp(60px, 8vw, 120px); }
.showcase-intro { text-align: center; }
.cj-icon { width: 120px; height: 120px; margin: 0 auto 32px; border-radius: 27px; image-rendering: pixelated; box-shadow: 0 20px 60px -10px #9cc2ff33; }
.showcase-intro .sub { max-width: 30ch; margin: 20px auto 0; font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; color: var(--fg-2); line-height: 1.4; }
.status {
  display: inline-block; margin: 28px 0 0; padding: 8px 16px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--fg-2);
}

.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); margin-top: clamp(60px, 10vw, 140px); }
.step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .5s var(--ease); }
.step.active { opacity: 1; }
.step p { margin: 18px 0 0; max-width: 40ch; color: var(--fg-2); font-size: 19px; }
.stage { position: relative; }
.device {
  position: sticky; top: calc(50vh - min(34vh, 300px));
  width: min(100%, 340px); aspect-ratio: 9 / 16; max-height: 68vh; margin: 0 auto;
  border-radius: 44px; padding: 11px; background: #050505;
  box-shadow: 0 0 0 1.5px #3a362c, 0 40px 100px -30px #000;
}
.device video { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; background: #1C2440; transition: opacity .25s ease; }
.device video.swap { opacity: 0; }

@media (max-width: 820px) {
  .story { grid-template-columns: 1fr; }
  .stage { order: -1; position: sticky; top: 68px; z-index: 1; height: 52vh; padding: 8px 0; background: var(--bg); }
  .device { position: static; height: 100%; width: auto; max-height: none; border-radius: 32px; padding: 8px; }
  .device video { border-radius: 25px; }
  .step { min-height: 62vh; justify-content: flex-start; padding-top: 4vh; }
}

/* ---------- dig deep ---------- */
.dig { padding: clamp(100px, 12vw, 160px) 0; border-top: 1px solid var(--line); }
.dig-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.dig-head .sub { max-width: 34ch; margin: 20px 0 0; font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; color: var(--fg-2); line-height: 1.4; }
.dig-head .status { margin: 0; }
.dig figure { margin: 0; }
.dig img { width: 100%; height: auto; border-radius: 20px; background: var(--bg-2); }
.dig-hero { margin-top: clamp(40px, 6vw, 72px) !important; }
.dig-hero img { aspect-ratio: 16 / 8; object-fit: cover; border-radius: 28px; }
.dig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); margin-top: clamp(16px, 2.4vw, 28px); }
.dig-grid img { aspect-ratio: 4 / 3; object-fit: cover; }
.dig-grid figcaption { margin-top: 18px; color: var(--fg-2); font-size: 16px; line-height: 1.55; }
.dig-grid strong { display: block; color: var(--fg); font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.dig-coop { margin: clamp(48px, 6vw, 72px) 0 0; font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; letter-spacing: -0.01em; max-width: 40ch; }
@media (max-width: 820px) { .dig-grid { grid-template-columns: 1fr; gap: 36px; } .dig-hero img { aspect-ratio: 4 / 3; } }

/* ---------- about ---------- */
.about { padding: clamp(100px, 12vw, 160px) 0; border-top: 1px solid var(--line); }
.about-lede { max-width: 30ch; margin: 28px 0 0; font-size: clamp(24px, 2.8vw, 34px); font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; color: var(--fg); }
/* ---------- contact ---------- */
.contact { padding: clamp(100px, 12vw, 160px) 0; text-align: center; background: var(--bg-2); }
.contact p { margin: 20px auto 40px; color: var(--fg-2); font-size: 20px; max-width: 36ch; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 24px 52px; border-radius: 999px;
  background: var(--fg); color: var(--bg); font-weight: 700; font-size: clamp(20px, 2vw, 24px);
  transition: transform .2s var(--ease), background-color .2s ease;
}
.pill:hover { transform: scale(1.04); background: #fff; }
.pill:active { transform: scale(.98); }

.mail-text { display: block; width: fit-content; margin: 28px auto 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; color: var(--fg); border-bottom: 2px solid var(--line); padding-bottom: 2px; transition: border-color .2s ease; }
.mail-text:hover { border-color: var(--fg); }

/* ---------- footer ---------- */
.foot { padding: 72px 0 36px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand img { height: 26px; width: auto; }
.foot-brand p { margin: 16px 0 0; color: var(--fg-2); font-size: 15px; }
.foot h4 { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--fg); }
.foot-grid a { display: block; color: var(--fg-2); font-size: 15px; padding: 4px 0; transition: color .2s ease; }
.foot-grid a:hover { color: var(--fg); }
.foot-legal { margin-top: 64px; color: #6f6a5f; font-size: 14px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}


/* 404 page */
.notfound { min-height: 100svh; display: grid; place-items: center; background: var(--bg); }
