/* ============================================================
   Quasar Infinity — www.quasar8.com
   Design system & styles. Dark, futuristic, wireframe.
   ============================================================ */

/* ---------- Fonts (self-hosted: no third-party requests) ---------- */
/* Variable fonts, one file per subset; the browser only fetches latin-ext if a page needs it. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand palette (derived from logo) */
  --brand:        #5569a5;
  --brand-light:  #8aa0e0;
  --brand-deep:   #1b3f83;
  --accent:       #6ea8ff;
  --accent-soft:  rgba(110, 168, 255, 0.14);

  /* Surfaces */
  --bg:        #080b13;
  --bg-2:      #0b101c;
  --surface:   #10172a;
  --surface-2: #141d33;
  --line:      rgba(138, 160, 224, 0.14);
  --line-soft: rgba(138, 160, 224, 0.08);

  /* Text */
  --text:      #e8edf9;
  --text-2:    #aeb9d4;
  --text-3:    #7d89a8;

  /* Layout */
  --maxw: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 72px;

  --font-display: "Space Grotesk", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --font-body: "Inter", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Background canvas ---------- */
#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
  display: block;
}
.bg-overlay {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 75% -10%, rgba(85, 105, 165, 0.22), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(27, 63, 131, 0.20), transparent 60%),
    linear-gradient(180deg, rgba(8,11,19,0.20) 0%, rgba(8,11,19,0.50) 55%, rgba(8,11,19,0.80) 100%);
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 110px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, rgba(16,23,42,0.4), rgba(11,16,28,0.5)); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--accent); color: #04122c; padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { left: 16px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.74rem; font-weight: 600;
  color: var(--accent);
  margin: 0 0 14px;
}
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.7rem);
  line-height: 1.12; letter-spacing: -0.02em;
  margin: 0;
}
.section-lead { color: var(--text-2); font-size: 1.08rem; margin: 18px 0 0; max-width: 640px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  padding: 13px 26px; border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  will-change: transform;
}
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--brand));
  color: #061227;
  box-shadow: 0 8px 30px -10px rgba(110, 168, 255, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgba(110, 168, 255, 0.75); }
.btn-ghost {
  background: rgba(138, 160, 224, 0.06);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8, 11, 19, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { height: 34px; width: auto; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.01em; }
.brand-name-accent { color: var(--accent); margin-left: 2px; }

.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav-link { color: var(--text-2); font-size: 0.95rem; font-weight: 500; position: relative; padding: 4px 0; transition: color .2s; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width .25s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 14px; }

/* ---------- Language switcher ---------- */
.lang { position: relative; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(138, 160, 224, 0.06); border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 8px 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem;
  transition: border-color .2s, background .2s;
}
.lang-toggle:hover { border-color: var(--accent); }
.lang-caret { transition: transform .25s var(--ease); color: var(--text-3); }
.lang.open .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 168px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px; box-shadow: 0 24px 60px -20px rgba(0,0,0,0.7);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.lang.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; font-size: 0.9rem; color: var(--text-2);
  cursor: pointer; transition: background .15s, color .15s;
}
.lang-menu li:hover { background: var(--accent-soft); color: var(--text); }
.lang-menu li[aria-selected="true"] { color: var(--text); background: rgba(138,160,224,0.08); }
.lang-code {
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 5px; padding: 2px 6px; min-width: 30px; text-align: center;
}

/* ---------- Burger ---------- */
.nav-burger { display: none; background: none; border: none; width: 40px; height: 40px; position: relative; }
.nav-burger span {
  display: block; position: absolute; left: 8px; right: 8px; height: 2px; background: var(--text);
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-burger span:nth-child(1) { top: 13px; }
.nav-burger span:nth-child(2) { top: 19px; }
.nav-burger span:nth-child(3) { top: 25px; }
.nav-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 40px) 0 80px; position: relative;
}
.hero-inner { max-width: 880px; }
.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 1.2rem + 5vw, 4.6rem);
  line-height: 1.04; letter-spacing: -0.03em;
  margin: 0 0 28px;
  background: linear-gradient(180deg, #ffffff 30%, #b9c6ec 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subtitle { font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.28rem); color: var(--text-2); max-width: 680px; margin: 0 0 38px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-3);
}
.hero-scroll-line { width: 1px; height: 46px; background: linear-gradient(180deg, var(--accent), transparent); animation: scrollPulse 2.4s var(--ease) infinite; }
@keyframes scrollPulse { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
.about-body p { color: var(--text-2); font-size: 1.08rem; margin: 0 0 20px; }
.about-body p:last-child { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 28px 24px; display: flex; flex-direction: column; gap: 8px; }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--text); letter-spacing: -0.02em; }
.stat-plus { color: var(--accent); }
.stat-label { font-size: 0.86rem; color: var(--text-3); line-height: 1.45; }

