/* =========================================================
   Youth Chess Initiative — shared styles
   Minimalist · geometric · typography-forward
   ========================================================= */

:root {
  --bg:        #ffffff;
  --paper:     #f4f7fb;   /* light section background */
  --ink:       #14181f;   /* near-black text & knight  */
  --ink-soft:  #4a525e;   /* secondary text            */
  --slate:     #1c2128;   /* dark sections / footer     */
  --blue:      #c9ddf2;   /* logo pale blue             */
  --blue-soft: #e8f1fb;
  --blue-mid:  #6fa0d4;   /* underlines / accents       */
  --blue-edge: #a4c6ea;   /* button borders             */
  --blue-deep: #2f5d92;   /* text links                 */
  --line:      #e3e8ef;   /* hairlines                  */
  --line-dark: #333a44;

  --maxw: 1080px;
  --radius: 4px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; color: var(--ink-soft); }
a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--blue-deep);
  margin-bottom: 1rem;
}
.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 56ch; }

/* ---------- checkerboard accent strip ---------- */
.board-strip {
  height: 10px;
  background-image:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%),
    linear-gradient(-45deg, var(--ink) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--ink) 75%),
    linear-gradient(-45deg, transparent 75%, var(--ink) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  opacity: .9;
}

/* ---------- navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img, .brand svg { width: 40px; height: 40px; display: block; }
.brand__name {
  font-family: var(--serif); font-size: 1.15rem; color: var(--ink);
  line-height: 1.05; letter-spacing: -0.01em;
}
.brand__name small { display: block; font-family: var(--sans); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.nav a:hover { text-decoration: none; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a:not(.btn) {
  color: var(--ink-soft); font-size: .76rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .15em; white-space: nowrap;
  position: relative; padding: 6px 1px; transition: color .15s ease;
}
.nav__links a:not(.btn):hover { color: var(--ink); text-decoration: none; }
.nav__links a:not(.btn).active { color: var(--ink); }
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; border-radius: 2px;
  background: var(--blue-mid); transform: scaleX(0); transform-origin: left; transition: transform .18s ease;
}
.nav__links a:not(.btn):hover::after,
.nav__links a:not(.btn).active::after { transform: scaleX(1); }
.nav__toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: .98rem;
  padding: 13px 26px; border-radius: 7px;
  background: var(--blue); color: var(--ink); border: 1.5px solid var(--blue-edge);
  cursor: pointer; transition: all .16s ease; text-decoration: none;
  box-shadow: 0 2px 10px -3px rgba(47,93,146,.30);
}
.btn:hover {
  background: #b6d4f1; border-color: #88b2df; color: var(--ink);
  box-shadow: 0 5px 16px -4px rgba(47,93,146,.42); transform: translateY(-1px); text-decoration: none;
}
.btn--outline { background: transparent; color: var(--ink); border-color: #cdd8e6; box-shadow: none; }
.btn--outline:hover { background: var(--blue-soft); border-color: var(--blue-edge); color: var(--ink); transform: none; box-shadow: none; }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; border-radius: 8px; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- sections ---------- */
section { padding: 88px 0; }
.section--paper { background: var(--paper); }
.section--slate { background: var(--slate); color: #e7ecf3; }
.section--slate h2, .section--slate h3 { color: #fff; }
.section--slate p { color: #aeb8c6; }

/* ---------- hero ---------- */
.hero { padding: 96px 0 80px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero__badge { display: flex; justify-content: center; }
.hero__badge svg, .hero__badge img { width: 100%; max-width: 340px; height: auto; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero__meta { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero__meta div { border-left: 2px solid var(--blue); padding-left: 14px; }
.hero__meta b { font-family: var(--serif); font-size: 1.5rem; display: block; color: var(--ink); }
.hero__meta span { font-size: .82rem; color: var(--ink-soft); }

/* ---------- feature grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px;
}
.card .num { font-family: var(--serif); font-size: 1.1rem; color: var(--blue-deep); border: 1.5px solid var(--blue); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 16px; }
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; font-size: .96rem; }

/* ---------- QR block ---------- */
.qr-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.qr-card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 28px; text-align: center; max-width: 320px; margin: 0 auto;
  box-shadow: 0 18px 50px -28px rgba(20,24,31,.4);
}
.qr-card img { width: 100%; max-width: 240px; height: auto; display: block; margin: 0 auto 14px; }
.qr-card .qr-label { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }

/* ---------- form ---------- */
.form-wrap { max-width: 620px; margin: 0 auto; }
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 40px; box-shadow: 0 24px 60px -38px rgba(20,24,31,.45);
}
.fieldset { border: 0; padding: 0; margin: 0 0 26px; }
.fieldset legend {
  font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue-deep); margin-bottom: 16px; width: 100%;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field select {
  width: 100%; padding: 12px 14px; font-size: 1rem; font-family: var(--sans);
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
  transition: border-color .15s ease;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--blue-deep); }
.field .hint { font-size: .8rem; color: var(--ink-soft); margin-top: 5px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.child-block { border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; position: relative; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); margin: 8px 0 22px; }
.consent input { margin-top: 4px; }
.form-note { font-size: .82rem; color: var(--ink-soft); text-align: center; margin-top: 16px; }
.linklike { background: none; border: 0; color: var(--blue-deep); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

.form-msg { display: none; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 22px; font-size: .95rem; }
.form-msg--ok { display: block; background: #e9f6ee; border: 1px solid #b6e0c4; color: #1f6b3b; }
.form-msg--err { display: block; background: #fdecec; border: 1px solid #f3c2c2; color: #99312f; }

/* ---------- about / stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 26px 14px; border: 1px solid var(--line-dark); border-radius: var(--radius); }
.section--slate .stat b { font-family: var(--serif); font-size: clamp(2rem,4vw,2.8rem); color: #fff; display: block; }
.section--slate .stat span { font-size: .82rem; letter-spacing: .04em; color: #aeb8c6; }
.profile { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
.profile__photo {
  aspect-ratio: 1/1; border-radius: 8px; background: var(--blue-soft);
  display: grid; place-items: center; border: 1px solid var(--line); overflow: hidden;
}
.profile__photo img { width: 100%; height: 100%; object-fit: cover; }
.profile__photo .ph { font-family: var(--serif); font-size: 4rem; color: var(--blue-deep); }
.timeline { list-style: none; padding: 0; margin: 18px 0 0; }
.timeline li { padding: 0 0 16px 22px; border-left: 2px solid var(--blue); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-deep); }
.timeline b { color: var(--ink); }

/* ---------- coming soon ---------- */
.coming { text-align: center; max-width: 640px; margin: 0 auto; }
.coming .icon { font-size: 3rem; margin-bottom: 12px; }

/* ---------- footer ---------- */
.footer { background: var(--slate); color: #aeb8c6; padding: 56px 0 30px; }
.footer__grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.footer .brand__name { color: #fff; }
.footer a { color: #cdd6e2; }
.footer__links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer__bottom { border-top: 1px solid var(--line-dark); margin-top: 36px; padding-top: 20px; font-size: .82rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.muted { color: var(--ink-soft); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__badge { order: -1; }
  .grid-3 { grid-template-columns: 1fr; }
  .qr-wrap { grid-template-columns: 1fr; gap: 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .profile { grid-template-columns: 1fr; }
  .profile__photo { max-width: 260px; }
  .nav__links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); padding: 8px 24px 16px; }
  .nav__links.open { display: flex; }
  .nav__links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links .btn { margin-top: 10px; }
  .nav__toggle { display: block; }
  section { padding: 60px 0; }
  .form-card { padding: 26px; }
  .row-2 { grid-template-columns: 1fr; }
}
