/* Jidosei website — design system & layout. Black / white with a single vermilion accent. */

:root {
  --ink: #0b0b0c;
  --ink-2: #16161a;
  --paper: #f3f2ee;
  --paper-2: #e9e7e1;
  --white: #ffffff;
  --muted: #6d6b66;
  --muted-dark: #8f8d88;
  --line: rgba(11, 11, 12, 0.12);
  --line-dark: rgba(255, 255, 255, 0.12);
  --accent: #e8392b;
  --accent-soft: rgba(232, 57, 43, 0.14);
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --nav-h: 72px;
  --font-latin: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-jp: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-sc: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-tc: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-kr: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-th: "Noto Sans Thai", "Leelawadee UI", sans-serif;
  --font: var(--font-latin);
}

html[lang="ja"] { --font: var(--font-latin), var(--font-jp); }
html[lang="zh-Hans"] { --font: var(--font-latin), var(--font-sc); }
html[lang="zh-Hant"] { --font: var(--font-latin), var(--font-tc); }
html[lang="ar"] { --font: var(--font-latin), "Noto Sans Arabic", "Segoe UI", sans-serif; }
html[lang="ko"] { --font: var(--font-latin), var(--font-kr); }
html[lang="th"] { --font: var(--font-latin), var(--font-th); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--white); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: fixed; inset-inline-start: 8px; top: 8px; z-index: 100; background: var(--white); color: var(--ink); padding: 8px 14px; border-radius: 8px; transform: translateY(-200%); }
.skip:focus { transform: none; }

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

/* Film grain over everything — subtle texture that keeps flat black/white from feeling sterile. */
.grain {
  pointer-events: none; position: fixed; inset: 0; z-index: 90; opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 8s steps(8) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); }
}

/* ---------- Logo (black block, MINISO-like) ---------- */
.logo { display: inline-flex; align-items: center; }
.logo-block {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--ink); color: var(--white); padding: 7px 12px 6px; border-radius: 3px; line-height: 1;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.logo-word { font-family: var(--font-latin); font-weight: 900; font-size: 17px; letter-spacing: 0.02em; }
.logo-kana { font-family: var(--font-jp); font-weight: 700; font-size: 7.5px; letter-spacing: 0.62em; margin-top: 4px; padding-left: 0.62em; }
.on-dark .logo-block { background: var(--white); color: var(--ink); }

/* ---------- Language suggestion bar ---------- */
.langbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 36px;
  display: none; align-items: center; justify-content: center; gap: 14px;
  background: var(--accent); color: var(--white); font-size: 13px; font-weight: 500; letter-spacing: 0.01em;
}
.langbar.is-open { display: flex; }
.langbar a { text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.langbar button { position: absolute; right: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.langbar button:hover { background: rgba(255, 255, 255, 0.18); }
body.has-langbar .nav { top: 36px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background 0.45s var(--ease), color 0.45s var(--ease), transform 0.45s var(--ease), top 0.3s var(--ease), border-color 0.45s;
  color: var(--white); border-bottom: 1px solid transparent;
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav.is-scrolled { background: rgba(11, 11, 12, 0.62); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-color: var(--line-dark); }
.nav.is-light { color: var(--ink); }
.nav.is-light.is-scrolled { background: rgba(243, 242, 238, 0.72); border-color: var(--line); }
.nav.is-light .logo-block { background: var(--ink); color: var(--white); }
.nav:not(.is-light) .logo-block { background: var(--white); color: var(--ink); }
.nav.is-hidden { transform: translateY(-110%); }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 14px; font-weight: 500; }
.nav-links a { position: relative; opacity: 0.82; transition: opacity 0.2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 28%, transparent); }
.lang-btn svg { width: 14px; height: 14px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; max-height: 70vh; overflow: auto;
  background: var(--white); color: var(--ink); border-radius: 16px; padding: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), 0 0 0 1px var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.98); transform-origin: top right;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.lang.is-open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.lang-menu a:hover { background: var(--paper); }