/* ---------- Quote bands ---------- */
.quote-band { padding: 90px 0; position: relative; }
.quote { max-width: 920px; margin: 0 auto; text-align: center; }
.quote blockquote {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.4rem, 1rem + 1.8vw, 2.2rem); line-height: 1.34; letter-spacing: -0.01em;
  margin: 0; color: var(--text);
  text-wrap: balance;
}
.quote figcaption { margin-top: 26px; }
.quote-author { font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-family: var(--font-display); font-weight: 600; }
.quote-band-2 blockquote { background: linear-gradient(180deg, #eaf0ff, #9fb4ec); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Vision ---------- */
.vision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.vision-grid .section-head { margin-bottom: 0; }
.vision-body p { color: var(--text-2); font-size: 1.08rem; margin: 0 0 20px; }
.vision-body p:last-child { margin-bottom: 0; }

/* ---------- Cards ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px 30px; transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: rgba(110,168,255,0.4); box-shadow: 0 30px 60px -30px rgba(110,168,255,0.4); }
.card-icon { width: 56px; height: 56px; color: var(--accent); margin-bottom: 22px; }
.card-icon svg { width: 100%; height: 100%; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin: 0 0 12px; }
.card-body { color: var(--text-2); margin: 0; font-size: 0.98rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 20px; padding-left: 0; }
.timeline::before { content: ""; position: absolute; left: 90px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(180deg, transparent, var(--line) 8%, var(--line) 92%, transparent); }
.tl-item { position: relative; display: grid; grid-template-columns: 90px 1fr; gap: 36px; padding: 16px 0; align-items: start; }
.tl-year { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--text); text-align: right; padding-top: 16px; }
.tl-item::before {
  content: ""; position: absolute; left: 85px; top: 24px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(110,168,255,0.12); z-index: 1;
}
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 24px; transition: transform .3s var(--ease), border-color .3s; }
.tl-card:hover { transform: translateX(6px); border-color: rgba(110,168,255,0.35); }
.tl-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin: 0 0 6px; }
.tl-card p { margin: 0; color: var(--text-2); font-size: 0.95rem; }
.tl-item.is-future .tl-year { color: var(--accent); }
.tl-item.is-future::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(110,168,255,0.25), 0 0 22px rgba(110,168,255,0.8); }
.tl-item.is-future .tl-card { border-color: rgba(110,168,255,0.4); background: linear-gradient(180deg, rgba(110,168,255,0.07), var(--surface)); }

/* ---------- Products ---------- */
.product-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px 36px; display: flex; flex-direction: column; gap: 18px;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.product-card:hover { transform: translateY(-6px); border-color: rgba(110,168,255,0.4); box-shadow: 0 30px 60px -30px rgba(110,168,255,0.4); }
.product-card-feature { background: linear-gradient(160deg, rgba(110,168,255,0.12), var(--surface) 55%); border-color: rgba(110,168,255,0.3); }
.product-head { display: flex; flex-direction: column; gap: 12px; }
.product-badge {
  align-self: flex-start; font-family: var(--font-display); font-weight: 600;
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(110,168,255,0.25);
  padding: 5px 12px; border-radius: 999px;
}
.product-badge-alt { color: var(--brand-light); background: rgba(138,160,224,0.08); border-color: var(--line); }
.product-name { font-family: var(--font-display); font-weight: 700; font-size: 2rem; margin: 0; letter-spacing: -0.02em; }
.product-tagline { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; color: var(--text); margin: 0; }
.product-body { color: var(--text-2); margin: 0; flex-grow: 1; }
.product-card .btn { align-self: flex-start; margin-top: 6px; }

/* ---------- Offices ---------- */
.offices-grid { margin-top: 8px; }
.office-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .35s var(--ease), border-color .35s; }
.office-card:hover { transform: translateY(-6px); border-color: rgba(110,168,255,0.4); }
.map-frame { position: relative; aspect-ratio: 16 / 11; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.map-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  filter: invert(0.92) hue-rotate(180deg) brightness(0.92) contrast(0.95) saturate(0.7);
  transition: filter .4s var(--ease);
}
.map-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(8,11,19,0.6); mix-blend-mode: multiply; }
.office-card:hover .map-frame iframe { filter: invert(0.9) hue-rotate(180deg) brightness(1) contrast(1) saturate(0.85); }
.office-info { padding: 22px 24px; }
.office-role { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.office-city { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin: 8px 0 12px; }
.office-link { color: var(--text-2); font-size: 0.9rem; font-weight: 500; transition: color .2s; }
.office-link:hover { color: var(--accent); }

/* ---------- News ---------- */
.news-band { text-align: center; max-width: 680px; margin: 0 auto; padding: 30px 0; }
.badge-soon {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(110,168,255,0.35); background: var(--accent-soft);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.news-band .section-title { margin-bottom: 14px; }
.news-band .section-lead { margin: 0 auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 48px; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; color: var(--text-2); }
.field input, .field textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 16px; color: var(--text); font-family: inherit; font-size: 0.98rem;
  transition: border-color .2s, background .2s, box-shadow .2s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input:invalid:not(:placeholder-shown), .field textarea:invalid:not(:placeholder-shown) { border-color: rgba(255,120,120,0.5); }
.contact-form .btn { align-self: flex-start; margin-top: 4px; }
.form-note { font-size: 0.82rem; color: var(--text-3); margin: 0; }

.contact-aside { display: flex; flex-direction: column; gap: 28px; }
.contact-direct, .contact-pgp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.contact-label { display: block; font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.contact-email { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--text); transition: color .2s; }
.contact-email:hover { color: var(--accent); }
.contact-pgp p { color: var(--text-2); font-size: 0.92rem; margin: 0 0 16px; }
.pgp-fingerprint { display: block; margin-top: 14px; font-size: 0.66rem; color: var(--text-3); word-break: break-all; line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 60px 0 30px; background: rgba(8,11,19,0.6); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.footer-brand { min-width: 0; }
/* Discreet single-colour company mark, same as the footer of pulsar.quasar8.com */
.footer-mark { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); transition: color .2s; }
.footer-mark:hover { color: var(--text); }
.footer-mark svg { height: 20px; width: auto; }
.footer-mark span { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; letter-spacing: -0.01em; }
/* Small, one line, tucked under the mark (it may wrap only on phones, see the 680px block) */
.footer-tagline { color: var(--text-3); font-size: 0.8rem; line-height: 1.4; margin: 6px 0 0; white-space: nowrap; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-nav a { color: var(--text-2); font-size: 0.92rem; transition: color .2s; }
.footer-nav a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.footer-bottom p { margin: 0; color: var(--text-3); font-size: 0.84rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about-grid, .vision-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .vision-grid .section-head { margin-bottom: 0; }
}
@media (max-width: 820px) {
  .nav, .nav-cta { display: none; }
  .nav-burger { display: block; }
  .nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: rgba(8,11,19,0.96); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); padding: 18px 24px 26px; margin: 0;
  }
  .nav.open .nav-link { font-size: 1.1rem; padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line-soft); }
  .section { padding: 84px 0; }
}
@media (max-width: 680px) {
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .timeline::before { left: 7px; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; padding-left: 34px; }
  .tl-year { text-align: left; padding-top: 0; }
  .tl-item::before { left: 2px; top: 7px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .footer-tagline { white-space: normal; }
}
@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .stats { grid-template-columns: 1fr; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
}

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

/* ============================================================
   JAPANESE THEME  (html[lang="ja"])
   A deliberately conservative, corporate look for the Japanese
   audience: a light background, restrained deep-blue accents,
   system gothic typography, clear borders and a calm (hidden)
   background animation — closer to the trusted, information-first
   style of Japanese corporate websites.
   ============================================================ */
html[lang="ja"] {
  color-scheme: light;

  /* Restrained, corporate palette */
  --brand:        #2f5096;
  --brand-light:  #3a5ca6;
  --brand-deep:   #1b3f83;
  --accent:       #1b3f83;   /* deep blue reads as trustworthy, not flashy */
  --accent-soft:  rgba(27, 63, 131, 0.08);

  --bg:        #f4f6fa;
  --bg-2:      #eceff5;
  --surface:   #ffffff;
  --surface-2: #f7f9fc;
  --line:      rgba(20, 40, 80, 0.16);
  --line-soft: rgba(20, 40, 80, 0.08);

  --text:      #14233f;
  --text-2:    #41506b;
  --text-3:    #6a778f;

  /* Less rounded = more businesslike */
  --radius: 8px;
  --radius-lg: 12px;

  /* System Japanese gothic fonts — what most JP corporate sites use */
  --font-display: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", system-ui, sans-serif;
  --font-body: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", system-ui, sans-serif;
}

/* Japanese text reads better with a little more leading */
html[lang="ja"] body { line-height: 1.9; }

/* Calm, conservative background: hide the animation, light wash */
html[lang="ja"] #bg-canvas { display: none; }
html[lang="ja"] .bg-overlay {
  background:
    radial-gradient(1100px 600px at 88% -12%, rgba(27, 63, 131, 0.06), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #eef1f7 100%);
}

/* Tighter, businesslike rhythm + clearer separators */
html[lang="ja"] .section { padding: 84px 0; }
html[lang="ja"] .section-alt { background: var(--bg-2); }
html[lang="ja"] .section-title { font-weight: 600; font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.2rem); }

/* Header: solid white with a clear bottom rule (not translucent dark) */
html[lang="ja"] .site-header { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
html[lang="ja"] .site-header.scrolled { background: rgba(255, 255, 255, 0.96); }
html[lang="ja"] .nav.open { background: #ffffff; }

/* Hero: smaller, solid (no gradient text), less theatrical */
html[lang="ja"] .hero { min-height: 78vh; }
html[lang="ja"] .hero-title {
  background: none;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);
}

/* Buttons: solid corporate blue, minimal glow */
html[lang="ja"] .btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 18px -10px rgba(27, 63, 131, 0.5);
}
html[lang="ja"] .btn-primary:hover { background: #16356e; box-shadow: 0 10px 24px -10px rgba(27, 63, 131, 0.55); }
html[lang="ja"] .skip-link { color: #ffffff; }

/* Quote: solid text instead of the bright gradient */
html[lang="ja"] .quote-band-2 blockquote {
  background: none;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

/* Cards / products: soft neutral shadow on hover instead of blue glow */
html[lang="ja"] .card,
html[lang="ja"] .product-card { background: var(--surface); }
html[lang="ja"] .card:hover,
html[lang="ja"] .product-card:hover,
html[lang="ja"] .office-card:hover {
  border-color: rgba(27, 63, 131, 0.35);
  box-shadow: 0 18px 40px -26px rgba(20, 40, 80, 0.35);
}
html[lang="ja"] .product-card-feature { background: linear-gradient(160deg, rgba(27, 63, 131, 0.06), #ffffff 55%); border-color: var(--line); }

/* Timeline: tone the future-marker glow down */
html[lang="ja"] .tl-item.is-future::before { box-shadow: 0 0 0 4px rgba(27, 63, 131, 0.15); }
html[lang="ja"] .tl-item.is-future .tl-card { background: var(--surface); }

/* Maps: show them as normal light maps (drop the dark invert) */
html[lang="ja"] .map-frame iframe,
html[lang="ja"] .office-card:hover .map-frame iframe { filter: none; }
html[lang="ja"] .map-frame::after { display: none; }

/* Footer: light (the footer mark follows the theme colours by itself) */
html[lang="ja"] .site-footer { background: var(--bg-2); }
/* Break only between places ("牛久（日本） · …"), never inside a city or before its country */
html[lang="ja"] .footer-locations { word-break: keep-all; }

/* ============================================================
   Footer — registered company details
   Shown in every language. The Japanese values must match the
   commercial register exactly (banks and 特定商取引法 rely on it).
   ============================================================ */
/* Company details: Japanese version only, one discreet line */
.footer-company[hidden] { display: none; }
html[lang="ja"] .footer-company[hidden] { display: block; margin-top: 32px; }
.footer-company p { margin: 0; font-size: 0.74rem; line-height: 1.7; color: var(--text-3); }
.footer-company .sep { margin: 0 0.6em; opacity: 0.6; }
html[lang="ja"] .footer-company + .footer-bottom { margin-top: 10px; }

/* ============================================================
   Legal pages (tokushoho.html) — standalone, Japanese only
   ============================================================ */
.legal-header { border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.legal-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: var(--header-h);
}
.legal-logo { height: 28px; }
.legal-back { font-size: 0.9rem; color: var(--text-2); }
.legal-back:hover { color: var(--accent); }

.legal-main { max-width: 880px; padding: 64px 24px 96px; }
.legal-title {
  font-family: var(--font-display); font-size: clamp(1.55rem, 4vw, 2.1rem);
  letter-spacing: 0.02em; margin: 10px 0 20px;
}
.legal-lead { color: var(--text-2); font-size: 0.98rem; margin: 0 0 40px; }

.legal-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.legal-table th, .legal-table td {
  border: 1px solid var(--line); padding: 16px 18px; text-align: left; vertical-align: top;
}
.legal-table th { width: 30%; background: var(--surface-2); color: var(--text); font-weight: 600; }
.legal-table td { background: var(--surface); color: var(--text-2); }
.legal-table a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-sub { display: inline-block; margin-top: 8px; font-size: 0.85rem; color: var(--text-3); }
.legal-updated { margin: 32px 0 0; font-size: 0.85rem; color: var(--text-3); text-align: right; }

@media (max-width: 620px) {
  .legal-main { padding: 40px 20px 72px; }
  .legal-table th, .legal-table td { display: block; width: 100%; }
  .legal-table th { border-bottom: none; }
  .legal-table td { border-top: none; }
  .legal-table br { display: none; }
}

/* ============================================================
   Pulsar product page (pulsar.html)
   Same design system as the home page; the Japanese overrides
   are at the end of this block.
   ============================================================ */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.btn-xl { padding: 18px 38px; font-size: 1.1rem; gap: 10px; }
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Hero ---------- */
.pulsar-hero { min-height: auto; padding: calc(var(--header-h) + 80px) 0 100px; }
.pulsar-hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center; }
.pulsar-hero .hero-title { font-size: clamp(2.3rem, 1.2rem + 3.8vw, 3.9rem); text-wrap: balance; }
.pulsar-hero .hero-subtitle { margin-bottom: 34px; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 26px; font-size: 0.9rem; color: var(--text-3); }
.hero-notes li { display: inline-flex; align-items: center; gap: 8px; }
.hero-notes svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

/* Scan card: an illustration of an analysis, not a real result */
.scan-card {
  --warn: #ffc56b; --bad: #ff8a8a;
  position: relative;
  background: linear-gradient(180deg, rgba(20, 29, 51, 0.94), rgba(11, 16, 28, 0.94));
  border: 1px solid rgba(110, 168, 255, 0.28); border-radius: var(--radius-lg);
  padding: 28px 26px 24px;
  box-shadow: 0 40px 90px -40px rgba(110, 168, 255, 0.55);
}
.scan-caption {
  position: absolute; top: -11px; right: 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}
.scan-file { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.scan-file-icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--bad); background: rgba(255, 107, 107, 0.12);
}
.scan-file-name { display: block; font-family: var(--font-display); font-weight: 600; color: var(--text); }
.scan-file-meta { display: block; font-size: 0.8rem; color: var(--text-3); }
.scan-steps li {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 13px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem;
}
.scan-step-name { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); }
.scan-step-name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.scan-step-res { font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.scan-steps .is-warn .scan-step-name::before { background: var(--warn); }
.scan-steps .is-warn .scan-step-res { color: var(--warn); background: rgba(255, 197, 107, 0.12); }
.scan-steps .is-bad .scan-step-name::before { background: var(--bad); }
.scan-steps .is-bad .scan-step-res { color: var(--bad); background: rgba(255, 107, 107, 0.12); }
.scan-verdict {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 18px; padding: 14px 18px; border-radius: 12px;
  background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.35);
}
.scan-verdict span { font-family: var(--font-display); font-weight: 600; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); }
.scan-verdict strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--bad); }

