@import url('fonts.css');

/* ==========================================================================
   Tessera Learning — style.css
   Palette and type are taken from the brand kit:
   Ink #17293D · Tessera Teal #0F857A · Gold #C08A2E · Manrope wordmark
   The layout device is "grout": tiles sit on a ground, separated by an even
   gap, the way tesserae sit in a mosaic. Gaps, not borders, do the dividing.
   ========================================================================== */

:root {
  --ink: #17293D;
  --ink-90: #22374d;
  --teal: #0F857A;
  --teal-dark: #0b6b62;
  --gold: #C08A2E;
  --paper: #F4F6F5;
  --tile: #FFFFFF;
  --slate: #56697C;
  --hair: rgba(23, 41, 61, .12);
  --hair-soft: rgba(23, 41, 61, .07);

  --grout: 10px;
  --wrap: 1140px;
  --radius: 3px;

  --sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  --step: clamp(64px, 9vw, 116px);   /* section rhythm */
}

/* ------------------------------------------------------------------ base */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--teal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

#main { scroll-margin-top: 92px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ------------------------------------------------------------ typography */

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 800; letter-spacing: -.028em; margin: 0; }

.h-display { font-size: clamp(38px, 6.4vw, 68px); line-height: 1.04; }
.h-section { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; }
.h-tile    { font-size: 21px; line-height: 1.25; letter-spacing: -.02em; font-weight: 800; }

/* The wordmark sets "Learning" in tracked-out title case. Every label on the
   site borrows that treatment, so the brand shows up in the small type too. */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .34em;
  color: var(--slate);
  margin: 0 0 18px;
}
.eyebrow--teal { color: var(--teal-dark); }

.lede {
  font-family: var(--serif);
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.58;
  color: var(--ink-90);
  font-weight: 400;
  margin: 0;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--slate); }
.small { font-size: 15px; }

/* --------------------------------------------------------------- header */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 246, 245, .88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hair-soft);
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 76px;
}
.brand { display: block; line-height: 0; }
.brand img { width: 168px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 15px; font-weight: 600; color: var(--ink);
  text-decoration: none; padding: 6px 0; position: relative;
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--teal); transform: scaleX(0);
  transform-origin: left; transition: transform .22s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--hair);
  border-radius: var(--radius); padding: 9px 12px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-block; padding: 14px 26px; border-radius: var(--radius);
  background: var(--ink); color: #fff; text-decoration: none;
  font-size: 15px; font-weight: 700; letter-spacing: .01em;
  border: 1px solid var(--ink); cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn-ghost:hover { background: transparent; color: var(--teal-dark); border-color: var(--teal); }

.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--teal); border-color: var(--teal); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* -------------------------------------------------------------- sections */

.section { padding: var(--step) 0; }
.section-hair { border-top: 1px solid var(--hair-soft); }
.section-head { max-width: 660px; margin: 0 0 44px; }
.section-head p { margin-top: 16px; }

/* ------------------------------------------------------------------ hero */

