/* JipJip official site — design system v2 (SITE-VISUAL-DIRECTION-002).
   Clean · fresh · premium · dynamic. Pure CSS + local JS only:
   NO web fonts, NO CDN, NO external scripts, NO trackers. Light + dark. Mobile-first.
   All motion respects prefers-reduced-motion. */

/* ------------------------------------------------------------------ tokens */
:root {
  /* clean, cool, premium — the anti "dark-gold" */
  --bg:        #ffffff;
  --bg-soft:   #f4f7fe;
  --bg-deep:   #070c18;          /* deep-navy band for contrast rhythm */
  --ink:       #0b1526;
  --ink-2:     #24304a;
  --muted:     #59647a;
  --line:      #e6ebf5;
  --card:      #ffffff;
  --glass:     rgba(255,255,255,.72);
  --glass-brd: rgba(11,21,38,.08);
  --shadow:    0 18px 50px -22px rgba(20,40,90,.35);
  --shadow-sm: 0 8px 24px -14px rgba(20,40,90,.30);

  /* brand — fresh blue → cyan, violet only in the aurora */
  --b1: #3b7bff;
  --b2: #22d3ee;
  --b3: #8b5cf6;
  --brand:      #2f6bff;
  --brand-ink:  #1e50d8;
  --grad:  linear-gradient(135deg, var(--b1) 0%, var(--b2) 100%);
  --grad-3: linear-gradient(120deg, var(--b3) 0%, var(--b1) 45%, var(--b2) 100%);

  --maxw: 68rem;              /* wider, modern landing */
  --measure: 44rem;          /* comfortable reading width for docs */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "Noto Sans", "Noto Sans Myanmar", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --r:  16px;                /* card radius */
  --r-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #060a14;
    --bg-soft:   #0b1220;
    --bg-deep:   #04070f;
    --ink:       #eaf0ff;
    --ink-2:     #c6d2ec;
    --muted:     #93a0bd;
    --line:      #1b2540;
    --card:      #0d1526;
    --glass:     rgba(13,21,38,.62);
    --glass-brd: rgba(255,255,255,.09);
    --shadow:    0 24px 60px -24px rgba(0,0,0,.7);
    --shadow-sm: 0 10px 28px -16px rgba(0,0,0,.6);
    --brand:     #5b8bff;
    --brand-ink: #7ba2ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* --------------------------------------------------------------- type */
h1, h2, h3 { font-weight: 800; line-height: 1.08; letter-spacing: -.03em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6.4vw, 4.3rem); }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); letter-spacing: -.025em; }
h3 { font-size: 1.18rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: var(--ink-2); line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
  padding: .34rem .7rem; border-radius: 999px;
}
.gradient-text {
  background: var(--grad-3); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* --------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-head.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -22px rgba(20,40,90,.5);
}
.head-inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto; padding: .8rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); }
.brand-logo { width: 30px; height: 30px; border-radius: 9px; display: block;
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.brand b { font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em; }
.nav { display: flex; align-items: center; gap: 1.25rem; font-size: .95rem; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav .btn { margin-left: .2rem; }
@media (max-width: 40rem) {
  .nav { gap: .8rem; font-size: .9rem; }
  .nav .nav-link { display: none; }   /* collapse text links on small screens; keep brand + CTA */
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .78rem 1.4rem; border-radius: 12px;
  font-family: inherit; font-size: 1rem; font-weight: 700; letter-spacing: -.01em;
  cursor: pointer; border: 1px solid transparent; position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn-sm { min-height: 40px; padding: .5rem 1rem; border-radius: 10px; font-size: .92rem; }
.btn-primary { background: var(--grad); color: #fff;
  box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--b1) 80%, transparent); }
.btn-primary::after {   /* sheen sweep on hover */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.btn-primary:hover { color: #fff; transform: translateY(-2px);
  box-shadow: 0 20px 44px -12px color-mix(in srgb, var(--b1) 85%, transparent); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1.6rem; }
.textlink { font-weight: 700; display: inline-flex; align-items: center; gap: .3rem; }

/* --------------------------------------------------------------- hero */
.hero { position: relative; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
  overflow: hidden; isolation: isolate; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; }
@media (max-width: 54rem) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin: .9rem 0 1rem; }
.hero .meta { font-size: .92rem; color: var(--muted); margin-top: 1.4rem; }
.hero .meta b { color: var(--ink-2); font-weight: 600; }

/* aurora + grid backdrop (pure CSS, no images) */
.aurora { position: absolute; inset: -20% -10% auto -10%; height: 130%; z-index: -2;
  filter: blur(60px); opacity: .7; pointer-events: none; }
.aurora span { position: absolute; display: block; border-radius: 50%; }
.aurora .a1 { width: 46vw; height: 46vw; left: -6%; top: -8%;
  background: radial-gradient(circle at 30% 30%, var(--b1), transparent 62%);
  animation: drift1 18s ease-in-out infinite; }
.aurora .a2 { width: 40vw; height: 40vw; right: -6%; top: 2%;
  background: radial-gradient(circle at 60% 40%, var(--b2), transparent 62%);
  animation: drift2 22s ease-in-out infinite; }
.aurora .a3 { width: 34vw; height: 34vw; left: 30%; top: 30%;
  background: radial-gradient(circle at 50% 50%, var(--b3), transparent 60%);
  animation: drift3 26s ease-in-out infinite; }
.grid-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 78%);
}

