:root {
  color-scheme: dark;
  --void: #05060f;
  --ink: #1a2350;
  --white: #EAF0FF;
  --cyan: #6FE6FF;
  --violet: #9C8CFF;
  --magenta: #FF7BD0;
  --steel: #7FB0E0;
  --dim: #6b7aa6;
  --muted: #a9b5d8;
  --line: rgba(127, 176, 224, 0.16);
  --panel: rgba(26, 35, 80, 0.18);
  --sans: 'Sora', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--void); color: var(--white); font-family: var(--sans); font-weight: 400; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; text-wrap: balance; }
svg { display: block; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px 80px; }
@media (max-width: 640px) { .wrap { padding: 0 20px 60px; } }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); font-weight: 600; letter-spacing: .18em; font-size: 13px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 18px; height: auto; }
.brand span { color: var(--steel); font-weight: 400; font-family: var(--mono); font-size: 10px; letter-spacing: .4em; }
.nav .links { display: flex; gap: 26px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.nav .links a { color: var(--muted); }
.nav .links a:hover, .nav .links a[aria-current] { color: var(--white); text-decoration: none; }

/* ---------- home hero ---------- */
.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } .hero .art { display: none; } }
.hero h1 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -0.02em; max-width: 16ch; }
.hero p { font-size: 18px; color: var(--muted); max-width: 52ch; margin-top: 20px; }
.hero .cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 12px 20px; border-radius: 6px; background: var(--cyan); color: var(--void); font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; }
.hero .cta:hover { text-decoration: none; filter: brightness(1.08); }
.hero .actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero .actions .cta { margin-top: 0; }
.cta-ghost { display: inline-flex; align-items: center; padding: 12px 20px; border: 1px solid rgba(127,176,224,.35); border-radius: 6px; color: var(--muted); font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; }
.cta-ghost:hover { color: var(--white); border-color: var(--cyan); text-decoration: none; }
.hero .art { justify-self: center; width: min(100%, 340px); filter: drop-shadow(0 0 34px rgba(120,170,255,.4)); }
.spine { height: 3px; border-radius: 2px; margin-top: 48px; background: linear-gradient(90deg, #fff, var(--cyan) 36%, var(--violet) 68%, var(--magenta)); box-shadow: 0 0 20px rgba(120,200,255,.35); }
.svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; margin-top: 28px; }
@media (max-width: 760px) { .svc { grid-template-columns: 1fr; gap: 28px; } }
.svc > div { border-top: 1px solid rgba(127,176,224,.28); padding-top: 22px; }
.svc .glyph { width: 28px; height: 28px; color: var(--cyan); margin-bottom: 14px; }
.svc h3 { font-size: 20px; }
.svc p { font-size: 14.5px; color: var(--muted); margin-top: 8px; }

/* ---------- sections ---------- */
section { padding: 64px 0 0; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--steel); margin-bottom: 18px; }
h2 { font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -0.01em; max-width: 22ch; }
.lede { font-size: 18px; color: var(--muted); max-width: 60ch; margin-top: 16px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 24px 22px 20px; background: var(--panel); }
.card .glyph { width: 30px; height: 30px; color: var(--cyan); margin-bottom: 16px; }
.card h3 { font-size: 17px; }
.card p { font-size: 14.5px; color: var(--muted); margin-top: 8px; }
.card .n { font-family: var(--mono); font-size: 11px; color: var(--steel); letter-spacing: .2em; }

.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }
@media (max-width: 640px) { .works { grid-template-columns: 1fr; } }
.work { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 22px 22px 18px; background: var(--panel); color: var(--white); transition: border-color .18s ease; }
a.work:hover { border-color: rgba(111,230,255,.45); text-decoration: none; }
.work h3 { font-size: 18px; }
.work p { font-size: 14.5px; color: var(--muted); margin-top: 6px; }
.work .kind { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--steel); }

.now { border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px; margin-top: 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px 32px; align-items: center;
  background: radial-gradient(600px 220px at 10% 0%, rgba(111,230,255,.08), transparent 60%), var(--panel); }
@media (max-width: 640px) { .now { grid-template-columns: 1fr; } }
.now h3 { font-size: 17px; }
.now p { color: var(--muted); font-size: 14.5px; margin-top: 6px; max-width: 56ch; }
.status { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--void); background: var(--cyan); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }

.how { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; margin-top: 28px; }
@media (max-width: 640px) { .how { grid-template-columns: 1fr; } }
.how .glyph { width: 22px; height: 22px; color: var(--steel); margin-bottom: 10px; }
.how h3 { font-size: 16px; }
.how p { font-size: 14.5px; color: var(--muted); margin-top: 4px; max-width: 44ch; }

.contact { margin-top: 28px; border: 1px solid var(--line); border-radius: 12px; padding: 32px; display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; align-items: center;
  background: radial-gradient(700px 260px at 0% 100%, rgba(156,140,255,.10), transparent 60%), var(--panel); }
@media (max-width: 640px) { .contact { grid-template-columns: 1fr; padding: 24px; } }
.contact h2 { font-size: 26px; }
.contact p { color: var(--muted); margin-top: 8px; max-width: 48ch; }
.email { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 14px; color: var(--white); }
.email button { font: inherit; font-size: 11px; letter-spacing: .1em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--steel); cursor: pointer; }
.email button:hover { border-color: var(--cyan); color: var(--cyan); }

footer { margin-top: 80px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; font-family: var(--mono); font-size: 11.5px; color: var(--dim); letter-spacing: .08em; }
footer a { color: var(--dim); }
footer a:hover { color: var(--white); }

