/* ---------------------------------------------------------------------
   Magnetro — tokens
   Brand blue #0271f6 reaches 4.47:1 on white, just under AA (4.5:1) for
   body text, so it never carries text on white. --blue-dk (7.09:1) does
   that job. On the dark section, plain --blue only reaches 4.25:1, so
   --blue-lt (4.9:1) carries text there instead. The mark itself is exempt
   from text-contrast rules (it is a logo, not text) and stays true brand
   blue everywhere, including on --night.
------------------------------------------------------------------------ */

:root {
  --paper: #ffffff;
  --paper-2: #f6f8fb;
  --ink: #101012;
  --ink-2: #4a4d55;
  --ink-3: #b9bec8;        /* borders and hover edges only — 1.86:1 on paper, never text */
  --ink-label: #6e727d;    /* the small-caps label grey, 4.83:1 on paper */
  --rule: #e3e6ec;

  --blue: #0271f6;
  --blue-dk: #0154b8;
  --blue-lt: #1b7ff6;
  --blue-tint: #eaf2ff;
  --blue-fill: #026ff6;    /* button fill: carries white text at 4.56:1; --blue itself is 4.47:1 */

  --night: #0a0c11;
  --night-2: #14171f;
  --rule-night: #262b36;

  --edge: clamp(20px, 5vw, 64px);
  --measure: 640px;
  --radius: 10px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, figure { margin: 0; }

a { color: inherit; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 200;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- top bar ---------- */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--edge);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--rule);
  transition: background-color .2s ease, border-color .2s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo { height: 26px; width: auto; display: block; }
.brand-logo-night { display: none; }
html.on-night .brand-logo-day { display: none; }
html.on-night .brand-logo-night { display: block; }

html.on-night .top-bar {
  background: rgba(10, 12, 17, 0.92);
  border-bottom-color: var(--rule-night);
}
html.on-night .lang-switch a { color: #b7bdca; }
html.on-night .lang-switch a[aria-current="page"] { color: #fff; background: var(--night-2); }
html.on-night .btn-ghost { border-color: var(--rule-night); color: #fff; }
html.on-night .btn-ghost:hover { border-color: #4a5062; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  padding: 5px 8px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 600;
}
.lang-switch a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--blue-fill); color: #fff; }
.btn-primary:hover { background: var(--blue-dk); }
.btn-ghost { border-color: var(--rule); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); }

/* ---------- layout ---------- */

section { padding: 96px var(--edge); }
.section-alt { background: var(--paper-2); }

.wrap { max-width: 1040px; margin: 0 auto; }
.prose { max-width: var(--measure); }
.center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-dk);
  margin-bottom: 14px;
}
.on-night .eyebrow, .section-night .eyebrow { color: var(--blue-lt); }

h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -0.01em; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }

p { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
p + p { margin-top: 16px; }
.lede { font-size: 20px; line-height: 1.55; color: var(--ink-2); }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- hero ---------- */

.hero { padding-top: 88px; padding-bottom: 72px; text-align: center; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.patent-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--blue-dk);
  background: var(--blue-tint);
  border-radius: 999px;
  padding: 7px 14px;
  margin-bottom: 22px;
}
.patent-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

.hero h1 { max-width: 760px; margin: 0 auto; }
.hero .lede { max-width: 620px; margin: 22px auto 0; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

.hero-mark { width: 96px; height: auto; margin: 0 auto 28px; display: block; overflow: visible; }
.hero-mark .spin-mark {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: spin 26s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- facts row ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 780px;
  margin: 56px auto 0;
}
.fact { background: var(--paper); padding: 22px 20px; text-align: left; }
.fact .num { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.fact .label { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); }

@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; }
}

/* ---------- problem ---------- */

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 820px) {
  .problem-grid { grid-template-columns: 1fr; }
}
.problem-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.problem-list li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-2);
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.problem-list .x { color: var(--blue-dk); font-weight: 700; }
.problem-note { margin-top: 24px; font-size: 15px; }

/* ---------- how it works / night section ---------- */

