/* EduFL company site
   Palette: ink #17154A, indigo #4F46E5, cyan #06B6D4, paper #F6F7FB, coral #D9482B (absent marks only)
   Type: Bricolage Grotesque (headings), Instrument Sans (text) */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #17154a;
  --ink-soft: #4a4878;
  --indigo: #4f46e5;
  --cyan: #06b6d4;
  --paper: #f6f7fb;
  --white: #ffffff;
  --coral: #d9482b;
  --rule: rgba(23, 21, 74, 0.14);
  --ruling: rgba(6, 182, 212, 0.28);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1160px;
}

*, *::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: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

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

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; margin: 0; }
h1 { font-size: clamp(2.4rem, 4.8vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); max-width: 18ch; }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }
.lede { font-size: 1.1875rem; color: var(--ink-soft); max-width: 52ch; }

/* ── Header ─────────────────────────────────────────────── */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; gap: 28px; }
.brand { display: block; height: 52px; margin-right: auto; }
.brand img { height: 100%; width: auto; }
.nav { display: flex; gap: 26px; }
.nav a { text-decoration: none; font-weight: 500; padding: 8px 0; }
.nav a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.signin { font-weight: 600; text-decoration: none; padding: 10px 16px; border: 1.5px solid var(--ink); border-radius: 10px; }
.signin:hover { background: var(--ink); color: var(--white); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font: 600 1rem/1 var(--text);
  text-decoration: none; cursor: pointer;
  border: 0; border-radius: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(100deg, var(--indigo), var(--cyan)); color: var(--white); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(79, 70, 229, 0.32); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-cyan { background: var(--cyan); color: var(--ink); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: clamp(36px, 6vw, 84px) 0 clamp(56px, 8vw, 110px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* The register: a school attendance sheet you can mark */
.register {
  position: relative;
  background: var(--white);
  border-radius: 14px;
  padding: 22px 22px 18px 38px;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -18px rgba(23, 21, 74, 0.35);
}
.register::before { /* margin rule, as in a school notebook */
  content: ""; position: absolute; top: 0; bottom: 0; left: 24px; width: 2px;
  background: rgba(217, 72, 43, 0.55);
}
.register-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; }
.register-head h2 { font-size: 1.35rem; max-width: none; letter-spacing: -0.015em; }
.register-head span { color: var(--ink-soft); font-size: 0.9rem; }
.register table { width: 100%; border-collapse: collapse; background: transparent; }
.register th, .register td { border-bottom: 1px solid var(--ruling); }
.register th { font-weight: 500; font-size: 0.82rem; color: var(--ink-soft); text-align: center; height: 44px; padding: 0; }
.register th:first-child, .register td:first-child { text-align: left; }
.register td { height: 48px; padding: 0; text-align: center; font-size: 0.98rem; }
.register td:first-child { font-weight: 500; padding-right: 8px; white-space: nowrap; }
.register .today { background: rgba(79, 70, 229, 0.07); }
.register th.today { color: var(--indigo); font-weight: 700; }
.register .week { font-variant-numeric: tabular-nums; font-weight: 600; width: 52px; }

.mark {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 0.8rem; font-weight: 700; line-height: 1;
}
.mark.p { background: var(--ink); color: var(--white); }
.mark.a { background: transparent; color: var(--coral); box-shadow: inset 0 0 0 2px var(--coral); }
.mark svg { width: 14px; height: 14px; }

.toggle {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  width: 44px; height: 44px; border-radius: 10px; padding: 0; color: inherit;
  display: inline-grid; place-items: center;
}
.toggle:hover { background: rgba(79, 70, 229, 0.12); }
.toggle .mark { transition: transform 0.15s ease; }
.toggle:active .mark { transform: scale(0.88); }

.register-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; flex-wrap: wrap; }
.tally { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.tally small { font: 400 0.9rem var(--text); color: var(--ink-soft); margin-left: 6px; }
.link-btn { appearance: none; border: 0; background: none; font: 600 0.92rem var(--text); color: var(--indigo); cursor: pointer; padding: 10px 4px; text-decoration: underline; text-underline-offset: 4px; }

/* The one entrance: past days stamp in, row by row */
@media (prefers-reduced-motion: no-preference) {
  .register .stamp { animation: stamp 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; animation-delay: calc(var(--i) * 30ms + 200ms); }
  .registered .register .stamp { animation: none; }
  @keyframes stamp { from { opacity: 0; transform: scale(1.8) rotate(-12deg); } to { opacity: 1; transform: none; } }
}

/* ── Sections ───────────────────────────────────────────── */
.section { padding: clamp(56px, 8vw, 112px) 0; }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 5vw, 56px); }

