/* ============================================================
   Mindhalla v3 — «Measured in days»
   One concept: the site as a precision instrument.
   Swiss: grid, rulers, tabular data. Japanese: ma, kanji indices,
   one accent used like a hanko seal.
   ============================================================ */

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0B0C;
  --surface: #111113;
  --border: rgba(255,255,255,0.10);
  --hairline: rgba(255,255,255,0.07);
  --text: #F4F4F2;
  --text2: rgba(244,244,242,0.52);
  --text3: rgba(244,244,242,0.30);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --border: rgba(17,17,19,0.14);
  --hairline: rgba(17,17,19,0.08);
  --text: #131316;
  --text2: rgba(19,19,22,0.55);
  --text3: rgba(19,19,22,0.32);
  --shadow-card: 0 1px 2px rgba(22,22,26,0.05), 0 10px 36px rgba(22,22,26,0.06);
}
html[data-accent="orange"] { --accent:#FF4D00; --accent-ink:#FFF; --accent-rgb:255,77,0; }
html[data-accent="lime"]   { --accent:#C8FF00; --accent-ink:#0B0B0C; --accent-rgb:200,255,0; }
html[data-theme="light"][data-accent="lime"] { --accent:#86B300; --accent-ink:#131316; --accent-rgb:134,179,0; }
html[data-accent="cobalt"] { --accent:#2E4BFF; --accent-ink:#FFF; --accent-rgb:46,75,255; }
html[data-accent="mono"]   { --accent:#F4F4F2; --accent-ink:#0B0B0C; --accent-rgb:244,244,242; }
html[data-theme="light"][data-accent="mono"] { --accent:#131316; --accent-ink:#F7F6F3; --accent-rgb:19,19,22; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .45s ease, color .45s ease;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.display {
  font-family: "Clash Display", "Switzer", "Helvetica Neue", sans-serif;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.mono {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.wrap {
  max-width: 1380px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4.5vw, 80px);
}

/* ============ line-mask reveal system ============
   .lines > .l (mask) > .li (content). JS adds .in. */
.lines .l { display: block; overflow: clip; }
.lines .l .li {
  display: block;
  transform: translateY(112%);
  transition: transform .9s cubic-bezier(.19,1,.22,1);
  transition-delay: calc(var(--i, 0) * 95ms);
  will-change: transform;
}
.lines.in .l .li { transform: none; }

/* generic quiet reveal — opacity only, no slide (no fade-up slop) */
.rv { opacity: 0; transition: opacity .8s ease; transition-delay: calc(var(--d, 0) * 110ms); }
.rv.in { opacity: 1; }

/* drawn rule */
.rule {
  height: 1px; background: var(--border);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s cubic-bezier(.19,1,.22,1);
}
.rule.in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .lines .l .li { transform: none; transition: none; }
  .rv { transition: opacity .3s ease; }
  .rule { transform: none; transition: none; }
}

/* ============ header ============ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  height: 58px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  font-family: "Clash Display", sans-serif;
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
}
.wordmark sup {
  font-family: "JetBrains Mono", monospace;
  font-size: 8px; letter-spacing: .12em; color: var(--accent);
  margin-left: 6px; text-transform: uppercase; vertical-align: super;
}
.site-nav { display: flex; gap: clamp(18px, 2.6vw, 34px); }
.site-nav a {
  font-size: 13px; color: var(--text2);
  display: inline-flex; align-items: baseline; gap: 7px;
  transition: color .2s;
}
.site-nav a i { font-style: normal; font-family: "JetBrains Mono", monospace; font-size: 9px; color: var(--text3); }
.site-nav a:hover { color: var(--text); }
.header-right { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%;
  background: transparent; color: var(--text2); cursor: pointer;
  transition: color .2s, background .2s;
}
.theme-toggle:hover { color: var(--text); background: var(--surface); }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ============ status line (signature) ============ */
.status { display: inline-flex; align-items: center; gap: 9px; color: var(--text2); }
.status .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  position: relative; flex: none;
}
.status .pulse::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0;
  animation: pulse 2.6s cubic-bezier(.22,1,.36,1) infinite;
}
@keyframes pulse {
  0% { transform: scale(.4); opacity: .9; }
  70%, 100% { transform: scale(1.3); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .status .pulse::after { animation: none; } }

/* ============ hero ============ */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding-top: 58px;
  position: relative;
}
.hero-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding-top: clamp(20px, 3.5vh, 40px);
  color: var(--text2);
}
.hero-meta .mono { white-space: nowrap; }
.hero-stage { flex: 1; display: flex; align-items: center; padding-block: clamp(28px, 5vh, 60px); }
.hero h1 {
  font-family: "Clash Display", sans-serif;
  font-weight: 600;
  font-size: clamp(66px, 16.5vw, 240px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero h1 .indent { padding-left: clamp(34px, 9vw, 160px); }
.hero h1 .fast { color: var(--accent); }
html[data-accent="mono"] .hero h1 .fast {
  color: var(--text);
  box-shadow: inset 0 -0.09em var(--accent);
}
.hero h1 .dot {
  display: inline-block;
  width: .13em; height: .13em; border-radius: 50%;
  background: var(--accent);
  margin-left: .06em;
  transform: translateY(-.03em);
}

.hero-base {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  align-items: end;
  gap: 24px 48px;
  padding-bottom: clamp(22px, 4vh, 48px);
}
.hero-base .sub {
  color: var(--text2);
  font-size: clamp(15px, 1.4vw, 18px);
  max-width: 46ch;
  text-wrap: pretty;
}
.hero-ctas { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* hero bottom data strip */
.data-strip {
  border-top: 1px solid var(--hairline);
  padding-block: 14px;
}
.data-strip .wrap {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.data-strip .cell { color: var(--text2); display: inline-flex; gap: 9px; align-items: center; }
.data-strip .cell b { color: var(--text); font-weight: 400; }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 54px; padding-inline: 28px;
  font-size: 15px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.btn .arr { transition: transform .3s cubic-bezier(.19,1,.22,1); }
.btn:hover .arr { transform: translateX(5px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }

.link-u {
  color: var(--text2);
  background: linear-gradient(var(--text), var(--text)) no-repeat 0 100% / 0 1px;
  padding-bottom: 3px;
  transition: color .25s, background-size .35s cubic-bezier(.19,1,.22,1);
  white-space: nowrap;
}
.link-u:hover { color: var(--text); background-size: 100% 1px; }

/* ============ section system ============ */
.sec { padding-top: clamp(120px, 17vw, 260px); position: relative; }
.sec-head { margin-bottom: clamp(40px, 6vw, 90px); }
.sec-head .meta {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.sec-head .meta .mono { color: var(--text2); }
.sec-head .kanji {
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--text3);
  line-height: 1;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}
.sec-title {
  font-family: "Clash Display", sans-serif;
  font-weight: 600;
  font-size: clamp(42px, 8.6vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-top: clamp(16px, 2.4vw, 28px);
}
