/* ==========================================================================
   kasih4u.my: home of Mewarna. Concept: "the page colours itself".
   Tokens in 5 layers; components read tokens, never raw hex.
   Contrast ratios (WCAG, computed) are noted beside the pairs they apply to.
   ========================================================================== */

@font-face { font-family: "Fredoka"; src: url("assets/fonts/fredoka-latin.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("assets/fonts/nunito-latin.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

/* ---- LAYER 1+2: surface, elevation, colour, semantics (light) ---------- */
:root {
  color-scheme: light;
  /* surface scale */
  --surface-base: #fffaf0;      /* drawing paper */
  --surface-subtle: #fff1d9;    /* alternating bands */
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --surface-sky: #bfe9ff;
  --surface-sky-2: #e8f7ff;
  --border-subtle: rgba(31, 35, 71, .11);   /* 1px hairline */
  --border-strong: rgba(31, 35, 71, .22);
  /* layered low-opacity directional shadows */
  --shadow-1: 0 1px 1px rgba(31,35,71,.05), 0 2px 4px rgba(31,35,71,.05);
  --shadow-2: 0 1px 2px rgba(31,35,71,.05), 0 4px 8px rgba(31,35,71,.06), 0 12px 28px rgba(31,35,71,.07);
  --shadow-3: 0 2px 4px rgba(31,35,71,.05), 0 10px 20px rgba(31,35,71,.08), 0 28px 56px rgba(31,35,71,.10);
  /* text: ink on paper = 14.6:1 (AAA), muted on paper = 7.3:1 (AAA), faint on paper = 4.7:1 (AA) */
  --ink: #1f2347;
  --ink-muted: #4a4f78;
  --ink-faint: #5d6286;
  /* the 10%: crayon box, used only for the primary action, focal marks and decoration */
  --crayon-red: #e63946; --crayon-orange: #ff7a59; --crayon-yellow: #ffb703;
  --crayon-green: #2a9d8f; --crayon-blue: #4361ee; --crayon-purple: #9b5de5; --crayon-pink: #f15bb5;
  --action: #ffb703;            /* primary button fill; ink on it = 9.4:1 (AAA) */
  --action-hover: #ffc533;
  --action-ink: #1f2347;
  --focus: #4361ee;             /* focus ring on paper = 5.9:1 */
  /* semantic status: soft tinted bg + high-contrast fg (all >= 4.5:1) */
  --success-bg: #e3f6ec; --success-fg: #11613a;  /* 7.0:1 */
  --warning-bg: #fff2d1; --warning-fg: #7a4d00;  /* 6.8:1 */
  --danger-bg:  #fde8e6; --danger-fg:  #a1231b;  /* 6.2:1 */
  --info-bg:    #e6eeff; --info-fg:    #1b3fb8;  /* 7.4:1 */
  --glass: rgba(255, 250, 240, .72);
  --stars-opacity: 0;

  /* ---- LAYER 3: typography -------------------------------------------- */
  --font-display: "Fredoka", ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(2.75rem, 7.4vw, 5.4rem);
  --fs-h2: clamp(1.95rem, 4.2vw, 3.1rem);
  --fs-h3: 1.3125rem;
  --fs-lead: clamp(1.125rem, 1.6vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-micro: .8125rem;
  --tracking-display: -.025em;
  --tracking-tight: -.015em;
  --lh-tight: 1.04;
  --lh-snug: 1.22;
  --lh-body: 1.62;

  /* ---- LAYER 4: spacing (4px grid) + concentric radii ------------------ */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;
  --r-card: 28px;               /* outer */
  --r-inner: 20px;              /* nested = outer - padding step */
  --r-chip: 12px;               /* badges, inputs */
  --r-pill: 999px;
  --wrap: 1180px;

  /* ---- LAYER 5: motion -------------------------------------------------- */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --t-micro: 150ms;
  --t-panel: 250ms;
  --t-scene: 600ms;
}

/* ---- Night mode: same token names, different values ---------------------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --surface-base: #12163a;
  --surface-subtle: #181d4a;
  --surface-card: #1d2358;
  --surface-elevated: #252c68;
  --surface-sky: #1b2162;
  --surface-sky-2: #12163a;
  --border-subtle: rgba(255, 255, 255, .12);
  --border-strong: rgba(255, 255, 255, .26);
  --shadow-1: 0 1px 1px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.25);
  --shadow-2: 0 2px 4px rgba(0,0,0,.28), 0 8px 24px rgba(0,0,0,.34);
  --shadow-3: 0 4px 8px rgba(0,0,0,.3), 0 24px 56px rgba(0,0,0,.45);
  --ink: #f5f6ff;                /* 15.8:1 on base */
  --ink-muted: #c1c5ea;          /* 9.9:1 */
  --ink-faint: #a6abd8;          /* 6.9:1 */
  --focus: #9db0ff;              /* 8.1:1 */
  --success-bg: #123b2a; --success-fg: #8ae6b4;
  --warning-bg: #40300a; --warning-fg: #ffd77a;
  --danger-bg:  #43171a; --danger-fg:  #ffadad;
  --info-bg:    #182a66; --info-fg:    #b3c4ff;
  --glass: rgba(18, 22, 58, .72);
  --stars-opacity: 1;
}

/* ---- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface-base); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.lock { overflow: hidden; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; line-height: var(--lh-snug); letter-spacing: var(--tracking-tight); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.num, .stat b, .step b { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
::selection { background: var(--crayon-yellow); color: #1f2347; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.wrap.narrow { width: min(100% - 40px, 820px); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--surface-base); padding: 10px 16px; border-radius: var(--r-chip); text-decoration: none; transition: top var(--t-micro) var(--ease); }
.skip:focus { top: 12px; }

/* focus-visible: crisp, custom, everywhere */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.btn:focus-visible, .icon-btn:focus-visible { outline-offset: 4px; }

/* custom scrollbar */
html { scrollbar-width: thin; scrollbar-color: var(--crayon-orange) transparent; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--crayon-orange); border-radius: 12px; border: 3px solid var(--surface-base); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 12px 24px; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: var(--tracking-tight);
  text-decoration: none; border: 2px solid var(--ink); background: var(--surface-card); color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  transition: transform var(--t-micro) var(--ease), box-shadow var(--t-micro) var(--ease), background-color var(--t-micro) var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(2px) scale(.98); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: var(--action); color: var(--action-ink); }
.btn-primary:hover { background: var(--action-hover); }
.btn-ghost { background: var(--surface-card); }
.btn-xl { min-height: 56px; padding: 14px 32px; font-size: 1.1875rem; }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: .9375rem; box-shadow: 0 2px 0 var(--ink); }
.icon-btn {
  display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--ink);
  font-family: var(--font-display); font-weight: 600; box-shadow: var(--shadow-1);
  transition: transform var(--t-micro) var(--ease), background-color var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease);
}
.icon-btn:hover { transform: translateY(-1px); border-color: var(--ink); }
.icon-btn:active { transform: scale(.96); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-chip); font-size: var(--fs-micro); font-weight: 800; letter-spacing: .02em; }
.pill-success { background: var(--success-bg); color: var(--success-fg); }
.pill-info { background: var(--info-bg); color: var(--info-fg); }

