/* Classroomcompass — website.
 *
 * Palette is docs/branding.md. Values are copied rather than imported because
 * this site has no build step, but they are the same hexes lib/theme.dart uses.
 *
 * Unlike the app, this commits to the guide's indigo hero. The app could not:
 * it puts tab bars and text actions inside its bars, and Material resolves
 * those colours from the scheme. A marketing page has no such constraint, so
 * here the palette gets what it actually asked for.
 */

:root {
  --indigo: #3d346c;
  --indigo-deep: #241e42;
  --indigo-container: #e4e0f0;
  --gold: #e9b949;
  --gold-bright: #fae367;
  --gold-deep: #c9922e;
  --saffron: #f16c4b;
  --violet: #8162aa;
  --violet-light: #b9a5d6;
  --canvas: #f4f2f9;
  --ink: #201d30;
  --muted: #8b8698;
  --line: #d5d1de;
  --teal: #36b7a6;

  --wrap: 1080px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* --- type ---------------------------------------------------------------- */

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; color: var(--indigo); }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--indigo); }

.lede { font-size: 1.15rem; color: #4a4560; max-width: 62ch; }
.small { font-size: 0.87rem; color: var(--muted); }

/* Gold earns its place as a rule, never as text - it measures 1.9:1 on white. */
.rule {
  height: 3px;
  width: 64px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright), var(--gold));
  margin: 0 0 22px;
}

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

header {
  background: var(--indigo);
  color: #fff;
}

.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  /* Vertical only. These elements also carry `.wrap`, and the `padding`
   * shorthand would reset its 24px side padding to zero — which is invisible
   * on a wide screen, where `max-width` plus `margin: auto` keeps content off
   * the edges anyway, and edge-to-edge text on a phone. */
  padding-top: 18px;
  padding-bottom: 18px;
}

.bar img { width: 38px; height: 38px; border-radius: 9px; display: block; }