.lang-menu a[aria-current="true"] { font-weight: 700; }
.lang-menu a[aria-current="true"]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.lang-menu small { color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px; font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: color 0.45s var(--ease), border-color 0.45s;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; transform: translateY(101%); transition: transform 0.5s var(--ease); }
.btn:hover::before { transform: translateY(0); }
.btn .arrow { width: 16px; height: 16px; transition: transform 0.45s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--white); color: var(--ink); }
.btn-primary::before { background: var(--accent); }
.btn-primary:hover { color: var(--white); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.35); color: var(--white); }
.btn-ghost::before { background: var(--white); }
.btn-ghost:hover { color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark::before { background: var(--accent); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.on-light .btn-ghost { border-color: var(--line); color: var(--ink); }
.on-light .btn-ghost::before { background: var(--ink); }
.on-light .btn-ghost:hover { color: var(--white); }

.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); place-items: center; }
.menu-btn span { display: block; width: 16px; height: 1.5px; background: currentColor; box-shadow: 0 5px 0 currentColor; transform: translateY(-2.5px); }
.drawer {
  position: fixed; inset: 0; z-index: 70; background: var(--ink); color: var(--white);
  display: flex; flex-direction: column; padding: calc(var(--nav-h) + 24px) var(--gutter) 32px;
  clip-path: circle(0 at calc(100% - 38px) 36px); transition: clip-path 0.7s var(--ease); visibility: hidden;
}
.drawer.is-open { clip-path: circle(150% at calc(100% - 38px) 36px); visibility: visible; }
.drawer a.big { font-size: clamp(34px, 9vw, 54px); font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; }
.drawer .close { position: absolute; top: 16px; right: var(--gutter); width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-dark); display: grid; place-items: center; }
.drawer .drawer-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; background: var(--ink); color: var(--white); overflow: hidden;
  display: flex; align-items: flex-end;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-fallback {
  position: absolute; right: -6vw; top: 50%; width: min(70vw, 760px); aspect-ratio: 1; transform: translateY(-50%);
  background:
    radial-gradient(closest-side, rgba(232, 57, 43, 0.22), transparent 70%),
    radial-gradient(closest-side, rgba(255, 255, 255, 0.10), transparent 75%);
  filter: blur(10px); opacity: 0.9;
}
.hero-fallback::after {
  content: ""; position: absolute; inset: 22%; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 4px;
  transform: rotateX(58deg) rotateZ(38deg); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 0 80px rgba(255, 255, 255, 0.05);
}
.webgl-on .hero-fallback { display: none; }
.hero-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 70% 40%, transparent 30%, rgba(11, 11, 12, 0.55) 70%, var(--ink) 100%), linear-gradient(to top, var(--ink) 0%, transparent 35%); }
.hero-inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(56px, 10vh, 120px); padding-top: calc(var(--nav-h) + 40px); }
.badge {
  display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px 0 12px; border-radius: 999px;
  border: 1px solid var(--line-dark); background: rgba(255, 255, 255, 0.04); backdrop-filter: blur(8px);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.82);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: pulse 2.2s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3.2); opacity: 0; } }
.hero h1 {
  margin: 28px 0 0; font-weight: 900; letter-spacing: -0.035em; line-height: 0.98;
  font-size: clamp(54px, 10.2vw, 168px);
}
html[lang="ja"] .hero h1, html[lang^="zh"] .hero h1, html[lang="ko"] .hero h1 { letter-spacing: -0.02em; line-height: 1.08; font-size: clamp(46px, 9vw, 150px); }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .line > span { display: inline-block; }
.hero h1 .accent-dot { color: var(--accent); }
.hero-bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px; margin-top: clamp(28px, 4vw, 48px); }
.hero-sub { max-width: 560px; margin: 0; font-size: clamp(16px, 1.45vw, 19px); line-height: 1.75; color: rgba(255, 255, 255, 0.72); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 12.5px; color: rgba(255, 255, 255, 0.45); letter-spacing: 0.02em; }
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); writing-mode: vertical-rl; }
.scroll-cue i { display: block; width: 1px; height: 64px; background: linear-gradient(rgba(255, 255, 255, 0.5), transparent); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--white); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { to { top: 110%; } }

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); color: var(--white); border-top: 1px solid var(--line-dark); overflow: hidden; padding: 22px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font-size: clamp(18px, 2.2vw, 28px); font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.marquee-item::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: clamp(96px, 14vw, 180px) 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.on-dark .eyebrow { color: var(--muted-dark); }
h1, h2, h3, .h2, .who-text { text-wrap: balance; }
html[lang="ja"] :is(h1, h2, h3, p, .who-text) { word-break: auto-phrase; }
p { text-wrap: pretty; line-break: strict; }
.h2 { margin: 18px 0 0; font-size: clamp(36px, 5.6vw, 84px); font-weight: 900; line-height: 1.06; letter-spacing: -0.03em; max-width: 14em; }
html[lang="ja"] .h2, html[lang^="zh"] .h2, html[lang="ko"] .h2, html[lang="ar"] .h2 { letter-spacing: -0.01em; line-height: 1.18; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: clamp(48px, 6vw, 80px); }
.on-dark { background: var(--ink); color: var(--white); }

