/* tanab ai: site stylesheet. Plain CSS, no build-time processing. */

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

:root {
  color-scheme: light dark;

  --bg: #fafaf9;
  --bg-glow: rgb(13 148 136 / 0.14);
  --fg: #1c1917;
  --muted: #78716c;
  --accent: #0d9488;
  --accent-soft: rgb(13 148 136 / 0.1);
  /* Accent for normal-size text: --accent is only 3.6:1 on --bg, under
     the 4.5:1 WCAG AA minimum; this is 5.2:1. */
  --accent-text: #0f766e;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --bg-glow: rgb(45 212 191 / 0.12);
    --fg: #f5f5f4;
    --muted: #a8a29e;
    --accent: #2dd4bf;
    --accent-soft: rgb(45 212 191 / 0.12);
    --accent-text: #2dd4bf;
  }
}

/* ---------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh; /* fallback for browsers without svh */
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    radial-gradient(60rem 40rem at 50% -10%, var(--bg-glow), transparent 70%),
    var(--bg);
  color: var(--fg);
  font: 16px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* A light underline that firms up on hover and keyboard focus. The link
   colour alone isn't distinct enough from the surrounding muted text
   (about 1.1:1), so the underline is what marks it as a link; at 80% it
   stays at or above 3:1 against the background in both themes. */
a {
  color: var(--accent-text);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: currentColor; /* fallback without color-mix() */
  text-decoration-color: color-mix(in srgb, currentColor 80%, transparent);
}

a:hover,
a:focus-visible {
  text-decoration-color: currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: text-decoration-color 150ms ease;
  }
}

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

/* ---------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------ */

.hero {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.wordmark {
  font-size: clamp(3rem, 12vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.wordmark span {
  color: var(--accent);
}

/* A status line, not a control: no outline or background, so it can't be
   mistaken for a button. */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--muted);
  font-size: 0.9375rem;
}

.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

@media (prefers-reduced-motion: no-preference) {
  .status::before {
    animation: pulse 2.4s ease-in-out infinite;
  }
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px transparent;
  }
}

.lede {
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.site-footer {
  padding: var(--space-6) var(--space-4);
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

/* 404 page */
.error-code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--accent-text);
}

.error-title {
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