/* Your school, under your own name: three addresses */
.addresses { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.address {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 40px; align-items: center;
  background: var(--white); border-radius: 14px; padding: 20px 26px;
  box-shadow: 0 1px 0 var(--rule);
}
.address .where { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 2.2vw, 1.55rem); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.address .where svg { flex: none; width: 26px; height: 26px; color: var(--indigo); }
.address p { color: var(--ink-soft); }
.addresses-note { margin-top: 22px; color: var(--ink-soft); max-width: 62ch; }

/* Modules: a ledger, not a card grid */
.modules { margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 96px); }
.modules > div { border-top: 1.5px solid var(--rule); padding: 20px 0 22px; }
.modules dt { font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.015em; }
.modules dd { margin: 4px 0 0; color: var(--ink-soft); max-width: 46ch; }
.modules-note { margin-top: 28px; padding-top: 22px; border-top: 1.5px solid var(--ink); font-weight: 500; max-width: 62ch; }

/* How it works: a real sequence, so it is numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font: 800 3rem/1 var(--display); letter-spacing: -0.04em; color: var(--indigo); margin-bottom: 12px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--ink-soft); }

/* Demo band */
.demo { background: var(--ink); color: var(--white); }
.demo .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 40px; align-items: center; }
.demo h2 { max-width: 16ch; }
.demo p { color: rgba(255, 255, 255, 0.78); margin-top: 16px; max-width: 52ch; }
.demo .roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.demo .roles li { border-top: 1px solid rgba(255, 255, 255, 0.25); padding-top: 12px; }
.demo .roles b { font-family: var(--display); font-size: 1.1rem; letter-spacing: -0.01em; }
.demo .roles span { display: block; color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }
.demo .hero-actions { margin-top: 28px; }

/* Contact */
.contact .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact .lede { margin-top: 18px; }
.phone { display: inline-block; margin-top: 26px; font: 700 1.6rem/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.phone:hover { text-decoration: underline; text-underline-offset: 6px; }
.form { display: grid; gap: 16px; background: var(--white); padding: clamp(20px, 3vw, 32px); border-radius: 16px; box-shadow: 0 1px 0 var(--rule); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field textarea {
  font: inherit; color: inherit; width: 100%;
  padding: 12px 14px; border: 1.5px solid rgba(23, 21, 74, 0.28); border-radius: 10px; background: var(--paper);
}
.field input:focus, .field textarea:focus { outline: 3px solid rgba(79, 70, 229, 0.4); outline-offset: 0; border-color: var(--indigo); }
.field textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 0.92rem; color: var(--ink-soft); }

/* Footer */
.site-footer { padding: 36px 0 48px; border-top: 1.5px solid var(--rule); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: 0.95rem; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { color: var(--ink); }

/* Legal pages */
.legal { padding: clamp(32px, 5vw, 64px) 0 clamp(56px, 8vw, 100px); }
.legal .wrap { max-width: calc(760px + var(--gutter) * 2); }
.legal h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); max-width: none; }
.legal .updated { color: var(--ink-soft); margin: 12px 0 36px; }
.legal h2 { font-size: 1.45rem; max-width: none; margin: 38px 0 10px; letter-spacing: -0.02em; }
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 1.2em; margin: 10px 0; }
.legal li { margin: 6px 0; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero .wrap, .demo .wrap, .contact .wrap { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .modules { grid-template-columns: 1fr; }
  .address { grid-template-columns: 1fr; padding: 18px 20px; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .register { padding: 18px 12px 14px 30px; }
  .register::before { left: 18px; }
  .register th, .register td { font-size: 0.78rem; }
  .register td:first-child { font-size: 0.9rem; }
  .register .week { width: 40px; }
  .site-header .wrap { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .toggle .mark { transition: none; }
}