@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6%,4%) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1.05); } 50% { transform: translate(-5%,6%) scale(.95); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4%,-6%) scale(1.15); } }

/* --------------------------------------------------------------- phone mockup */
.phone-stage { display: flex; justify-content: center; position: relative; }
.phone-glow { position: absolute; width: 78%; height: 70%; top: 12%; left: 11%; z-index: 0;
  background: var(--grad-3); filter: blur(70px); opacity: .45; border-radius: 50%; }
.phone { position: relative; z-index: 1; width: min(280px, 74vw); aspect-ratio: 9 / 19;
  border-radius: 38px; padding: 12px;
  background: linear-gradient(160deg, #10192e, #060a14);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 40px 90px -30px rgba(10,25,70,.65), inset 0 1px 0 rgba(255,255,255,.10);
  animation: floaty 6s ease-in-out infinite; will-change: transform; }
.phone-screen { position: relative; height: 100%; border-radius: 28px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #16305e 0%, #0a1122 55%, #070c18 100%);
  display: flex; flex-direction: column; }
.phone-notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 38%; height: 20px; background: #05080f; border-radius: 0 0 12px 12px; z-index: 3; }
.scr { padding: 2.4rem 1.15rem 1.15rem; color: #eaf0ff; display: flex; flex-direction: column;
  height: 100%; gap: .7rem; }
.scr-top { display: flex; align-items: center; gap: .5rem; }
.scr-logo { width: 26px; height: 26px; border-radius: 8px; }
.scr-name { font-weight: 800; letter-spacing: -.02em; }
.scr-orb { margin: .4rem auto .2rem; width: 116px; height: 116px; border-radius: 50%;
  display: grid; place-items: center; position: relative; overflow: hidden;
  box-shadow: 0 0 44px color-mix(in srgb, var(--b2) 70%, transparent); }
.scr-orb::before {   /* only the gradient ring spins — text + centre stay upright */
  content: ""; position: absolute; inset: -30%; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--b1), var(--b2), var(--b3), var(--b1));
  animation: spin 14s linear infinite; }
.scr-orb::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #0a1122; }
.scr-orb b { position: relative; z-index: 1; font-size: .82rem; font-weight: 800; color: #eaf0ff;
  letter-spacing: .06em; }
