/* ==========================================================================
   FreeKidApps.org — Design System & Stylesheet
   Warm storybook paper aesthetic, tactile controls, zero visual clutter.
   ========================================================================== */

:root {
  /* Palette (HSL tokens) */
  --bg-paper: hsl(42, 100%, 97%);
  --bg-warm: hsl(40, 72%, 93%);
  --bg-surface: hsl(0, 0%, 100%);
  --bg-surface-tinted: hsl(42, 60%, 98.5%);

  --ink-primary: hsl(218, 30%, 17%);
  --ink-secondary: hsl(217, 17%, 38%);
  --ink-muted: hsl(217, 13%, 52%);

  --coral: hsl(11, 96%, 60%);
  --coral-deep: hsl(11, 78%, 45%);
  --coral-soft: hsl(11, 100%, 95%);

  --sky: hsl(209, 88%, 54%);
  --sky-deep: hsl(209, 76%, 40%);
  --sky-soft: hsl(207, 100%, 94%);

  --meadow: hsl(154, 72%, 38%);
  --meadow-deep: hsl(154, 74%, 28%);
  --meadow-soft: hsl(152, 70%, 93%);

  --buttercup: hsl(42, 100%, 56%);
  --buttercup-deep: hsl(37, 88%, 41%);
  --buttercup-soft: hsl(45, 100%, 92%);

  /* Borders & Elevation */
  --border-subtle: hsla(218, 30%, 17%, 0.09);
  --border-strong: hsla(218, 30%, 17%, 0.16);
  --shadow-card:
    0 2px 0 hsla(218, 30%, 17%, 0.05),
    0 14px 36px -12px hsla(34, 48%, 32%, 0.12);
  --shadow-card-hover:
    0 4px 0 hsla(218, 30%, 17%, 0.06),
    0 22px 44px -14px hsla(34, 48%, 32%, 0.18);
  --shadow-dialog:
    0 28px 68px -16px hsla(218, 30%, 12%, 0.34);

  /* Radii & Spacing */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --container-max: 1120px;
  --space-gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Typography */
  --font-display: "Fredoka", "Nunito", ui-rounded, system-ui, -apple-system, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-primary);
  background-color: var(--bg-paper);
  background-image:
    radial-gradient(circle at 12% 8%, hsla(42, 100%, 72%, 0.22) 0%, transparent 42%),
    radial-gradient(circle at 90% 14%, hsla(207, 100%, 82%, 0.18) 0%, transparent 38%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

/* Accessibility Helpers */
.skip-link {
  position: absolute;
  top: -120px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--ink-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 1rem;
}

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

/* Layout Container */
.container {
  width: min(100% - 2 * var(--space-gutter), var(--container-max));
  margin-inline: auto;
}

main {
  flex: 1;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: hsla(42, 100%, 97%, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 3px 0 hsla(11, 78%, 45%, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-mark {
  transform: rotate(-6deg) scale(1.05);
}

.brand-tld {
  color: var(--coral);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-secondary);
  transition: background-color 0.16s ease, color 0.16s ease;
}

.nav-link:hover {
  background: var(--bg-warm);
  color: var(--ink-primary);
}

.nav-link--github {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.25rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.nav-link--github:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

/* ==========================================================================
   Buttons (Tactile Pressable Style)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition:
    transform 0.14s cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.14s cubic-bezier(0.25, 1, 0.5, 1),
    background-color 0.14s ease;
}

.btn--primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 4px 0 var(--coral-deep);
}

.btn--primary:hover {
  background: hsl(11, 96%, 56%);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--coral-deep);
}

.btn--primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--coral-deep);
}

.btn--sky {
  background: var(--sky);
  color: #fff;
  box-shadow: 0 4px 0 var(--sky-deep);
}

.btn--sky:hover {
  background: hsl(209, 88%, 50%);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--sky-deep);
}

.btn--sky:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--sky-deep);
}

.btn--meadow {
  background: var(--meadow);
  color: #fff;
  box-shadow: 0 4px 0 var(--meadow-deep);
}

.btn--meadow:hover {
  background: hsl(154, 72%, 34%);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--meadow-deep);
}

.btn--meadow:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--meadow-deep);
}

.btn--secondary {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1.5px solid var(--border-strong);
  box-shadow: 0 3px 0 hsla(218, 30%, 17%, 0.08);
}

.btn--secondary:hover {
  background: var(--bg-surface-tinted);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 hsla(218, 30%, 17%, 0.11);
}

.btn--secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 hsla(218, 30%, 17%, 0.08);
}

.btn--sm {
  padding: 0.62rem 1.15rem;
  font-size: 0.95rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding-block: clamp(2.5rem, 6vw, 4.75rem) clamp(2rem, 5vw, 3.75rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero-copy h1 {
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 4.8vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.hero-copy p {
  margin: 0 0 1.85rem;
  font-size: clamp(1.06rem, 1.5vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-secondary);
  max-width: 48ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.hero-reassurance {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  list-style: none;
  padding-left: 0;
  color: var(--ink-secondary);
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-reassurance li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.check-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--meadow-soft);
  color: var(--meadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-art-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #fdf9ef;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
}

.hero-art-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ==========================================================================
   Section Headers & Controls
   ========================================================================== */
.section {
  padding-block: clamp(2.75rem, 6vw, 4.75rem);
}

.section--tinted {
  background: var(--bg-warm);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.section-subtitle {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 1.05rem;
  max-width: 56ch;
}

/* Search & Filter Toolbar */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.filter-pill[aria-pressed="true"] {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #fff;
}

.search-box {
  position: relative;
  min-width: min(100%, 260px);
}

.search-box svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font: inherit;
  font-size: 0.94rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px hsla(209, 88%, 54%, 0.18);
}

/* ==========================================================================
   Featured App Card (Flagship Spotlight)
   ========================================================================== */
.featured-app {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 2rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.featured-app:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.featured-media {
  position: relative;
  background: var(--sky-soft);
  min-height: 260px;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-body {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.72rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tag--featured {
  background: var(--buttercup-soft);
  color: hsl(33, 85%, 30%);
}

.tag--category {
  background: var(--sky-soft);
  color: var(--sky-deep);
}

.tag--age {
  background: var(--meadow-soft);
  color: var(--meadow-deep);
}

.featured-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.featured-domain {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
}

.featured-domain:hover {
  color: var(--sky-deep);
}

.featured-desc {
  margin: 0 0 1.25rem;
  color: var(--ink-secondary);
  font-size: 1.02rem;
}

.highlight-list {
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  font-size: 0.93rem;
  color: var(--ink-secondary);
}

.highlight-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.highlight-list svg {
  color: var(--meadow);
  flex-shrink: 0;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   Multi-App Grid & Coming Soon Strip
   ========================================================================== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
  gap: 1.5rem;
}

.app-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.app-card-media {
  aspect-ratio: 16 / 9;
  background: var(--bg-warm);
  overflow: hidden;
}

.app-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-card-body {
  padding: 1.35rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.app-card-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.app-card-desc {
  margin: 0 0 1.25rem;
  color: var(--ink-secondary);
  font-size: 0.95rem;
  flex: 1;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
}

/* Upcoming / More Apps Invitation Panel */
.more-apps-panel {
  margin-top: 1.75rem;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-tinted);
  border: 1.5px dashed var(--border-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.more-apps-panel h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.more-apps-panel p {
  margin: 0;
  color: var(--ink-secondary);
  max-width: 58ch;
  font-size: 0.96rem;
}

.empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.empty-state h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.empty-state p {
  margin: 0 0 1.25rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Family & Teacher Promise Pillars
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.pillar {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.6rem 1.5rem;
  box-shadow: 0 2px 0 hsla(218, 30%, 17%, 0.04);
}

.pillar-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.pillar-icon--coral {
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.pillar-icon--meadow {
  background: var(--meadow-soft);
  color: var(--meadow-deep);
}

.pillar-icon--sky {
  background: var(--sky-soft);
  color: var(--sky-deep);
}

.pillar-icon--buttercup {
  background: var(--buttercup-soft);
  color: var(--buttercup-deep);
}

.pillar h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.pillar p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* ==========================================================================
   Native Accessible App Details Dialog
   ========================================================================== */
.app-dialog {
  width: min(calc(100% - 2rem), 560px);
  max-height: 90dvh;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-dialog);
  overflow-y: auto;
}

.app-dialog::backdrop {
  background: hsla(218, 35%, 12%, 0.5);
  backdrop-filter: blur(4px);
}

.dialog-media {
  position: relative;
  width: 100%;
  height: 190px;
  background: var(--sky-soft);
  overflow: hidden;
}

.dialog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: hsla(0, 0%, 100%, 0.94);
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.dialog-close:hover {
  background: #fff;
  transform: scale(1.06);
}

.dialog-content {
  padding: 1.25rem 1.5rem 1.5rem;
}

.dialog-content h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.2;
}

.dialog-meta-url {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
  color: var(--ink-secondary);
  text-decoration: none;
}

.dialog-content p {
  margin: 0 0 1rem;
  color: var(--ink-secondary);
  font-size: 0.96rem;
}

.dialog-content .highlight-list {
  margin-bottom: 1.15rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding-block: 2.5rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.footer-note {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ==========================================================================
   Secondary Pages (Privacy Policy & 404)
   ========================================================================== */
.prose-page {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.prose-card {
  max-width: 760px;
  margin-inline: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: clamp(1.75rem, 4.5vw, 3rem);
}

.prose-card h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 2.7rem);
  line-height: 1.15;
}

.prose-card h2 {
  margin: 2rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.prose-card p,
.prose-card li {
  color: var(--ink-secondary);
}

.prose-card ul {
  padding-left: 1.25rem;
}

.prose-lead {
  font-size: 1.1rem;
  color: var(--ink-primary) !important;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--meadow-soft);
  margin: 1.25rem 0 1.75rem;
}

.not-found-box {
  max-width: 560px;
  margin: clamp(3rem, 10vh, 6rem) auto;
  text-align: center;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: clamp(2rem, 5vw, 3.25rem);
}

.not-found-code {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--coral);
  line-height: 1;
}

.not-found-box h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
}

.not-found-box p {
  margin: 0 0 1.75rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid,
  .featured-app {
    grid-template-columns: 1fr;
  }

  .pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding-block: 0.75rem;
    gap: 0.6rem 1rem;
  }

  .brand {
    font-size: 1.2rem;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.35rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--border-subtle);
  }

  .nav-link {
    padding: 0.42rem 0.78rem;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .nav-link--github {
    margin-left: auto;
  }

  .nav-link--github span {
    display: inline;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .featured-media {
    min-height: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
