/* Kindergarten Companion — pre-launch landing page */

:root {
  /* Surfaces */
  --bg: oklch(0.985 0.006 75);
  --surface: #fff;
  --surface-muted: oklch(0.975 0.007 75);
  --navy: oklch(0.24 0.02 235);

  /* Ink */
  --ink: oklch(0.24 0.012 75);
  --ink-body: oklch(0.34 0.014 75);
  --ink-card: oklch(0.3 0.014 75);
  --ink-footer: oklch(0.35 0.014 75);
  --muted: oklch(0.42 0.015 75);
  --muted-note: oklch(0.45 0.015 75);
  --subtle: oklch(0.52 0.015 75);
  --placeholder: oklch(0.62 0.012 75);
  --on-navy: oklch(0.86 0.02 235);
  --on-navy-muted: oklch(0.75 0.03 235);

  /* Brand */
  --accent: oklch(0.55 0.09 235);
  --accent-hover: oklch(0.48 0.09 235);
  --accent-strong: oklch(0.5 0.09 235);
  --link-hover: oklch(0.45 0.09 235);
  --accent-tint: oklch(0.95 0.025 235);
  --orange: oklch(0.64 0.16 62);
  --success: oklch(0.61 0.16 148);
  --error: oklch(0.56 0.19 28);
  --error-on-navy: oklch(0.75 0.14 28);

  /* Lines */
  --line: oklch(0.93 0.008 75);
  --line-card: oklch(0.9 0.008 75);
  --line-field: oklch(0.88 0.008 75);

  /* Type */
  --font-display: "Fredoka", ui-rounded, "Nunito Sans", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-script: "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --gutter: 24px;
  --content: 1120px;
}

/* sRGB equivalents for browsers without oklch() (Safari < 15.4, Chrome < 111, Firefox < 113) */
@supports not (color: oklch(0 0 0)) {
  :root {
    --bg: #fdfaf6;
    --surface-muted: #faf6f2;
    --navy: #162127;
    --ink: #231f19;
    --ink-body: #3c3730;
    --ink-card: #322d26;
    --ink-footer: #3f3a33;
    --muted: #524c44;
    --muted-note: #5a544c;
    --subtle: #6e6860;
    --placeholder: #8a857e;
    --on-navy: #c5d3dc;
    --on-navy-muted: #9cb1bf;
    --accent: #347a9f;
    --accent-hover: #1c6589;
    --accent-strong: #236b8f;
    --link-hover: #0f5c80;
    --accent-tint: #dff2fd;
    --orange: #cf7100;
    --success: #279c47;
    --error: #cc342d;
    --error-on-navy: #fa897b;
    --line: #ebe7e2;
    --line-card: #e1ddd8;
    --line-field: #dbd7d2;
  }
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

h1, h2, h3, p, ul, ol {
  margin: 0;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--link-hover);
}

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

/* Success panels receive focus programmatically; they shouldn't draw a ring */
[tabindex="-1"]:focus {
  outline: none;
}

input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

strong {
  font-weight: 700;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--content);
  margin: 0 auto;
}

/* ---------- Accessibility helpers ---------- */

.skip-link,
.motion-toggle {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font: 700 15px/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transform: translateY(-200%);
}

.skip-link:hover {
  color: #fff;
}

.skip-link:focus,
.motion-toggle:focus {
  transform: none;
}

/* ---------- Buttons & fields ---------- */

.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn:disabled {
  cursor: progress;
  background: var(--accent-hover);
}

.btn--nav {
  padding: 12px 22px;
  font-size: 15px;
}

.btn--submit {
  padding: 15px 26px;
  font-size: 16px;
}

.field {
  flex: 1;
  min-width: 220px;
  padding: 15px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-field);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.field[aria-invalid="true"] {
  border-color: var(--error);
}

.field[aria-invalid="true"]:focus {
  border-color: var(--accent);
}

/* ---------- Logo mark ---------- */

.mark-blue {
  fill: var(--accent);
}

.mark-orange {
  fill: var(--orange);
}

/* ---------- Nav ---------- */

.site-header {
  padding: 20px var(--gutter);
}

.site-header__inner {
  max-width: var(--content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.15;
  white-space: nowrap;
}

/* ---------- Hero ---------- */

.hero {
  padding: 80px var(--gutter) 96px;
}

.hero__grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 56px;
  align-items: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}

