/* ================================================================
   Studymate UMS — Landing page styles.
   Plain CSS, one file, no framework. Brand system defined at the top
   as CSS custom properties so a tenant white-label is a variable swap.
   ================================================================ */

:root {
  /* Brand — Deep Academic Navy + Warm Gold (Option A from the guide). */
  --c-primary: #1b2a4a;
  --c-primary-600: #152138;
  --c-accent: #c8952e;
  --c-accent-600: #a87b1d;
  --c-surface: #f8f7f4;
  --c-surface-2: #efede6;
  --c-card: #ffffff;
  --c-text: #1a1a1a;
  --c-muted: #5f6472;
  --c-line: #e4e1d8;
  --c-success: #0d7c4a;

  /* Typography. Serif for display, sans for body — per guide. */
  --ff-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ff-body: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Scale: multiples of 8 so vertical rhythm stays intact without tooling. */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 48px;
  --s-6: 64px;
  --s-7: 96px;
  --s-8: 128px;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 12px 32px -12px rgba(27, 42, 74, 0.18);
  --shadow-sm: 0 4px 12px -4px rgba(27, 42, 74, 0.12);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-surface);
  color: var(--c-text);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--s-3) 0; }

/* Accessibility — visible focus, skip-link, hidden utility. */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: var(--c-primary); color: #fff; padding: 8px 12px;
  border-radius: var(--radius-sm); z-index: 1000;
}
.skip-link:focus { top: 8px; }

/* Layout containers. */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-3);
}
.container--narrow { max-width: 840px; }

/* Typography utilities. */
h1, h2, h3 {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-2);
  color: var(--c-primary);
}
p { margin: 0 0 var(--s-2); color: var(--c-text); }

/* Buttons. Accent gold is reserved for the most-valuable CTA
   (contact/demo) so it stands out against the navy + gold palette. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--ff-body);
  font-weight: 500; font-size: 15px;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease),
              border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-600); }
.btn--accent { background: var(--c-accent); color: #1a1300; }
.btn--accent:hover { background: var(--c-accent-600); color: #fff; }
.btn--ghost {
  background: transparent; color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn--ghost:hover { background: var(--c-primary); color: #fff; }

/* ─────────── NAV ─────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 247, 244, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
  height: 72px;
}
.nav__brand {
  display: flex; align-items: center; gap: var(--s-2);
  text-decoration: none; color: inherit;
  font-family: var(--ff-display); font-weight: 600; font-size: 20px;
}
.nav__mark {
  width: 36px; height: 36px;
  background: var(--c-primary); color: var(--c-accent);
  border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--ff-display); font-size: 20px; font-weight: 700;
}
.nav__word { font-size: 18px; }
.nav__word-accent { color: var(--c-accent); }
.nav__links {
  display: flex; gap: var(--s-4);
  font-size: 15px;
}
.nav__links a {
  color: var(--c-text); text-decoration: none;
  padding: 8px 0; position: relative;
}
.nav__links a:hover { color: var(--c-primary); }
.nav__actions { display: flex; gap: var(--s-2); align-items: center; }

.nav__toggle { display: none; }
.nav__mobile { display: none; }

@media (max-width: 960px) {
  .nav__links, .nav__actions { display: none; }
  .nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center;
    width: 44px; height: 44px; gap: 5px; padding: 10px;
    background: transparent; border: 1px solid var(--c-line);
    border-radius: var(--radius-sm); cursor: pointer;
  }
  .nav__toggle span {
    display: block; height: 2px; width: 100%;
    background: var(--c-primary); border-radius: 2px;
  }
  .nav__mobile {
    display: none; flex-direction: column; gap: var(--s-2);
    padding: var(--s-3) var(--s-3) var(--s-4);
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
  }
  .nav__mobile[data-open="true"] { display: flex; }
  .nav__mobile a { color: var(--c-text); text-decoration: none; padding: 8px 0; font-size: 17px; }
  .nav__mobile .btn { justify-content: center; }
}

/* ─────────── HERO ─────────── */
.hero {
  padding: var(--s-7) 0 var(--s-6);
  position: relative;
  overflow: hidden;
}
.hero__inner { position: relative; }
.hero__eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 13px; font-weight: 500; color: var(--c-accent-600);
  margin: 0 0 var(--s-2);
}
.hero__headline {
  font-size: clamp(40px, 5.5vw, 60px);
  line-height: 1.08;
  max-width: 940px;
  margin-bottom: var(--s-3);
}
.hero__accent { color: var(--c-accent-600); }
.hero__sub {
  font-size: 19px; color: var(--c-muted);
  max-width: 640px; line-height: 1.6;
  margin-bottom: var(--s-4);
}
.hero__actions {
  display: flex; gap: var(--s-2); flex-wrap: wrap;
  margin-bottom: var(--s-6);
}

