/*
 * ClassPulse marketing site.
 *
 * Tokens mirror theme/colors.ts so the site and the app stay one visual
 * system. Change a colour there, change it here.
 */

:root {
  /* Ground and ink swap with the theme; the amber never does — one brand
     colour doing one job is worth more than a palette that shifts. */
  --paper: #fff7e8;
  --paper-raised: #fbf1e1;
  --midnight: #141126;
  --slate: #1d1934;
  --amber: #ff8a1e;
  --amber-soft: #ffd980;
  --ink: #231c3b;
  --ink-soft: #615a7d;
  --ink-faint: #8d85a6;
  --mist: #bcb4d9;
  --mist-faint: #8a81ac;
  --teal: #0d9488;
  --hairline: #dfc8a0;

  --bg: var(--paper);
  --bg-raised: var(--paper-raised);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --text-faint: var(--ink-faint);
  --rule: var(--hairline);

  --measure: 62ch;
  --radius: 20px;
  --radius-lg: 28px;
  --step: clamp(4rem, 9vw, 7rem);

  --font: 'Lexend', ui-sans-serif, system-ui, -apple-system, 'Segoe UI',
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--midnight);
    --bg-raised: var(--slate);
    --text: #faf8ff;
    --text-soft: var(--mist);
    --text-faint: var(--mist-faint);
    --rule: #443c72;
    --teal: #2dd4bf;
  }
}

:root[data-theme='dark'] {
  --bg: var(--midnight);
  --bg-raised: var(--slate);
  --text: #faf8ff;
  --text-soft: var(--mist);
  --text-faint: var(--mist-faint);
  --rule: #443c72;
  --teal: #2dd4bf;
}

:root[data-theme='light'] {
  --bg: var(--paper);
  --bg-raised: var(--paper-raised);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --text-faint: var(--ink-faint);
  --rule: var(--hairline);
  --teal: #0d9488;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

:where(a, button, summary):focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

.narrow {
  width: min(100% - 2.5rem, 46rem);
  margin-inline: auto;
}

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

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3rem);
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

p {
  margin: 0;
  max-width: var(--measure);
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0;
}

.lede {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-soft);
}

/* ---------- the highlighter ---------- */

/*
 * The app draws this exact gesture: deadlines.tsx rotates an amber pill behind
 * a word. Two offset passes read as a marker gone over twice rather than a
 * rounded rectangle.
 */
.mark {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  isolation: isolate;
}

.mark::before,
.mark::after {
  content: '';
  position: absolute;
  inset: 0.08em -0.28em 0.06em -0.28em;
  z-index: -1;
  background: var(--amber);
  border-radius: 0.32em 0.4em 0.3em 0.36em;
}

.mark::before {
  transform: rotate(-1.6deg);
}

.mark::after {
  opacity: 0.42;
  transform: rotate(1.1deg);
}

/* ---------- bands ---------- */

.band {
  padding-block: var(--step);
}

.band--dark {
  background: var(--midnight);
  color: #faf8ff;
}

.band--dark .eyebrow {
  color: var(--mist-faint);
}

.band--dark .lede,
.band--dark p {
  color: var(--mist);
}

.band--raised {
  background: var(--bg-raised);
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--midnight) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #2c2447;
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  color: #faf8ff;
  text-decoration: none;
  margin-right: auto;
}

.brand__dot {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.5rem;
  background: var(--amber);
  display: grid;
  place-items: center;
  color: var(--midnight);
  font-size: 0.9rem;
  font-weight: 800;
}

.nav__links {
  display: none;
  gap: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav__links a {
  color: var(--mist);
  text-decoration: none;
}

.nav__links a:hover {
  color: #faf8ff;
}

@media (min-width: 48rem) {
  .nav__links {
    display: flex;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--amber);
  color: #231c3b;
}

.btn--ghost {
  border-color: #4a4170;
  color: #faf8ff;
}

.band--raised .btn--ghost,
.band:not(.band--dark) .btn--ghost {
  border-color: var(--rule);
  color: var(--text);
}

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

.hero {
  padding-block: clamp(4rem, 11vw, 8rem);
}

.hero__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 4.5rem);
  align-items: center;
}

@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__note {
  font-size: 0.85rem;
  color: var(--mist-faint);
}

/* ---------- deadline stack ---------- */

.stack {
  display: grid;
  gap: 0.75rem;
}

.card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--slate);
  border: 1px solid #372f5c;
}