/* ---------- about: opening sequence ---------- */
.splash { padding: 24px 0 8px; display: flex; flex-direction: column; align-items: center; }
.stage { position: relative; width: min(100%, 1000px); aspect-ratio: 16/9; cursor: pointer; }
.glow { position: absolute; top: 39%; left: 50%; transform: translate(-50%, -50%); width: 340px; height: 340px; border-radius: 50%; max-width: 80vw; max-height: 80vw;
  background: radial-gradient(circle, rgba(120,170,255,.26), rgba(156,140,255,.09) 45%, transparent 68%); filter: blur(9px); opacity: 1; }
.beam { position: absolute; top: 39%; left: 6%; width: 44%; height: 2px; opacity: 0; transform-origin: left center;
  background: linear-gradient(90deg, transparent, var(--white)); box-shadow: 0 0 14px rgba(234,240,255,.8); }
.fan { position: absolute; top: 39%; left: 50%; width: 42%; height: 230px; max-height: 40vw; transform: translateY(-50%); filter: drop-shadow(0 0 7px rgba(150,200,255,.55)); }
.fan line { stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; }
.lensbar { position: absolute; top: 39%; left: 50%; width: 6px; height: 206px; max-height: 36vw; border-radius: 3px; opacity: 0; transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #fff 0%, var(--cyan) 36%, var(--violet) 68%, var(--magenta) 100%);
  box-shadow: 0 0 18px 2px rgba(120,200,255,.7), 0 0 60px 10px rgba(140,160,255,.22); }
.crystal { position: absolute; top: 39%; left: 50%; transform: translate(-50%, -50%); }
.crystal .inner { filter: drop-shadow(0 0 16px rgba(120,170,255,.45)); }
.crystal svg { width: clamp(96px, 18vw, 172px); height: auto; }
.lock { position: absolute; top: 73%; left: 0; right: 0; text-align: center; }
.word { font-weight: 600; font-size: clamp(34px, 6vw, 58px); letter-spacing: .16em; padding-left: .16em; text-shadow: 0 0 34px rgba(120,160,255,.45); }
.tag { margin-top: 11px; font-family: var(--mono); font-size: clamp(9px, 1.4vw, 13px); letter-spacing: .68em; padding-left: .68em; color: var(--steel); }
.hint { margin-top: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .3em; color: #3a4060; text-transform: uppercase; }

@keyframes teru-rise { from { opacity: 0; transform: translateY(40px) } to { opacity: 1; transform: translateY(0) } }
@keyframes teru-up { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: translateY(0) } }
@keyframes teru-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes teru-pulse { 0%, 100% { opacity: .5 } 50% { opacity: .95 } }
@keyframes teru-beamin { 0% { opacity: 0; transform: scaleX(0) } 22% { opacity: 1; transform: scaleX(1) } 66% { opacity: 1; transform: scaleX(1) } 100% { opacity: 0; transform: scaleX(1) } }
@keyframes teru-shoot { 0% { stroke-dashoffset: 100; opacity: .9 } 30% { stroke-dashoffset: 0; opacity: 1 } 66% { stroke-dashoffset: 0; opacity: 1 } 100% { stroke-dashoffset: 0; opacity: 0 } }
@keyframes teru-lensbar { 0% { opacity: 0; transform: translate(-50%, -50%) scaleY(.15) } 11% { opacity: 1; transform: translate(-50%, -50%) scaleY(1) } 72% { opacity: 1; transform: translate(-50%, -50%) scaleY(1) } 87% { opacity: 0; transform: translate(-50%, -50%) scaleY(1) } 100% { opacity: 0; transform: translate(-50%, -50%) scaleY(1) } }
@keyframes teru-lens2 { 0% { opacity: 0; transform: scaleX(.12) } 72% { opacity: 0; transform: scaleX(.12) } 83% { opacity: 1; transform: scaleX(.12) } 100% { opacity: 1; transform: scale(1) } }

.playing .glow { animation: teru-fade .8s .1s both, teru-pulse 4s 1.2s infinite; }
.playing .beam { animation: teru-beamin 1s ease .25s both; }
.playing .fan line { animation: teru-shoot .8s cubic-bezier(.2,.7,.2,1) both; }
.playing .fan line:nth-child(1) { animation-delay: .55s }
.playing .fan line:nth-child(2) { animation-delay: .6s }
.playing .fan line:nth-child(3) { animation-delay: .65s }
.playing .fan line:nth-child(4) { animation-delay: .7s }
.playing .fan line:nth-child(5) { animation-delay: .75s }
.playing .lensbar { animation: teru-lensbar 2.2s cubic-bezier(.3,.7,.2,1) 0s both; }
.playing .crystal .inner { animation: teru-lens2 2.2s cubic-bezier(.32,.6,.25,1) 0s both; }
.playing .word { animation: teru-rise .9s cubic-bezier(.2,.7,.2,1) 1.75s both; }
.playing .tag { animation: teru-up .7s ease 2.05s both; }
@media (prefers-reduced-motion: reduce) {
  .playing .glow, .playing .beam, .playing .fan line, .playing .lensbar, .playing .crystal .inner, .playing .word, .playing .tag { animation: none !important; }
}

/* ---------- about: name + mark ---------- */
.meaning { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: center; }
@media (max-width: 640px) { .meaning { grid-template-columns: 1fr; } }
.kanji { font-family: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif CJK JP', 'Noto Serif JP', serif; font-size: clamp(120px, 20vw, 220px); line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(127,176,224,.35); user-select: none; }
.reading { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--dim); margin-top: 10px; text-align: center; }
.step svg { width: 100%; height: auto; aspect-ratio: 5/3; }
.step h3 { margin-top: 16px; }