/* Browser mockup — a stylised div stack, not a fake screenshot. Per
   guide: "If you don't have screenshots yet, use … placeholder layouts
   (not placeholder images)". */
.hero__preview { max-width: 980px; margin: 0 auto; }
.browser {
  background: var(--c-card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--c-line);
  overflow: hidden;
}
.browser__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-line);
  font-size: 12px;
}
.browser__bar > span {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d0cdc3;
}
.browser__bar > span:nth-child(1) { background: #e08a70; }
.browser__bar > span:nth-child(2) { background: #e3b86c; }
.browser__bar > span:nth-child(3) { background: #86b87b; }
.browser__url {
  margin-left: 16px;
  padding: 4px 12px;
  background: var(--c-card);
  border-radius: 4px;
  color: var(--c-muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.browser__body { padding: 0; }

/* In-browser preview — sidebar + main area. */
.preview { display: grid; grid-template-columns: 220px 1fr; min-height: 480px; }
.preview__side {
  background: var(--c-surface);
  border-right: 1px solid var(--c-line);
  padding: var(--s-3) var(--s-2);
  font-size: 13px;
}
.preview__brand {
  font-family: var(--ff-display);
  font-weight: 600;
  padding: 6px 10px var(--s-3);
  border-bottom: 1px solid var(--c-line);
  margin-bottom: var(--s-2);
}
.preview__nav-group {
  font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--c-muted);
  padding: 10px 10px 4px;
}
.preview__nav-item {
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--c-text);
}
.preview__nav-item--active { background: var(--c-primary); color: #fff; }
.preview__main {
  padding: var(--s-3);
  display: grid;
  gap: var(--s-2);
  align-content: start;
}
.preview__headline {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--s-1);
}
.preview__stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
}
.preview__stat {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: var(--s-2);
}
.preview__stat-val { font-family: var(--ff-display); font-size: 22px; font-weight: 600; color: var(--c-primary); }
.preview__stat-lbl { font-size: 11px; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.preview__card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: var(--s-2);
}
.preview__card-title {
  font-weight: 600; font-size: 13px;
  margin-bottom: 8px; color: var(--c-primary);
}
.preview__row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--c-line);
  font-size: 13px;
}
.preview__row:first-of-type { border-top: 0; }
.preview__row--grade {
  justify-content: space-between;
}
.preview__grade {
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--c-primary);
}
.preview__tag {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px;
  background: var(--c-primary); color: var(--c-accent);
  border-radius: 3px;
}
.preview__tag--live { background: #c83a2e; color: #fff; }

@media (max-width: 640px) {
  .preview { grid-template-columns: 1fr; }
  .preview__side { display: none; }
  .preview__stats { grid-template-columns: repeat(2, 1fr); }
}

/* ─────────── GENERIC SECTIONS ─────────── */
.section {
  padding: var(--s-7) 0;
}
.section--alt { background: var(--c-surface-2); }
.section__eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 13px; font-weight: 500; color: var(--c-accent-600);
  margin: 0 0 var(--s-1);
}
.section__title {
  font-size: clamp(32px, 3.5vw, 44px);
  margin-bottom: var(--s-3);
  max-width: 760px;
}
.section__sub {
  color: var(--c-muted); font-size: 18px;
  max-width: 680px; margin-bottom: var(--s-5);
}