.card__mark {
  flex: none;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.05rem;
  background: rgba(255, 138, 30, 0.16);
  color: var(--amber-soft);
}

.card__mark b {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.card__mark span {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.card--urgent .card__mark {
  background: rgba(251, 113, 133, 0.18);
  color: #fb7185;
}

.card--done .card__mark {
  background: rgba(74, 222, 128, 0.16);
  color: #4ade80;
}

.card__body {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.card__title {
  font-weight: 600;
  font-size: 0.98rem;
  color: #faf8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__meta {
  font-size: 0.8rem;
  color: var(--mist-faint);
}

.chip {
  flex: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 138, 30, 0.18);
  color: var(--amber-soft);
}

.chip--danger {
  background: rgba(251, 113, 133, 0.18);
  color: #fb7185;
}

.chip--ok {
  background: rgba(45, 212, 191, 0.16);
  color: #2dd4bf;
}

/* ---------- section heading ---------- */

.head {
  display: grid;
  gap: 0.85rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  max-width: 44rem;
}

/* ---------- feature grid ---------- */

.grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 40rem) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 62rem) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--rule);
}

.band--dark .feature {
  background: var(--slate);
  border-color: #372f5c;
}

.feature__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  background: rgba(255, 138, 30, 0.16);
  color: var(--amber);
  margin-bottom: 0.35rem;
}

.feature p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.band--dark .feature p {
  color: var(--mist);
}

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

.steps {
  display: grid;
  gap: 2rem;
  counter-reset: step;
}

@media (min-width: 52rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

/* Numbered because importing genuinely is a sequence — you cannot review
   before you scan. Not used as decoration elsewhere. */
.step {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  counter-increment: step;
  padding-top: 1.5rem;
  border-top: 2px solid var(--amber);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--amber);
}

.step p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.band--dark .step p {
  color: var(--mist);
}

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

.plans {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 46rem) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}

.plan {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.1rem;
  align-content: start;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  background: var(--bg);
}

.plan--featured {
  border: 2px solid var(--amber);
  background: var(--bg-raised);
}

.plan > .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.plan__price small {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0;
}

.plan__alt {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.plan__alt strong {
  color: var(--text-soft);
  font-weight: 700;
}

.plan__trial {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-faint);
}

.plan__trial span {
  flex: none;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 138, 30, 0.16);
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.ticks li {
  display: flex;
  min-width: 0;
  gap: 0.55rem;
  align-items: start;
}

.ticks li::before {
  content: '';
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 138, 30, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF8A1E' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 0.72rem;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------- faq ---------- */

.faq {
  display: grid;
  gap: 0.5rem;
}

.qa {
  border-bottom: 1px solid var(--rule);
}

.qa summary {
  cursor: pointer;
  list-style: none;
  padding-block: 1.15rem;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary::after {
  content: '';
  margin-left: auto;
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(45deg) translate(-0.1rem, -0.1rem);
  transition: transform 0.2s ease;
}

.qa[open] summary::after {
  transform: rotate(225deg) translate(-0.15rem, -0.15rem);
}

.qa p {
  padding-bottom: 1.25rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

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

.cta {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 2rem;
  border-radius: var(--radius-lg);
  background: var(--slate);
  border: 1px solid #372f5c;
}

.cta p {
  color: var(--mist);
  margin-inline: auto;
}

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

.foot {
  background: var(--midnight);
  color: var(--mist);
  padding-block: 3.5rem 2.5rem;
  font-size: 0.9rem;
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: center;
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-left: auto;
}

.foot a {
  color: var(--mist);
  text-decoration: none;
}

.foot a:hover {
  color: #faf8ff;
  text-decoration: underline;
}

.foot__legal {
  width: 100%;
  color: var(--mist-faint);
  font-size: 0.82rem;
  border-top: 1px solid #2c2447;
  padding-top: 1.5rem;
}

/* ---------- legal documents ---------- */

.doc {
  padding-block: clamp(3rem, 7vw, 5rem);
  display: grid;
  gap: 2.5rem;
}

.doc__head {
  display: grid;
  gap: 0.75rem;
}

.doc section {
  display: grid;
  gap: 0.85rem;
}

.doc h2 {
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

.doc p,
.doc li {
  color: var(--text-soft);
  font-size: 0.98rem;
}

.doc ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.5rem;
}

.doc a {
  color: var(--text);
  text-decoration-color: var(--amber);
  text-underline-offset: 3px;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-faint);
  text-decoration: none;
}

.backlink:hover {
  color: var(--text);
}