.wordmark {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.wordmark .a { color: #fff; }
.wordmark .b { color: var(--violet-light); }

.bar nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.bar nav a {
  color: var(--indigo-container);
  text-decoration: none;
  font-size: 0.95rem;
}
.bar nav a:hover { color: #fff; }

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

.hero { padding-top: 60px; padding-bottom: 84px; }
.hero h1 { max-width: 20ch; }
.hero h1 .accent { color: var(--gold); }
.hero .lede { color: var(--indigo-container); font-size: 1.2rem; }

.deadline {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--violet-light);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* Saffron is the scarcest colour in the system - one thing at a time. On this
 * page that one thing is the primary call to action, and nothing else. */
.cta {
  display: inline-block;
  margin-top: 14px;
  padding: 13px 30px;
  border: 0;
  border-radius: 10px;
  background: var(--saffron);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  cursor: pointer;
}
.cta:hover { background: #dd5c3c; }

.cta.ghost {
  background: transparent;
  border: 1px solid var(--violet-light);
  color: #fff;
  margin-left: 10px;
}
.cta.ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* Operating history as a credibility band rather than a sentence. Numbers
 * read as maturity; a paragraph about where the software came from reads as
 * an origin story. */
.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 42px;
  margin-top: 54px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.proof div { display: flex; flex-direction: column; }
.proof strong {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.proof span { font-size: 0.88rem; color: var(--indigo-container); margin-top: 2px; }

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

section { padding: 68px 0; }
section.tint { background: var(--canvas); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.card h3 { color: var(--indigo); margin-bottom: 6px; }
.card p { margin: 0; color: #4a4560; font-size: 0.96rem; }

/* Two columns of prose for the differentiators — wider than a card, so each
 * claim gets room to be argued rather than asserted. */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px 46px;
  margin-top: 36px;
}
.point h3 { color: var(--indigo); margin-bottom: 6px; }
.point p { margin: 0; color: #4a4560; }

/* The security paragraph. Set apart with a gold edge because it answers the
 * question a serious buyer asks last and cares about most. */
.assurance {
  margin-top: 44px;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}
.assurance h3 { color: var(--indigo); margin-bottom: 8px; }
.assurance p { margin: 0; color: #4a4560; font-size: 0.96rem; }

/* --- pricing ------------------------------------------------------------- */

table { border-collapse: collapse; width: 100%; margin-top: 26px; font-size: 0.97rem; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { color: var(--indigo); font-weight: 600; border-bottom: 2px solid var(--indigo-container); vertical-align: top; }
thead th .hint {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 3px;
  max-width: 22ch;
}
tbody th { font-weight: 600; }
td.price { font-variant-numeric: tabular-nums; }

.table-scroll { overflow-x: auto; }

/* Repeats the column headers for the phone layout, where the real ones are
 * hidden. Desktop already has them, so this would be duplication there. */
.tier-legend { display: none; }
.tier-legend div {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
.tier-legend strong { display: block; color: var(--indigo); font-weight: 600; }

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

form { max-width: 620px; margin-top: 28px; }

/* Halves the apparent length of the form. Six stacked fields reads as a chore;
 * four rows reads as a moment. */
.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
@media (max-width: 520px) {
  .two-up { grid-template-columns: 1fr; }
}

button.cta:disabled { opacity: 0.6; cursor: default; }

label { display: block; margin-bottom: 16px; font-size: 0.92rem; font-weight: 600; }
label span.hint { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }

input, select, textarea {
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(61, 52, 108, 0.14);
}

.status { margin-top: 16px; font-size: 0.95rem; }
.status.ok { color: #0e4a42; }
.status.bad { color: #6b2110; }

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

footer {
  background: var(--indigo-deep);
  color: var(--indigo-container);
  padding: 40px 0;
  font-size: 0.9rem;
}
footer a { color: #fff; }
footer .disclaimer { color: var(--violet-light); margin-top: 14px; }

/* --- narrow panel, used by reset.html and privacy.html ------------------- */

.panel {
  max-width: 470px;
  margin: 56px auto;
  padding: 0 24px;
}

/* --- phones -------------------------------------------------------------- */

/* The nav was the whole problem on a phone. Five items on one line are wider
 * than the viewport, so the *document* became wider than the screen — which is
 * why the hero and the proof numbers looked clipped at the left edge. Nothing
 * was wrong with their padding; the page was simply scrolled sideways. */
@media (max-width: 760px) {
  .bar {
    flex-wrap: wrap;
    row-gap: 12px;
    padding-top: 16px;
    padding-bottom: 14px;
  }
  .bar nav {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px 20px;
  }
  .bar nav a { font-size: 0.92rem; }

  .hero { padding-top: 34px; padding-bottom: 52px; }
  .hero .lede { font-size: 1.05rem; }

  /* Two columns rather than a 42px flex gap, which stranded the third stat on
   * a row of its own with the others still spread wide. */
  .proof {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 18px;
    margin-top: 36px;
  }
  .proof strong { font-size: 1.55rem; }
  .proof span { font-size: 0.82rem; }

  section { padding: 46px 0; }
  .cta, .cta.ghost { display: block; text-align: center; margin-left: 0; }
  .cta.ghost { margin-top: 12px; }
}

/* Pricing as cards, not a squeezed grid.
 *
 * Four columns cannot be read on a phone at any font size that is also
 * legible, and a horizontally scrolling price list hides the column a buyer
 * most wants. One card per enrollment band, each row labelled with the tier it
 * belongs to, says the same thing in the direction phones actually scroll. */
@media (max-width: 720px) {
  .table-scroll { overflow-x: visible; }

  table, tbody, tbody tr, tbody th, tbody td { display: block; width: 100%; }
  thead { display: none; }

  tbody tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 4px 18px 10px;
    margin-bottom: 14px;
  }

  tbody th {
    border: 0;
    padding: 12px 0 6px;
    font-size: 1.05rem;
    color: var(--indigo);
  }

  tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
  }
  tbody td:last-child { border-bottom: 0; }

  tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.88rem;
  }

  .tier-legend { display: block; margin-top: 8px; }
}
