/**
 * @file home.css
 * @description Presentation for the Semester homepage — the brand surface, distinct from
 *              app.css which dresses the dashboard. Shares the cardinal palette and the
 *              hairline-rule language so the two read as one product, and departs on
 *              typography and scale because this page has eight seconds to earn a sign-in.
 *
 * @status Active
 * @issues None
 * @todo None
 */

/* Design plan.
 *
 * Color — Committed, but by SCALE rather than by wash. Cardinal carries the page through
 * the term ruler, one oversized figure per section, the rules and the CTA, while the
 * ground stays paper. PRODUCT.md bans a Razorback red wash outright ("a school-week tool
 * that happens to include games, not a fan app"), so a drenched hero is off the table;
 * the commitment shows up as size instead of area.
 *
 * Type — Archivo, one variable family, wght 400-700 and wdth 62-125. Chosen for the
 * physical object this page imitates: a registrar's printed term calendar and the
 * signage in a campus building. The width axis is the reason — display sizes run
 * expanded, which reads institutional rather than start-up. Tabular figures everywhere,
 * because almost every number on this page is a date or a count.
 *
 * Layout — a wall planner. Full-bleed term ruler, hairline-ruled sections, left-aligned
 * on a strict grid. No cards anywhere, matching the dashboard's own rule. */

:root {
  --paper: oklch(98.8% 0.004 30);
  --paper-sunk: oklch(96.6% 0.006 30);
  --rule: oklch(90.5% 0.008 30);
  --rule-firm: oklch(83% 0.010 30);

  --ink: oklch(23% 0.014 262);
  --ink-2: oklch(46% 0.011 262);
  --ink-3: oklch(62% 0.009 262);

  --brand: oklch(42% 0.145 22);
  --brand-hi: oklch(37% 0.145 22);
  --brand-soft: oklch(95.5% 0.022 22);

  --classes: oklch(48% 0.128 255);
  --blackboard: oklch(58% 0.145 62);
  --athletics: oklch(49% 0.17 20);
  --orgs: oklch(52% 0.095 195);
  --greek: oklch(50% 0.115 300);

  --shell: min(1120px, 100% - 2 * var(--gutter));
  --gutter: clamp(20px, 5vw, 56px);

  --t-label: 0.6875rem;
  --t-sm: 0.875rem;
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --t-lead: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --t-h3: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
  --t-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --t-h1: clamp(2.75rem, 1.6rem + 5.2vw, 6rem);
  --t-figure: clamp(2.5rem, 1.6rem + 4vw, 4.75rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Same guard as app.css: a component that sets its own `display` otherwise outranks the
   UA's `[hidden] { display: none }` and stays visible while the DOM says it is hidden. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }

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

.shell { width: var(--shell); margin-inline: auto; }

/* Uppercase kickers are used once per section as a structural label, the way a printed
   schedule labels a column. Not repeated inside sections. */
.label {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 13px 22px;
  font: inherit;
  font-size: var(--t-sm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}

.btn-primary { background: var(--brand); color: var(--paper); }

/* Sign in with Google has its own branding rules: the G keeps its four colours and the
   button takes one of three sanctioned fills. The crimson button with a white monochrome
   G was a guideline violation and a real verification risk, so these two CTAs opt out of
   the brand palette. */
/* Google's dark variant (#131314 fill, #8E918F stroke) — one of the three sanctioned
   fills, and the one that keeps the primary CTA visually primary against a light page.
   The white variant made it indistinguishable from the secondary button beside it. */
.btn-google { background: #131314; color: #E3E3E3; border: 1px solid #8E918F; }
.btn-google:hover { background: #2a2a2b; }
.btn-primary:hover { background: var(--brand-hi); }

.btn-quiet { background: none; color: var(--ink); border-color: var(--rule-firm); }
.btn-quiet:hover { background: var(--paper-sunk); border-color: var(--ink-3); }

.g-mark { width: 18px; height: 18px; flex: none; }
.wordmark img { width: 24px; height: 24px; border-radius: 6px; vertical-align: -6px; margin-right: 8px; }
.hero-sub { margin: 0 0 1.1rem; font-size: 1.05rem; line-height: 1.45; color: var(--ink-2); }
.trust-purpose { margin: 0 0 1.6rem; max-width: 62ch; line-height: 1.6; color: var(--ink-2); }
.trust-purpose code { font-size: .82em; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------------- masthead */

.masthead {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
  /* Solid, not a blur. A translucent bar is decorative glassmorphism, and on a page
     whose whole language is hairlines on paper it reads as borrowed from somewhere else. */
  background: var(--paper);
}

.masthead-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
}

.wordmark {
  font-size: 1.0625rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  color: var(--brand);
  text-decoration: none;
}

.masthead nav { display: flex; align-items: center; gap: 8px; }

.nav-link {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 6px;
}

.nav-link:hover { color: var(--ink); background: var(--paper-sunk); }

@media (max-width: 620px) { .nav-link.is-optional { display: none; } }

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

.hero { padding: clamp(52px, 9vw, 108px) 0 0; }

.hero h1 {
  font-size: var(--t-h1);
  font-stretch: 118%;
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 15ch;
  margin-bottom: 22px;
}

/* The one word the whole page turns on. Cardinal earns its scale here rather than in a
   background wash. */
.hero h1 em { font-style: normal; color: var(--brand); }

.hero-lead {
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
  margin-bottom: 30px;
}

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.hero-note {
  margin-top: 16px;
  font-size: var(--t-sm);
  color: var(--ink-3);
  max-width: 52ch;
}

/* --------------------------------------------------------------------- term ruler */

/* The dashboard's signature element, at poster scale. It is the honest hero: the real
   Fall 2026 registrar dates, with breaks as literal gaps and today where today is. */
.termline { padding: clamp(46px, 8vw, 88px) 0 clamp(38px, 6vw, 64px); }

.termline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.termline-term {
  font-size: var(--t-h3);
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: -0.02em;
}

.ruler {
  position: relative;
  height: 74px;
  border-top: 1px solid var(--rule-firm);
  border-bottom: 1px solid var(--rule-firm);
}

.ruler-track {
  position: absolute;
  inset: 34px 0 auto;
  height: 6px;
  background: var(--rule);
  border-radius: 3px;
}

.ruler-elapsed {
  position: absolute;
  inset: 34px auto auto 0;
  height: 6px;
  width: 0;
  background: var(--brand);
  border-radius: 3px;
  transition: width 1200ms var(--ease);
}

.ruler-break {
  position: absolute;
  top: 30px;
  height: 14px;
  background: var(--paper);
  border-left: 1px solid var(--rule-firm);
  border-right: 1px solid var(--rule-firm);
}

.ruler-today {
  position: absolute;
  top: 18px;
  width: 2px;
  height: 38px;
  background: var(--brand);
  transform: translateX(-1px);
}

.ruler-today span {
  position: absolute;
  top: -19px;
  left: 0;
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  white-space: nowrap;
}

.ruler-ends {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  font-size: var(--t-sm);
  color: var(--ink-3);
}

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

.band { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--rule); }

.band-head { margin-bottom: clamp(28px, 4vw, 44px); }

.band-head h2 {
  font-size: var(--t-h2);
  font-stretch: 110%;
  letter-spacing: -0.028em;
  margin: 12px 0 0;
  max-width: 20ch;
}

.band-head p {
  margin-top: 14px;
  color: var(--ink-2);
  max-width: 58ch;
}

/* ----------------------------------------------------------------- source ledger */

/* Rows, not cards: the dashboard renders its sources as a ruled list and so does this. */
.ledger { border-top: 1px solid var(--rule-firm); }

.ledger-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 15ch) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: clamp(12px, 2.5vw, 28px);
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.ledger-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  align-self: center;
}

.ledger-name { font-weight: 600; font-size: var(--t-h3); letter-spacing: -0.015em; }
/* Capped: the grid column is wide enough to run past 90 characters, which is well
   over a comfortable measure. */
.ledger-what { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.55; max-width: 62ch; }

.ledger-count {
  font-size: var(--t-sm);
  color: var(--ink-3);
  white-space: nowrap;
  text-align: right;
}

.ledger-count b { display: block; font-size: 1.5rem; font-weight: 600; color: var(--ink); line-height: 1.1; }

@media (max-width: 720px) {
  .ledger-row {
    grid-template-columns: 14px minmax(0, 1fr) auto;
    row-gap: 6px;
  }
  .ledger-what { grid-column: 2 / -1; }
}

/* -------------------------------------------------------------------- week proof */

.proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.week { border-top: 1px solid var(--rule-firm); }

.week-day {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 18px 0 6px;
}

.week-row {
  display: grid;
  grid-template-columns: 5.5em 10px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-sm);
}

.week-time { color: var(--ink-3); }
.week-dot { width: 8px; height: 8px; border-radius: 50%; align-self: center; }
.week-what { min-width: 0; }
.week-what b { font-weight: 500; }
.week-where { color: var(--ink-3); }

/* ------------------------------------------------------------------------- steps */

/* Numbered because this genuinely is a sequence: nothing works until the one before it. */
.steps { counter-reset: step; border-top: 1px solid var(--rule-firm); }

.step {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: clamp(14px, 3vw, 32px);
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: var(--t-figure);
  font-weight: 700;
  font-stretch: 78%;
  line-height: 0.8;
  color: var(--brand);
  letter-spacing: -0.03em;
}

.step h3 { font-size: var(--t-h3); letter-spacing: -0.018em; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.6; max-width: 54ch; }

/* ------------------------------------------------------------------------- trust */

.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: clamp(24px, 4vw, 48px);
  border-top: 1px solid var(--rule-firm);
  padding-top: 30px;
}

