/* The structure every Appswalaa app site shares. Colour, type and character come from the site's own css/site.css, which sets:
   --bg --bg2 --fg --fg2 --fg3 --line --card --accent --accent-ink --accent2 --display --body --display-weight
   and restyles anything it likes. Nothing here names a colour of its own except neutral fallbacks. */

:root {
  --bg: #0b0d14; --bg2: #121521; --fg: #f4f1ea; --fg2: rgba(244, 241, 234, .74); --fg3: rgba(244, 241, 234, .5);
  --line: rgba(255, 255, 255, .12); --card: rgba(255, 255, 255, .05); --accent: #e5b86a; --accent-ink: #120d05; --accent2: #7fb2ff;
  --display: Georgia, serif; --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --display-weight: 400;
  --radius: 28px; --ease: cubic-bezier(.2, .7, .1, 1); --ease-io: cubic-bezier(.65, 0, .35, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--fg); font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
main { overflow-x: clip; }
img, svg, canvas { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.wrap.narrow { max-width: 900px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: -.02em; line-height: 1.02; }
.eyebrow { font: 800 12.5px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--fg3); margin-bottom: 20px; display: inline-flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 30px; height: 2px; border-radius: 2px; background: var(--accent); }
.lead { font-size: clamp(18px, 1.8vw, 21px); color: var(--fg2); max-width: 34em; line-height: 1.55; }
h2.big { font-size: clamp(40px, 6vw, 86px); }
.section { padding: clamp(80px, 13vh, 150px) 0; position: relative; }
.sec-head { max-width: 900px; margin-bottom: clamp(36px, 6vh, 70px); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font: 800 16px/1 var(--body); transition: transform .35s var(--ease), box-shadow .35s; }
.btn:hover { box-shadow: 0 14px 36px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn i { font-style: normal; transition: transform .3s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: var(--card); box-shadow: none; }
.btn.small { min-height: 44px; padding: 0 20px; font-size: 14.5px; }

/* header */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px clamp(20px, 4vw, 44px); border-bottom: 1px solid transparent; transition: background .4s, border-color .4s, padding .4s var(--ease); }
.bar.is-scrolled { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-color: var(--line); padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font: var(--display-weight) 26px/1 var(--display); letter-spacing: -.01em; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.bar-nav { display: flex; gap: 4px; position: absolute; left: 50%; transform: translateX(-50%); }
.bar-nav a { padding: 9px 15px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--fg2); transition: color .2s, background .2s; }
.bar-nav a:hover { color: var(--fg); background: var(--card); }
.bar-right { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); position: relative; }
.menu-btn i { position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: var(--fg); transition: transform .35s var(--ease), top .35s var(--ease); }
.menu-btn i:first-child { top: 18px; } .menu-btn i:last-child { top: 25px; }
body.menu-open .menu-btn i:first-child { top: 21px; transform: rotate(45deg); } body.menu-open .menu-btn i:last-child { top: 21px; transform: rotate(-45deg); }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .bar-nav { flex-direction: column; position: fixed; top: 70px; left: 12px; right: 12px; transform: translateY(-10px); padding: 10px; border-radius: 24px; background: var(--bg2); border: 1px solid var(--line); opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); }
  body.menu-open .bar-nav { opacity: 1; transform: none; pointer-events: auto; }
  .bar-nav a { padding: 15px 18px; font-size: 18px; }
}
@media (max-width: 420px) { .bar .btn.small { display: none; } }

/* hero: the scene fills it; copy on the left (wide) or below the scene (narrow) */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; isolation: isolate; padding: 120px 0 80px; touch-action: pan-y; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero.has-3d .scene { opacity: 1; }
.hero.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.hero-fallback { position: absolute; z-index: -2; right: 10%; top: 50%; transform: translateY(-50%); filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .4)); }
.hero-fallback img { width: clamp(160px, 22vw, 260px); height: auto; border-radius: 22%; }
.hero.has-3d .hero-fallback { display: none; }
.hero-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 42%, transparent 66%), linear-gradient(0deg, var(--bg) 0%, transparent 24%); }
.hero-copy { position: relative; z-index: 2; }
.hero-copy > * { animation: kit-up 1.1s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; } .hero-copy > :nth-child(3) { animation-delay: .2s; } .hero-copy > :nth-child(4) { animation-delay: .32s; }
.hero-copy > :nth-child(5) { animation-delay: .44s; } .hero-copy > :nth-child(6) { animation-delay: .56s; } .hero-copy > :nth-child(7) { animation-delay: .68s; }
@keyframes kit-up { from { opacity: 0; transform: translate3d(0, 26px, 0); } }
.crumb { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font: 700 13.5px/1 var(--body); color: var(--fg2); }
.crumb span { padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 10%, transparent); color: var(--fg); }
.crumb b { color: var(--accent); }
.title { font-size: clamp(60px, 9vw, 140px); line-height: .92; letter-spacing: -.03em; max-width: 7em; }
.tagline { margin-top: 14px; font: var(--display-weight) clamp(24px, 2.8vw, 38px)/1.15 var(--display); color: var(--accent); max-width: 18em; }
.hero .lead { margin-top: 22px; max-width: 29em; }
.cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.drag-hint { position: absolute; right: clamp(20px, 4vw, 44px); bottom: 28px; font: 800 11.5px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--fg3); opacity: 0; transition: opacity .6s; }
.hero.has-3d .drag-hint { opacity: 1; }
@media (max-width: 900px) {
  .hero { align-items: flex-end; padding-top: max(52svh, 360px); }
  .hero-shade { background: linear-gradient(180deg, transparent 0%, transparent 38%, color-mix(in srgb, var(--bg) 82%, transparent) 56%, var(--bg) 100%); }
  .hero-fallback { top: 25%; left: 50%; right: auto; transform: translate(-50%, -50%); }
  .drag-hint { top: 90px; bottom: auto; }
}

