/* InnoxSofty — cinematic edition. Dark stage, colour comes from the app on screen. */

:root {
  --bg: #050507;
  --ink: #f4f3ef;
  --ink-2: #a3a3ab;
  --ink-3: #5d5d66;
  --line: rgba(255, 255, 255, .09);
  --accent: #e0962a;
  --ok: #35c48d;
  --soon: #e0a93c;
  --display: "Inter Tight", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gut: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; overflow-x: clip; }
html::-webkit-scrollbar { display: none; }
html.loading body { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }

/* word/char masks for reveals */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w > i { display: inline-block; font-style: inherit; will-change: transform; }

/* ---------- atmosphere ---------- */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .85; }

.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); }
  40% { transform: translate(4%, -6%); } 60% { transform: translate(-7%, -2%); }
  80% { transform: translate(6%, 5%); } 100% { transform: translate(0, 0); }
}
.vignette {
  position: fixed; inset: 0; z-index: 89; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .7) 100%);
}

.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 2px; z-index: 95; }
.progress i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: background .8s; }

.cursor { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; mix-blend-mode: difference; }
.cursor span {
  display: block; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #fff; transition: transform .35s var(--ease);
}
.cursor.is-on span { transform: scale(4); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- opener ---------- */
.opener { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #000; overflow: hidden; }
.opener .bar { position: absolute; left: 0; right: 0; height: 12vh; background: #000; z-index: 2; }
.bar-top { top: 0; } .bar-bot { bottom: 0; }
.opener-stage { text-align: center; padding: 0 var(--gut); }
.opener-kicker { color: var(--ink-3); display: block; margin-bottom: 2rem; opacity: 0; }
.opener-beats { position: relative; height: 1.1em; font: 800 clamp(3rem, 11vw, 9.5rem)/1 var(--display); letter-spacing: -.05em; }
.opener-beats span { position: absolute; left: 50%; top: 0; white-space: nowrap; transform: translateX(-50%); opacity: 0; }
.opener-beats span:last-child em { color: var(--accent); }
.opener-line { margin: 2.2rem auto 0; max-width: 34ch; color: var(--ink-2); font-size: clamp(1rem, 1.6vw, 1.25rem); opacity: 0; }
.opener-count { position: absolute; left: var(--gut); bottom: calc(12vh + 1.2rem); color: var(--ink-3); z-index: 3; }
.opener-skip { position: absolute; right: var(--gut); bottom: calc(12vh + 1rem); color: var(--ink-2); z-index: 3; padding: .6rem 0; }
.opener-skip:hover { color: var(--ink); }

/* ---------- top bar ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; gap: 2rem; padding: 1.25rem var(--gut);
  mix-blend-mode: difference;
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { opacity: .55; transition: opacity .3s; position: relative; }
.nav a:hover, .nav a.on { opacity: 1; }
.nav a.on::before { content: ""; position: absolute; left: -.9rem; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: currentColor; }
.chapter { color: var(--ink-2); min-width: 5.5em; text-align: right; }
@media (max-width: 760px) { .nav { display: none; } .chapter { margin-left: auto; } }

/* ---------- hero ---------- */
main { position: relative; z-index: 1; }
section { position: relative; }
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 7rem var(--gut) 4rem; }
.hero-kicker { color: var(--ink-3); margin-bottom: 2rem; display: flex; align-items: center; gap: .9rem; }
.hero-kicker::before { content: ""; width: 3rem; height: 1px; background: currentColor; }
.hero h1 { margin: 0; font: 800 clamp(3.4rem, 13.5vw, 13rem)/.88 var(--display); letter-spacing: -.055em; }
.hero h1 .serif { display: block; font-size: .62em; line-height: 1; color: var(--ink-2); letter-spacing: -.02em; margin-top: .12em; }
.hero-foot { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-top: clamp(2.5rem, 7vh, 5rem); flex-wrap: wrap; }
.hero-chips { display: flex; gap: .6rem; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .9rem .45rem .45rem;
  border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, .03);
  backdrop-filter: blur(8px); font-size: .9rem; transition: border-color .3s, background .3s;
}
.chip:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.chip img { width: 26px; height: 26px; border-radius: 8px; }
.chip i { font-style: normal; font: 500 .6rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soon); }
.scroll-cue { display: flex; align-items: center; gap: .8rem; color: var(--ink-3); }
.scroll-cue b { width: 1px; height: 46px; background: linear-gradient(var(--ink-3), transparent); position: relative; overflow: hidden; }
.scroll-cue b::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: drip 1.8s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* ---------- manifesto ---------- */
.manifesto { padding: 20vh var(--gut); }
.manifesto p {
  margin: 0; max-width: 22ch; font: 500 clamp(1.9rem, 5.2vw, 4.6rem)/1.08 var(--display); letter-spacing: -.035em;
}
.manifesto p span { opacity: .14; transition: none; }
.manifesto .mono { color: var(--ink-3); display: block; margin-bottom: 2.5rem; }