/* ---------- Why documents ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.why-item { border-top: 1px solid var(--line); padding-top: 24px; }
.why-num {
  display: block; margin-bottom: 16px;
  font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1; letter-spacing: -0.02em;
  color: var(--accent);
}
.why-item h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; margin: 0 0 8px; }
.why-item p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* ---------- How it works ---------- */
.steps-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { position: relative; padding: 32px 26px; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -18px; width: 10px; height: 10px;
  border-top: 2px solid var(--accent); border-right: 2px solid var(--accent);
  transform: translateY(-50%) rotate(45deg); opacity: 0.7;
}
.step-num {
  display: block; margin-bottom: 18px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.18em; color: var(--text-3);
}
.step-final { border-color: rgba(110, 168, 255, 0.45); background: linear-gradient(160deg, rgba(110, 168, 255, 0.14), var(--surface) 60%); }

/* ---------- Benchmark ---------- */
.bench-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: center; }
.bench-stat { margin: 36px 0 0; }
.bench-stat-value {
  display: block;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(3.8rem, 2.4rem + 5vw, 6.4rem);
  line-height: 1; letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 20%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bench-stat-label { display: block; margin-top: 12px; max-width: 320px; color: var(--text-2); }
.bench-chart {
  margin: 0; padding: 32px; display: flex; flex-direction: column; gap: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.bench-row { display: grid; grid-template-columns: 140px 1fr 72px; gap: 16px; align-items: center; }
.bench-name { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--text-2); }
.bench-name small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.76rem; color: var(--text-3); }
.bench-track { height: 14px; border-radius: 999px; background: rgba(138, 160, 224, 0.08); overflow: hidden; }
.bench-fill {
  display: block; height: 100%; border-radius: 999px; background: rgba(138, 160, 224, 0.35);
  transform: scaleX(0); transform-origin: left center; transition: transform 1.2s var(--ease) 0.25s;
}
.reveal.in .bench-fill { transform: none; }
.bench-fill--pulsar { width: 94.8%; background: linear-gradient(90deg, var(--brand), var(--accent)); box-shadow: 0 0 18px rgba(110, 168, 255, 0.5); }
.bench-fill--a { width: 85.4%; }
.bench-fill--b { width: 65.9%; }
.bench-fill--c { width: 7.04%; }
.bench-val { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; text-align: right; color: var(--text-2); white-space: nowrap; }
.bench-row--pulsar .bench-name { color: var(--text); }
.bench-row--pulsar .bench-val { color: var(--accent); }
.bench-note { margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 0.8rem; color: var(--text-3); }

