/* RedZoc — site styles. Colours and fonts follow brand-strategy/DECISIONS.md (13.2, 13.3). */

@font-face { font-family: "Raleway"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/raleway-500.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/raleway-700.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f8f5f6;
  --surface-strong: #fdecef;
  --text: #1a1a1a;
  --muted: #666666;
  --line: #e7e1e3;
  --brand: #ea033b;          /* logo crimson: 4.59:1 on white */
  --on-brand: #ffffff;
  --glow: rgba(234, 3, 59, 0.16);
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.06), 0 12px 32px rgba(26, 26, 26, 0.08);
  --heading: "Raleway", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --radius: 20px;
  --max: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1c1b1c;
    --surface-strong: #2a1a1e;
    --text: #ededed;
    --muted: #b8b8b8;
    --line: #2e2c2d;
    --brand: #ff4d6d;        /* lighter crimson: 5.83:1 on #121212 */
    --on-brand: #121212;
    --glow: rgba(255, 77, 109, 0.18);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.125rem;       /* 18px */
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--heading); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--brand); color: var(--on-brand);
  padding: 0.6rem 1rem; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; min-height: 4.25rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.brand { display: inline-flex; flex: none; border-radius: 8px; }
.brand img { height: 2.5rem; width: auto; max-width: none; }
.site-nav ul { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: 0.5rem 0.75rem; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1rem;
}
@media (max-width: 26rem) {
  .site-header .wrap { padding-left: 1rem; padding-right: 1rem; }
  .brand img { height: 1.75rem; }
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 0.5rem 0.4rem; font-size: 0.9rem; }
}
.site-nav a:hover { background: var(--surface-strong); text-decoration: underline; text-decoration-color: var(--brand); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 8vw, 6rem); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 70vw; height: 70vw; max-width: 56rem; max-height: 56rem;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; gap: 2.5rem; align-items: center; }
.hero h1 {
  font-size: clamp(3rem, 10vw, 5.75rem);
  letter-spacing: -0.025em;
  margin-bottom: 0.35em;
}
.hero h1 .accent { color: var(--brand); }
.hero .lead { font-size: clamp(1.2rem, 2.4vw, 1.4rem); max-width: 36rem; color: var(--text); }
.hero-symbol { justify-self: center; width: min(14rem, 55vw); filter: drop-shadow(0 24px 40px var(--glow)); }

@media (min-width: 46rem) {
  .hero .wrap { grid-template-columns: 1.25fr 1fr; }
  .hero-symbol { justify-self: end; width: min(22rem, 34vw); }
}

.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--brand); color: var(--on-brand);
  padding: 0.85rem 1.4rem; border-radius: 999px;
  font-weight: 700; font-size: 1.05rem; text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 20px var(--glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 28px var(--glow); }
.button.secondary { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.button svg { width: 1.1em; height: 1.1em; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section.alt { background: var(--surface); }
.section-intro { max-width: 40rem; color: var(--muted); font-size: 1.2rem; margin-bottom: 2.5rem; }

/* App cards */
.apps { display: grid; gap: 1.5rem; }
.app-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(1.25rem, 4vw, 2.5rem);
  display: grid; gap: 2rem;
}
.app-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-bottom: 1rem; }
.app-head h3 { margin: 0; }
.app-icon { width: 4rem; height: 4rem; border-radius: 1rem; flex: none; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.app-icon.placeholder { display: grid; place-items: center; background: var(--surface-strong); color: var(--brand); }
.app-icon.placeholder svg { width: 2.2rem; height: 2.2rem; }
.app-card p { max-width: 42rem; }
.app-note { color: var(--muted); font-size: 1rem; border-left: 3px solid var(--brand); padding-left: 0.9rem; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; }
.badge {
  display: inline-block; font-family: var(--heading); font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.25rem 0.7rem; border-radius: 999px; white-space: nowrap;
  background: var(--brand); color: var(--on-brand);
}
.shots { display: flex; gap: 1rem; justify-content: center; align-items: flex-start; }
.shots img {
  width: min(13rem, calc(50% - 0.5rem)); border-radius: 1.4rem;
  border: 6px solid #1a1a1a; box-shadow: var(--shadow); background: #1a1a1a;
}
.shots img:nth-child(2) { margin-top: 2.5rem; }

@media (min-width: 60rem) {
  .app-card.featured { grid-template-columns: 1.2fr 1fr; align-items: center; }
}

/* Principles */
.principles { display: grid; gap: 1.25rem; list-style: none; padding: 0; margin: 0; }
.principles li {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow);
}
.principles h3 { color: var(--brand); font-size: 1.35rem; }
.principles p { margin: 0; }
@media (min-width: 46rem) { .principles { grid-template-columns: 1fr 1fr; } }

/* About and contact */
.prose { max-width: 42rem; font-size: 1.2rem; }
.contact-email { display: inline-block; margin-top: 0.25rem; font-family: var(--heading); font-weight: 700; font-size: clamp(1.5rem, 4vw, 2.1rem); word-break: break-word; }
.contact-place { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: 1rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand); }

/* Legal pages */
.legal { padding: clamp(2.5rem, 6vw, 4rem) 0 4rem; }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(2.1rem, 6vw, 3rem); }
.legal h2 { font-size: 1.5rem; margin-top: 2.25rem; }
.legal .meta { color: var(--muted); }
.legal ul { padding-left: 1.3rem; }
.legal li { margin-bottom: 0.5em; }
.legal .summary { background: var(--surface); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.legal .summary ul { margin: 0; }

/* Gentle reveal on scroll; only when JavaScript runs and motion is allowed */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal.visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .button:hover { transition: none; transform: none; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Very narrow screens (under 336px): let long buttons wrap instead of overflowing. */
.apps > * { min-width: 0; }
@media (max-width: 26rem) { .button { padding: 0.8rem 1.1rem; } }
@media (max-width: 19rem) { .button { white-space: normal; } }