/* ---------- app scenes ---------- */
.scene { height: 100svh; overflow: hidden; position: relative; }
.scene-inner { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr minmax(260px, 30vw) 1fr; align-items: center; gap: clamp(1.5rem, 4vw, 4rem); padding: 6rem var(--gut) 3rem; }
.scene-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40vw 40vw at 50% 55%, color-mix(in srgb, var(--c) 34%, transparent), transparent 70%),
    radial-gradient(60vw 30vw at 50% 110%, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%);
}
.scene-name {
  position: absolute; left: 0; top: 50%; white-space: nowrap; pointer-events: none;
  font: 800 clamp(8rem, 30vw, 30rem)/1 var(--display); letter-spacing: -.06em; transform: translateY(-50%);
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--c) 22%, transparent);
}
.scene-num { position: absolute; top: 5.4rem; left: var(--gut); color: var(--ink-3); }
.scene-num b { color: var(--c); font-weight: 500; }

.scene-left { align-self: center; }
.app-id { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.app-id img { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 10px 40px -10px var(--c); }
.badge { display: inline-flex; align-items: center; gap: .5rem; color: var(--ok); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); animation: pulse 2s infinite; }
.badge[data-status="soon"] { color: var(--soon); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px transparent; } }
.scene h2 { margin: 0; font: 800 clamp(2.8rem, 6vw, 5.6rem)/.92 var(--display); letter-spacing: -.05em; }
.tagline { margin: .9rem 0 1.4rem; font: italic 400 clamp(1.3rem, 2.2vw, 2rem)/1.15 var(--serif); color: var(--c); }
.desc { margin: 0; color: var(--ink-2); max-width: 42ch; }
.links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem; padding: .85rem 1.3rem; border-radius: 99px;
  border: 1px solid var(--line); font-size: .9rem; font-weight: 500; transition: transform .4s var(--ease), background .3s, border-color .3s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--c); }