.eyebrow {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin-bottom: 28px;
  text-wrap: balance;
}

.hero__lede {
  font-size: 21px;
  line-height: 33px;
  color: var(--ink-body);
  margin-bottom: 48px;
  max-width: 620px;
  text-wrap: pretty;
}

/* ---------- Signup ---------- */

.signup {
  width: 100%;
}

.signup--hero {
  max-width: 560px;
  scroll-margin-top: 24px;
}

.signup__label {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.signup__form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.signup__error {
  font-size: 15px;
  font-weight: 600;
  color: var(--error);
  margin-top: 12px;
}

.signup__error:empty {
  margin-top: 0;
}

.signup__note {
  font-size: 15px;
  line-height: 24px;
  color: var(--muted-note);
  margin-top: 14px;
}

.success {
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  text-align: left;
}

.signup--hero .success {
  border: 1px solid var(--line-card);
}

.success__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.success__check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--ink);
}

.success__body {
  font-size: 16px;
  line-height: 26px;
  color: var(--ink-body);
  margin-bottom: 16px;
}

.tip {
  border-radius: 16px;
  background: var(--accent-tint);
  padding: 18px 20px;
}

.tip__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 8px;
}

.tip__text {
  font-size: 16px;
  line-height: 26px;
  color: var(--ink-card);
  text-wrap: pretty;
}

.tip__text + .tip__text {
  margin-top: 10px;
}

/* ---------- Marquees ---------- */

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.motion-paused .marquee-track {
  animation-play-state: paused !important;
}

.screens {
  min-width: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  padding: 20px 0 28px;
}

.screens__track {
  animation: marquee 48s linear infinite;
}

.screens__shot {
  width: 240px;
  height: 430px;
  flex-shrink: 0;
  margin-right: 20px;
  object-fit: cover;
  object-position: top;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line-card);
  box-shadow: 0 16px 32px -16px rgba(52, 45, 35, 0.25);
  box-shadow: 0 16px 32px -16px oklch(0.3 0.02 75 / 0.25);
}

.moments {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  padding-bottom: 12px;
}

.moments__track {
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 70s linear infinite;
}

.moments.is-paused .moments__track {
  animation-play-state: paused;
}

.moments.is-hovered .moments__track {
  animation-play-state: paused;
}

.moment {
  flex: 0 0 290px;
  width: 290px;
  margin-right: 14px;
  background: #fff;
  border: 1px solid var(--line-card);
  border-radius: 20px;
  padding: 24px;
}

.moment__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.moment__text {
  font-size: 16px;
  line-height: 26px;
  color: var(--ink-card);
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none !important;
  }

  /* Without the animation, let the cards be scrolled by hand instead */
  .moments {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
    scroll-snap-type: x proximity;
  }

  .moment {
    scroll-snap-align: start;
  }

  .moment--clone {
    display: none;
  }

  .motion-toggle {
    display: none;
  }
}

/* ---------- Sections ---------- */

.band {
  padding: 72px var(--gutter);
}

.band--white {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.problem {
  padding: 88px var(--gutter) 72px;
}

.statement {
  max-width: 820px;
  margin: 0 auto 72px;
  text-align: center;
}

.statement__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.018em;
  text-wrap: balance;
  margin-bottom: 16px;
}

.statement__sub {
  font-size: 22px;
  line-height: 34px;
  font-weight: 700;
  color: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}

.section-title--tight {
  margin-bottom: 8px;
}

.section-title--balance {
  text-wrap: balance;
}

.section-intro {
  font-size: 18px;
  line-height: 30px;
  color: var(--muted);
  margin-bottom: 28px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--surface-muted);
  border-radius: 20px;
  padding: 28px;
}

.card__step {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 16px;
}

.card__title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 8px;
}

