/* GiftedTech — giftedtech.org
 * One family (Atkinson Hyperlegible), deep ink on white, and the AAC
 * colour key (Modified Fitzgerald) used only where it means something:
 * the live board, the logo and word types. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #13294b;
  --ink-soft: #3d4f6e;
  --paper: #ffffff;
  --mist: #eef3f9;
  --action: #1f4f8b;
  --focus: #ffb000;
  --pronoun: #ffe27a;
  --verb: #9fdcb0;
  --describer: #a9cbf2;
  --social: #f7b8cf;
  --line: #c9d5e4;
  --measure: 68ch;
  --step--1: clamp(0.94rem, 0.9rem + 0.15vw, 1rem);
  --step-0: clamp(1.06rem, 1rem + 0.25vw, 1.19rem);
  --step-1: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-2: clamp(1.7rem, 1.4rem + 1.3vw, 2.4rem);
  --step-3: clamp(2.5rem, 1.8rem + 3.4vw, 4.6rem);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

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

a {
  color: var(--action);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(1160px, 100% - 2.5rem);
  margin-inline: auto;
}

h1,
h2,
h3 {
  line-height: 1.12;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 {
  font-size: var(--step-3);
  letter-spacing: -0.02em;
}
h2 {
  font-size: var(--step-2);
  letter-spacing: -0.01em;
}
h3 {
  font-size: var(--step-1);
}
p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.nav {
  display: flex;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  align-items: center;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 0.4rem 0;
}
.nav a:hover {
  text-decoration: underline;
}
.nav .nav-cta {
  color: var(--action);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.3rem;
  border: 2px solid var(--action);
  border-radius: 12px;
  background: var(--paper);
  color: var(--action);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  background: var(--mist);
}
.button.primary {
  background: var(--action);
  color: #fff;
}
.button.primary:hover {
  background: #173d6c;
}
.button.small {
  min-height: 44px;
  padding: 0.4rem 1rem;
}
.button.large {
  min-height: 60px;
  padding: 0.8rem 1.8rem;
  font-size: var(--step-1);
}
.button:disabled {
  opacity: 0.45;
  cursor: default;
}
.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 34em;
}

/* The live board: the one bold thing on the page. */
.demo {
  margin: 0;
  padding: clamp(0.9rem, 2vw, 1.4rem);
  background: var(--mist);
  border: 3px solid var(--ink);
  border-radius: 22px;
}
.demo-message {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  font-size: var(--step-1);
  font-weight: 700;
}
.demo-placeholder {
  color: var(--ink-soft);
  font-weight: 400;
  font-size: var(--step-0);
}
.demo-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.8rem 0;
}
.w {
  aspect-ratio: 1 / 0.92;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border: 2px solid var(--ink);
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  font-size: clamp(1rem, 0.85rem + 0.7vw, 1.35rem);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 80ms ease-out;
}
.w img {
  width: 48%;
  height: auto;
  pointer-events: none;
}
.w:active {
  transform: scale(0.96);
}
.w.pronoun {
  background: var(--pronoun);
}
.w.verb {
  background: var(--verb);
}
.w.describer {
  background: var(--describer);
  border-style: dashed;
}
.demo-controls {
  display: flex;
  gap: 0.6rem;
}
.demo figcaption {
  margin-top: 0.9rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
@media (prefers-reduced-motion: reduce) {
  .w {
    transition: none;
  }
}

/* Sections */
.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.tint {
  background: var(--mist);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.status {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--verb);
  font-weight: 700;
  font-size: var(--step--1);
}
.feature-shot {
  border: 3px solid var(--ink);
  border-radius: 16px;
  display: block;
}
.facts {
  padding-left: 1.2rem;
  margin: 0 0 1.5rem;
  max-width: var(--measure);
}
.facts li {
  margin-bottom: 0.45rem;
}
.facts li::marker {
  color: var(--action);
}

.next-title {
  margin-bottom: 1rem;
}
.next {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  border-top: 2px solid var(--ink);
}
.next li {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) 1fr;
  gap: 0.25rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.next strong {
  font-size: var(--step-0);
}
.next span {
  color: var(--ink-soft);
}
.aside {
  color: var(--ink-soft);
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 2rem 3rem;
  margin: 0;
}
.principles div {
  border-left: 5px solid var(--describer);
  padding-left: 1rem;
}
.principles div:nth-child(3n + 1) {
  border-left-color: var(--pronoun);
}
.principles div:nth-child(3n + 2) {
  border-left-color: var(--verb);
}
.principles dt {
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.2;
  margin-bottom: 0.4rem;
}
.principles dd {
  margin: 0;
  color: var(--ink-soft);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.contact {
  background: var(--ink);
  color: #fff;
}
.contact .lede {
  color: #d7e2f1;
}
.contact .button.primary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.contact .button.primary:hover {
  background: var(--mist);
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: baseline;
}
.footer-row ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.credits {
  flex-basis: 100%;
}

/* Text pages (privacy, accessibility) */
.page {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.page h1 {
  font-size: var(--step-2);
}
.page h2 {
  font-size: var(--step-1);
  margin-top: 2rem;
}
.page ul {
  max-width: var(--measure);
  padding-left: 1.2rem;
}

@media (max-width: 860px) {
  .hero-grid,
  .feature,
  .two-col {
    grid-template-columns: 1fr;
  }
  .next li {
    grid-template-columns: 1fr;
  }
}
