/* Future Kid — homepage styles. Reference width 1346px (sizes sampled from the mockup). */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-var.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --navy: #070a33;
  --blue: #0a2cfe;
  --blue-dark: #001fc4;
  --link: #0a17ee;
  --lavender: #dacdfb;
  --ivory: #fdf8ef;
  --white: #ffffff;
  --coding: #fedc4a;
  --design: #75c8fa;
  --engineering: #9ae682;
  --robotics: #c29ff9;
  --focus: #0a2cfe;
  --page-pad: 33px;
  --radius-tile: 14px;
  --font: "Nunito", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; font-weight: 900; letter-spacing: -0.015em; line-height: 1.04; }
p { margin: 0; }

a { color: inherit; }

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

[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 34px;
  border: 2px solid var(--navy);
  border-radius: 9px;
  font: 800 1.6875rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.btn--primary {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.btn--primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn--outline { background: var(--white); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--small {
  min-height: 42px;
  padding: 0 24px;
  font-size: 1.4rem;
  border-radius: 10px;
}

/* ---------- Header ---------- */

.site-header { background: var(--white); }
.site-header__inner {
  display: flex;
  align-items: center;
  height: 63px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--page-pad) 0 46px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--navy);
}
.brand__mark { width: 78px; height: auto; }
.brand__word {
  white-space: nowrap;
  font-weight: 900;
  font-size: 2.45rem;
  letter-spacing: -0.01em;
  line-height: 1;
}

.site-nav { margin-left: clamp(32px, 7.1vw, 96px); }
.site-nav ul {
  display: flex;
  gap: clamp(28px, 4.5vw, 61px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  font-weight: 800;
  font-size: 1.53rem;
  text-decoration: none;
}
.site-nav a:hover { color: var(--blue); }

.site-header__cta { margin-left: auto; }

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

.hero {
  position: relative;
  overflow: hidden;
  background: var(--lavender);
  aspect-ratio: 1346 / 434;
  max-height: 560px;
  width: 100%;
}
.hero__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.hero__copy {
  position: relative;
  max-width: 1600px;
  margin: 0 auto;
  /* Positions and sizes scale with the viewport so the copy keeps clear of the robot. */
  padding: clamp(36px, 3.95vw, 54px) 0 0 clamp(28px, 3.42vw, 46px);
}
.hero h1 {
  font-size: clamp(3rem, 5.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
  word-spacing: -0.06em;
}
.hero__lede {
  max-width: 21em;
  margin-top: clamp(10px, 1vw, 16px);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.1vw, 1.8rem);
  line-height: 1.22;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(18px, 1.9vw, 26px);
}
.hero__actions .btn {
  min-height: clamp(44px, 4.55vw, 62px);
  padding: 0 clamp(18px, 1.95vw, 26px);
  font-size: clamp(1rem, 1.84vw, 1.55rem);
}

/* ---------- Shared section layout ---------- */

.learn, .gallery {
  max-width: 1346px;
  margin: 0 auto;
  padding-inline: var(--page-pad);
}
.learn h2, .gallery h2 {
  font-size: clamp(2rem, 4.2vw, 3.55rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ---------- Learning tiles ---------- */

.learn { padding-top: 22px; }
.learn h2 { padding-left: 9px; }

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-tile);
  text-decoration: none;
  color: var(--navy);
  aspect-ratio: 315 / 227;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile--coding { background: var(--coding); }
.tile--design { background: var(--design); }
.tile--engineering { background: var(--engineering); }
.tile--robotics { background: var(--robotics); }
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile__label {
  position: absolute;
  z-index: 1;
  top: clamp(5px, 0.6vw, 8px);
  left: clamp(14px, 1.85vw, 25px);
  font-weight: 900;
  font-size: clamp(1.35rem, 2.75vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 6px 0 rgba(7, 10, 51, .12); }
.tile:focus-visible {
  outline: 4px solid var(--navy);
  outline-offset: 4px;
  border-radius: var(--radius-tile);
}
@media (prefers-reduced-motion: reduce) { .tile:hover { transform: none; } }

/* ---------- Gallery ---------- */

.gallery { padding-top: 27px; padding-bottom: 48px; }
.gallery h2 { font-size: clamp(2rem, 4.4vw, 3.72rem); }
.gallery__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-left: 7px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: 5px;
  color: var(--link);
  font-weight: 800;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--navy); }

.feature {
  display: grid;
  grid-template-columns: 61.7% minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 2.3vw, 31px);
  margin-top: 16px;
}
.feature__img {
  width: 100%;
  aspect-ratio: 788 / 226;
  object-fit: cover;
  border-radius: 14px;
}
.feature h3 {
  font-size: clamp(1.75rem, 3.33vw, 2.85rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
}
.feature__link { margin-top: 10px; }
.feature p {
  margin-top: 8px;
  font-weight: 600;
  font-size: clamp(1.15rem, 1.95vw, 1.65rem);
}

/* ---------- Footer & socials ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.site-footer { background: var(--white); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: 1346px;
  margin: 0 auto;
  padding: 18px var(--page-pad);
}
.site-footer__label { font-weight: 900; font-size: 1.25rem; }
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--navy);
  border-radius: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--navy);
  transition: background-color .15s ease, color .15s ease;
}
.social:hover { background: var(--navy); color: var(--white); }
.social__icon { width: 22px; height: 22px; flex: none; }

/* ---------- Tablet & phone ---------- */

@media (max-width: 1100px) {
  .brand__mark { width: 64px; }
  .brand__word { font-size: 2rem; }
  .site-nav a { font-size: 1.3rem; }
  .btn--small { font-size: 1.2rem; padding: 0 18px; }
}

@media (max-width: 900px) {
  .site-header__inner { padding-left: var(--page-pad); }
  .brand__mark { width: 60px; }
  .brand__word { font-size: 1.9rem; }
  .site-nav { margin-left: auto; }
  .site-nav ul { gap: 24px; }
  .site-nav a { font-size: 1.2rem; }
  .site-header__cta { margin-left: 24px; }
  .btn--small { font-size: 1.15rem; padding: 0 18px; }
  .learn h2, .gallery h2 { font-size: clamp(2rem, 5.6vw, 2.8rem); }
  .feature { grid-template-columns: 1fr; gap: 16px; }
  .feature h3 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
  .feature p { font-size: clamp(1.1rem, 3vw, 1.4rem); }

  .hero {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
  }
  .hero__copy { order: 1; padding: 36px var(--page-pad) 8px; margin: 0; }
  .hero__art { order: 2; }
  .hero__art img {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 760 / 434;
    object-position: right bottom;
  }
  .hero h1 { font-size: clamp(2.5rem, 7.6vw, 3.6rem); }
  .hero__lede { font-size: clamp(1.15rem, 3vw, 1.45rem); }
  .hero__actions .btn { min-height: 50px; font-size: clamp(1.15rem, 2.6vw, 1.35rem); }

  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile__label { font-size: clamp(1.3rem, 4.4vw, 2rem); }
}

@media (max-width: 640px) {
  :root { --page-pad: 18px; }
  .site-header__inner { height: auto; min-height: 63px; flex-wrap: wrap; padding: 10px var(--page-pad) 2px; row-gap: 0; }
  .brand { gap: 8px; }
  .brand__mark { width: 44px; }
  .brand__word { font-size: 1.45rem; }
  .site-header__cta { margin-left: auto; min-height: 44px; padding: 0 14px; font-size: 1.02rem; }
  .site-nav { order: 3; width: 100%; margin-left: 0; }
  .site-nav ul { gap: 24px; }
  .site-nav a { font-size: 1.15rem; }

  .hero h1 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { min-width: 0; width: 100%; }

  .tiles { gap: 10px; }
  .tile { border-radius: 12px; }

  .gallery__head { flex-wrap: wrap; padding-left: 0; }
  .learn h2 { padding-left: 0; }
  .feature { grid-template-columns: 1fr; }
}

@media (max-width: 350px) {
  .site-header__cta { display: none; }
}