/* features */
.feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 20px); }
.feat { position: relative; padding: 28px 24px 30px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.feat > * { transform: translateZ(24px); }
.feat-n { display: inline-block; margin-bottom: 22px; font: 800 13px/1 var(--body); letter-spacing: .12em; color: var(--accent); }
.feat h3 { font-size: clamp(25px, 2.2vw, 32px); margin-bottom: 10px; }
.feat p { color: var(--fg2); font-size: 16px; }
@media (max-width: 1080px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feats { grid-template-columns: 1fr; } }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); position: relative; }
.steps::before { content: ""; position: absolute; left: 44px; right: 8%; top: 44px; height: 2px; background: var(--accent); opacity: .5; transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.6s var(--ease) .2s; }
.steps.on::before { transform: none; }
.step { position: relative; }
.step b { display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: 24px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); color: var(--accent); font: var(--display-weight) 40px/1 var(--display); position: relative; }
.step h3 { font-size: clamp(26px, 2.4vw, 36px); margin-bottom: 8px; }
.step p { color: var(--fg2); max-width: 22em; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 30px; }
  .steps::before { left: 43px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; transform-origin: 50% 0; transform: scaleY(0); }
  .steps.on::before { transform: none; }
  .step { display: grid; grid-template-columns: 88px 1fr; gap: 22px; align-items: start; }
  .step b { margin: 0; }
}

/* promise: a tilted ribbon */
.promise { overflow: hidden; padding: 24px 0; background: var(--accent); color: var(--accent-ink); transform: perspective(900px) rotateX(8deg) rotateZ(-2deg) scale(1.05); margin: clamp(30px, 6vh, 70px) 0; }
.promise-track { display: flex; width: max-content; animation: kit-run 36s linear infinite; }
.promise span { display: inline-flex; align-items: center; gap: 42px; padding: 0 21px; font: var(--display-weight) clamp(24px, 3vw, 42px)/1 var(--display); white-space: nowrap; }
.promise span::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: .55; }
@keyframes kit-run { to { transform: translate3d(-50%, 0, 0); } }

/* early access */
.early { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(26px, 4vw, 56px); align-items: center; padding: clamp(28px, 5vw, 60px); border-radius: calc(var(--radius) + 8px); background: var(--bg2); border: 1px solid var(--line); }
.early > * { transform: translateZ(26px); }
.early h2.big { font-size: clamp(40px, 5vw, 74px); margin-bottom: 16px; }
.early-form { display: flex; flex-direction: column; gap: 12px; }
.early-label { font-weight: 800; font-size: 15px; color: var(--fg2); }
.early-row { display: flex; gap: 10px; }
.early-row input { flex: 1; min-width: 0; min-height: 58px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--fg); font: 600 17px/1 var(--body); }
.early-row input::placeholder { color: var(--fg3); }
.early-row input:focus { outline: none; border-color: var(--accent); }
.early-row input[aria-invalid="true"] { border-color: #e2554a; }
.early-row .btn { min-height: 58px; }
.early-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.early-msg { min-height: 1.4em; font-weight: 700; color: var(--accent2); }
.early-msg.bad { color: #e2554a; }
.early-form.done .early-row { opacity: .55; }
.early-fine { font-size: 14px; color: var(--fg3); }
.early-fine a { color: var(--fg2); text-decoration: underline; }
@media (max-width: 860px) { .early { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .early-row { flex-direction: column; } }

/* questions */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font: var(--display-weight) clamp(22px, 2.3vw, 30px)/1.2 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); font: 400 22px/1 var(--body); color: var(--accent); transition: transform .4s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--fg2); padding: 0 50px 22px 0; max-width: 40em; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: clamp(50px, 8vh, 90px) 0 36px; background: var(--bg); }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 40px; }
.foot-by { color: var(--fg2); }
.foot-by a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.foot-h { font: 800 12px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--fg3); margin-bottom: 16px; }
.fam-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.fam { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: transform .35s var(--ease), border-color .3s; }
.fam:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.fam img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.fam b { display: block; font: var(--display-weight) 19px/1.1 var(--display); }
.fam small { display: block; margin-top: 4px; font: 800 10.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg3); }
.foot-legal { margin-top: 40px; font-size: 14px; color: var(--fg3); }
.foot-legal a { color: var(--fg2); }

/* simple pages */
.doc { padding: clamp(150px, 26vh, 240px) 0 clamp(80px, 14vh, 140px); }
.doc-title { font-size: clamp(50px, 8vw, 120px); margin-bottom: 24px; }
.doc .lead { margin-bottom: 32px; }

/* motion: reveal, tilt, glare */
.js [data-reveal] { opacity: 0; transform: perspective(1000px) rotateX(16deg) translate3d(0, 50px, 0); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.js [data-reveal].in.is-tilting { transition: opacity .9s, transform .12s linear; transition-delay: 0s; }
[data-tilt] { transform-style: preserve-3d; }
.glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 45%); mix-blend-mode: soft-light; }
.is-tilting .glare { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .promise-track { animation: none; }
  .js [data-reveal], .js [data-reveal].in { opacity: 1; transform: none; transition: none; }
  .steps::before { transform: none; transition: none; }
  .scene { transition: none; }
}