/* ---------- Feature cards (bento) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; min-height: 290px; padding: 30px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; transform-style: preserve-3d;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), border-color 0.4s;
}
.card:nth-child(1) { background: var(--ink); color: var(--white); border-color: var(--ink); }
.card:nth-child(1) p, .card:nth-child(1) .card-num { color: rgba(255, 255, 255, 0.6); }
.card:nth-child(1) .card-icon { background: rgba(255, 255, 255, 0.1); }
.card:nth-child(1)::before { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(232, 57, 43, 0.32), transparent 60%); }
.card:nth-child(1):hover .card-icon { background: var(--accent); }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.5s; background: radial-gradient(420px circle at var(--mx) var(--my), var(--accent-soft), transparent 60%); }
.card:hover { box-shadow: 0 30px 70px -30px rgba(11, 11, 12, 0.35); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-num { font-family: var(--font-latin); font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.08em; }
.card-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--paper); display: grid; place-items: center; transition: background 0.4s, color 0.4s, transform 0.6s var(--ease); }
.card-icon svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card-icon { background: var(--ink); color: var(--white); transform: rotate(-8deg) scale(1.06); }
.card h3 { margin: auto 0 10px; padding-top: 44px; font-size: clamp(20px, 1.9vw, 26px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; max-width: 34em; }

/* ---------- How it works ---------- */
.how-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.how-grid .h2 { font-size: clamp(34px, 4.4vw, 68px); }
.steps { position: relative; margin-top: 56px; display: grid; gap: 8px; }
.steps::before { content: ""; position: absolute; left: 23px; top: 24px; bottom: 24px; width: 1px; background: var(--line); }
.steps .progress { position: absolute; left: 23px; top: 24px; bottom: 24px; width: 1px; background: var(--accent); transform-origin: top; transform: scaleY(0); }
.step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding: 18px 0; }
.step-dot { position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); font-family: var(--font-latin); font-size: 14px; font-weight: 700; transition: background 0.5s, color 0.5s, border-color 0.5s; }
.step.is-active .step-dot { background: var(--ink); color: var(--white); border-color: var(--ink); }
.step h3 { margin: 10px 0 4px; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--muted); }

.demo { position: sticky; top: calc(var(--nav-h) + 32px); }
.window {
  border-radius: 24px; background: var(--ink); color: var(--white); overflow: hidden;
  box-shadow: 0 50px 100px -40px rgba(11, 11, 12, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.window-bar { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-bottom: 1px solid var(--line-dark); font-size: 12.5px; color: rgba(255, 255, 255, 0.6); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.window-bar .title { margin-left: 10px; }
.window-bar .status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.window-body { display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 420px; }
.chat { padding: 22px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--line-dark); }
.msg { max-width: 92%; padding: 12px 15px; border-radius: 16px; font-size: 14px; line-height: 1.6; }
.msg.user { align-self: flex-end; background: var(--white); color: var(--ink); border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-dark); border-bottom-left-radius: 5px; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.6); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; } .typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.screen { padding: 22px; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent); }
.screen-viz { position: relative; height: 150px; border-radius: 14px; border: 1px solid var(--line-dark); overflow: hidden; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px); }
.screen-viz .bar { position: absolute; bottom: 14px; width: 18%; border-radius: 6px 6px 2px 2px; background: rgba(255, 255, 255, 0.85); transform-origin: bottom; }
.screen-viz .bar.b1 { left: 12%; height: 46%; } .screen-viz .bar.b2 { left: 41%; height: 72%; background: var(--accent); } .screen-viz .bar.b3 { left: 70%; height: 58%; }
.screen-viz .scan { position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent); animation: scan 3.2s var(--ease) infinite; }
@keyframes scan { from { left: -40%; } to { left: 100%; } }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13.5px; }
.tasks li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.82); }
.tasks .tick { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-dark); display: grid; place-items: center; }
.tasks .tick svg { width: 11px; height: 11px; stroke: var(--white); stroke-width: 2.4; fill: none; stroke-dasharray: 20; stroke-dashoffset: 20; }
.tasks li.is-done .tick { background: var(--accent); border-color: var(--accent); }
.tasks li.is-done .tick svg { stroke-dashoffset: 0; transition: stroke-dashoffset 0.5s var(--ease) 0.1s; }
.demo-caption { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: right; }

/* ---------- Why ---------- */
.why-list { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-dark); }
.why-item { padding: 36px 28px 8px 0; border-right: 1px solid var(--line-dark); }
.why-item + .why-item { padding-left: 28px; }
.why-item:last-child { border-right: 0; }
.why-num { font-family: var(--font-latin); font-size: clamp(56px, 6.5vw, 96px); font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: rgba(255, 255, 255, 0.12); transition: color 0.6s var(--ease); }
.why-item:hover .why-num { color: var(--accent); }
.why-item h3 { margin: 30px 0 10px; font-size: 21px; font-weight: 800; }
.why-item p { margin: 0; color: rgba(255, 255, 255, 0.62); font-size: 15px; }