.hero { padding: clamp(48px, 8vw, 92px) 0 clamp(56px, 8vw, 96px); }
.hero-grid {
  display: grid; grid-template-columns: 1fr 300px;
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
.hero h1 { margin-bottom: 26px; }
.hero .lede { max-width: 52ch; }
.hero .btn-row { margin-top: 34px; }

/* Signature: the mark builds itself, tile by tile, on load. */
.field { width: 100%; max-width: 300px; margin-left: auto; }
.field rect { transform-box: fill-box; transform-origin: center; }
.field .ghost rect { fill: var(--ink); opacity: .06; }
.field.build .live rect {
  opacity: 0; transform: scale(.72);
  animation: place .62s cubic-bezier(.2, .8, .25, 1) forwards;
}
.field.build .live rect:nth-child(1) { animation-delay: .10s; }
.field.build .live rect:nth-child(2) { animation-delay: .24s; }
.field.build .live rect:nth-child(3) { animation-delay: .38s; }
.field.build .live rect:nth-child(4) { animation-delay: .52s; }
.field.build .live rect:nth-child(5) { animation-delay: .70s; }

@keyframes place { to { opacity: 1; transform: scale(1); } }

/* ------------------------------------------------------------ tile grid */

.tiles { display: grid; gap: var(--grout); }
.tiles-2 { grid-template-columns: repeat(2, 1fr); }
.tiles-3 { grid-template-columns: repeat(3, 1fr); }

.tile-card {
  background: var(--tile); border-radius: var(--radius);
  padding: 32px 30px 34px; position: relative;
  border-top: 3px solid transparent;
  transition: border-color .22s ease, transform .22s ease;
}
.tile-card:hover { border-top-color: var(--teal); transform: translateY(-2px); }
.tile-card h3 { margin-bottom: 12px; }
.tile-card p { color: var(--slate); font-size: 16px; }

.tile-card-link { text-decoration: none; color: inherit; display: block; }

/* -------------------------------------------------------------- process */
/* Numbered because the order is real: this is the sequence a project runs in. */

.steps { display: grid; gap: var(--grout); grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step {
  background: var(--tile); border-radius: var(--radius); padding: 30px 28px 32px;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-size: 13px; font-weight: 700; letter-spacing: .2em;
  color: var(--teal-dark); margin-bottom: 16px;
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--slate); font-size: 16px; }

/* ------------------------------------------------------------------ band */

.band { background: var(--ink); color: #fff; }
.band a { color: #fff; }
.band .btn-light { color: var(--ink); }        /* keep the button legible: .band a would win otherwise */
.band .btn-light:hover { color: #fff; }
.band .eyebrow { color: rgba(255, 255, 255, .55); }
/* Vertical only — setting the shorthand here would wipe out .wrap's side padding. */
.band-inner { padding-top: clamp(60px, 8vw, 100px); padding-bottom: clamp(60px, 8vw, 100px); }

.statement {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(22px, 3vw, 33px); line-height: 1.42;
  letter-spacing: -.01em; max-width: 21ch; margin: 0;
}
.statement em { font-style: italic; color: #7fd6c9; }

.statement-body { max-width: 46ch; color: rgba(255, 255, 255, .78); font-size: 16.5px; }

.hanzi {
  font-size: 15px; letter-spacing: .3em; color: var(--gold);
  margin: 26px 0 0;
}

.band-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }

/* ------------------------------------------------------------------ prose */

.prose { max-width: 68ch; }
.prose p { font-family: var(--serif); font-size: 18.5px; line-height: 1.72; color: var(--ink-90); }
.prose h2 { font-size: 26px; margin: 52px 0 16px; }
.prose h3 { font-size: 19px; margin: 36px 0 10px; }
.prose ul { padding-left: 20px; margin: 0 0 1.15em; }
.prose li { font-family: var(--serif); font-size: 18.5px; line-height: 1.7; margin-bottom: 8px; color: var(--ink-90); }
.prose .small, .prose .small li { font-family: var(--sans); font-size: 15px; }

.page-head { padding: clamp(52px, 7vw, 86px) 0 0; }
.page-head h1 { max-width: 18ch; }
.page-head .lede { max-width: 58ch; margin-top: 24px; }

/* ------------------------------------------------------------------ facts */

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--grout); }
.fact { background: var(--tile); border-radius: var(--radius); padding: 24px 26px; }
.fact dt { font-size: 12px; letter-spacing: .28em; color: var(--slate); font-weight: 500; margin-bottom: 8px; }
.fact dd { margin: 0; font-size: 17px; font-weight: 600; }

/* ------------------------------------------------------------------ form */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--grout) 20px; }
.field-row { display: flex; flex-direction: column; gap: 8px; }
.field-row.full { grid-column: 1 / -1; }
.field-row .btn { align-self: flex-start; }

label { font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--slate); }

input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--tile); border: 1px solid var(--hair);
  border-radius: var(--radius); padding: 13px 14px; width: 100%;
}
textarea { min-height: 148px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(15, 133, 122, .14); }

.form-note { font-size: 14px; color: var(--slate); margin-top: 16px; }
.form-status { font-size: 15px; margin-top: 14px; color: var(--teal-dark); font-weight: 600; }

/* ---------------------------------------------------------------- footer */

.site-foot { border-top: 1px solid var(--hair); padding: 56px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px 24px; }
.foot-grid img { width: 150px; margin-bottom: 18px; }
.foot-col h4 { font-size: 12px; letter-spacing: .28em; font-weight: 500; color: var(--slate); margin-bottom: 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 9px; }
.foot-col a { font-size: 15px; color: var(--ink); text-decoration: none; }
.foot-col a:hover { color: var(--teal-dark); text-decoration: underline; }
.foot-legal {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--hair-soft);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  font-size: 13.5px; color: var(--slate);
}

/* ---------------------------------------------------------------- reveal */

/* Content is visible by default; only hidden when JavaScript is running to
   run the reveal, so a failed script can never blank the page. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .field { max-width: 190px; margin: 0 0 12px; order: -1; }
  .tiles-3, .steps { grid-template-columns: 1fr 1fr; }
  .band-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16.5px; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 76px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--hair);
    padding: 8px 24px 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--hair-soft); }
  .nav a::after { display: none; }
  .nav-toggle { display: block; }
  .tiles-2, .tiles-3, .steps, .form-grid, .facts { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .statement { max-width: none; }
  .brand img { width: 148px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .field.build .live rect { opacity: 1; transform: none; animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tile-card:hover, .btn:hover { transform: none; }
}
