/* ---------- tokens ---------- */

:root {
  --bg: #faf9f7;
  --fg: #1a1a1a;
  --fg-muted: #6e6a63;
  --accent: #2450c8;
  --rule: #e4e1db;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter,
    "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;

  --measure: 42rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --fg: #e8e8ea;
    --fg-muted: #8d8d94;
    --accent: #7d9bf5;
    --rule: #2a2a2e;
  }
}

/* ---------- base ---------- */

* {
  margin: 0;
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main,
footer {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- typography ---------- */

h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

p + p {
  margin-top: 0.75rem;
}

.ja {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* ---------- links ---------- */

a {
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: color 0.25s var(--ease-out);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1em;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transform: scaleX(1);
  transform-origin: left;
  transition: opacity 0.25s var(--ease-out), transform 0.35s var(--ease-out);
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

a:hover::after,
a:focus-visible::after {
  opacity: 1;
  transform-origin: left;
  animation: underline-sweep 0.35s var(--ease-out);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@keyframes underline-sweep {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

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

.hero {
  padding-block: clamp(6rem, 24vh, 12rem) clamp(4rem, 12vh, 7rem);
}

.wordmark {
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.tagline {
  margin-top: 1.5rem;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.5;
  color: var(--fg);
}

.tagline-ja {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--fg-muted);
}

.hero > * {
  animation: rise-in 0.7s var(--ease-out) backwards;
}

.hero .tagline {
  animation-delay: 0.12s;
}

.hero .tagline-ja {
  animation-delay: 0.22s;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- sections ---------- */

section {
  padding-block: 3rem;
  border-top: 1px solid var(--rule);
}

.plain-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

/* scroll-driven reveal — no-ops where animation-timeline is unsupported */
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise-in 1s var(--ease-out) backwards;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
}

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

footer {
  padding-block: 3rem 4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