/* ---------- Who ---------- */
.who-text { margin: 22px 0 0; font-size: clamp(26px, 3.6vw, 52px); font-weight: 800; line-height: 1.38; letter-spacing: -0.015em; max-width: 22em; }
.who-text .w { display: inline-block; opacity: 0.16; transition: opacity 0.3s; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(40px, 6vw, 96px); }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; cursor: pointer; font-size: clamp(17px, 1.6vw, 21px); font-weight: 700; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .plus { flex: none; position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); transition: background 0.4s, border-color 0.4s, transform 0.5s var(--ease); }
.faq-item .plus::before, .faq-item .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); transition: transform 0.5s var(--ease), background 0.3s; }
.faq-item .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .plus { background: var(--ink); border-color: var(--ink); transform: rotate(180deg); }
.faq-item[open] .plus::before, .faq-item[open] .plus::after { background: var(--white); }
.faq-item[open] .plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.faq-item[open] .faq-answer { grid-template-rows: 1fr; }
.faq-answer > div { overflow: hidden; }
.faq-answer p { margin: 0 0 26px; padding-right: 58px; color: var(--muted); }

/* ---------- Final CTA ---------- */
.final { position: relative; overflow: hidden; text-align: center; padding: clamp(120px, 18vw, 220px) 0; }
.final-orb { position: absolute; left: 50%; top: 50%; width: min(90vw, 900px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(232, 57, 43, 0.35), rgba(232, 57, 43, 0.08) 45%, transparent 70%); filter: blur(30px); animation: orb 9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes orb { from { transform: translate(-55%, -48%) scale(0.92); } to { transform: translate(-45%, -52%) scale(1.06); } }
.final h2 { position: relative; margin: 0 auto; font-size: clamp(44px, 8.4vw, 132px); font-weight: 900; line-height: 1.04; letter-spacing: -0.035em; max-width: 12em; }
html[lang="ja"] .final h2, html[lang^="zh"] .final h2, html[lang="ar"] .final h2 { letter-spacing: -0.015em; line-height: 1.15; }
.final p { position: relative; margin: 26px auto 0; max-width: 34em; color: rgba(255, 255, 255, 0.66); font-size: clamp(16px, 1.4vw, 19px); }
.final .hero-ctas { justify-content: center; margin-top: 40px; position: relative; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255, 255, 255, 0.6); border-top: 1px solid var(--line-dark); padding: 56px 0 40px; font-size: 13.5px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.footer-links a:hover { color: var(--white); }
.footer-langs { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; }
.footer-langs a { opacity: 0.6; } .footer-langs a:hover, .footer-langs a[aria-current="true"] { opacity: 1; color: var(--white); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-dark); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; }
.footer .wordmark { margin-top: 56px; font-family: var(--font-latin); font-weight: 900; font-size: clamp(64px, 19vw, 300px); line-height: 0.8; letter-spacing: -0.05em; color: rgba(255, 255, 255, 0.06); user-select: none; white-space: nowrap; overflow: hidden; }

/* ---------- 404 ---------- */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; background: var(--ink); color: var(--white); padding: 24px; }
.notfound .big { font-family: var(--font-latin); font-size: clamp(120px, 26vw, 320px); font-weight: 900; letter-spacing: -0.06em; line-height: 0.9; }
.notfound .big span { color: var(--accent); }