.scr-status { text-align: center; }
.scr-status .s1 { font-weight: 800; font-size: 1.05rem; }
.scr-status .s2 { color: #9fb2dd; font-size: .82rem; }
.scr-chips { display: flex; gap: .4rem; justify-content: center; margin-top: .2rem; }
.scr-chips span { font-size: .72rem; padding: .24rem .55rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14); color: #cfe0ff; }
.scr-chips .on { background: color-mix(in srgb, var(--b2) 24%, transparent);
  border-color: color-mix(in srgb, var(--b2) 50%, transparent); color: #eaffff; }
.scr-btn { margin-top: auto; text-align: center; font-weight: 800; color: #06202b;
  background: linear-gradient(135deg, #7defff, #22d3ee); border-radius: 12px; padding: .6rem; }

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; position: relative; }
.section-head { max-width: 42rem; margin: 0 0 2.2rem; }
.section-head .eyebrow { margin-bottom: .9rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin-top: .7rem; }
.band { background: var(--bg-deep); color: #eaf0ff; }
.band h2, .band h3 { color: #fff; }
.band .muted, .band .section-head p { color: #9fb2dd; }
.band .line-hairline { border-color: rgba(255,255,255,.10); }

/* marquee of honest spec chips */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: .9rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: inline-flex; gap: 2.2rem; white-space: nowrap; will-change: transform;
  animation: slide 26s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; color: var(--muted); font-size: .95rem; }
.marquee-track span::before { content: ""; width: 6px; height: 6px; border-radius: 2px;
  background: var(--grad); }
@keyframes slide { to { transform: translateX(-50%); } }

/* platform availability */
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 40rem) { .platforms { grid-template-columns: 1fr; } }
.plat { border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem;
  background: var(--card); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.plat.available { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.plat.available::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.plat.soon { background: var(--bg-soft); }   /* muted via surface, not opacity — avoids clashing with .reveal */
.plat .os { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; }
.plat .os svg { width: 24px; height: 24px; }
.plat .tag { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: .22rem .6rem; border-radius: 999px; }
.plat .tag.ok { color: #067a5b; background: color-mix(in srgb, #10b981 16%, transparent); }
.plat .tag.wait { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
@media (prefers-color-scheme: dark) { .plat .tag.ok { color: #6ee7b7; } }
.plat p { color: var(--muted); margin: .7rem 0 1rem; font-size: .96rem; }
.plat .plat-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.badge-soon { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700;
  color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; padding: .6rem 1rem;
  min-height: 48px; font-size: .95rem; cursor: not-allowed; }

/* feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
@media (max-width: 40rem) { .feature-grid { grid-template-columns: 1fr; } }
.feature { padding: 1.5rem; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--card); box-shadow: var(--shadow-sm); position: relative;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.feature .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); margin-bottom: 1rem; }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: .4rem; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }

/* --------------------------------------------------------------- download card */
.dl-wrap { position: relative; border-radius: calc(var(--r) + 4px); padding: 2px; overflow: hidden; }
.dl-wrap::before {   /* rotating gradient ring */
  content: ""; position: absolute; inset: -60%; z-index: 0;
  background: conic-gradient(from 0deg, var(--b1), var(--b2), var(--b3), var(--b1));
  animation: spin 8s linear infinite;
}
.card {
  position: relative; z-index: 1;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.6rem 1.5rem 1.7rem; box-shadow: var(--shadow);
}
.dl-wrap .card { border-color: transparent; }
.dl-row { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: 0 0 .7rem; font-size: .96rem; }
.dl-row .k { color: var(--muted); min-width: 6.5rem; }
.sha-block { margin: 1rem 0 .2rem; }
.sha { font-family: var(--mono); font-size: .8rem; line-height: 1.55;
  overflow-wrap: anywhere; word-break: break-all;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .6rem .75rem; margin: .35rem 0 .1rem; }
.copy-sha { margin-top: .5rem; font-size: .85rem; font-weight: 700; color: var(--brand);
  background: none; border: 1px solid var(--line); border-radius: 8px; padding: .35rem .7rem;
  cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.copy-sha:hover { border-color: var(--brand); }
.verify { font-size: .86rem; color: var(--muted); margin: .5rem 0 0; }

/* --------------------------------------------------------------- lists (docs) */
.why { list-style: none; padding: 0; margin: 1rem 0; }
.why li { padding: .7rem 0 .7rem 1.6rem; position: relative; border-bottom: 1px solid var(--line); }
.why li:last-child { border-bottom: 0; }
.why li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: .6rem; height: .6rem;
  border-radius: 3px; background: var(--grad); }
.why b { font-weight: 700; }
.steps { padding-left: 1.3rem; margin: 1rem 0; }
.steps li { margin: .5rem 0; }
.note { border-left: 3px solid var(--brand); background: var(--bg-soft);
  padding: .7rem .9rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--ink-2); margin: 1rem 0; }

/* --------------------------------------------------------------- doc pages */
.doc { padding-top: 2.4rem; padding-bottom: 1rem; }
.doc > * { max-width: var(--measure); }
.doc h1 { margin: .6rem 0 .8rem; }
.doc h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2.4rem 0 .7rem; }
.doc h2:first-of-type { margin-top: 1.4rem; }
.doc ul { padding-left: 1.3rem; }
.doc li { margin: .4rem 0; }
.doc .eyebrow { margin-bottom: 1rem; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-radius: 999px; padding: .2rem .7rem; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-soft);
  padding: .1rem .35rem; border-radius: 5px; }

/* status list */
.status-list { list-style: none; padding: 0; margin: 1rem 0; max-width: var(--measure); }
.status-list li { display: flex; align-items: center; gap: .6rem; padding: .7rem 0;
  border-bottom: 1px solid var(--line); }
/* neutral by design: the status page is manually updated, not a live monitor —
   a coloured "operational" dot would over-claim. */
.dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--muted); flex: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--muted) 18%, transparent); }

/* --------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 4rem; padding: 2.4rem 0 3.5rem;
  color: var(--muted); font-size: .93rem; background: var(--bg-soft); }
.foot-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.foot-brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink);
  font-weight: 800; margin-bottom: .9rem; }
.foot-brand img { width: 26px; height: 26px; border-radius: 8px; }
.site-foot .links { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; margin: 0 0 1rem; }
.site-foot a { color: var(--muted); font-weight: 500; }
.site-foot a:hover { color: var(--brand); }
.site-foot .fine { font-size: .86rem; max-width: 46rem; }

/* --------------------------------------------------------------- reveal + a11y */
/* Reveal-on-scroll — gated on the `js` class so content is ALWAYS visible when
   JavaScript is off or fails (progressive enhancement, no invisible content). */
.reveal { transition: opacity .7s ease, transform .7s ease; transition-delay: calc(var(--i, 0) * 80ms); }
html.js .reveal { opacity: 0; transform: translateY(22px); }
html.js .reveal.in { opacity: 1; transform: none; }

a:focus-visible, .btn:focus-visible, .copy-sha:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