.btn-solid { background: var(--c); border-color: var(--c); color: #0a0a0a; }
.btn-off { opacity: .45; pointer-events: none; }
.btn svg { width: 14px; height: 14px; }

.phone-wrap { perspective: 1400px; display: grid; place-items: center; }
.phone-wrap > div { width: 100%; display: flex; flex-direction: column; align-items: center; }
.phone {
  position: relative; display: block; width: min(100%, 320px, calc((100svh - 230px) * .5625 + 20px)); border-radius: 38px; padding: 10px; cursor: zoom-in;
  background: linear-gradient(145deg, #2a2a30, #0d0d10); transform-style: preserve-3d;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 50px 120px -30px color-mix(in srgb, var(--c) 60%, #000), 0 30px 60px -20px #000;
}
.screen { position: relative; aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; background: #000; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.screen img + img { clip-path: inset(100% 0 0 0); }
.screen .ph { position: absolute; inset: 0; overflow: hidden; background: #0d0d0f; }
/* loading: skeleton app UI + drifting accent glow + light sweep */
.screen .ph::before { content: ""; position: absolute; inset: 0; opacity: .9;
  background:
    radial-gradient(60% 40% at 30% 20%, color-mix(in srgb, var(--c, #888) 35%, transparent), transparent 70%),
    radial-gradient(50% 35% at 75% 80%, color-mix(in srgb, var(--c, #888) 22%, transparent), transparent 70%);
  animation: ph-drift 6s ease-in-out infinite alternate; }
.screen .ph::after { content: ""; position: absolute; inset: 12% 10%;
  background:
    linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .14) 50%, transparent 70%) -150% 0 / 200% 100% no-repeat,
    linear-gradient(#ffffff14, #ffffff14) 0 0 / 45% 4% no-repeat,
    linear-gradient(#ffffff0f, #ffffff0f) 0 10% / 100% 30% no-repeat,
    linear-gradient(#ffffff12, #ffffff12) 0 47% / 80% 3% no-repeat,
    linear-gradient(#ffffff0c, #ffffff0c) 0 54% / 60% 3% no-repeat,
    linear-gradient(#ffffff0f, #ffffff0f) 0 66% / 47% 22% no-repeat,
    linear-gradient(#ffffff0f, #ffffff0f) 100% 66% / 47% 22% no-repeat,
    linear-gradient(#ffffff0c, #ffffff0c) 0 100% / 100% 6% no-repeat;
  border-radius: 6px; animation: ph-sweep 1.8s ease-in-out infinite; }
@keyframes ph-drift { to { transform: translate(-8%, 6%) scale(1.15); } }
@keyframes ph-sweep { to { background-position: 250% 0, 0 0, 0 10%, 0 47%, 0 54%, 0 66%, 100% 66%, 0 100%; } }
@media (prefers-reduced-motion: reduce) { .screen .ph::before, .screen .ph::after { animation: none; } }
.glare { position: absolute; inset: 10px; border-radius: 28px; z-index: 2; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, .16) 0%, transparent 35%); }
.shot-cap { margin-top: 1.4rem; color: var(--ink-3); display: flex; gap: 1rem; justify-content: center; }
.shot-cap span { transition: color .3s; }
.shot-cap span.on { color: var(--ink); }

.scene-right { align-self: center; }
.features { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.features li { display: grid; grid-template-columns: 2.2rem 1fr; padding: .55rem 0; line-height: 1.45; border-bottom: 1px solid var(--line); font-size: .92rem; color: var(--ink-2); }
.features li small { font: 500 .66rem/2 var(--mono); color: var(--c); }
.features li b { color: var(--ink); font-weight: 600; }
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); margin-top: 1.4rem; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.spec div { padding: .7rem .9rem; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.spec dt { font: 500 .62rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.spec dd { margin: .15rem 0 0; font-weight: 500; font-size: .9rem; }
.play {
  display: inline-flex; align-items: center; gap: .7rem; margin-top: 1.4rem; color: var(--ink);
}
.play b { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #000; transition: transform .4s var(--ease); }
.play:hover b { transform: scale(1.12); }
.play svg { width: 14px; height: 14px; margin-left: 2px; }

.shots-m { display: none; }

/* screenshot viewer */
.lb { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 3.5rem var(--gut) 2rem; background: rgba(0, 0, 0, .92); backdrop-filter: blur(14px); }
.lb[hidden] { display: none; }
.lb figure { margin: 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lb img { max-height: calc(100svh - 9rem); max-width: 100%; width: auto; border-radius: 20px; box-shadow: 0 30px 80px -20px #000; }
.lb figcaption { margin-top: 1rem; color: var(--ink-2); }
.lb-btn { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1px solid var(--line); font-size: 1.2rem; transition: background .3s; }
.lb-btn:hover { background: rgba(255, 255, 255, .08); }
.lb-close { position: absolute; top: 1rem; right: var(--gut); font-size: 1.6rem; }
@media (max-width: 760px) {
  .lb { padding-inline: 0; }
  .lb-prev, .lb-next { position: absolute; bottom: 1.2rem; }
  .lb-prev { left: var(--gut); } .lb-next { right: var(--gut); }
  .lb img { max-height: calc(100svh - 11rem); border-radius: 16px; }
  .lb figure { padding: 0 var(--gut); margin-bottom: 3rem; }
}

/* scenes stack on narrow screens; features collapse to keep it in one viewport */
@media (max-width: 1100px) {
  .scene-inner { grid-template-columns: 1fr minmax(220px, 36vw); grid-template-rows: auto auto; align-content: center; }
  .scene-left { grid-column: 1; }
  .phone-wrap { grid-column: 2; grid-row: 1 / span 2; }
  .scene-right { grid-column: 1; }
  .features li:nth-child(n+5) { display: none; }
  .spec { display: none; }
  .scene-inner { padding-top: 6.5rem; row-gap: 1rem; }
  .app-id { margin-bottom: 1rem; }
}
@media (max-width: 760px) {
  .scene { height: auto; min-height: 100svh; overflow: visible; }
  .scene-inner { position: relative; grid-template-columns: minmax(0, 1fr); padding: 7.5rem var(--gut) 4rem; }
  .phone-wrap, .scene-left, .scene-right { grid-column: 1; grid-row: auto; }
  .phone-wrap { display: none; }
  .scene-name { display: none; }
  .shots-m { display: block; order: -1; position: relative; margin: -1rem calc(var(--gut) * -1) 0; }
  /* accent pool of light behind the centre card */
  .shots-m::before {
    content: ""; position: absolute; left: 50%; top: 42%; width: 80vw; height: 80vw; transform: translate(-50%, -50%);
    background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent), transparent 65%); filter: blur(20px); pointer-events: none;
  }
  .shots-m .track {
    position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 24px calc((100vw - var(--card)) / 2) 8px; perspective: 1000px; --card: min(64vw, 270px);
  }
  .shots-m .track::-webkit-scrollbar { display: none; }
  /* main.js sets transform/opacity per card from its distance to centre */
  .shots-m figure { flex: 0 0 var(--card); margin: 0 -4px; scroll-snap-align: center; transform-origin: 50% 60%; will-change: transform; }
  .mini {
    display: block; width: 100%; padding: 7px; border-radius: 30px;
    background: linear-gradient(150deg, #34343c, #0b0b0e 60%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 30px 60px -20px #000, 0 20px 70px -25px var(--c);
  }
  .mini img { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; border-radius: 23px; background: #000; }
  .shots-m figcaption { text-align: center; margin-top: 1rem; color: var(--ink); letter-spacing: .2em; }
  .dots { position: relative; display: flex; justify-content: center; gap: 6px; margin-top: .9rem; }
  .dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--ink-3); transition: width .4s var(--ease), background .4s; }
  .dots i.on { width: 22px; background: var(--c); }
  .shots-m .hint { position: relative; text-align: center; color: var(--ink-3); margin: .7rem 0 1.5rem; font-size: .6rem; }
  .features li:nth-child(n+5) { display: grid; }
  .spec { display: grid; }
  .scene-num { top: 5rem; }
}

/* ---------- feature reel ---------- */
.reel { padding: 14vh 0; overflow: hidden; border-block: 1px solid var(--line); }
.reel-row { display: flex; gap: 3rem; white-space: nowrap; font: 800 clamp(2.4rem, 7vw, 6.5rem)/1.1 var(--display); letter-spacing: -.045em; will-change: transform; }
.reel-row + .reel-row { margin-top: .4rem; }
.reel-row span { display: inline-flex; align-items: center; gap: 3rem; }
.reel-row span::after { content: "✦"; font-size: .35em; color: var(--accent); }
.reel-row.ghost { color: transparent; -webkit-text-stroke: 1px var(--ink-3); }

/* ---------- outro ---------- */
.outro { padding: 22vh var(--gut) 3rem; min-height: 100svh; display: flex; flex-direction: column; }
.outro h2 { margin: 0; font: 800 clamp(3rem, 9vw, 9rem)/.9 var(--display); letter-spacing: -.055em; max-width: 12ch; }
.outro-body { margin: 2.5rem 0 0; max-width: 52ch; color: var(--ink-2); font-size: 1.1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1px; margin-top: 4rem; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.card { position: relative; padding: 1.6rem; background: var(--bg); display: flex; flex-direction: column; gap: .3rem; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c, #fff) 22%, transparent), transparent 60%); opacity: 0; transition: opacity .4s; }
.card:hover::before { opacity: 1; }
.card b { font-size: 1.15rem; position: relative; }
.card span { color: var(--ink-3); font-size: .85rem; position: relative; }
.card .arr { position: absolute; top: 1.4rem; right: 1.4rem; transition: transform .4s var(--ease); }
.card:hover .arr { transform: translate(4px, -4px); }
.wordmark { margin-top: auto; padding-top: 12vh; font: 800 clamp(4rem, 21vw, 22rem)/.8 var(--display); letter-spacing: -.07em; color: transparent; -webkit-text-stroke: 1px var(--ink-3); white-space: nowrap; overflow: hidden; }
.legal { display: flex; justify-content: space-between; margin-top: 2rem; color: var(--ink-3); flex-wrap: wrap; gap: 1rem; }

/* ---------- video ---------- */
.vb { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(0, 0, 0, .9); backdrop-filter: blur(12px); padding: var(--gut); }
.vb[hidden] { display: none; }
.vb iframe { width: min(100%, 1100px); aspect-ratio: 16 / 9; border: 0; border-radius: 16px; background: #000; }
.vb-close { position: absolute; top: 1rem; right: var(--gut); font-size: 2rem; line-height: 1; padding: .5rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  .grain, .badge::before, .scroll-cue b::after { animation: none; }
  .manifesto p span { opacity: 1; }
}
