/* ==========================================================================
   Strikethrough Text — main.css
   Design system: tokens, reset, base typography, layout primitives.
   Theme: "Ink & Line" — clean paper-white surfaces, a decisive red action
   accent that doubles as the strike line, deep charcoal ink, and a reserved
   green used only for star ratings.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette */
  --red: #FF4335;          /* primary action accent + strike line */
  --red-deep: #E12C1F;     /* pressed / links on light */
  --red-soft: #FFEAE8;     /* soft red tint surface */
  --white: #FFFFFF;
  --off: #FBFBFB;          /* page background */
  --rating: #00B67A;       /* rating green — stars only */
  --rating-soft: #E3F7F0;

  /* Ink / charcoal scale */
  --ink: #14171C;          /* near-black ink */
  --char-900: #1B1F27;
  --char-800: #262C36;     /* dark surface */
  --char-700: #363E4B;
  --char-500: #626C7D;     /* muted body text */
  --char-400: #8891A0;
  --char-200: #E3E6EC;     /* borders */
  --char-100: #F1F3F7;     /* subtle fills */

  /* Semantic assignments */
  --bg-page: var(--off);
  --bg-surface: var(--white);
  --bg-dark: var(--char-900);
  --text-body: var(--char-700);
  --text-heading: var(--ink);
  --text-muted: var(--char-500);
  --text-on-dark: #D7DCE5;
  --accent: var(--red);
  --link: var(--red-deep);
  --link-hover: var(--ink);
  --border: var(--char-200);
  --success: #0E9F6E;
  --error: #D92D20;

  /* Type families */
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Fluid type scale */
  --fs-hero: clamp(2.4rem, 1.5rem + 3.8vw, 4.4rem);
  --fs-h1: clamp(2rem, 1.35rem + 2.6vw, 3.1rem);
  --fs-h2: clamp(1.6rem, 1.18rem + 1.7vw, 2.4rem);
  --fs-h3: clamp(1.22rem, 1.05rem + 0.75vw, 1.5rem);
  --fs-h4: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-lead: clamp(1.05rem, 1rem + 0.45vw, 1.25rem);

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(20, 23, 28, 0.05), 0 1px 3px rgba(20, 23, 28, 0.07);
  --shadow-md: 0 6px 18px rgba(20, 23, 28, 0.07), 0 2px 6px rgba(20, 23, 28, 0.05);
  --shadow-lg: 0 20px 46px rgba(20, 23, 28, 0.12), 0 6px 14px rgba(20, 23, 28, 0.07);
  --shadow-red: 0 10px 28px rgba(255, 67, 53, 0.30);

  /* Layout */
  --container: 1180px;
  --container-narrow: 780px;
  --header-h: 70px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
img { border-style: none; }

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

a { color: var(--link); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--link-hover); }

ul, ol { padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- Focus visibility ---------- */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 1.5rem + 3vw, 3.5rem); }
.section--soft { background: var(--char-100); }
.section--slate { background: linear-gradient(180deg, #fff 0%, var(--char-100) 100%); }
.section--dark {
  background: radial-gradient(1200px 600px at 15% -10%, #2c333f 0%, transparent 55%),
              radial-gradient(900px 500px at 100% 0%, #33202a 0%, transparent 50%),
              var(--char-900);
  color: var(--text-on-dark);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }

.section-head { max-width: 720px; margin-inline: auto; text-align: center; margin-bottom: var(--space-7); }
.section-title { font-size: var(--fs-h2); margin-bottom: var(--space-3); }
.section-lead { font-size: var(--fs-lead); color: var(--text-muted); }
.section--dark .section-lead { color: var(--text-on-dark); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-deep);
  background: var(--red-soft);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-4);
}
.section--dark .eyebrow { color: #ff8f86; background: rgba(255, 67, 53, 0.14); }

/* Highlight span used inside headings — the signature strike effect */
.kw {
  position: relative;
  color: inherit;
  white-space: nowrap;
}
.kw::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px;
  top: 52%;
  height: 0.14em;
  background: var(--red);
  border-radius: 2px;
  transform: scaleX(1);
  transform-origin: left center;
}

/* Grid helpers */
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Utility */
.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;
}
.text-center { text-align: center; }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
