/* ---------------------------------------------------------------------------
 * Takumi marketing site — v0 styles
 *
 * Hand-authored, no preprocessor, no build step. Mobile-first. One breakpoint
 * at 768px. WCAG AA contrast. System-sans typography until v1.
 * ------------------------------------------------------------------------- */

:root {
  /* Palette — stark near-black base, near-white foreground. v0 accent
   * is neutral white; a real accent color is a v1 designer decision. */
  --color-bg: #0d0d0d;
  --color-fg: #f5f5f5;
  --color-muted: #a8a8a8;
  --color-rule: rgba(245, 245, 245, 0.12);
  /* Intentionally identical to --color-fg until a v1 designer assigns a real
   * accent. Keep the variable distinct so the CTA call sites only update in
   * one place when the accent lands. */
  --color-accent: #f5f5f5;

  /* Type scale — fluid via clamp(min, preferred, max). Preferred uses vw
   * so type scales with viewport between the bounds. */
  --type-base: clamp(1rem, 0.95rem + 0.4vw, 1.125rem);
  --type-lead: clamp(1.125rem, 1rem + 0.8vw, 1.375rem);
  --type-h2: clamp(1.5rem, 1.2rem + 1.6vw, 2.25rem);
  --type-h1: clamp(2rem, 1.5rem + 3.2vw, 3.5rem);

  /* Spacing scale — 8px-derived. */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6rem;

  /* Layout */
  --content-max: 42rem;       /* ~672px — comfortable prose column */
  --hero-lockup-max: 22rem;   /* lockup width on mobile */

  /* Type stack — system-sans only. Montserrat lands in v1 when the
   * webfont weight is justified by the rest of the page. */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

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

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  font-size: var(--type-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul.steps {
  padding: 0;
  list-style: none;
}

/* ---------- Accessibility ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  padding: var(--space-1) var(--space-2);
  background: var(--color-fg);
  color: var(--color-bg);
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  z-index: 100;
  transition: top 120ms ease-out;
}

.skip-link:focus {
  top: var(--space-2);
  outline: 2px solid var(--color-fg);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--color-fg);
  outline-offset: 3px;
  border-radius: 2px;
}

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

main {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-5);
  padding-inline: var(--space-3);
  max-width: var(--content-max);
  margin-inline: auto;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding-block: var(--space-5) var(--space-3);
}

.hero-lockup {
  width: 100%;
  max-width: var(--hero-lockup-max);
  margin-block-end: var(--space-2);
}

.hero-tagline {
  font-size: var(--type-h1);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 18ch;
}

.hero-subtagline {
  font-size: var(--type-lead);
  color: var(--color-muted);
  max-width: 32ch;
  line-height: 1.4;
}

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

.prose {
  display: grid;
  gap: var(--space-2);
}

.prose h2 {
  font-size: var(--type-h2);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-block-end: var(--space-1);
}

.prose p {
  font-size: var(--type-base);
  line-height: 1.65;
}

.prose .steps {
  display: grid;
  gap: var(--space-2);
  padding-block-start: var(--space-1);
}

.prose .steps li {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-rule);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.prose .steps strong {
  display: inline-block;
  min-width: 5.5em;
  font-weight: 600;
}

/* ---------- CTA ---------- */

.cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  padding-block: var(--space-4);
}

.cta {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border: 2px solid var(--color-accent);
  border-radius: 999px;
  color: var(--color-accent);
  font-size: var(--type-lead);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: transparent;
  transition: background-color 160ms ease-out, color 160ms ease-out,
    transform 160ms ease-out;
  min-height: 44px; /* tap target */
  min-width: 44px;
}

.cta:hover,
.cta:focus-visible {
  background: var(--color-accent);
  color: var(--color-bg);
}

.cta:active {
  transform: scale(0.98);
}

.cta-note {
  max-width: 38ch;
  color: var(--color-muted);
  font-size: 0.95em;
  line-height: 1.5;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-rule);
  margin-top: var(--space-5);
  padding-block: var(--space-4) var(--space-5);
  padding-inline: var(--space-3);
  max-width: var(--content-max);
  margin-inline: auto;
  display: grid;
  gap: var(--space-2);
  text-align: center;
}

.attribution {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  font-size: 0.95em;
  color: var(--color-muted);
}

.attribution-by {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.attribution-autonomy {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 160ms ease-out;
}

.attribution-autonomy:hover {
  opacity: 0.8;
}

.attribution-autonomy img {
  height: 1.1em;
  width: auto;
}

.footer-mission {
  color: var(--color-muted);
  font-size: 0.95em;
  letter-spacing: 0.02em;
  max-width: 36ch;
  margin-inline: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  padding-block: var(--space-1);
}

.footer-links a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.95em;
  padding-block: var(--space-1);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--color-fg);
}

.copyright {
  color: var(--color-muted);
  font-size: 0.85em;
  opacity: 0.75;
}

/* ---------- Tablet / desktop breakpoint ---------- */

@media (min-width: 768px) {
  :root {
    --hero-lockup-max: 28rem;
  }

  main {
    padding-block: var(--space-6);
    padding-inline: var(--space-4);
    gap: var(--space-7);
  }

  .hero {
    padding-block: var(--space-6) var(--space-4);
  }

  .prose .steps {
    gap: var(--space-2);
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