/* ---- Header (glass pill, compacts on scroll) -------------------------------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 60; padding: 14px 20px; pointer-events: none; transition: padding var(--t-panel) var(--ease); }
.site-header.scrolled { padding-block: 8px; }
.nav {
  pointer-events: auto; max-width: var(--wrap); margin-inline: auto; display: flex; align-items: center; gap: var(--s4);
  padding: 8px 10px 8px 14px; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--border-subtle);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: var(--shadow-1); transition: box-shadow var(--t-panel) var(--ease), padding var(--t-panel) var(--ease);
}
.site-header.scrolled .nav { box-shadow: var(--shadow-2); padding-block: 5px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.brand-mark .bm-bg { fill: var(--crayon-orange); }
.brand-mark .bm-paper { fill: #fffaf0; }
.brand-word { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: var(--tracking-tight); }
.brand-word b { color: var(--crayon-red); font-weight: 700; }
.nav-links { display: flex; gap: 2px; margin-inline: auto; }
.nav-links a { display: block; padding: 10px 16px; border-radius: var(--r-pill); text-decoration: none; font-weight: 700; color: var(--ink-muted); transition: background-color var(--t-micro) var(--ease), color var(--t-micro) var(--ease); }
.nav-links a:hover { background: var(--surface-subtle); color: var(--ink); }
.nav-links a[aria-current="true"] { background: var(--ink); color: var(--surface-base); }
.nav-tools { display: flex; align-items: center; gap: var(--s2); }
.nav-cta { min-height: 44px; padding: 8px 20px; font-size: 1rem; box-shadow: 0 2px 0 var(--ink); }
.menu-btn { display: none; }
.i-sun { display: none; }
html[data-theme="dark"] .i-sun { display: block; }
html[data-theme="dark"] .i-moon { display: none; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(18, 22, 58, .5); opacity: 0; transition: opacity var(--t-panel) var(--ease); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); display: flex; flex-direction: column; gap: var(--s2); padding: 88px 24px 24px; background: var(--surface-elevated); border-left: 1px solid var(--border-subtle); box-shadow: var(--shadow-3); transform: translateX(100%); transition: transform var(--t-panel) var(--ease); }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-panel a:not(.btn) { padding: 14px 16px; border-radius: var(--r-inner); text-decoration: none; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.drawer-panel a:not(.btn):hover { background: var(--surface-subtle); }
.drawer-panel .btn { margin-top: var(--s4); }
.drawer-close { position: absolute; top: 18px; right: 18px; }

/* ---- 1. Hero ---------------------------------------------------------------- */
.hero { position: relative; padding: 132px 0 120px; background: linear-gradient(180deg, var(--surface-sky) 0%, var(--surface-sky-2) 78%, var(--surface-base) 100%); overflow: clip; isolation: isolate; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy > * + * { margin-top: var(--s5); }
.display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); font-weight: 700; text-wrap: balance; }
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -.12em; height: .34em; z-index: -1; border-radius: 40px; background: var(--crayon-yellow); transform: rotate(-1.2deg) scaleX(0); transform-origin: left; animation: scribble 900ms 500ms var(--ease) forwards; opacity: .9; }
html[data-theme="dark"] .hl::after { opacity: .38; }  /* white text over the tinted bar >= 5.9:1 */
.lead { font-size: var(--fs-lead); color: var(--ink-muted); max-width: 34em; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s4); }
.cta-row.center { justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips li { padding: 8px 16px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--border-subtle); font-weight: 700; font-size: var(--fs-small); color: var(--ink-muted); }
.sky-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cloud { position: absolute; background: #fff; border-radius: 80px; opacity: .85; animation: drift 38s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.c1 { width: 130px; height: 40px; top: 16%; left: 6%; }
.c1::before { width: 56px; height: 56px; left: 18px; top: -26px; } .c1::after { width: 44px; height: 44px; left: 62px; top: -18px; }
.c2 { width: 170px; height: 48px; top: 30%; right: 4%; animation-duration: 52s; animation-direction: reverse; }
.c2::before { width: 70px; height: 70px; left: 24px; top: -34px; } .c2::after { width: 52px; height: 52px; left: 90px; top: -22px; }
.c3 { width: 100px; height: 32px; top: 62%; left: 32%; animation-duration: 64s; opacity: .6; }
.c3::before { width: 44px; height: 44px; left: 14px; top: -20px; } .c3::after { width: 34px; height: 34px; left: 48px; top: -14px; }
html[data-theme="dark"] .cloud { background: #39408a; opacity: .5; }
.spark { position: absolute; width: 14px; height: 14px; background: var(--crayon-yellow); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: var(--stars-opacity); animation: twinkle 3s ease-in-out infinite; }
.s1 { top: 18%; left: 46%; } .s2 { top: 52%; left: 4%; animation-delay: 1s; } .s3 { top: 12%; right: 12%; animation-delay: 2s; }
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; fill: var(--surface-base); }

/* hero scene: clipboard + crayon case */
.hero-scene { position: relative; }
.scribble-hint { position: absolute; z-index: 3; top: -14px; right: 8%; transform: rotate(4deg); padding: 6px 16px; border-radius: var(--r-chip); background: var(--crayon-yellow); color: #1f2347; font-family: var(--font-display); font-weight: 600; font-size: 1rem; box-shadow: var(--shadow-2); }
.board { position: relative; padding: 14px; border-radius: var(--r-card); background: var(--surface-card); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-3); transform: rotate(1.2deg); transition: transform var(--t-scene) var(--ease); }
.board:hover, .board:focus-within { transform: rotate(0); }
.tape { position: absolute; z-index: 2; width: 92px; height: 28px; background: rgba(255, 183, 3, .75); border-left: 2px dashed rgba(31,35,71,.18); border-right: 2px dashed rgba(31,35,71,.18); }
.t1 { top: -12px; left: 12%; transform: rotate(-5deg); } .t2 { top: -12px; right: 12%; transform: rotate(4deg); background: rgba(241, 91, 181, .65); }
.paper { border-radius: var(--r-inner); overflow: hidden; background: #fff; aspect-ratio: 4 / 3; border: 1px solid var(--border-subtle); touch-action: manipulation; }
.paper svg { display: block; width: 100%; height: 100%; }
#scene .r { cursor: pointer; transition: fill 320ms var(--ease); }
#scene .r:hover { filter: brightness(.96); }
#scene .r.pop { animation: pop 380ms var(--ease-bounce); }
.case { margin-top: var(--s4); padding: 12px 16px 14px; border-radius: var(--r-card); background: var(--surface-card); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-2); display: grid; gap: var(--s3); }
.crayons { display: flex; align-items: flex-end; gap: 2px; overflow-x: auto; padding: 20px 4px 16px; margin-top: -8px; scrollbar-width: none; }
.crayons::-webkit-scrollbar { display: none; }
.crayon { flex: 1 0 36px; min-width: 36px; max-width: 48px; height: 124px; display: grid; place-items: end center; padding: 2px; border: 0; background: none; border-radius: 10px; transform: translateY(8px); transition: transform var(--t-panel) var(--ease-bounce); }
.crayon svg { display: block; width: 32px; height: 120px; filter: drop-shadow(0 2px 1px rgba(31,35,71,.18)); }
.crayon:hover { transform: translateY(0); }
.crayon[aria-pressed="true"] { transform: translateY(-8px); }
.crayon:active { transform: translateY(-2px) scale(.96); }
.case-actions { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: center; }

/* ---- Sections ------------------------------------------------------------------ */
.section { padding: var(--s24) 0; }
.section-alt { background: var(--surface-subtle); }
.section-head { max-width: 760px; margin-bottom: var(--s12); }
.section-head > * + * { margin-top: var(--s3); }
.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: .02em; color: var(--crayon-red); }
html[data-theme="dark"] .eyebrow { color: #ff9aa2; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); letter-spacing: var(--tracking-display); font-weight: 700; text-wrap: balance; }
.sub { font-size: var(--fs-lead); color: var(--ink-muted); }
.card { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--r-card); box-shadow: var(--shadow-1); transition: transform var(--t-panel) var(--ease), box-shadow var(--t-panel) var(--ease), border-color var(--t-panel) var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: var(--border-strong); }
.card h3 { font-size: var(--fs-h3); }
.card p { color: var(--ink-muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); margin-bottom: var(--s8); }
.stat { padding: var(--s5); border-radius: var(--r-inner); background: var(--surface-card); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-1); display: grid; gap: 2px; }
.stat b { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; line-height: 1; color: var(--crayon-blue); }
html[data-theme="dark"] .stat b { color: #9db0ff; }
.stat span { color: var(--ink-muted); font-weight: 700; font-size: var(--fs-small); }

.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s5); }
.bento .card { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); overflow: hidden; }
.card-copy { display: grid; gap: var(--s2); align-content: start; }
.b-wide { grid-column: span 8; } .b-tall { grid-column: span 4; grid-row: span 2; }
.b-voice { grid-column: span 4; } .b-mirror { grid-column: span 4; }
.b-reward { grid-column: span 6; } .b-own { grid-column: span 6; }
.b-wide .shot, .b-reward .shot, .b-own .shot { margin-top: auto; }
.shot { margin: 0; border-radius: var(--r-inner); overflow: hidden; border: 1px solid var(--border-subtle); box-shadow: var(--shadow-2); background: var(--surface-subtle); aspect-ratio: 960 / 667; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.b-tall .shot { aspect-ratio: auto; flex: 1; min-height: 230px; } .b-tall .shot img { object-position: 50% 40%; }
.voice-demo { display: flex; align-items: center; gap: var(--s4); padding: var(--s5); border-radius: var(--r-inner); background: linear-gradient(135deg, #e8edff, #ffe9f4); min-height: 150px; }
html[data-theme="dark"] .voice-demo { background: linear-gradient(135deg, #252c68, #3a2a63); }
.letter { font-family: var(--font-display); font-weight: 700; font-size: 6rem; line-height: 1; color: var(--crayon-pink); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; animation: wiggle 3.2s ease-in-out infinite; }
.bubble { position: relative; padding: 10px 16px; border-radius: 18px 18px 18px 4px; background: var(--surface-card); border: 2px solid var(--ink); font-family: var(--font-display); font-weight: 600; box-shadow: 0 3px 0 var(--ink); }
.bubble::before { content: ""; position: absolute; left: -12px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--crayon-yellow); border: 2px solid var(--ink); animation: pulse 1.6s ease-in-out infinite; }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.trust .card { padding: var(--s6); display: grid; gap: var(--s3); align-content: start; }
.ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-inner); background: var(--info-bg); color: var(--info-fg); }
.ico svg { width: 28px; height: 28px; }
.trust li:nth-child(3n+2) .ico { background: var(--success-bg); color: var(--success-fg); }
.trust li:nth-child(3n) .ico { background: var(--warning-bg); color: var(--warning-fg); }
.notice { margin-top: var(--s8); padding: var(--s5) var(--s6); border-radius: var(--r-inner); background: var(--surface-card); border: 1px dashed var(--border-strong); display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; color: var(--ink-muted); font-weight: 600; }

/* stepper */
.stepper { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: stretch; }
.steps { display: grid; gap: var(--s3); align-content: center; }
.step { width: 100%; display: flex; gap: var(--s4); text-align: left; padding: var(--s5); border-radius: var(--r-inner); background: var(--surface-card); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-1); transition: transform var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease), box-shadow var(--t-micro) var(--ease); }
.step:hover { transform: translateX(4px); border-color: var(--border-strong); }
.step:active { transform: scale(.98); }
.step b { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-subtle); font-family: var(--font-display); font-size: 1.25rem; }
.step strong { display: block; font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; }
.step small { display: block; color: var(--ink-muted); font-size: var(--fs-small); margin-top: 2px; }
.step.on { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.step.on b { background: var(--action); color: var(--action-ink); }
.step-view { position: relative; min-height: 360px; border-radius: var(--r-card); background: linear-gradient(160deg, var(--surface-sky), var(--surface-sky-2)); border: 1px solid var(--border-subtle); overflow: hidden; box-shadow: var(--shadow-2); }
.mock { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--s6); opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; transition: opacity var(--t-panel) var(--ease), transform var(--t-panel) var(--ease); }
.mock.show { opacity: 1; transform: none; pointer-events: auto; }
.urlbar { display: flex; align-items: center; gap: var(--s2); padding: 12px 18px; border-radius: var(--r-pill); background: var(--surface-card); border: 1px solid var(--border-strong); font-weight: 800; box-shadow: var(--shadow-2); }
.mock-0 { align-content: center; gap: var(--s4); } .mock-0 .mock-art { width: 62%; border-radius: var(--r-inner); background: #fff; border: 1px solid var(--border-subtle); box-shadow: var(--shadow-1); }
.sheet { width: min(100%, 320px); border-radius: var(--r-inner); background: var(--surface-card); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-3); overflow: hidden; }
.sheet-row { display: flex; gap: var(--s3); align-items: center; padding: 16px 20px; font-weight: 700; border-bottom: 1px solid var(--border-subtle); color: var(--ink-muted); }
.sheet-row:last-child { border-bottom: 0; }
.sheet-row.hot { background: var(--action); color: var(--action-ink); font-weight: 800; animation: pulse-bg 1.8s ease-in-out infinite; }
.share-hint { position: absolute; top: 18px; right: 22px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-card); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); animation: bob 1.6s ease-in-out infinite; }
.homegrid { display: grid; grid-template-columns: repeat(4, 76px); gap: 22px 18px; padding: 24px; border-radius: 36px; background: rgba(255,255,255,.35); border: 1px solid var(--border-subtle); }
.homegrid i { width: 76px; height: 76px; border-radius: 20px; background: rgba(31,35,71,.12); }
.app-icon { grid-column: 3; display: grid; justify-items: center; gap: 4px; font-style: normal; animation: pop 700ms var(--ease-bounce); }
.app-icon img { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--shadow-2); }
.app-icon em { font-style: normal; font-size: 12px; font-weight: 800; }
.note { margin-top: var(--s6); color: var(--ink-faint); font-size: var(--fs-small); text-align: center; }