/* ---------- Reveal (only when JS animation is active) ---------- */
.js-anim [data-reveal] { opacity: 0; transform: translateY(28px); }
.js-anim .hero h1 .line > span { transform: translateY(110%); }
.js-anim .hero [data-hero] { opacity: 0; transform: translateY(18px); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card { min-height: 260px; }
  .how-grid, .faq-grid { grid-template-columns: 1fr; }
  .demo { position: relative; top: 0; }
  .why-list { grid-template-columns: repeat(2, 1fr); }
  .why-item { border-right: 0; padding-left: 0 !important; border-bottom: 1px solid var(--line-dark); padding-bottom: 28px; }
  .why-item:nth-child(odd) { border-right: 1px solid var(--line-dark); padding-right: 24px; }
  .why-item:nth-child(even) { padding-left: 24px !important; }
}
@media (max-width: 820px) {
  :root { --nav-h: 64px; }
  .nav-links, .nav-actions .btn { display: none; }
  .lang-btn { height: 42px; }
  .lang-menu { position: fixed; right: 16px; left: 16px; top: calc(var(--nav-h) + 4px); min-width: 0; }
  .menu-btn { display: grid; }
  .hero-bottom { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
  .window-body { grid-template-columns: 1fr; }
  .chat { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .section-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 230px; padding: 24px; }
  .why-list { grid-template-columns: 1fr; }
  .why-item, .why-item:nth-child(odd), .why-item:nth-child(even) { border-right: 0; padding: 28px 0 !important; }
  .btn { height: 50px; padding: 0 22px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .faq-answer p { padding-right: 0; }
  .langbar { font-size: 12px; justify-content: flex-start; padding: 0 48px 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .grain { display: none; }
}


/* ===================== Mascot "Jido" (智多星 / 自動星) ===================== */
.mascot { position: absolute; z-index: 3; width: 128px; pointer-events: none; }
.m-svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 14px 18px rgba(11, 11, 12, 0.18)); }
.m-body { transform-box: fill-box; transform-origin: 50% 90%; animation: m-bob 3.2s ease-in-out infinite; }
.m-eye { transform-box: fill-box; transform-origin: center; animation: m-blink 5.5s infinite; }
.m-eyes { transition: transform 0.25s ease-out; }
@keyframes m-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes m-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.m-bubble {
  position: absolute; left: 62%; bottom: 92%; white-space: nowrap; z-index: 1;
  background: var(--white); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 14px 14px 14px 4px;
  padding: 6px 12px; font-size: 13px; font-weight: 700; box-shadow: 3px 3px 0 var(--ink);
  transform-origin: 0 100%; animation: m-pop 4s var(--ease) infinite;
}
@keyframes m-pop { 0%, 8% { transform: scale(0); opacity: 0; } 14%, 80% { transform: scale(1); opacity: 1; } 88%, 100% { transform: scale(0.6); opacity: 0; } }

/* sits on the top edge of the first card — its feet dangle over the frame */
.cards-wrap { position: relative; }
.mascot--sit { top: -96px; left: 22px; width: 116px; }
.mascot--sit .m-bubble { animation-delay: 1s; }
/* peeks from behind the demo window */
.demo .mascot--peek { top: -74px; right: 34px; width: 104px; z-index: 0; }
.demo .window { position: relative; z-index: 1; }
.demo .mascot--peek .m-bubble { opacity: 0; transform: scale(0); animation: none; transition: transform 0.4s var(--ease), opacity 0.3s; }
.demo.is-done .mascot--peek .m-bubble { opacity: 1; transform: scale(1); }
.demo.is-done .mascot--peek .m-body { animation: m-jump 0.7s var(--ease) 2; }
@keyframes m-jump { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-22px) rotate(-8deg); } }
/* thinking next to the FAQ title */
.faq-side { position: relative; }
.mascot--think { position: relative; display: block; width: 120px; margin-top: 40px; }
.mascot--think .m-body { animation-duration: 4.2s; }
.mascot--think .m-bubble { left: 92%; bottom: 60%; animation-delay: 0.6s; }
/* floating in the "who" art */
.who-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: 40px; align-items: center; }
.who-art { position: relative; aspect-ratio: 1; max-width: 380px; justify-self: end; width: 100%; }
.who-art .kanji { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-jp); font-weight: 900; font-size: clamp(180px, 22vw, 320px); line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(11, 11, 12, 0.14); user-select: none; }
.mascot--float { left: 50%; top: 50%; width: 150px; transform: translate(-50%, -46%); }
.mascot--float .m-body { animation: m-float 4.6s ease-in-out infinite; }
@keyframes m-float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(6deg); } }
.spark { position: absolute; width: 22px; height: 22px; fill: var(--accent); animation: twinkle 2.6s ease-in-out infinite; }
.who-art .spark:nth-of-type(1) { left: 8%; top: 18%; }
.who-art .spark:nth-of-type(2) { right: 10%; top: 8%; width: 14px; height: 14px; fill: var(--ink); animation-delay: 0.8s; }
.who-art .spark:nth-of-type(3) { right: 16%; bottom: 14%; width: 18px; height: 18px; animation-delay: 1.5s; }
@keyframes twinkle { 0%, 100% { transform: scale(0.6) rotate(0deg); opacity: 0.5; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
/* flies across the final CTA on a comet */
.final .mascot--fly { left: 8%; top: 18%; width: 112px; animation: m-fly 9s ease-in-out infinite; }
.final .mascot--fly .m-svg { filter: drop-shadow(0 0 24px rgba(255, 74, 54, 0.45)); }
.final .mascot--fly::before { content: ""; position: absolute; right: 70%; top: 52%; width: 160px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, rgba(255, 74, 54, 0.9)); transform: rotate(-14deg); transform-origin: right; }
@keyframes m-fly { 0%, 100% { transform: translate(0, 0) rotate(8deg); } 50% { transform: translate(28px, -18px) rotate(-4deg); } }
.final-sky .spark { fill: rgba(255, 255, 255, 0.8); }
.final-sky .spark:nth-child(1) { left: 14%; top: 64%; width: 14px; height: 14px; }
.final-sky .spark:nth-child(2) { right: 12%; top: 22%; animation-delay: 0.6s; fill: var(--accent); }
.final-sky .spark:nth-child(3) { right: 22%; bottom: 18%; width: 12px; height: 12px; animation-delay: 1.2s; }
.final-sky .spark:nth-child(4) { left: 30%; top: 12%; width: 10px; height: 10px; animation-delay: 1.8s; }
.final-sky .spark:nth-child(5) { right: 34%; top: 70%; width: 16px; height: 16px; animation-delay: 2.2s; }

/* ===================== Stickers & paper texture (breaks up the big light areas) ===================== */
[data-theme="light"].section, #who, #faq { background-image: radial-gradient(rgba(11, 11, 12, 0.09) 1px, transparent 1.2px); background-size: 26px 26px; background-position: -13px -13px; }
.stickers { position: absolute; right: 0; top: -120px; width: 46%; height: 120px; pointer-events: none; }
.sticker {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--white); border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap;
  animation: sticker 5s ease-in-out infinite;
}
.sticker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sticker.s0 { right: 52%; top: 18px; --r: -6deg; }
.sticker.s1 { right: 18%; top: 0; --r: 5deg; animation-delay: 0.7s; background: var(--ink); color: var(--white); }
.sticker.s1::before { background: var(--white); }
.sticker.s2 { right: 34%; top: 66px; --r: 3deg; animation-delay: 1.4s; }
.sticker.s3 { right: 0; top: 52px; --r: -4deg; animation-delay: 2.1s; background: var(--accent); color: var(--white); border-color: var(--ink); }
.sticker.s3::before { background: var(--white); }
@keyframes sticker { 0%, 100% { transform: rotate(var(--r)) translateY(0); } 50% { transform: rotate(var(--r)) translateY(-6px); } }

