/*
 * Purpose: The look of the TTSNative website: brand colours, type, layout and the light and dark themes.
 * Scope: Tokens (contrast checked against WCAG 2.2 AA), base type, the header, hero, buttons and
 *   cards; responsive from 320 px; reduced motion respected. Shared by every page, including 404.
 * Does NOT belong: Content sections (sections.css) or the app's styles (apps/web/src/styles/index.css).
 */
@font-face {
  font-family: Inter;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --band: #efede8;
  --line: #dedbd4;
  --text: #14151a;
  --muted: #4f5057;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-text: #4338ca;
  --accent-soft: #eef0ff;
  --warn-bg: #fff4e5;
  --warn-text: #7a3e00;
  --grad-a: #4f46e5;
  --grad-b: #0891b2;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(20 21 26 / 6%), 0 8px 30px rgb(20 21 26 / 8%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f14;
    --surface: #17181e;
    --band: #13141a;
    --line: #2b2c34;
    --text: #ececef;
    --muted: #a9aab1;
    --accent: #5b54e8;
    --accent-hover: #4f46e5;
    --accent-text: #a5b4fc;
    --accent-soft: #23234a;
    --warn-bg: #2d2010;
    --warn-text: #f5c27a;
    --grad-a: #a5b4fc;
    --grad-b: #67e8f9;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 30px rgb(0 0 0 / 35%);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    400 17px/1.6 Inter,
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);
  margin: 0.2em 0 0.4em;
}

h2 {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem);
  margin: 0 0 0.6em;
}

h3 {
  font-size: 1.08rem;
  margin: 0 0 0.35em;
}

section {
  padding-block: clamp(48px, 7vw, 88px);
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.stop-a {
  stop-color: var(--grad-a);
}

.stop-b {
  stop-color: var(--grad-b);
}

.wordmark {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

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

.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 0.95rem;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
}

.top nav a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.eyebrow {
  margin: 0;
  color: var(--accent-text);
  font-weight: 600;
  font-size: 0.92rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36em;
}

.fine {
  color: var(--muted);
  font-size: 0.9rem;
}

.shot {
  margin: 0;
}

.shot img,
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font:
    600 0.95rem/1 Inter,
    system-ui,
    sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--muted);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-hover);
}

.btn.ghost {
  background: transparent;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Bands and cards */
.band {
  background: var(--band);
  border-block: 1px solid var(--line);
}

.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.cards li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.cards p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.cards.small {
  margin-top: 24px;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .top nav a {
    transition:
      background-color 0.15s ease,
      border-color 0.15s ease,
      color 0.15s ease;
  }
}
