* {
  box-sizing: border-box;
}

html {
  background: var(--color-surface);
  color: var(--color-on-surface);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-tint) 48%, var(--color-surface-warm) 100%);
  color: var(--color-on-surface);
  font-family: 'Quicksand', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

img,
video {
  max-width: 100%;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--color-outline);
  background: color-mix(in srgb, var(--color-surface-raised) 88%, transparent);
  backdrop-filter: blur(0.75rem);
}

.site-nav {
  width: min(100%, var(--max-page-width));
  margin: 0 auto;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--color-primary);
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-links a {
  color: var(--color-on-surface);
  text-decoration: none;
}

.hero {
  position: relative;
  overflow: hidden;
}

.home-hero {
  min-height: 42rem;
  display: grid;
  align-items: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: brightness(1.15) saturate(0.9);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 68%, transparent), var(--color-surface));
}

.hero-inner,
.content-wrap {
  width: min(100%, var(--max-page-width));
  margin: 0 auto;
  padding: 3rem 1rem;
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 48rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: 'Fredoka', system-ui, sans-serif;
  line-height: 1.1;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 48rem;
  color: var(--color-on-surface);
  font-size: 4.5rem;
}

h2 {
  margin: 0 0 1rem;
  color: var(--color-on-surface);
  font-size: 2.25rem;
}

h3 {
  margin: 0 0 0.4rem;
  color: var(--color-on-surface);
  font-size: 1.16rem;
}

.lead {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--color-on-surface-muted);
  font-size: 1.12rem;
}

.tool-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 13.5rem));
  gap: 1rem;
}

.tool-card {
  min-height: 19rem;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.65rem;
  padding: 1rem;
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-raised) 86%, transparent);
  box-shadow: var(--shadow-soft);
  color: var(--color-on-surface);
  text-align: center;
  text-decoration: none;
}

.tool-card img {
  width: min(100%, 10rem);
}

.tool-card strong {
  display: block;
  color: var(--color-primary);
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.08rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.primary-action {
  width: fit-content;
  min-height: 3.25rem;
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 800;
  text-decoration: none;
}

.section-band {
  border-top: 1px solid var(--color-outline);
  background: color-mix(in srgb, var(--color-surface-raised) 70%, transparent);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.info-card,
.faq-item,
.meaning-panel {
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  padding: 1.1rem;
}

.info-card p,
.faq-item p,
.meaning-panel p {
  margin: 0;
  color: var(--color-on-surface-muted);
}

.info-card h3 + p,
.meaning-panel h3 + p {
  margin-top: 0.35rem;
}

.page-hero {
  border-bottom: 1px solid var(--color-outline);
}

.page-hero .hero-inner {
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
}

.page-body {
  display: grid;
  gap: 2rem;
}

.content-section {
  max-width: 56rem;
}

.content-section p,
.content-section li {
  color: var(--color-on-surface-muted);
}

.content-section ul {
  padding-inline-start: 1.3rem;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.keyword-list li {
  border: 1px solid var(--color-outline-strong);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  color: var(--color-primary);
  font-weight: 700;
}

.meaning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.site-footer {
  border-top: 1px solid var(--color-outline);
  background: var(--color-surface-raised);
}

.footer-inner {
  width: min(100%, var(--max-page-width));
  margin: 0 auto;
  padding: 1.25rem 1rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--color-on-surface-muted);
  font-size: 0.95rem;
}

.footer-inner nav {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.legal-page .content-wrap {
  max-width: 48rem;
}

.legal-page h1 {
  font-size: 2.75rem;
}

.legal-page h2 {
  margin-top: 1.8rem;
  font-size: 1.35rem;
}

.legal-page p {
  color: var(--color-on-surface-muted);
}

.legal-updated {
  margin-top: 0.75rem;
  color: var(--color-primary);
  font-weight: 800;
}

.nav-toggle { display: none; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.3125rem;
  width: 2rem;
  height: 2rem;
  padding: 0.25rem;
  cursor: pointer;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 0.125rem;
  background: var(--color-on-surface);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle:checked ~ .nav-hamburger span:nth-child(1) {
  transform: translateY(0.4375rem) rotate(45deg);
}

.nav-toggle:checked ~ .nav-hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-toggle:checked ~ .nav-hamburger span:nth-child(3) {
  transform: translateY(-0.4375rem) rotate(-45deg);
}

@media (max-width: 479px) {
  .site-nav {
    flex-wrap: wrap;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 0.5rem;
    gap: 0.5rem;
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .home-hero {
    min-height: auto;
  }

  .hero-inner,
  .content-wrap {
    padding: 1.5rem 0.75rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .lead {
    font-size: 0.95rem;
  }

  .tool-grid,
  .section-grid,
  .meaning-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .tool-card {
    min-height: auto;
    padding: 0.75rem;
  }

  .primary-action {
    width: 100%;
    justify-content: center;
  }

  .page-hero .hero-inner {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .footer-inner nav {
    justify-content: center;
  }

  .legal-page h1 {
    font-size: 1.75rem;
  }

  .legal-page h2 {
    font-size: 1.15rem;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .site-nav {
    flex-wrap: wrap;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 0.5rem;
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .home-hero {
    min-height: auto;
  }

  .hero-inner,
  .content-wrap {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  .tool-grid,
  .section-grid,
  .meaning-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: auto;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .hero-inner,
  .content-wrap {
    padding: 2.5rem 1.5rem;
  }

  .home-hero {
    min-height: 34rem;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 34rem;
  }

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

  .lead {
    max-width: 38rem;
    font-size: 1.05rem;
  }

  .legal-page h1 {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: 4.5rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .hero-inner,
  .content-wrap {
    padding: 3rem 2rem;
  }

  .hero-copy {
    max-width: 48rem;
  }

  .lead {
    font-size: 1.12rem;
  }

  .tool-grid {
    grid-template-columns: repeat(4, minmax(0, 14rem));
  }
}
