/* ==========================================================
   KanaQ Simulations — styles
   Look: warm sketchbook paper + comic-panel borders (to match
   Kana's line art) with quantum violet/cyan and saffron accents.
   ========================================================== */

:root {
  --paper: #fbf7ee;
  --paper-2: #f3ecdd;
  --card: #fffdf8;
  --ink: #1a1628;
  --ink-soft: #4d4862;
  --ink-mute: #7a748c;
  --line: #e3d9c4;

  --violet: #5b4bdb;
  --violet-soft: #e7e3ff;
  --cyan: #0fa3b5;
  --cyan-soft: #d6f4f7;
  --saffron: #f28c28;
  --saffron-soft: #fde6cc;
  --green: #138808;

  --night: #15132b;
  --night-2: #211d45;
  --night-line: #37316b;

  --radius: 14px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --f-hand: "Caveat", "Comic Sans MS", cursive;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--violet); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3, h4, h5 { font-family: var(--f-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1.35rem; font-weight: 700; }
h4 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.14rem; color: var(--ink-soft); max-width: 62ch; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 1rem;
  display: inline-flex; align-items: center; gap: .5rem;
}
.eyebrow--light { color: #a99fff; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #13880822; }

.footnote { font-size: .8rem; color: var(--ink-mute); margin-top: 1.25rem; }
.footnote--light { color: #9c97bb; }
.footnote--light a { color: #c6bfff; }

/* ---------- highlight marker ---------- */
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::after {
  content: ""; position: absolute; left: -4px; right: -4px; bottom: .08em; height: .38em;
  z-index: -1; border-radius: 4px; transform: skew(-8deg);
}
.hl--violet::after { background: var(--violet-soft); }
.hl--cyan::after { background: var(--cyan-soft); }
.hl--saffron::after { background: var(--saffron-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font: 700 1rem/1 var(--f-body);
  padding: .95rem 1.35rem;
  color: #fff; background: var(--violet);
  border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: var(--shadow);
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--ghost { background: var(--card); color: var(--ink); }
.btn--small { padding: .6rem 1rem; font-size: .92rem; box-shadow: 3px 3px 0 var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- panels ---------- */
.panel {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================
   NAV
   ========================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand__mark { width: 36px; height: 36px; color: var(--violet); }
.brand__name { font: 800 1.55rem/1 var(--f-display); letter-spacing: -.02em; }
.brand__name b { color: var(--saffron); }
.brand--light { color: #fff; }

.nav__links { display: flex; align-items: center; gap: 1.4rem; }
.nav__links a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
  background: linear-gradient(var(--saffron), var(--saffron)) left bottom / 0 2px no-repeat;
  transition: background-size .2s;
}
.nav__links a:not(.btn):hover, .nav__links a.is-active { background-size: 100% 2px; }

.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

@media (max-width: 1020px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 2px solid var(--ink);
    padding: .5rem 24px 1.25rem;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: .8rem 0; border-bottom: 1px dashed var(--line); background: none; }
  .nav__links .btn { margin-top: 1rem; justify-content: center; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(3rem, 7vw, 6rem) 2rem;
  background:
    radial-gradient(circle at 1px 1px, #d9cfb9 1px, transparent 0) 0 0 / 22px 22px;
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0; }
.hero__stats { list-style: none; padding: 0; margin: 2.2rem 0 0; display: flex; flex-wrap: wrap; gap: 1.2rem 2.4rem; }
.hero__stats li { display: flex; flex-direction: column; border-left: 3px solid var(--saffron); padding-left: .8rem; }
.hero__stats b { font: 800 1.6rem/1.1 var(--f-display); }
.hero__stats span { font-size: .85rem; color: var(--ink-mute); }

.hero__art { position: relative; aspect-ratio: 1; max-width: 480px; width: 100%; justify-self: center; }
.orbit { position: absolute; inset: 0; border: 2px dashed var(--ink); border-radius: 50%; opacity: .25; }
.orbit--2 { inset: 9%; border-style: solid; border-color: var(--violet); opacity: .35; animation: spin 40s linear infinite; }
.orbit--3 { inset: 19%; border-color: var(--cyan); opacity: .45; animation: spin 26s linear infinite reverse; }
.orbit--2::before, .orbit--3::before {
  content: ""; position: absolute; top: -8px; left: calc(50% - 7px); width: 14px; height: 14px;
  border-radius: 50%; background: var(--violet); border: 2px solid var(--ink);
}
.orbit--3::before { background: var(--saffron); }
@keyframes spin { to { transform: rotate(360deg); } }

.bloch { position: absolute; width: 42%; right: -2%; top: 4%; overflow: visible; }
.bloch__sphere { fill: var(--card); stroke: var(--ink); stroke-width: 3; }
.bloch__eq { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 5; }
.bloch__axis { stroke: var(--ink-mute); stroke-width: 1.5; }
.bloch__lbl { font: 600 15px var(--f-mono); fill: var(--ink); }
.bloch__vec { stroke: var(--violet); stroke-width: 5; stroke-linecap: round; }
.bloch__tip { fill: var(--saffron); stroke: var(--ink); stroke-width: 2.5; }

.hero__kana {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%);
  width: 46%;
  animation: bob 3.2s ease-in-out infinite;
}
.hero__kana img { width: 100%; height: auto; }
@keyframes bob { 50% { transform: translate(-50%, -50%); } }

.bubble {
  font: 700 1.4rem/1.15 var(--f-hand);
  background: var(--card); border: 2px solid var(--ink); border-radius: 18px;
  padding: .6rem .9rem; box-shadow: var(--shadow);
  position: absolute;
}
.bubble--hero { left: -4%; bottom: 8%; max-width: 210px; transform: rotate(-3deg); }
.bubble--hero::after {
  content: ""; position: absolute; right: 26px; top: -12px; width: 18px; height: 18px;
  background: var(--card); border-left: 2px solid var(--ink); border-top: 2px solid var(--ink);
  transform: rotate(45deg);
}
.bubble em { color: var(--violet); font-style: normal; }

/* ==========================================================
   STRIP
   ========================================================== */
.strip { background: var(--ink); color: var(--paper); border-block: 2px solid var(--ink); }
.strip__inner { display: flex; align-items: center; gap: 1.5rem; padding-block: 1.1rem; flex-wrap: wrap; }
.strip__label { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #a8a2c2; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 2rem; }
.strip li { font: 700 1.05rem var(--f-display); opacity: .92; }

/* ==========================================================
   SECTIONS
   ========================================================== */
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section--tint { background: var(--paper-2); border-block: 2px solid var(--ink); }
.section__head { margin-bottom: 2.8rem; }
.section__head--sub { margin: 4rem 0 1.5rem; }
.section__head--sub p { color: var(--ink-soft); }

/* ---------- service cards ---------- */
.cards { display: grid; gap: 1.6rem; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--ink); }
.card p { color: var(--ink-soft); font-size: .98rem; }
.card__icon {
  width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center;
  background: var(--violet-soft); border: 2px solid var(--ink); margin-bottom: 1.1rem;
}
.card:nth-child(3n+2) .card__icon { background: var(--cyan-soft); }
.card:nth-child(3n) .card__icon { background: var(--saffron-soft); }
.card__icon svg { width: 32px; height: 32px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.ticks li { position: relative; padding-left: 1.6rem; font-size: .95rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green);
  transform: rotate(-45deg);
}

/* ---------- domains ---------- */
.domain-tabs { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.6rem; }
.domain-tabs button {
  font: 700 1rem var(--f-body); padding: .7rem 1.3rem; cursor: pointer;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s, background .15s;
}
.domain-tabs button:hover { transform: translate(-1px, -1px); }
.domain-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }

.domain {
  display: grid; grid-template-columns: 1.4fr .6fr; gap: 2rem; align-items: center;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: clamp(1.5rem, 4vw, 2.8rem);
  animation: pop .35s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.domain__copy p { color: var(--ink-soft); }
.domain__copy .ticks { margin: 1.2rem 0 1.6rem; }
.stat {
  display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .8rem;
  background: var(--saffron-soft); border: 2px dashed var(--ink); border-radius: 12px; padding: .7rem 1.1rem;
}
.stat b { font: 800 2rem/1 var(--f-display); }
.stat span { font-size: .9rem; color: var(--ink-soft); }
.domain__art { margin: 0; text-align: center; }
.domain__art img { margin-inline: auto; height: 230px; width: auto; object-fit: contain; }
.domain__art figcaption { font: 700 1.35rem/1.15 var(--f-hand); margin-top: .6rem; color: var(--violet); }

/* ---------- steps ---------- */
.steps {
  list-style: none; padding: 0; margin: 0 0 2.5rem;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; counter-reset: s;
}
.steps li { position: relative; padding: 1.2rem 1rem; border: 2px dashed var(--ink); border-radius: var(--radius); background: var(--card); }
.steps li:not(:last-child)::after {
  content: "→"; position: absolute; right: -.95rem; top: 50%; transform: translateY(-50%);
  font: 800 1.3rem var(--f-display); color: var(--saffron); z-index: 1;
}
.steps span {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--violet); color: #fff; font: 700 .9rem var(--f-mono); margin-bottom: .6rem; border: 2px solid var(--ink);
}
.steps h4 { margin-bottom: .25rem; }
.steps p { font-size: .88rem; color: var(--ink-soft); margin: 0; }

/* ---------- VQE demo ---------- */
.vqe { display: grid; grid-template-columns: 340px 1fr; gap: 2rem; padding: clamp(1.25rem, 3vw, 2rem); }
.vqe__controls label { display: flex; justify-content: space-between; font-weight: 700; margin-top: .6rem; }
.vqe__controls output { font-family: var(--f-mono); color: var(--violet); }
.vqe input[type="range"] { width: 100%; accent-color: var(--violet); margin: .6rem 0 1rem; }
.vqe__circuit { background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: .6rem; margin-bottom: 1rem; }
.vqe__circuit svg { width: 100%; height: auto; }
.vqe__circuit text { font: 600 13px var(--f-mono); fill: var(--ink); }
.vqe__circuit line { stroke: var(--ink); stroke-width: 1.6; }
.vqe__circuit .gate { fill: var(--violet-soft); stroke: var(--ink); stroke-width: 1.8; }
.vqe__circuit .gate--x { fill: var(--cyan-soft); }
.vqe__circuit .gate--m { fill: var(--saffron-soft); }
.vqe__circuit .gtxt { font-size: 12px; }
.vqe__circuit .ctrl { fill: var(--ink); }
.vqe__circuit .targ { fill: var(--card); stroke: var(--ink); stroke-width: 1.8; }
.vqe__circuit .meter { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.vqe__readout { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1.2rem 0 0; }
.vqe__readout div { background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: .5rem .7rem; }
.vqe__readout dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.vqe__readout dd { margin: 0; font: 600 1.02rem var(--f-mono); }
.vqe__plot canvas { width: 100%; height: auto; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; }

/* ---------- platforms / algorithms ---------- */
.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.platform { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.platform p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.p-ico { display: block; width: 52px; height: 52px; margin-bottom: 1rem; border: 2px solid var(--ink); border-radius: 50%; position: relative; }
.p-ico--sc { background: repeating-linear-gradient(90deg, var(--violet-soft) 0 6px, var(--card) 6px 12px); }
.p-ico--ph { background: radial-gradient(circle, var(--saffron) 0 5px, var(--saffron-soft) 6px 100%); }
.p-ico--ph::after { content: ""; position: absolute; inset: 22px -12px auto; height: 2px; background: var(--saffron); }
.p-ico--ion { background: radial-gradient(circle at 30% 50%, var(--cyan) 0 4px, transparent 5px), radial-gradient(circle at 50% 50%, var(--cyan) 0 4px, transparent 5px), radial-gradient(circle at 70% 50%, var(--cyan) 0 4px, transparent 5px), var(--cyan-soft); }
.p-ico--na { border-radius: 12px; background: radial-gradient(circle, var(--violet) 0 3px, transparent 4px) 0 0 / 12px 12px, var(--violet-soft); }

.algos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.algo { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.algo code { font: 700 1.1rem var(--f-mono); color: var(--violet); }
.algo span { font-weight: 500; font-size: .95rem; }
.algo em { font-style: normal; font-size: .78rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }

/* ==========================================================
   NQM (night)
   ========================================================== */
.section--night {
  background:
    radial-gradient(ellipse at 85% 0%, #3a2f9a55, transparent 55%),
    radial-gradient(ellipse at 0% 100%, #0fa3b533, transparent 50%),
    var(--night);
  color: #ecebf7;
}
.section--night .lead { color: #c3c0dc; }
.section--night h2 { color: #fff; }
.nqm__head { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.nqm__kana {
  width: 200px; height: 200px; border-radius: 50%; background: var(--paper);
  border: 3px solid var(--saffron); display: grid; place-items: end center; overflow: hidden;
  box-shadow: 0 0 0 10px #f28c2822;
}
.nqm__kana img { height: 88%; width: auto; }

.bigstats { list-style: none; padding: 0; margin: 3rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.bigstats li { border: 1.5px solid var(--night-line); background: var(--night-2); border-radius: var(--radius); padding: 1.3rem; }
.bigstats b { display: block; font: 800 clamp(1.7rem, 3vw, 2.4rem)/1.1 var(--f-display); color: #fff; }
.bigstats li:nth-child(1) b { color: var(--saffron); }
.bigstats li:nth-child(3) b { color: #7fe3ef; }
.bigstats span { font-size: .9rem; color: #aaa6c9; }

.nqm__sub { color: #fff; margin: 3rem 0 1.2rem; }
.hubs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.hub { background: var(--night-2); border: 1.5px solid var(--night-line); border-radius: var(--radius); padding: 1.3rem; border-top: 4px solid var(--violet); }
.hub:nth-child(2) { border-top-color: var(--cyan); }
.hub:nth-child(3) { border-top-color: var(--saffron); }
.hub:nth-child(4) { border-top-color: #3fbf5a; }
.hub__tag { font: 500 .72rem var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: #a99fff; }
.hub h4 { color: #fff; margin: .4rem 0; }
.hub p { font-size: .9rem; color: #bbb7d6; margin: 0; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: .2rem; }
.timeline::before { content: ""; position: absolute; left: 96px; top: 8px; bottom: 8px; width: 2px; background: var(--night-line); }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 1.8rem; padding: .7rem 0; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 90px; top: 1.05rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--night); border: 3px solid var(--saffron);
}
.timeline time { font: 600 .85rem/1.9 var(--f-mono); color: #a99fff; }
.timeline p { margin: 0; color: #d6d3ea; }
.timeline strong { color: #fff; }

/* ==========================================================
   EVENT
   ========================================================== */
.event { display: grid; grid-template-columns: 1.3fr .7fr; overflow: hidden; }
.event__main { padding: clamp(1.5rem, 4vw, 3rem); }
.event__tag { font: 700 1.6rem var(--f-hand); color: var(--violet); margin-top: -.4rem; }
.event__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-weight: 700; }
.event__main > p:not(.eyebrow):not(.event__tag):not(.event__meta) { color: var(--ink-soft); }
.event__side { position: relative; background: var(--night); color: #e6e4f3; padding: clamp(1.5rem, 3vw, 2.2rem); border-left: 2px solid var(--ink); }
.event__side h4 { color: #fff; font-size: .85rem; font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .1em; margin-top: .4rem; }
.tracks { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: .6rem; }
.tracks li { display: grid; grid-template-columns: 32px 1fr; font-weight: 700; line-height: 1.3; }
.tracks span { font: 600 .8rem var(--f-mono); color: #7fe3ef; padding-top: .15rem; }
.tracks small { grid-column: 2; font: 500 .72rem var(--f-mono); color: #9d98bf; letter-spacing: .05em; text-transform: uppercase; }
.agenda { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; font-size: .9rem; color: #c3c0dc; padding-right: 90px; }
.agenda b { display: block; color: var(--saffron); }
.event__kana {
  position: absolute; right: 12px; bottom: 12px; width: 100px; height: auto;
  background: var(--paper); border-radius: 50%; padding: 12px; border: 2px solid var(--saffron);
}

.countdown { display: flex; gap: .8rem; margin: 1.8rem 0 .6rem; flex-wrap: wrap; }
.countdown div {
  min-width: 82px; text-align: center; padding: .7rem .5rem; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink);
}
.countdown b { display: block; font: 800 2rem/1 var(--f-display); color: var(--violet); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }

/* ==========================================================
   KANA'S CORNER
   ========================================================== */
.kana-intro { display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: center; margin-bottom: 2.8rem; }
.kana-intro img { height: 220px; width: auto; }

.flips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.flip {
  position: relative; height: 280px; padding: 0; border: 0; background: none; cursor: pointer;
  perspective: 1000px; font: inherit; color: inherit; text-align: center;
}
.flip__front, .flip__back {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform .6s cubic-bezier(.3, 1.3, .5, 1);
  padding: 1.4rem;
}
.flip__front { background: var(--card); }
.flip__front img { height: 150px; width: auto; max-width: 90%; object-fit: contain; margin-bottom: .4rem; }
.flip__front b { font: 800 1.35rem var(--f-display); }
.flip__front small { font: 700 1.1rem var(--f-hand); color: var(--violet); }
.flip__back {
  background: var(--violet); color: #fff; transform: rotateY(180deg);
  font: 700 1.5rem/1.25 var(--f-hand);
}
.flip__back b { font: 800 .8rem var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--saffron-soft); margin-bottom: .4rem; }
.flip__back em { font-style: normal; color: var(--saffron-soft); }
.flip:nth-child(3n+2) .flip__back { background: #0b8796; }
.flip:nth-child(3n) .flip__back { background: #c26512; }
.flip[aria-pressed="true"] .flip__front { transform: rotateY(-180deg); }
.flip[aria-pressed="true"] .flip__back { transform: rotateY(0); }
.flip:hover .flip__front { box-shadow: 7px 7px 0 var(--ink); }

/* ==========================================================
   CONTACT
   ========================================================== */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact__copy { position: relative; }
.contact__list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .6rem; }
.contact__list b { display: inline-block; width: 90px; font-family: var(--f-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.contact__kana { height: 180px; width: auto; margin-top: 1rem; }

.form { padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 700; font-size: .92rem; }
.form input, .form select, .form textarea {
  font: 400 1rem var(--f-body); color: var(--ink);
  padding: .75rem .9rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper);
  width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.form .btn { justify-self: start; }
.form__note { margin: 0; font: 700 1.3rem var(--f-hand); color: var(--green); min-height: 1.4em; }

/* ==========================================================
   FOOTER
   ========================================================== */
.footer { background: var(--ink); color: #c9c5dc; padding-block: 3.5rem 1.5rem; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer p { margin-top: .8rem; }
.footer nav { display: grid; gap: .45rem; align-content: start; }
.footer h5 { font: 500 .75rem var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: #8a85a6; margin-bottom: .4rem; }
.footer nav a { color: #e9e7f5; text-decoration: none; font-size: .95rem; }
.footer nav a:hover { color: var(--saffron); }
.footer__legal { border-top: 1px solid #332e4e; margin-top: 2.5rem; padding-top: 1.2rem; font-size: .8rem; color: #8a85a6; }

/* ==========================================================
   FLOATING KANA BUDDY
   ========================================================== */
.buddy { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; align-items: flex-end; gap: .6rem; pointer-events: none; }
.buddy__btn {
  pointer-events: auto; width: 84px; height: 84px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--paper); border: 2.5px solid var(--ink); box-shadow: var(--shadow);
  display: grid; place-items: end center; overflow: hidden;
  transition: transform .2s;
}
.buddy__btn:hover { transform: scale(1.06) rotate(-4deg); }
.buddy__btn img { height: 78px; width: auto; max-width: 110%; object-fit: contain; object-position: bottom; transition: opacity .25s; }
.buddy__bubble {
  pointer-events: auto;
  max-width: 240px; background: var(--card); border: 2px solid var(--ink); border-radius: 16px 16px 4px 16px;
  box-shadow: var(--shadow); padding: .6rem .85rem; margin-bottom: 42px;
  font: 700 1.2rem/1.2 var(--f-hand);
  opacity: 0; transform: translateY(8px) scale(.96); transform-origin: bottom right;
  transition: opacity .3s, transform .3s;
}
.buddy.is-talking .buddy__bubble { opacity: 1; transform: none; }
.buddy.is-hidden .buddy__bubble { opacity: 0 !important; transform: translateY(8px) scale(.96) !important; pointer-events: none; }

/* ==========================================================
   REVEAL ON SCROLL
   ========================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- WhatsApp & form states ---------- */
.btn--wa { background: #1fa855; }
.btn--wa svg { width: 20px; height: 20px; fill: currentColor; }
.contact__copy .btn--wa { margin-top: .2rem; }
.contact__list a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--saffron-soft); }
.contact__list a:hover { border-bottom-color: var(--saffron); }
.footer__wa { color: #7ee2a3 !important; text-decoration: none; font-weight: 700; }
.footer__wa:hover { color: #fff !important; }
.form__note--error { color: #c0392b; font: 500 .95rem var(--f-body); }
.form__note--error a { color: #1fa855; font-weight: 700; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }
.cta__btns { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ==========================================================
   ABOUT PAGE
   ========================================================== */
.about-hero { padding-block: clamp(3rem, 7vw, 5.5rem); }
.about-hero__grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 3rem; align-items: center; }
.about-hero__art { position: relative; margin: 0; justify-self: center; padding: 3rem 0 0; }
.about-hero__art img { height: 300px; width: auto; }
.bubble--about { right: 60%; top: 0; width: 220px; transform: rotate(-4deg); }

.story__cols { columns: 3 260px; column-gap: 2.5rem; color: var(--ink-soft); }
.story__cols p { break-inside: avoid; }

.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.mv__card { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: clamp(1.5rem, 3vw, 2.4rem); }
.mv__card h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.mv__card p:last-child { color: var(--ink-soft); margin: 0; }
.mv__card--night { background: var(--night); color: #fff; }
.mv__card--night p:last-child { color: #c3c0dc; }

.founders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.founder { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.8rem 1.6rem 1.6rem; border-top: 8px solid var(--violet); }
.founder:nth-child(2) { border-top-color: var(--cyan); }
.founder:nth-child(3) { border-top-color: var(--saffron); }
.founder__num { font: 800 2.6rem/1 var(--f-display); color: var(--line); position: absolute; right: 1.2rem; top: 1rem; }
.founder h3 { padding-right: 3.2rem; }
.founder p { color: var(--ink-soft); }
.todo { background: repeating-linear-gradient(-45deg, #fff4d6 0 8px, #fdeab8 8px 16px); outline: 1.5px dashed var(--saffron); border-radius: 4px; }

.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.value { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.value img { height: 90px; width: auto; margin-bottom: .8rem; }
.value p { font-size: .94rem; color: var(--ink-soft); margin: 0; }

.steps--4 { grid-template-columns: repeat(4, 1fr); }

.why-kana { display: grid; grid-template-columns: auto 1fr; gap: 3rem; align-items: center; }
.why-kana img { height: 240px; width: auto; }

.cta { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding: clamp(1.5rem, 4vw, 3rem); background: var(--violet-soft); }
.cta h2 { margin-bottom: .3rem; }
.cta .lead { margin: 0; }

@media (max-width: 1020px) {
  .about-hero__grid { grid-template-columns: 1fr; }
  .founders, .values { grid-template-columns: repeat(2, 1fr); }
  .steps--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .mv, .founders, .values { grid-template-columns: 1fr; }
  .why-kana { grid-template-columns: 1fr; gap: 1rem; }
  .why-kana img { height: 170px; }
  .about-hero__art img { height: 220px; }
  .bubble--about { right: 55%; width: 170px; }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1020px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 400px; }
  .cards--3, .flips { grid-template-columns: repeat(2, 1fr); }
  .platforms, .hubs, .bigstats, .algos { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li::after { display: none; }
  .vqe { grid-template-columns: 1fr; }
  .event { grid-template-columns: 1fr; }
  .event__side { border-left: 0; border-top: 2px solid var(--ink); }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }
  .cards--3, .flips, .platforms, .hubs, .algos { grid-template-columns: 1fr; }
  .bigstats { grid-template-columns: 1fr 1fr; }
  .domain { grid-template-columns: 1fr; }
  .domain__art { order: -1; }
  .domain__art img { height: 160px; }
  .nqm__head { grid-template-columns: 1fr; }
  .nqm__kana { width: 150px; height: 150px; }
  .kana-intro { grid-template-columns: 1fr; gap: 1rem; }
  .kana-intro img { height: 160px; }
  .form__row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 0; padding-left: 28px; }
  .timeline li::before { left: 0; top: 1.05rem; }
  .countdown div { min-width: 68px; }
  .bubble--hero { left: 0; font-size: 1.15rem; max-width: 170px; }
  .buddy__btn { width: 64px; height: 64px; }
  .buddy__btn img { height: 60px; }
  .buddy__bubble { max-width: 190px; font-size: 1.05rem; margin-bottom: 30px; }
  .agenda { padding-right: 0; padding-bottom: 110px; }
}

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