/* Matrix Software. One family (Archivo), personality carried by the width axis:
   wide + heavy for display, normal width for reading. */

:root {
  --haze: #EFE9F6;      /* page */
  --haze-2: #E4DBF0;    /* tint panels */
  --ink: #1C1233;       /* text + dark bands */
  --ink-2: #4A3F63;     /* secondary text */
  --flamingo: #E8336F;  /* action */
  --lagoon: #12B5C9;    /* live / interactive */
  --brass: #D9A441;     /* 3D cast */
  --line: rgba(28, 18, 51, .14);

  --wide: 125;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4.4vw, 3.25rem);
  --step-4: clamp(2.75rem, 8.6vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--haze);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1; font-weight: 800; font-variation-settings: "wdth" var(--wide); letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lagoon); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--ink); color: var(--haze); padding: 8px 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--flamingo); color: #fff; border-color: var(--flamingo);
  font: inherit; font-weight: 700; font-variation-settings: "wdth" 112;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { background: #cf2460; border-color: #cf2460; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--haze); border-color: var(--ink); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: var(--step--1); }
.btn-light { background: var(--haze); color: var(--ink); border-color: var(--haze); }
.btn-light:hover { background: #fff; border-color: #fff; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--haze) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-variation-settings: "wdth" var(--wide);
  text-decoration: none; font-size: 1.05rem; white-space: nowrap;
}
.glyph { width: 22px; height: 22px; fill: var(--ink); }
.glyph rect:nth-child(2) { fill: var(--flamingo); }
.glyph rect:nth-child(3) { fill: var(--lagoon); }
.nav nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); }
.nav nav a:not(.btn) { text-decoration: none; font-size: var(--step--1); font-weight: 600; color: var(--ink-2); }
.nav nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 760px) { .nav nav a:not(.btn) { display: none; } }
@media (max-width: 380px) { .wordmark { font-size: .95rem; } .btn-small { padding: 0 14px; } }

/* Shared section rhythm */
main > section {
  padding-block: clamp(72px, 10vw, 140px);
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
}
h2 { font-size: var(--step-3); }
.section-lede { margin-top: 20px; max-width: 58ch; font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); }