.trust h3 {
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.trust-yes h3 { color: var(--brand); }
.trust-no h3 { color: var(--ink-3); }

.trust ul { list-style: none; margin: 0; padding: 0; }

.trust li {
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-sm);
  line-height: 1.55;
  color: var(--ink-2);
}

.trust li b { color: var(--ink); font-weight: 500; }

.disclosure {
  margin-top: 34px;
  padding: 20px 22px;
  border: 1px solid var(--rule-firm);
  border-radius: 8px;
  background: var(--paper-sunk);
  font-size: var(--t-sm);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 68ch;
}

.disclosure b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------------ themes */

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 12px;
}

.swatch {
  border: 1px solid var(--rule-firm);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.swatch-mini {
  border-radius: 5px;
  border: 1px solid;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.swatch-bar { height: 5px; border-radius: 3px; width: 62%; }
.swatch-rule { height: 1px; }
.swatch-dots { display: flex; gap: 4px; }
.swatch-dot { width: 7px; height: 7px; border-radius: 50%; }
.swatch-name { font-size: var(--t-sm); font-weight: 500; }

/* -------------------------------------------------------------------- closing cta */

.close { padding: clamp(64px, 10vw, 120px) 0; border-top: 1px solid var(--rule); text-align: center; }

.close h2 {
  font-size: var(--t-h2);
  font-stretch: 114%;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.close p { color: var(--ink-2); max-width: 44ch; margin: 0 auto 28px; }

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

.foot {
  border-top: 1px solid var(--rule);
  padding: 26px 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: var(--t-sm);
  color: var(--ink-3);
}

.foot nav { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ------------------------------------------------------------------------ motion */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); }
  .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 620ms var(--ease), transform 620ms var(--ease);
  }
}