/* gallery marquee */
.gallery { overflow: hidden; }
.marquee { overflow: hidden; margin-top: var(--s4); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.track { display: flex; gap: var(--s4); width: max-content; animation: slide 60s linear infinite; }
.rev .track { animation-direction: reverse; animation-duration: 70s; }
.marquee:hover .track { animation-play-state: paused; }
.tile { flex: none; width: 240px; margin: 0; padding: 10px; border-radius: var(--r-card); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-1); }
.tile img { width: 100%; border-radius: var(--r-inner); background: #fff; }
.t0 { background: #ffe0e3; } .t1 { background: #fff0c2; } .t2 { background: #d6f3e6; } .t3 { background: #d9ecff; } .t4 { background: #ecdcff; } .t5 { background: #ffd9ec; }
html[data-theme="dark"] .t0 { background: #5c2a35; } html[data-theme="dark"] .t1 { background: #5a4a1d; } html[data-theme="dark"] .t2 { background: #1f4a3d; }
html[data-theme="dark"] .t3 { background: #1f3a6b; } html[data-theme="dark"] .t4 { background: #3d2d6b; } html[data-theme="dark"] .t5 { background: #5c2a50; }

/* FAQ accordion */
.faq { display: grid; gap: var(--s3); }
.qa { border-radius: var(--r-inner); background: var(--surface-card); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-1); transition: border-color var(--t-micro) var(--ease); }
.qa:hover { border-color: var(--border-strong); }
.q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: 18px 22px; border: 0; background: none; text-align: left; font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; border-radius: var(--r-inner); min-height: 56px; }
.q:active { transform: scale(.995); }
.chev { flex: none; width: 14px; height: 14px; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg) translateY(-3px); transition: transform var(--t-panel) var(--ease); }
.q[aria-expanded="true"] .chev { transform: rotate(-135deg) translateY(-3px); }
.a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-panel) var(--ease); }
.a > div { overflow: hidden; }
.a p { padding: 0 22px 20px; color: var(--ink-muted); }
.qa.open .a { grid-template-rows: 1fr; }
.qa > h3 { font-size: inherit; letter-spacing: normal; }