.section-night {
  background: var(--night);
  color: #fff;
}
.section-night p { color: #b7bdca; }
.section-night h2 { color: #fff; }
.section-night .rule { border-color: var(--rule-night); }

.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 20px;
}
@media (max-width: 900px) {
  .how-grid { grid-template-columns: 1fr; }
}

.diagram-frame {
  background: var(--night-2);
  border: 1px solid var(--rule-night);
  border-radius: 14px;
  padding: 28px;
}
.diagram-frame svg { width: 100%; height: auto; display: block; }
.diagram-cap {
  margin-top: 14px;
  font-size: 13px;
  color: #8a90a0;
  text-align: center;
}

.variant-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; }
.variant-list li {
  padding: 16px 18px;
  border: 1px solid var(--rule-night);
  border-radius: 8px;
  background: var(--night-2);
}
.variant-list .v-name { display: block; font-weight: 700; font-size: 14px; color: var(--blue-lt); margin-bottom: 4px; }
.variant-list .v-desc { font-size: 14px; color: #b7bdca; line-height: 1.5; }

/* SVG diagram parts */
.d-core { fill: none; stroke: var(--blue-lt); stroke-width: 3; }
.d-coil { fill: rgba(27,127,246,0.16); stroke: var(--blue-lt); stroke-width: 1.5; }
.d-plate { fill: none; stroke: #4a5062; stroke-width: 2; stroke-dasharray: 4 4; }
.d-shaft { fill: #e9ecf3; stroke: #4a5062; stroke-width: 2; }
.d-label { fill: #8a90a0; font-family: var(--mono); font-size: 15px; }
.d-rotor { animation: spin-slow 9s linear infinite; transform-origin: 300px 300px; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ---------- prototype / video ---------- */

.video-wrap {
  position: relative;
  max-width: 380px;
  margin: 36px auto 0;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--rule);
  box-shadow: 0 20px 50px -20px rgba(16, 16, 18, 0.35);
}
.video-wrap video { width: 100%; display: block; aspect-ratio: 9/16; object-fit: cover; }
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  border: none;
  cursor: pointer;
  padding: 0;
}
.video-play .circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play svg { width: 22px; height: 22px; fill: var(--ink); margin-left: 3px; }
.video-wrap.is-playing .video-play { display: none; }
.video-cap { max-width: 380px; margin: 14px auto 0; font-size: 13px; color: var(--ink-2); text-align: center; }

/* ---------- roadmap ---------- */

.roadmap-list { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.roadmap-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.roadmap-list li:last-child { border-bottom: 1px solid var(--rule); }
.roadmap-list li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--blue-dk);
  font-weight: 700;
  padding-top: 2px;
}
.roadmap-list h3 { margin-bottom: 6px; }
.roadmap-list p { font-size: 15px; }

/* ---------- status ---------- */

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 32px;
}
@media (max-width: 820px) {
  .status-grid { grid-template-columns: repeat(2, 1fr); }
}
.status-cell { background: var(--paper); padding: 20px 18px; }
.status-cell .s-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-label); margin-bottom: 8px; }
.status-cell .s-value { display: block; font-size: 15px; line-height: 1.4; }
.status-note {
  margin-top: 24px;
  font-size: 14px;
  color: var(--ink-2);
  border-left: 2px solid var(--blue);
  padding-left: 16px;
}

/* ---------- patent ---------- */

.patent-card {
  margin-top: 32px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--paper);
}
.patent-title { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-label); font-weight: 700; margin-bottom: 10px; }
.patent-name { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 18px; }
.patent-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 32px; margin-bottom: 24px; }
@media (max-width: 640px) { .patent-meta { grid-template-columns: 1fr; } }
.patent-meta dt { font-size: 12px; color: var(--ink-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.patent-meta dd { margin: 4px 0 0; font-size: 15px; }
.patent-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-dk);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid transparent;
}
.patent-link:hover { border-bottom-color: var(--blue-dk); }

/* ---------- contact / footer ---------- */

.contact { text-align: center; }
.contact .btn-primary { margin-top: 28px; font-size: 16px; padding: 14px 28px; }

footer {
  padding: 36px var(--edge);
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-label);
}
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--ink); }

@media (max-width: 560px) {
  section { padding: 64px var(--edge); }
  .top-actions { gap: 10px; }
  .btn { padding: 8px 12px; font-size: 13px; }
}
