/* Ailurus Sein Robotics — mission-control theme */
:root {
  color-scheme: dark;
  --bg: #07090d;
  --bg-2: #0b0f15;
  --panel: #0f141c;
  --line: #1d2531;
  --line-2: #2a3544;
  --text: #e7ecf3;
  --muted: #8d99ab;
  --dim: #5d6879;
  --accent: #e8622c;        /* red-panda rust */
  --accent-soft: rgba(232, 98, 44, .14);
  --signal: #5fd4c4;        /* telemetry teal */
  --signal-soft: rgba(95, 212, 196, .12);
  --radius: 10px;
  --wrap: 1160px;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }

/* labels like telemetry readouts */
.eyebrow {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-flex; align-items: center; gap: .6em;
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; padding: .8em 1.3em; border-radius: 8px; border: 1px solid var(--accent);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { color: #fff; background: #f0733f; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--panel); color: var(--text); border-color: var(--muted); }
.btn-sm { padding: .5em 1em; font-size: .92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(7, 9, 13, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand em { font-style: normal; color: var(--muted); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.topbar-tools { display: flex; align-items: center; gap: 10px; order: 3; margin-left: 18px; }
.lang-switch {
  font-size: .85rem; color: var(--muted); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px;
}
.lang-switch:hover { color: var(--text); border-color: var(--muted); }
.nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.nav ul a { text-decoration: none; color: var(--muted); font-size: .95rem; white-space: nowrap; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--text); }
.nav ul a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 4px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 8px; width: 42px; height: 38px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 18px; height: 2px; background: var(--text); margin: 0 auto; position: relative; content: ""; }
.nav-toggle .bars::before { position: absolute; top: -6px; }
.nav-toggle .bars::after { position: absolute; top: 6px; }

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .topbar-tools { order: 0; margin-left: auto; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 24px 22px; gap: 14px; }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 4px; }
  .nav ul a { display: block; padding: 10px 0; font-size: 1.05rem; }
  .nav ul a[aria-current="page"] { box-shadow: none; color: var(--accent); }
}

/* sections */
section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }
.section-head { max-width: 46rem; margin-bottom: 48px; }

/* hero with telemetry grid */
.hero { position: relative; overflow: hidden; padding: 120px 0 110px; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
  opacity: .55;
}
.hero::after {
  content: ""; position: absolute; width: 640px; height: 640px; right: -160px; top: -200px; pointer-events: none;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 15ch; }
.hero h1 span { color: var(--accent); }
.hero .lead { margin-top: 1.2rem; }
.hero-readout {
  margin-top: 56px; display: flex; flex-wrap: wrap; gap: 10px 28px;
  font-family: var(--mono); font-size: .8rem; color: var(--dim); letter-spacing: .06em;
}
.hero-readout b { color: var(--signal); font-weight: 500; }

.page-hero { padding: 96px 0 72px; }
.page-hero h1 { max-width: 18ch; font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.crumb { font-family: var(--mono); font-size: .8rem; color: var(--dim); margin-bottom: 1.4rem; letter-spacing: .06em; }
.crumb a { color: var(--muted); text-decoration: none; }

/* emblem */
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.emblem { margin: 0; position: relative; justify-self: center; width: 100%; max-width: 440px; }
.emblem::before {
  content: ""; position: absolute; inset: 4% 2% 6%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle at 50% 48%, rgba(95, 212, 196, .16), rgba(232, 98, 44, .10) 45%, transparent 70%);
}
.emblem img { position: relative; z-index: 1; width: 100%; height: auto; filter: drop-shadow(0 0 1px rgba(231, 236, 243, .35)) drop-shadow(0 18px 40px rgba(0, 0, 0, .55)); }
.emblem-sm { max-width: 300px; }
.name-split { align-items: center; }
.brand-mark { border-radius: 7px; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-grid .emblem { order: -1; max-width: 240px; justify-self: start; }
  .emblem-sm { max-width: 220px; justify-self: start; }
}

/* mission cards */
.grid { display: grid; gap: 18px; }
.grid-5 { grid-template-columns: repeat(6, 1fr); }
.grid-5 > :nth-child(-n+3) { grid-column: span 2; }
.grid-5 > :nth-child(n+4) { grid-column: span 3; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-5, .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-5 > * { grid-column: auto !important; }
  .grid-5 > :last-child { grid-column: 1 / -1 !important; }
}
@media (max-width: 600px) { .grid-5, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s ease, transform .2s ease;
}
.card p { color: var(--muted); margin-bottom: 0; }
a.card { display: block; text-decoration: none; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
a.card:hover .card-go { color: var(--accent); }
.card-id { position: absolute; top: 22px; right: 24px; font-family: var(--mono); font-size: .75rem; color: var(--dim); }
.card-icon { width: 44px; height: 44px; color: var(--accent); margin-bottom: 20px; }
.card-go { display: inline-block; margin-top: 18px; font-family: var(--mono); font-size: .82rem; color: var(--muted); letter-spacing: .04em; }

/* feature list on area pages */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--muted); }
.checklist li::before { content: ""; width: 10px; height: 10px; margin-top: 8px; border: 2px solid var(--accent); border-radius: 2px; transform: rotate(45deg); }
.checklist strong { color: var(--text); font-weight: 600; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.panel h3 { margin-bottom: .8em; }
.panel-label { font-family: var(--mono); font-size: .75rem; color: var(--signal); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; display: block; }

/* principle rows */
.principles { display: grid; gap: 0; border-top: 1px solid var(--line); }
.principle { display: grid; grid-template-columns: 90px 1fr 1.4fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.principle .num { font-family: var(--mono); color: var(--accent); font-size: .9rem; }
.principle h3 { margin: 0; }
.principle p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .principle { grid-template-columns: 1fr; gap: 8px; } }

/* call to action band */
.cta { text-align: left; }
.cta-box {
  border: 1px solid var(--line-2); border-radius: 14px; padding: 56px;
  background: linear-gradient(135deg, var(--panel), var(--bg-2));
  display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center;
}
.cta-box h2 { margin-bottom: .3em; }
.cta-box p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .cta-box { grid-template-columns: 1fr; padding: 36px 26px; } }

/* status note */
.status {
  display: inline-flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: .8rem;
  color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; margin-bottom: 1.6rem;
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* form */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .9rem; margin-bottom: 6px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 12px 14px; font: inherit; font-size: 1rem;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.hp { display: none; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; background: var(--bg-2); }
.footer-inner { display: grid; grid-template-columns: 1.3fr 2fr; gap: 24px 48px; align-items: start; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: flex-end; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.footer .brand { margin-bottom: 10px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } .footer-links { justify-content: flex-start; } }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding: 80px 0 72px; }
  .page-hero { padding: 64px 0 48px; }
  .card, .panel { padding: 22px; }
}

/* Japanese typography */
html[lang="ja"] body { font-family: "Space Grotesk", "Noto Sans JP", system-ui, sans-serif; line-break: strict; word-break: auto-phrase; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3 { letter-spacing: 0; line-height: 1.3; }
html[lang="ja"] .hero h1 { max-width: 13em; }
html[lang="ja"] .page-hero h1 { max-width: 15em; }
html[lang="ja"] .lead, html[lang="ja"] p { line-height: 1.85; }
html[lang="ja"] .eyebrow, html[lang="ja"] .crumb, html[lang="ja"] .panel-label { letter-spacing: .08em; }