@media (max-width: 1080px) {
  .stickers { display: none; }
  .who-grid { grid-template-columns: 1fr; }
  .who-art { justify-self: center; max-width: 300px; }
}
@media (max-width: 820px) {
  .mascot--sit { top: -84px; width: 96px; }
  .demo .mascot--peek { width: 84px; top: -60px; }
  .final .mascot--fly { top: 6%; left: 4%; width: 84px; }
  .mascot--think { width: 96px; margin-top: 24px; }
}
/* Touch devices: drop expensive full-screen effects so scrolling stays smooth */
@media (hover: none), (max-width: 820px) {
  .grain { display: none; }
  .nav.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(11, 11, 12, 0.94); }
  .nav.is-light.is-scrolled { background: rgba(243, 242, 238, 0.96); }
  .badge { backdrop-filter: none; }
  .final-orb { animation: none; filter: blur(20px); }
  .m-svg { filter: none; }
}
@media (prefers-reduced-motion: reduce) { .m-body, .m-eye, .m-bubble, .sticker, .spark, .mascot { animation: none !important; } }


/* ===================== v3: animated wordmark, text protection, perf ===================== */
.logo .jd-wordmark { display: block; height: 44px; width: auto; }
.nav .logo { --jd-bg: #ffffff; --jd-fg: #0b0b0c; }
.nav.is-light .logo { --jd-bg: #0b0b0c; --jd-fg: #ffffff; }
.footer .logo { --jd-bg: #ffffff; --jd-fg: #0b0b0c; }
.footer .logo .jd-wordmark { height: 52px; }
@media (max-width: 820px) { .logo .jd-wordmark { height: 38px; } }

/* keep the headline readable over the particles */
.hero-vignette {
  background:
    linear-gradient(90deg, rgba(11, 11, 12, 0.92) 0%, rgba(11, 11, 12, 0.7) 34%, rgba(11, 11, 12, 0) 58%),
    radial-gradient(120% 90% at 70% 40%, transparent 30%, rgba(11, 11, 12, 0.55) 70%, var(--ink) 100%),
    linear-gradient(to top, var(--ink) 0%, transparent 35%);
}
@media (max-width: 820px) {
  .hero { align-items: flex-start; }
  .hero-vignette { background: radial-gradient(130% 70% at 50% 42%, rgba(11, 11, 12, 0.08) 0%, rgba(11, 11, 12, 0.35) 62%, var(--ink) 100%), linear-gradient(to top, var(--ink) 0%, transparent 24%); }
  .hero-inner { padding-top: calc(var(--nav-h) + 9vh); padding-bottom: 48px; }
  .hero h1, .hero-sub { text-shadow: 0 2px 24px rgba(11, 11, 12, 0.85); }
}

/* mascots never sit on top of text on phones: give them their own room */
@media (max-width: 820px) {
  .cards-wrap { padding-top: 84px; }
  .mascot--sit { top: 6px; left: auto; right: 6px; width: 86px; }
  .mascot--sit .m-bubble { left: auto; right: 78%; border-radius: 14px 14px 4px 14px; }
  .demo { margin-top: 84px; }
  .demo .mascot--peek { top: -66px; right: 18px; }
  .demo .mascot--peek .m-bubble { left: auto; right: 80%; border-radius: 14px 14px 4px 14px; }
}

/* animate the <svg> element itself (composited) instead of SVG groups (repainted on iOS) */
.m-body { animation: none; }
.m-svg { animation: m-bob 3.2s ease-in-out infinite; transform-origin: 50% 90%; will-change: transform; }
.mascot--float .m-svg { animation: m-float 4.6s ease-in-out infinite; }
.mascot--think .m-svg { animation-duration: 4.2s; }
.demo.is-done .mascot--peek .m-svg { animation: m-jump 0.7s var(--ease) 2; }
/* pause every decorative loop that is off screen */
.is-idle .m-svg, .is-idle .m-eye, .is-idle .m-bubble, .is-idle .sticker, .is-idle .spark,
.is-idle .marquee-track, .is-idle.final .mascot--fly, .is-idle .final-orb, .is-idle .pulse::after { animation-play-state: paused !important; }

.footer-company { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13.5px; }
.footer-company .fc-label { color: rgba(255, 255, 255, 0.45); font-size: 12px; letter-spacing: 0.06em; }
.footer-company a { color: rgba(255, 255, 255, 0.9); font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, 0.25); padding-bottom: 1px; transition: border-color 0.3s, color 0.3s; }
.footer-company a:hover { color: var(--white); border-color: var(--accent); }
.footer-company .fc-sep { width: 1px; height: 12px; background: rgba(255, 255, 255, 0.2); margin: 0 6px; }

/* ===================== v4: flags, org logos, RTL, scroll stability ===================== */
.flag { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(127, 127, 127, 0.28); flex: none; }
.lang-btn .flag { width: 18px; height: 13px; }
.lang-menu { min-width: 240px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.lang-menu a { justify-content: flex-start; gap: 10px; }
.lang-menu a span { flex: 1; }
.lang-menu a[aria-current="true"] { background: var(--paper); }
.footer-langs a { display: inline-flex; align-items: center; gap: 7px; }
.footer-langs .flag { width: 16px; height: 12px; }
.drawer-foot a[data-lang] { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; margin-right: 14px; font-size: 15px; opacity: 0.8; }
.drawer-foot a[aria-current="true"] { opacity: 1; font-weight: 700; }
@media (max-width: 820px) { .lang-menu { grid-template-columns: 1fr 1fr; } }

.footer-orgs { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 14px; }
.org { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 14px 18px; border: 1px solid var(--line-dark); border-radius: 16px; min-width: 260px; transition: border-color 0.3s, background 0.3s; }
.org:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.03); }
.org-label { grid-column: 1 / -1; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); margin-bottom: 10px; }
.org-mark { width: 40px; height: 40px; border-radius: 4px; }
.ws-mark { display: grid; place-items: center; background: #ffffff; color: var(--ink); font-family: var(--font-latin); font-weight: 900; font-size: 22px; letter-spacing: -0.04em; }
.org-name { display: flex; flex-direction: column; line-height: 1.25; }
.org-name b { color: var(--white); font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
.org-name small { color: rgba(255, 255, 255, 0.5); font-size: 11.5px; letter-spacing: 0.14em; margin-top: 3px; }
.footer-company { display: none; }

/* RTL (Arabic) */
[dir="rtl"] .eyebrow::before { order: 1; }
[dir="rtl"] .steps::before, [dir="rtl"] .steps .progress { left: auto; right: 23px; }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .lang-menu { right: auto; left: 0; transform-origin: top left; }
[dir="rtl"] .mascot--sit { left: auto; right: 22px; }
[dir="rtl"] .hero-vignette { transform: scaleX(-1); }
[dir="rtl"] .marquee { direction: ltr; }
[dir="rtl"] .why-item + .why-item { padding-left: 0; padding-right: 28px; }

/* scroll stability: nothing in the demo changes height while it plays; no layout-animating keyframes */
.screen-viz .scan { left: 0; transform: translateX(-100%); animation-name: scan2; }
@keyframes scan2 { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.chat { min-height: 300px; }
.typing { position: absolute; }
.chat { position: relative; }
.final-orb { will-change: auto; }

html, body { overflow-x: clip; }

html[lang="ar"] .hero h1 { line-height: 1.25; }
html[lang="ar"] .hero h1 .line { padding-bottom: 0.2em; }

/* ===================== Light / dark mode (hero stays dark in both) ===================== */
.mode-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); }
.mode-btn svg { width: 17px; height: 17px; }
.mode-btn .i-sun { display: none; }
html[data-mode="dark"] .mode-btn .i-sun { display: block; }
html[data-mode="dark"] .mode-btn .i-moon { display: none; }
@media (max-width: 820px) { .mode-btn { width: 42px; height: 42px; } }

html[data-mode="dark"] body { background: #0b0b0c; color: #f3f2ee; }
html[data-mode="dark"] [data-theme="light"].section, html[data-mode="dark"] #who, html[data-mode="dark"] #faq { background-color: #0f0f11; background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.2px); }
html[data-mode="dark"] :is(.h2, .who-text, .faq-item summary, .step h3, .card h3) { color: #f3f2ee; }
html[data-mode="dark"] :is(.eyebrow, .step p, .card p, .faq-answer p, .demo-caption, .card-num) { color: #9a978f; }
html[data-mode="dark"] .card { background: #151517; border-color: rgba(255, 255, 255, 0.08); }
html[data-mode="dark"] .card:hover { box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8); }
html[data-mode="dark"] .card-icon { background: rgba(255, 255, 255, 0.07); color: #f3f2ee; }
html[data-mode="dark"] .card:hover .card-icon { background: #f3f2ee; color: #0b0b0c; }
html[data-mode="dark"] .card:nth-child(1) { background: #f3f2ee; border-color: #f3f2ee; }
html[data-mode="dark"] .card:nth-child(1) h3 { color: #0b0b0c; }
html[data-mode="dark"] .card:nth-child(1) :is(p, .card-num) { color: #6d6b66; }
html[data-mode="dark"] .card:nth-child(1) .card-icon { background: rgba(11, 11, 12, 0.08); color: #0b0b0c; }
html[data-mode="dark"] :is(.faq-list, .faq-item) { border-color: rgba(255, 255, 255, 0.12); }
html[data-mode="dark"] .faq-item .plus { border-color: rgba(255, 255, 255, 0.2); }
html[data-mode="dark"] .faq-item[open] .plus { background: #f3f2ee; border-color: #f3f2ee; }
html[data-mode="dark"] .faq-item[open] .plus::before, html[data-mode="dark"] .faq-item[open] .plus::after { background: #0b0b0c; }
html[data-mode="dark"] .steps::before { background: rgba(255, 255, 255, 0.12); }
html[data-mode="dark"] .step-dot { background: #151517; border-color: rgba(255, 255, 255, 0.14); color: #f3f2ee; }
html[data-mode="dark"] .step.is-active .step-dot { background: #f3f2ee; color: #0b0b0c; border-color: #f3f2ee; }
html[data-mode="dark"] .who-art .kanji { -webkit-text-stroke-color: rgba(255, 255, 255, 0.14); }
html[data-mode="dark"] .sticker { background: #151517; color: #f3f2ee; border-color: #f3f2ee; box-shadow: 3px 3px 0 #f3f2ee; }
html[data-mode="dark"] .sticker.s1 { background: #f3f2ee; color: #0b0b0c; }
html[data-mode="dark"] .sticker.s1::before { background: #0b0b0c; }
html[data-mode="dark"] .sticker.s3 { background: var(--accent); color: #fff; }
html[data-mode="dark"] .window { box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1) inset; }
html[data-mode="dark"] .nav.is-light { color: #fff; }
html[data-mode="dark"] .nav.is-light.is-scrolled { background: rgba(11, 11, 12, 0.72); border-color: rgba(255, 255, 255, 0.12); }
html[data-mode="dark"] .nav.is-light .logo { --jd-bg: #ffffff; --jd-fg: #0b0b0c; }
@media (hover: none), (max-width: 820px) { html[data-mode="dark"] .nav.is-light.is-scrolled { background: rgba(11, 11, 12, 0.96); } }
html[data-mode="dark"] .lang-menu { background: #18181b; color: #f3f2ee; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1); }
html[data-mode="dark"] .lang-menu a:hover, html[data-mode="dark"] .lang-menu a[aria-current="true"] { background: rgba(255, 255, 255, 0.07); }

/* ===================== Mobile drawer v2 ===================== */
.drawer { padding: 0 var(--gutter) calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; gap: 0; }
.drawer-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); background: var(--ink); }
.drawer-head .logo { --jd-bg: #ffffff; --jd-fg: #0b0b0c; }
.drawer .close { position: static; }
.drawer-nav { display: flex; flex-direction: column; margin-top: 18px; border-top: 1px solid var(--line-dark); }
.drawer-nav a { display: flex; align-items: center; justify-content: space-between; padding: 18px 2px; border-bottom: 1px solid var(--line-dark); font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.drawer-nav a .arrow { width: 18px; height: 18px; opacity: 0.5; }
[dir="rtl"] .drawer-nav a .arrow { transform: scaleX(-1); }
.drawer-sec { margin-top: 30px; }
.drawer-label { display: block; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); margin-bottom: 12px; }
.drawer-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.drawer-langs a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid transparent; font-size: 14.5px; color: rgba(255, 255, 255, 0.85); }
.drawer-langs a[aria-current="true"] { border-color: rgba(255, 255, 255, 0.35); color: #fff; font-weight: 700; }
.drawer-ctas { margin-top: 28px; display: grid; gap: 10px; }
.drawer-ctas .btn { width: 100%; }
.drawer.is-open .drawer-nav a, .drawer.is-open .drawer-sec, .drawer.is-open .drawer-ctas { animation: drawer-in 0.6s var(--ease) both; }
.drawer.is-open .drawer-nav a:nth-child(2) { animation-delay: 0.04s; } .drawer.is-open .drawer-nav a:nth-child(3) { animation-delay: 0.08s; }
.drawer.is-open .drawer-nav a:nth-child(4) { animation-delay: 0.12s; } .drawer.is-open .drawer-sec { animation-delay: 0.16s; } .drawer.is-open .drawer-ctas { animation-delay: 0.2s; }
@keyframes drawer-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* footer org cards full width on phones */
@media (max-width: 820px) { .footer-orgs { flex-direction: column; } .org { min-width: 0; width: 100%; } }