/* ─────────── HOW IT WORKS ─────────── */
.steps {
  display: grid; gap: var(--s-5);
  margin-top: var(--s-5);
}
.step {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: var(--s-4); align-items: center;
  padding: var(--s-4);
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.step__num {
  font-family: var(--ff-display); font-size: 42px; font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
}
.step__title { font-size: 26px; margin-bottom: 8px; }
.step__body p { color: var(--c-muted); max-width: 440px; }
.step__visual { justify-self: end; width: 100%; max-width: 360px; }

@media (max-width: 900px) {
  .step { grid-template-columns: 1fr; gap: var(--s-2); }
  .step__visual { justify-self: stretch; max-width: none; }
}

/* Mini cards used by steps + tabpanels. */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s-3);
}
.card--mini { padding: var(--s-2); }
.card__label {
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--c-muted);
  margin-bottom: var(--s-2);
}
.card__big {
  font-family: var(--ff-display); font-size: 30px; font-weight: 600;
  color: var(--c-primary); margin-bottom: var(--s-2);
}
.card__row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 14px;
  border-top: 1px solid var(--c-line);
}
.card__row:first-of-type { border-top: 0; }
.card__input {
  padding: 8px 10px; margin-bottom: 6px;
  font-size: 14px;
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
}
.card__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin: 6px 0;
}
.card__cell-lbl { font-size: 11px; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.card__cell-val { font-family: var(--ff-display); font-weight: 600; font-size: 20px; color: var(--c-primary); }
.card__total {
  margin-top: var(--s-2); padding-top: var(--s-2);
  border-top: 1px solid var(--c-line);
  font-size: 14px; color: var(--c-muted);
}
.card__total strong { color: var(--c-primary); font-weight: 600; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-muted); }
.dot--live { background: #c83a2e; box-shadow: 0 0 0 3px rgba(200, 58, 46, 0.18); }

/* ─────────── FEATURE HIGHLIGHTS ─────────── */
.features {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(2, 1fr);
  margin-top: var(--s-4);
}
.feature {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s-4);
  box-shadow: var(--shadow-sm);
}
.feature h3 {
  font-size: 22px; margin-bottom: var(--s-2);
}
.feature p { color: var(--c-muted); margin: 0; }

@media (max-width: 800px) {
  .features { grid-template-columns: 1fr; }
}

/* ─────────── AUDIENCE TABS ─────────── */
.tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 4px; margin: var(--s-4) 0 var(--s-4);
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  width: fit-content;
}
.tab {
  background: transparent; border: 0;
  padding: 10px 18px;
  font-family: var(--ff-body);
  font-size: 15px; font-weight: 500;
  color: var(--c-muted); cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.tab.is-active { background: var(--c-primary); color: #fff; }
.tab:not(.is-active):hover { color: var(--c-primary); }

.tabpanel { display: none; }
.tabpanel.is-active { display: block; }
.tabpanel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5); align-items: start;
}
.tabpanel__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
}
.tabpanel__list li {
  padding-left: var(--s-3); position: relative;
  color: var(--c-text); font-size: 17px; line-height: 1.55;
}
.tabpanel__list li::before {
  content: ""; position: absolute; left: 0; top: 0.65em;
  width: 10px; height: 2px; background: var(--c-accent);
}
.tabpanel__visual .card {
  background: var(--c-card);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 800px) {
  .tabpanel__grid { grid-template-columns: 1fr; }
}