.card__body {
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- Subjects ---------- */

.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subject {
  background: var(--subject-bg);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subject--reading { --subject-bg: oklch(0.97 0.028 275); --subject-dot: oklch(0.61 0.19 275); --subject-ink: oklch(0.42 0.16 275); }
.subject--math    { --subject-bg: oklch(0.97 0.03 200);  --subject-dot: oklch(0.61 0.12 200); --subject-ink: oklch(0.42 0.1 200); }
.subject--art     { --subject-bg: oklch(0.97 0.032 148); --subject-dot: oklch(0.61 0.16 148); --subject-ink: oklch(0.42 0.13 148); }
.subject--science { --subject-bg: oklch(0.97 0.035 82);  --subject-dot: oklch(0.61 0.14 82);  --subject-ink: oklch(0.42 0.11 82); }

@supports not (color: oklch(0 0 0)) {
  .subject--reading { --subject-bg: #eff4ff; --subject-dot: #6672f2; --subject-ink: #383da2; }
  .subject--math    { --subject-bg: #dffcfd; --subject-dot: #00989f; --subject-ink: #005c62; }
  .subject--art     { --subject-bg: #e7fce9; --subject-dot: #279c47; --subject-ink: #005f1d; }
  .subject--science { --subject-bg: #fff3db; --subject-dot: #ac7900; --subject-ink: #6a4500; }
}

.subject__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--subject-ink);
}

.subject__name::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--subject-dot);
  flex-shrink: 0;
}

.subject__desc {
  font-size: 16px;
  line-height: 25px;
  color: var(--ink-card);
  text-wrap: pretty;
}

.subject__topics {
  font-size: 13px;
  line-height: 20px;
  color: var(--subject-ink);
  margin-top: auto;
}

/* ---------- Founder note ---------- */

.founder {
  max-width: 580px;
  margin: 0 auto;
}

.founder__head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.founder__photo {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

.founder__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-tint);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1;
}

.founder__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.01em;
}

.founder > p,
.founder__list li {
  font-size: 18px;
  line-height: 30px;
  color: var(--ink-body);
}

.founder > p {
  margin-bottom: 18px;
  text-wrap: pretty;
}

.founder > .founder__lead-in {
  margin-bottom: 12px;
}

.founder__list {
  margin: 0 0 18px;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.founder > .founder__last {
  margin-bottom: 24px;
}

.founder > .founder__signature {
  font-family: var(--font-script);
  font-weight: 600;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 0;
}

.founder > .founder__role {
  font-size: 14px;
  line-height: normal;
  color: var(--subtle);
  margin: 6px 0 0;
}

/* ---------- Closing capture ---------- */

.band--closing {
  padding: 72px var(--gutter) 88px;
}

.closing {
  max-width: var(--content);
  margin: 0 auto;
  background: var(--navy);
  border-radius: 28px;
  padding: 64px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.closing__mark {
  margin-bottom: 20px;
}

.closing__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.018em;
  color: #fff;
  margin-bottom: 12px;
}

.closing__body {
  font-size: 18px;
  line-height: 30px;
  color: var(--on-navy);
  max-width: 480px;
  text-wrap: pretty;
  margin-bottom: 32px;
}

.signup--closing {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.signup--closing [data-signup-form] {
  width: 100%;
  max-width: 520px;
}

.signup--closing .signup__form {
  justify-content: center;
}

.signup--closing .field {
  border: 0;
}

.signup--closing .field:focus {
  box-shadow: 0 0 0 3px var(--accent);
  outline-color: transparent;
}

.signup--closing .field[aria-invalid="true"] {
  box-shadow: 0 0 0 2px var(--error-on-navy);
}

.signup--closing .field[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 2px var(--error-on-navy), 0 0 0 5px var(--accent);
}

.signup--closing .signup__error {
  color: var(--error-on-navy);
}

.signup--closing .signup__note {
  color: var(--on-navy-muted);
}

.signup--closing .success {
  max-width: 560px;
}

.closing :focus-visible {
  outline-color: #fff;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--gutter) 56px;
  margin-top: auto;
}

.site-footer__inner {
  max-width: var(--content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-footer__brand svg {
  flex-shrink: 0;
}

.site-footer__tagline {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-footer);
}

.site-footer__sub {
  font-size: 13px;
  color: var(--subtle);
  margin-top: 2px;
}

.site-footer__links {
  display: flex;
  gap: 20px;
  font-size: 14px;
  font-weight: 600;
}

.site-footer__links a {
  text-decoration: none;
}

/* ---------- Forced colors ---------- */

/* Box-shadows and backgrounds are dropped in forced-colors mode; give fields and buttons a visible edge */
@media (forced-colors: active) {
  .signup--closing .field,
  .btn {
    border: 1px solid CanvasText;
  }
}