/* closing */
.closing { padding: var(--s24) 0 var(--s20); text-align: center; background: linear-gradient(180deg, var(--surface-base), var(--surface-subtle)); }
.giant { font-family: var(--font-display); font-weight: 700; font-size: clamp(4.4rem, 18vw, 13rem); line-height: .95; letter-spacing: -.04em; display: flex; justify-content: center; margin-bottom: var(--s6); }
.giant span { display: inline-block; -webkit-text-stroke: clamp(3px, .5vw, 7px) var(--ink); paint-order: stroke fill; transition: transform var(--t-panel) var(--ease-bounce); }
.giant span:nth-child(1) { color: var(--crayon-red); } .giant span:nth-child(2) { color: var(--crayon-orange); } .giant span:nth-child(3) { color: var(--crayon-yellow); }
.giant span:nth-child(4) { color: var(--crayon-green); } .giant span:nth-child(5) { color: var(--crayon-blue); } .giant span:nth-child(6) { color: var(--crayon-purple); } .giant span:nth-child(7) { color: var(--crayon-pink); }
.giant span:hover { transform: translateY(-14px) rotate(-5deg); }
.closing-title { font-size: var(--fs-h2); margin-bottom: var(--s3); }
.closing .lead { margin: 0 auto var(--s8); }
.feedback { max-width: 520px; margin: var(--s12) auto 0; padding: var(--s6); border-radius: var(--r-card); background: var(--surface-card); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-2); text-align: left; display: grid; gap: var(--s4); }
.feedback[hidden] { display: none; }
.feedback label { display: grid; gap: 6px; font-weight: 800; font-size: var(--fs-small); }
.feedback input, .feedback textarea { font: inherit; padding: 12px 14px; border-radius: var(--r-chip); border: 1.5px solid var(--border-strong); background: var(--surface-base); color: var(--ink); width: 100%; transition: border-color var(--t-micro) var(--ease), box-shadow var(--t-micro) var(--ease); }
.feedback input:focus-visible, .feedback textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 25%, transparent); }
.feedback .invalid { border-color: var(--danger-fg); }
.err { min-height: 1.2em; color: var(--danger-fg); font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(31,35,71,.25); border-top-color: var(--ink); animation: spin 700ms linear infinite; }
.is-loading .spin { display: inline-block; }
.is-loading { pointer-events: none; opacity: .85; }