/* Hero */
.hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: 40px; overflow: hidden; }
.hero h1 { font-size: var(--step-4); font-weight: 900; line-height: .9; letter-spacing: -.025em; max-width: 11ch; }
.lede { margin-top: 28px; max-width: 46ch; font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.lineup {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  height: clamp(200px, 26vw, 370px);
  border-bottom: 6px solid var(--ink);
}
.lineup .c {
  flex: 0 1 auto; min-width: 0;
  height: calc(var(--h) * 1%); width: auto;
  object-fit: contain; object-position: bottom center;
  margin-inline: calc(var(--overlap, -1.4) * 1vw);
  filter: drop-shadow(0 14px 10px rgba(28, 18, 51, .18));
  transform-origin: bottom center;
}
.c-fox     { --h: 92; }
.c-panda   { --h: 78; }
.c-trophy  { --h: 100; z-index: 2; }
.c-tiger   { --h: 74; }
.c-robot   { --h: 84; }
.c-gorilla { --h: 70; }
.c-bear    { --h: 80; }
.cast { margin: clamp(40px, 6vw, 72px) 0 0; }
.cast figcaption { margin-top: 12px; font-size: var(--step--1); color: var(--ink-2); }
@media (max-width: 760px) {
  .c-fox, .c-gorilla, .c-bear { display: none; }
  .lineup .c { --overlap: -3.5; }
}

/* One orchestrated load moment: the cast steps up onto the line. */
@media (prefers-reduced-motion: no-preference) {
  .lineup .c { animation: rise .7s cubic-bezier(.2, .9, .25, 1.15) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
  @keyframes rise { from { transform: translateY(40%) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* Demo */
.demo {
  background: var(--ink); color: var(--haze);
  display: grid; grid-template-columns: 1fr auto; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.demo h2 { font-size: clamp(3rem, 9vw, 8rem); line-height: .88; color: var(--haze); }
.demo-copy p { margin-top: 24px; max-width: 42ch; font-size: var(--step-1); line-height: 1.45; color: #CFC6E0; }
.demo-copy .demo-note { font-size: var(--step-0); color: #A79CBF; }
.demo-copy .score { font-variation-settings: "wdth" var(--wide); font-weight: 700; color: var(--lagoon); }
.score span { font-variant-numeric: tabular-nums; }

.phone {
  width: min(340px, 82vw);
  padding: 12px; border-radius: 44px;
  background: #0E0820;
  box-shadow: 0 0 0 2px #3A2E57, 0 40px 80px rgba(0, 0, 0, .45), 0 0 120px rgba(232, 51, 111, .25);
}
.screen { position: relative; aspect-ratio: 9 / 16; border-radius: 34px; overflow: hidden; background: #2a1840; }
.screen video { width: 100%; height: 100%; object-fit: cover; }
.targets .t {
  position: absolute; left: var(--x); top: var(--y); translate: -50% -50%;
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid #fff; background: rgba(18, 181, 201, .28);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .18);
  cursor: pointer;
}
.targets .t::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: #fff; }
.targets .t:hover { background: var(--flamingo); }
@media (prefers-reduced-motion: no-preference) {
  .targets .t { animation: pulse 1.8s ease-in-out infinite; }
  .targets .t:nth-child(2) { animation-delay: .2s; }
  .targets .t:nth-child(3) { animation-delay: .4s; }
  .targets .t:nth-child(4) { animation-delay: .6s; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }
}
.targets.is-off { display: none; }
.hint {
  position: absolute; left: 50%; bottom: 7%; translate: -50% 0;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(28, 18, 51, .72); color: #fff;
  font-size: var(--step--1); font-weight: 600; white-space: nowrap;
}
.result {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: linear-gradient(to top, rgba(28, 18, 51, .8), rgba(28, 18, 51, .15) 70%);
}
.result[hidden] { display: none; }
.result-word { font-size: 4rem; font-weight: 900; font-variation-settings: "wdth" var(--wide); line-height: 1; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, .4); }
.result-word.is-goal { color: var(--lagoon); }
.result-word.is-save { color: var(--flamingo); }
@media (max-width: 860px) {
  .demo { grid-template-columns: 1fr; justify-items: center; }
  .demo-copy { justify-self: stretch; }
}

/* Art range */
.styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); margin-top: 56px; }
.style h3 { margin-top: 20px; font-size: var(--step-2); }
.style p { margin-top: 8px; max-width: 44ch; color: var(--ink-2); }
.stage { display: flex; align-items: flex-end; justify-content: center; height: clamp(240px, 30vw, 380px); padding: 24px 16px 0; border-radius: 28px; overflow: hidden; }
.stage img { height: 92%; width: auto; min-width: 0; object-fit: contain; object-position: bottom; margin-inline: -4%; }
.style-3d .stage { background: radial-gradient(120% 90% at 50% 100%, #F6DFA6, var(--brass) 70%); }
.style-3d .stage img:nth-child(2) { height: 100%; z-index: 1; }
.style-neon .stage { background: linear-gradient(170deg, #FF7AB0 0%, #8E4BD6 55%, #2B1E6B 100%); }
.style-neon .stage img { height: 96%; }
@media (max-width: 760px) { .styles { grid-template-columns: 1fr; } }

.props { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; margin-top: 28px; }
.props li { background: var(--haze-2); border-radius: 20px; padding: clamp(12px, 2vw, 24px); }
.props img { width: 100%; height: auto; }
@media (max-width: 520px) { .props { grid-template-columns: repeat(2, 1fr); } }

/* Capabilities */
.build { background: var(--haze-2); }
.caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 5vw, 72px); margin-top: 56px; }
.caps > div { padding: 28px 0; border-top: 2px solid var(--ink); }
.caps dt { font-size: var(--step-1); font-weight: 800; font-variation-settings: "wdth" 115; }
.caps dd { margin: 8px 0 0; max-width: 48ch; color: var(--ink-2); }
@media (max-width: 760px) { .caps { grid-template-columns: 1fr; } }

/* Pace */
.pace { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 96px); }
.why { margin: 28px 0 0; padding: 0; list-style: none; }
.why li { position: relative; padding: 10px 0 10px 28px; max-width: 46ch; }
.why li::before { content: ""; position: absolute; left: 0; top: 19px; width: 12px; height: 12px; border-radius: 3px; background: var(--flamingo); }
.timeline { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.timeline li { position: relative; padding: 0 0 36px 64px; counter-increment: step; }
.timeline li::before {
  content: counter(step);
  position: absolute; left: 0; top: -4px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--haze);
  font-weight: 800; font-variation-settings: "wdth" var(--wide);
}
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { background: var(--flamingo); }
.when { font-size: var(--step--1); font-weight: 700; color: var(--flamingo); }
.timeline h3 { margin-top: 4px; font-size: var(--step-2); }
.timeline p { margin-top: 8px; color: var(--ink-2); max-width: 44ch; }
@media (max-width: 860px) { .pace { grid-template-columns: 1fr; } }

/* Contact */
.contact { position: relative; overflow: hidden; background: var(--ink); color: #fff; min-height: min(80vh, 680px); display: grid; place-items: center; text-align: center; }
.contact-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.contact::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(70% 60% at 50% 50%, rgba(28, 18, 51, .75), rgba(28, 18, 51, .2)); }
.contact-inner { position: relative; z-index: 2; max-width: 680px; }
.contact h2 { font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: .92; }
.contact p { margin: 24px auto 32px; max-width: 44ch; font-size: var(--step-1); color: #E6DEF3; }

/* Footer */
.foot { display: flex; justify-content: space-between; gap: 16px; padding: 28px var(--gutter); font-size: var(--step--1); color: var(--ink-2); }
