/* -------------------------------------------------
   INTERFACE — mobile-first stylesheet
   Start with one column; add columns only when
   there is enough screen space for them.
-------------------------------------------------- */

:root {
  color-scheme: light;
  --page: #f7f8fc;
  --surface: #ffffff;
  --navy: #101a35;
  --text: #17213b;
  --muted: #4f5b75;
  --blue: #245fc4;
  --purple: #6843c2;
  --border: #dce2ee;
  --soft-blue: #edf3ff;
  --radius: 1.1rem;
  --content-width: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

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

a {
  color: #174f9e;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.15em;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 0.2rem solid #174f9e;
  outline-offset: 0.2rem;
}

::selection {
  color: #101a35;
  background: #d7d0ff;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 200;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  color: white;
  background: #101a35;
  border-radius: 0.4rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0.75rem max(1rem, calc((100% - var(--content-width)) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  color: var(--navy);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.brand span {
  color: var(--purple);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  min-height: 2.8rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--navy);
  background: white;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem 1rem;
  background: white;
  border-bottom: 1px solid var(--border);
}

.site-nav.is-open {
  display: grid;
  gap: 0.2rem;
}

.site-nav a {
  display: block;
  padding: 0.7rem 0.5rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.4rem;
}

.site-nav a:hover {
  background: var(--soft-blue);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 2rem;
  padding: 4rem 1.25rem 3.5rem;
  color: white;
  background: var(--navy);
}

.hero-copy,
.section,
.site-footer {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

.hero .eyebrow,
.dark-section .eyebrow,
.closing-panel .eyebrow {
  color: #b9caff;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

.hero h1 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(2.8rem, 12vw, 5.5rem);
  letter-spacing: -0.07em;
}

.hero h1 span {
  color: #b5a2ff;
}

.hero-intro {
  max-width: 38rem;
  margin: 1.2rem 0 1.6rem;
  color: #e0e7f6;
  font-size: 1.05rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 2.9rem;
  padding: 0.7rem 1rem;
  border: 2px solid var(--blue);
  border-radius: 0.6rem;
  color: white;
  background: var(--blue);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  color: white;
  background: #174b9e;
  border-color: #174b9e;
}

.hero .button {
  color: var(--navy);
  background: white;
  border-color: white;
}

.hero .button:hover {
  background: #e7edff;
  border-color: #e7edff;
}

.hero-art {
  position: relative;
  width: min(100%, 22rem);
  min-height: 13rem;
  margin-inline: auto;
}

.shape {
  position: absolute;
  top: 1rem;
  width: 43%;
  height: 10rem;
  border-radius: 1.5rem;
}

.shape-one {
  left: 5%;
  background: linear-gradient(145deg, #36b9ed, #2766d5);
  transform: rotate(-10deg);
}

.shape-two {
  right: 5%;
  background: linear-gradient(145deg, #d58be9, #7555d5);
  transform: rotate(10deg);
}

.shape-link {
  position: absolute;
  top: 4.2rem;
  left: 37%;
  z-index: 1;
  display: grid;
  width: 26%;
  min-height: 3.5rem;
  place-items: center;
  border: 1px solid #ffffffa6;
  border-radius: 0.8rem;
  color: white;
  background: #ffffff35;
  font-size: 2.4rem;
}

.hero-art p {
  position: absolute;
  right: 0;
  bottom: -0.3rem;
  margin: 0;
  color: #dce5ff;
  font-size: 0.8rem;
  text-align: right;
}

.hero-note {
  position: absolute;
  bottom: 0.5rem;
  left: 1.25rem;
  margin: 0;
  color: #c0cbe5;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.section {
  padding: 4rem 1.25rem;
}

.section-heading {
  max-width: 43rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.2rem);
  letter-spacing: -0.045em;
}

.section-heading h2 span {
  color: var(--purple);
}

.section-intro {
  max-width: 38rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
}

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

.info-card,
.context-card {
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.info-card {
  position: relative;
}

.card-number {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  margin: 0;
  color: #52617c;
  font-size: 0.8rem;
  font-weight: 700;
}

.info-card h3,
.context-card h3 {
  margin: 0.4rem 0 0.65rem;
  font-size: 1.3rem;
}

.info-card > p:not(.card-number):not(.tag),
.context-card > p:not(.eyebrow):not(.equation) {
  max-width: 38rem;
  color: var(--muted);
}

.tag {
  display: inline-block;
  margin: 0.7rem 0 0;
  padding: 0.3rem 0.55rem;
  border-radius: 0.35rem;
  color: #31466d;
  background: #edf1f8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.origin-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.35rem;
  border: 1px solid #cbd7f0;
  border-radius: var(--radius);
  background: #edf3ff;
}

.origin-mark {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  border-radius: 0.9rem;
  color: #49318d;
  background: white;
  font-size: 1.5rem;
  font-weight: 800;
}

.origin-panel h3 {
  margin: 0 0 0.5rem;
}

.origin-panel p:not(.eyebrow) {
  max-width: 48rem;
  margin: 0.5rem 0;
  color: #34415e;
}

.source-note {
  font-size: 0.85rem;
}

.dark-section {
  max-width: none;
  color: white;
  background: var(--navy);
}

.dark-section .section-heading,
.dark-section .card-grid,
.dark-section .quote {
  max-width: var(--content-width);
  margin-inline: auto;
}

.dark-section .section-intro {
  color: #d3dcef;
}

.context-card {
  color: var(--text);
}

.context-symbol {
  display: grid;
  min-height: 7rem;
  margin-bottom: 1.2rem;
  place-items: center;
  border-radius: 0.8rem;
  color: white;
  font-size: 3.5rem;
}

.symbol-blue { background: linear-gradient(135deg, #2766d5, #579cf0); }
.symbol-teal { background: linear-gradient(135deg, #087f91, #3ca8ae); }
.symbol-pink { background: linear-gradient(135deg, #a33e86, #d47ab7); }
.symbol-orange { background: linear-gradient(135deg, #a94c18, #d88a32); }

.context-card .eyebrow {
  color: #385b9a;
}

.context-card h3 {
  margin-top: 0.35rem;
}

.equation {
  margin: 1.2rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  color: #314d80;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.quote {
  max-width: 47rem;
  margin: 3rem auto 0;
  color: white;
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.quote cite {
  display: block;
  margin-top: 1rem;
  color: #c2d0f5;
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.word-lab {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
}

.word-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  padding: 0.8rem;
  background: #edf1f9;
}

.word-button {
  min-height: 2.8rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  color: #263653;
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.word-button:hover {
  background: white;
}

.word-button.is-active {
  color: white;
  background: var(--navy);
}

.word-result {
  min-height: 12rem;
  padding: 1.5rem;
}

.word-result h3 {
  margin: 0.2rem 0 0.5rem;
  font-size: clamp(2rem, 8vw, 3rem);
  overflow-wrap: anywhere;
}

.word-result > p:last-child {
  max-width: 35rem;
  color: var(--muted);
}

.play-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 1.35rem;
  border: 1px solid #d5d8ef;
  border-radius: var(--radius);
  background: #f0efff;
}

.play-panel h3 {
  max-width: 28rem;
  margin: 0 0 0.6rem;
  font-size: 1.4rem;
}

.play-panel > div > p:not(.eyebrow) {
  max-width: 34rem;
  color: #414d6b;
}

.word-play label,
.form-field label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.word-play input,
.form-field input,
.form-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid #9aa8c0;
  border-radius: 0.5rem;
  color: var(--text);
  background: white;
}

.form-field textarea {
  resize: vertical;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.button-small {
  min-height: 2.6rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
}

.button-light {
  color: var(--navy);
  background: white;
  border-color: white;
}

.button-light:hover {
  color: var(--navy);
  background: #e8edff;
  border-color: #e8edff;
}

.play-output {
  min-height: 2rem;
  margin: 1rem 0 0;
  color: #49318d;
  font-size: clamp(1.2rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

.people-section {
  background: #edf2fc;
}

.people-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.people-intro {
  max-width: 35rem;
}

.large-quote-mark {
  margin: 0;
  color: var(--purple);
  font-size: 4rem;
  line-height: 1;
}

.people-intro h3 {
  margin: 0.5rem 0;
  font-size: 1.5rem;
}

.people-intro > p:not(.large-quote-mark) {
  color: var(--muted);
}

.response-panel {
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
}

#responseForm {
  display: grid;
  gap: 0.9rem;
}

.form-field {
  min-width: 0;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: #24512d;
  font-size: 0.85rem;
}

.responses {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.response-card {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-width: 0;
  padding: 0.9rem;
  border-radius: 0.7rem;
  background: #f2f5fb;
}

.response-card > div {
  min-width: 0;
}

.avatar {
  display: grid;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #315fae;
  font-weight: 800;
}

.response-card h4 {
  margin: 0 0 0.3rem;
}

.response-card p {
  margin: 0.25rem 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.response-label {
  color: #344d7c !important;
  font-size: 0.68rem;
  font-weight: 800;
}

.result-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

.result-list article {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: white;
}

.result-list article > span {
  color: var(--purple);
  font-weight: 800;
}

.result-list h3,
.result-list p {
  margin: 0;
}

.result-list p {
  color: var(--muted);
  font-size: 0.9rem;
}

.closing-panel {
  margin-top: 2rem;
  padding: 2.5rem 1.2rem;
  border-radius: var(--radius);
  color: white;
  background: var(--navy);
  text-align: center;
}

.closing-symbol {
  display: grid;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.2rem;
  place-items: center;
  border-radius: 1rem;
  color: white;
  background: linear-gradient(135deg, #286bd5, #7954ce);
  font-size: 2.2rem;
}

.closing-panel h2 {
  margin: 0 0 1.4rem;
  font-size: clamp(1.8rem, 7vw, 3rem);
}

.closing-panel h2 span {
  color: #c2b4ff;
}

.site-footer {
  display: grid;
  gap: 0.7rem;
  padding: 2rem 1.25rem;
  color: #e1e8f8;
  background: #080f23;
}

.site-footer p {
  margin: 0;
  color: #e1e8f8;
  font-size: 0.85rem;
}

.footer-brand {
  color: white;
}

.site-footer a:not(.brand) {
  width: fit-content;
  color: #d7e2ff;
}

/* Wider screens: add columns only when there is room. */
@media (min-width: 42rem) {
  .site-header {
    padding-inline: max(1.5rem, calc((100% - var(--content-width)) / 2));
  }

  .menu-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0;
    border: 0;
  }

  .site-nav a {
    padding: 0.45rem;
    font-size: 0.9rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(15rem, 0.8fr);
    align-items: center;
    padding: 5rem max(2rem, calc((100% - var(--content-width)) / 2)) 4rem;
  }

  .hero-art {
    width: 100%;
    max-width: 22rem;
  }

  .hero-note {
    left: max(2rem, calc((100% - var(--content-width)) / 2));
  }

  .section {
    padding: 5rem max(2rem, calc((100% - var(--content-width)) / 2));
  }

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

  .origin-panel {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 1.7rem;
  }

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

  .play-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    padding: 1.7rem;
  }

  .people-content {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
  }

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

  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: max(2rem, calc((100% - var(--content-width)) / 2));
  }
}

@media (min-width: 62rem) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .word-lab {
    display: grid;
    grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1.3fr);
  }

  .word-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

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

  .site-footer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
  }
}

/* Keep the page usable for visitors who zoom or prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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