.footer { padding: var(--s12) 0 var(--s8); border-top: 1px solid var(--border-subtle); background: var(--surface-subtle); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s8); }
.foot-note { color: var(--ink-muted); margin-top: var(--s3); max-width: 30em; }
.foot-links { display: grid; gap: 2px; }
.foot-links a { display: inline-block; padding: 8px 0; min-height: 44px; text-decoration: none; font-weight: 700; color: var(--ink-muted); }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--crayon-yellow); text-underline-offset: 5px; }
.foot-bottom { margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--border-subtle); color: var(--ink-faint); font-size: var(--fs-small); }

/* floating furniture */
.mobile-cta { display: none; position: fixed; z-index: 55; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); justify-content: center; align-items: center; min-height: 56px; border-radius: var(--r-pill); background: var(--action); color: var(--action-ink); border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink), var(--shadow-3); font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; text-decoration: none; transition: transform var(--t-micro) var(--ease); }
.mobile-cta:active { transform: scale(.98); }
.wa-float { position: fixed; z-index: 56; right: 20px; bottom: 20px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #0b3d1f; box-shadow: var(--shadow-3); transition: transform var(--t-micro) var(--ease); }
.wa-float[hidden] { display: none; }
.wa-float:hover { transform: scale(1.06); } .wa-float:active { transform: scale(.96); }
.to-top { position: fixed; z-index: 54; left: 20px; bottom: 20px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--ink); background: var(--surface-card); color: var(--ink); box-shadow: 0 3px 0 var(--ink); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity var(--t-panel) var(--ease), transform var(--t-panel) var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top[hidden] { display: none; }
.to-top:active { transform: scale(.94); }

/* dialog */
.dlg { width: min(92vw, 460px); padding: var(--s8); border: 1px solid var(--border-strong); border-radius: var(--r-card); background: var(--surface-elevated); color: var(--ink); box-shadow: var(--shadow-3); }
.dlg::backdrop { background: rgba(18, 22, 58, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg[open] { animation: dlg-in var(--t-panel) var(--ease); }
.dlg h2 { font-size: 1.75rem; margin-bottom: var(--s3); }
.dlg p { color: var(--ink-muted); }
.copy-row { display: flex; gap: var(--s2); margin: var(--s5) 0; }
.copy-row input { flex: 1; min-width: 0; font: inherit; padding: 12px 14px; border-radius: var(--r-chip); border: 1.5px solid var(--border-strong); background: var(--surface-base); color: var(--ink); }
.dlg-actions { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: flex-end; }
.copied { background: var(--success-bg) !important; color: var(--success-fg) !important; border-color: var(--success-fg) !important; box-shadow: 0 3px 0 var(--success-fg) !important; }

/* toasts + tooltip */
.toasts { position: fixed; z-index: 120; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: var(--s2); width: min(92vw, 420px); pointer-events: none; }
.toast { padding: 14px 18px; border-radius: var(--r-inner); background: var(--ink); color: var(--surface-base); font-weight: 700; box-shadow: var(--shadow-3); animation: toast-in var(--t-panel) var(--ease); }
.toast.success { background: var(--success-fg); color: var(--success-bg); }
.toast.error { background: var(--danger-fg); color: var(--danger-bg); }
html[data-theme="dark"] .toast.success, html[data-theme="dark"] .toast.error { color: #12163a; background: var(--success-fg); }
html[data-theme="dark"] .toast.error { background: var(--danger-fg); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity var(--t-panel) var(--ease), transform var(--t-panel) var(--ease); }
.tooltip { position: fixed; z-index: 140; padding: 6px 12px; border-radius: 10px; background: var(--ink); color: var(--surface-base); font-size: var(--fs-micro); font-weight: 800; pointer-events: none; box-shadow: var(--shadow-2); }
.tooltip[hidden] { display: none; }
.noscript { padding: 12px 20px; background: var(--warning-bg); color: var(--warning-fg); text-align: center; }

/* reveal (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---- Keyframes --------------------------------------------------------------- */
@keyframes scribble { to { transform: rotate(-1.2deg) scaleX(1); } }
@keyframes drift { from { transform: translateX(-12vw); } to { transform: translateX(112vw); } }
@keyframes twinkle { 0%, 100% { transform: scale(.7) rotate(0); } 50% { transform: scale(1.15) rotate(25deg); } }
@keyframes pop { 0% { transform: scale(.96); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes pulse-bg { 0%, 100% { filter: none; } 50% { filter: brightness(1.08); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---- Responsive ---------------------------------------------------------------- */
@media (max-width: 980px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: inline-grid; }
  .nav-tools { margin-left: auto; }
  .hero { padding-top: 112px; }
  .hero-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .b-wide, .b-reward, .b-own { grid-column: span 2; } .b-tall { grid-column: span 1; grid-row: auto; } .b-voice, .b-mirror { grid-column: span 1; }
  .trust { grid-template-columns: 1fr 1fr; }
  .stepper { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: var(--s16) 0; }
  .hero { padding-bottom: 96px; }
  .bento { grid-template-columns: 1fr; }
  .b-wide, .b-reward, .b-own, .b-tall, .b-voice, .b-mirror { grid-column: auto; }
  .trust { grid-template-columns: 1fr; }
  .mobile-cta { display: flex; }
  body { padding-bottom: 84px; }
  .to-top { bottom: 90px; } .wa-float { bottom: 90px; }
  .cta-row .btn { flex: 1 1 100%; }
  .scribble-hint { right: 4%; font-size: .9375rem; }
  .homegrid { grid-template-columns: repeat(4, 60px); gap: 16px 14px; } .homegrid i, .app-icon img { width: 60px; height: 60px; border-radius: 16px; }
  .tile { width: 190px; }
  .step-view { min-height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .track { animation: none; }
  .hl::after { transform: rotate(-1.2deg) scaleX(1); }
  .js .reveal { opacity: 1; transform: none; }
}
@media (hover: none) { .card:hover, .btn:hover, .step:hover { transform: none; } }
@media print { .site-header, .mobile-cta, .wa-float, .to-top, .sky-deco { display: none !important; } }

/* ---- 404 ---------------------------------------------------------------- */
.nf-body { background: linear-gradient(180deg, var(--surface-sky), var(--surface-sky-2) 70%, var(--surface-base)); min-height: 100vh; }
.nf { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; text-align: center; }
.nf-card { max-width: 640px; display: grid; justify-items: center; gap: var(--s4); }
.nf-card img { width: min(300px, 70vw); border-radius: var(--r-card); background: #fff; border: 1px solid var(--border-subtle); box-shadow: var(--shadow-3); transform: rotate(-3deg); }
.nf-title { font-size: clamp(2.2rem, 7vw, 3.6rem); }

/* ---- apps section + new-feature chips ---- */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s6); }
.app-card { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s5); }
.app-card .card-copy { gap: var(--s3); }
.app-card .btn { justify-self: start; margin-top: var(--s2); }
.new-chips { margin-bottom: var(--s6); }
.new-chips li.pill { padding: 8px 16px; }
@media (max-width: 760px) { .apps { grid-template-columns: 1fr; } }

.hub-cta { margin-bottom: var(--s8); }

/* seven menu links need more room: switch to the drawer earlier */
@media (max-width: 1120px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: inline-grid; }
  .nav-tools { margin-left: auto; }
}