/* ---------- Use cases ---------- */
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cards-4 .card { padding: 32px 26px; }

/* ---------- Supported files ---------- */
.files-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.files-col { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.files-col-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; min-height: 30px; }
.files-col-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.files-list li { display: flex; align-items: flex-start; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.files-list li:first-child { border-top: 0; }
.files-list svg { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; color: var(--accent); }
.files-col--next .files-list svg { color: var(--text-3); }
.files-list strong { display: block; font-family: var(--font-display); font-weight: 600; color: var(--text); }
.files-list span { display: block; font-size: 0.88rem; color: var(--text-3); }
.files-note { margin: 24px 0 0; color: var(--text-2); }

/* ---------- Final call to action ---------- */
.cta-band {
  text-align: center; padding: 76px 32px; border-radius: 28px;
  border: 1px solid rgba(110, 168, 255, 0.3);
  background:
    radial-gradient(700px 320px at 50% 0%, rgba(110, 168, 255, 0.18), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
}
.cta-band .section-lead { margin: 18px auto 36px; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.cta-links { margin: 26px 0 0; font-size: 0.92rem; }
.cta-links a { color: var(--text-2); transition: color .2s; }
.cta-links a:hover { color: var(--accent); }
.cta-links .sep { margin: 0 0.8em; color: var(--text-3); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .steps-4, .cards-4 { grid-template-columns: 1fr 1fr; }
  .step:not(:last-child)::after { display: none; }
}
@media (max-width: 960px) {
  .pulsar-hero-grid, .bench-grid { grid-template-columns: 1fr; gap: 48px; }
  .pulsar-hero .scan-card { max-width: 520px; }
  .why-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .pulsar-hero { padding: calc(var(--header-h) + 48px) 0 72px; }
  .why-grid, .steps-4, .cards-4, .files-grid { grid-template-columns: 1fr; }
  .bench-chart, .files-col { padding: 24px 20px; }
  .bench-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .bench-track { grid-column: 1 / -1; grid-row: 2; }
  .hero-actions .btn-xl, .cta-actions .btn-xl { flex: 1 1 100%; }   /* one per row, overriding .hero-actions .btn */
  .cta-band { padding: 52px 20px; border-radius: 20px; }
}

/* ---------- Japanese theme ---------- */
html[lang="ja"] .pulsar-hero { min-height: auto; }
html[lang="ja"] .pulsar-hero .hero-title { text-wrap: wrap; word-break: auto-phrase; }   /* break between phrases, not inside them */
html[lang="ja"] .scan-card {
  --warn: #8a5300; --bad: #c62828;
  background: var(--surface); border-color: var(--line);
  box-shadow: 0 24px 50px -30px rgba(20, 40, 80, 0.35);
}
html[lang="ja"] .scan-caption { background: var(--surface); }
html[lang="ja"] .scan-steps .is-warn .scan-step-res { background: rgba(138, 83, 0, 0.08); }
html[lang="ja"] .scan-steps .is-bad .scan-step-res,
html[lang="ja"] .scan-file-icon { background: rgba(198, 40, 40, 0.08); }
html[lang="ja"] .scan-verdict { background: rgba(198, 40, 40, 0.05); border-color: rgba(198, 40, 40, 0.3); }
html[lang="ja"] .step-final { background: var(--surface); border-color: rgba(27, 63, 131, 0.35); }
html[lang="ja"] .bench-stat-value { background: none; color: var(--accent); -webkit-text-fill-color: var(--accent); }
html[lang="ja"] .bench-fill { background: rgba(20, 40, 80, 0.22); }
html[lang="ja"] .bench-fill--pulsar { background: var(--accent); box-shadow: none; }
html[lang="ja"] .cta-band { background: var(--surface); border-color: var(--line); }

/* ============================================================
   FAQ page (faq.html)
   Native <details> accordions: no JS, keyboard accessible, and
   find-in-page still reaches the closed answers.
   ============================================================ */
.faq-page { padding-top: calc(var(--header-h) + 72px); }
.faq-title { font-size: clamp(2rem, 1.2rem + 3vw, 3.2rem); }
.faq-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }

.faq-toc { position: sticky; top: calc(var(--header-h) + 28px); display: flex; flex-direction: column; gap: 2px; }
.faq-toc-label {
  margin: 0 0 10px 14px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-3);
}
.faq-toc a { padding: 8px 14px; border-radius: 8px; font-size: 0.95rem; color: var(--text-2); transition: background .2s, color .2s; }
.faq-toc a:hover { background: var(--accent-soft); color: var(--text); }

.faq-group + .faq-group { margin-top: 56px; }
.faq-group-title { margin: 0 0 18px; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; }

.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .25s var(--ease); }
.faq-item + .faq-item { margin-top: 12px; }
.faq-item:hover, .faq-item[open] { border-color: rgba(110, 168, 255, 0.4); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 24px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex-shrink: 0; width: 9px; height: 9px; margin-right: 4px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq-item summary:focus-visible { outline-offset: -2px; border-radius: var(--radius); }
.faq-answer { padding: 0 24px 22px; color: var(--text-2); }
.faq-answer p { margin: 0; max-width: 72ch; }
.faq-answer strong { color: var(--text); font-weight: 600; }
.faq-answer a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.faq-end { padding-top: 0; }

@media (max-width: 860px) {
  .faq-layout { grid-template-columns: 1fr; gap: 32px; }
  .faq-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .faq-toc-label { width: 100%; margin: 0 0 2px; }
  .faq-toc a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.88rem; }
}
@media (max-width: 680px) {
  .faq-page { padding-top: calc(var(--header-h) + 44px); }
  .faq-item summary { padding: 18px 18px; font-size: 0.98rem; }
  .faq-answer { padding: 0 18px 20px; }
}

/* ============================================================
   Error pages (404.html, error.html)
   ============================================================ */
.error-page { min-height: calc(100vh - 220px); display: flex; align-items: center; padding: calc(var(--header-h) + 64px) 0 96px; }
.error-code {
  display: block; margin-bottom: 18px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(5rem, 3rem + 9vw, 8.5rem);
  line-height: 1; letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 15%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-page .section-lead { margin-bottom: 36px; }
html[lang="ja"] .error-code { background: none; color: var(--accent); -webkit-text-fill-color: var(--accent); }

/* html[lang="ja"] .section resets the padding, so restate the header clearance */
html[lang="ja"] .faq-page { padding-top: calc(var(--header-h) + 60px); }
html[lang="ja"] .faq-end { padding-top: 0; }
html[lang="ja"] .faq-toc a { word-break: auto-phrase; }
html[lang="ja"] .faq-item:hover,
html[lang="ja"] .faq-item[open] { border-color: rgba(27, 63, 131, 0.35); }