/* ─────────── PRICING ─────────── */
.pricing {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(2, 1fr);
  margin-top: var(--s-4);
}
.price {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s-4);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.price--featured {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.price--featured h3, .price--featured .price__amount { color: #fff; }
.price--featured .price__tag, .price--featured .price__list li { color: rgba(255,255,255,0.78); }
.price--featured .price__list li::before { background: var(--c-accent); }
.price header { margin-bottom: var(--s-3); }
.price h3 { font-size: 22px; margin-bottom: 4px; color: var(--c-primary); }
.price__tag { color: var(--c-muted); font-size: 14px; margin: 0; }

.price__amount {
  display: flex; align-items: baseline; gap: 4px;
  margin: var(--s-2) 0;
}
.price__currency { font-family: var(--ff-display); font-size: 24px; font-weight: 600; color: var(--c-primary); }
.price__value { font-family: var(--ff-display); font-size: 44px; font-weight: 700; color: var(--c-primary); line-height: 1; }
.price__period { color: var(--c-muted); font-size: 15px; margin-left: 4px; }
.price__amount--muted .price__value, .price__amount--muted .price__currency { color: var(--c-muted); font-size: 28px; }
.price__amount--contact {
  font-family: var(--ff-display); font-size: 32px; font-weight: 600;
  color: #fff;
}
.price__list {
  list-style: none; margin: var(--s-3) 0; padding: 0;
  display: grid; gap: 8px;
  flex: 1;
}
.price__list li {
  position: relative; padding-left: var(--s-3);
  color: var(--c-text); font-size: 15px; line-height: 1.55;
}
.price__list li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 10px; height: 2px; background: var(--c-accent);
}
.price__footnote {
  margin-top: var(--s-3);
  color: var(--c-muted); font-size: 14px;
  text-align: center;
}

@media (max-width: 800px) { .pricing { grid-template-columns: 1fr; } }

/* ─────────── FAQ ─────────── */
.faq { margin-top: var(--s-4); display: grid; gap: 10px; }
.faq__item {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 0 var(--s-3);
  overflow: hidden;
}
.faq__item summary {
  padding: var(--s-3) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--ff-display);
  font-weight: 600; font-size: 18px;
  color: var(--c-primary);
  display: flex; align-items: center; justify-content: space-between;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; font-family: var(--ff-body);
  font-size: 22px; font-weight: 400;
  color: var(--c-accent);
  transition: transform 180ms var(--ease);
}
.faq__item[open] summary::after { content: "−"; }
.faq__item p {
  padding-bottom: var(--s-3);
  margin: 0; color: var(--c-muted);
  line-height: 1.65;
}

/* ─────────── CTA / CONTACT ─────────── */
.cta {
  background: var(--c-primary);
  color: #fff;
  text-align: center;
}
.cta__title {
  color: #fff;
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: var(--s-2);
}
.cta__sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto var(--s-4);
}
.cta__actions {
  display: flex; gap: var(--s-2); flex-wrap: wrap;
  justify-content: center;
}
.cta .btn--ghost {
  color: #fff; border-color: rgba(255,255,255,0.5);
}
.cta .btn--ghost:hover { background: #fff; color: var(--c-primary); border-color: #fff; }

/* ─────────── FOOTER ─────────── */
.footer {
  background: var(--c-primary-600);
  color: rgba(255, 255, 255, 0.82);
  padding: var(--s-6) 0 0;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer__brand {
  display: flex; gap: var(--s-2); align-items: center;
}
.footer__name {
  font-family: var(--ff-display);
  font-size: 20px; font-weight: 600; color: #fff;
}
.footer__tag { font-size: 14px; color: rgba(255,255,255,0.6); }
.footer__cols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.footer__heading {
  color: #fff; font-weight: 600;
  text-transform: uppercase; font-size: 12px; letter-spacing: 0.12em;
  margin-bottom: var(--s-2);
}
.footer__cols a {
  display: block; padding: 4px 0;
  color: rgba(255,255,255,0.72); text-decoration: none;
  font-size: 15px;
}
.footer__cols a:hover { color: var(--c-accent); }

.footer__legal {
  background: rgba(0,0,0,0.2);
  padding: var(--s-2) 0;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.footer__legal-inner {
  display: flex; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap;
}
.footer__powered {
  display: flex; align-items: center; gap: 6px;
  text-align: center;
}
.footer__powered a {
  color: var(--c-accent); text-decoration: none; font-weight: 500;
}
.footer__powered a:hover { text-decoration: underline; }

@media (max-width: 800px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}

/* ─────────── REVEAL ON SCROLL ─────────── */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Honour OS-level reduced-motion setting. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
