/* SolutionTee Edu Academy — reset, elements, typography
   =========================================================================
   Element defaults only. Anything that needs a class lives in
   components.css or glass.css; anything that arranges a page lives in
   layout.css.
   ====================================================================== */

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

/* The `hidden` attribute must win over any component's own display rule.
   Without this, a component that sets `display: flex` stays visible while
   claiming to be hidden — which breaks both the layout and the
   accessibility tree, since assistive tech trusts the attribute. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  /* Native smooth scroll is OFF: Lenis owns scrolling and the two fight
     each other, producing a stutter on every fragment link. motion.js
     sets html.lenis and hands anchor scrolling to Lenis. If Lenis never
     loads, the rule below restores the native behaviour. */
  scroll-behavior: auto;
  /* Clears the sticky header when a fragment link lands mid-page. */
  scroll-padding-top: calc(var(--header-h) + var(--space-5));
  background: var(--canvas);
}

html:not(.lenis) {
  scroll-behavior: smooth;
}

/* Lenis drives transform on <html>; these are the library's requirements,
   inlined so the vendored file needs no companion stylesheet. */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Stops a long unbroken string from forcing a horizontal scrollbar. */
  overflow-wrap: break-word;
  /* Native controls — checkbox, radio, progress, range — take the brand
     blue instead of the operating system default. One declaration here
     replaces a pile of hand-built control styling. */
  accent-color: var(--action);
  /* A themed scrollbar. Without this the dark canvas keeps a bright
     system scrollbar down its edge, which is the single loudest thing on
     the page. */
  scrollbar-color: var(--edge-bright) transparent;
  scrollbar-width: thin;
}

/* WebKit's scrollbar, which ignores scrollbar-color. Kept narrow and
   almost invisible until the pointer is over it. */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--edge-strong);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: var(--r-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--edge-bright);
  background-clip: content-box;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-ink);
}


/* ==========================================================================
   HEADINGS
   the display face, with balanced wrapping so a two-line heading does not
   leave one orphan word. text-wrap: balance is progressive — unsupported
   browsers wrap normally.

   Tracking tightens as size grows, which is the whole reason the scale
   has its own tracking tokens: -0.016em is right for an h3 and far too
   loose for a 6rem hero.
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
  color: var(--ink);
}

h1 {
  font-size: var(--step-4);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
}

h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

h4 {
  font-size: var(--step-1);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-heading);
}

h5, h6 {
  font-size: var(--step-0);
  font-weight: var(--weight-bold);
  letter-spacing: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* Vertical rhythm inside prose only. Layout elsewhere sets its own. */
p + p {
  margin-block-start: var(--space-4);
}

/* Figures are proportional for reading and tabular wherever they are
   compared down a column. The display face's digits are the technical ones,
   so anything numeric that matters — a score, a price, a countdown —
   takes the display face as well as the tabular figures. */
table,
time,
.tabular {
  font-variant-numeric: tabular-nums;
}

.num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-heading);
  font-feature-settings: "ss01" 1;
}


/* ==========================================================================
   LINKS
   Underlines stay on by default in body copy. They are removed only where
   a link is already unmistakable — navigation, buttons, cards.
   ========================================================================== */

a {
  color: var(--action);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 38%, transparent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
  transition: color var(--dur-fast) var(--ease-out),
              text-decoration-color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--action-hover);
  text-decoration-color: currentColor;
}


/* ==========================================================================
   FOCUS
   Visible for keyboard users, suppressed for pointer users. Never removed
   outright: :focus-visible is the only thing that decides.

   Gold, not blue. On a dark canvas the blue ring sits too close to the
   interactive colour it is supposed to be marking, and a focus ring that
   looks like a hover state is not a focus ring.
   ========================================================================== */

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--r-2);
}


/* ==========================================================================
   LISTS · MEDIA · FORMS · TABLES
   ========================================================================== */

ul, ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

/* Prose lists opt back into markers. */
.prose ul, .prose ol {
  padding-inline-start: var(--space-5);
  margin-block: var(--space-4);
}

.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose li + li { margin-block-start: var(--space-2); }
.prose li::marker { color: var(--ink-faint); }

/* A list that wants markers without the rest of the prose treatment.
   The bullet is a pseudo-element rather than a list-style marker so it
   can take its own colour — ::marker support for colour is recent and
   this list predates it. */
.plain-list li {
  list-style: none;
}

.plain-list li::before {
  content: "— ";
  color: var(--ink-faint);
}

.plain-list li + li {
  margin-block-start: var(--space-2);
}

/* Images declare width and height in HTML; this keeps them fluid without
   losing the aspect ratio that prevents layout shift. */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* A DEFAULT SIZE FOR ICONS, so a missing rule is not a silent 42px bell.

   Every macro in partials/icons.html emits `class="icon ..."`, and an
   inline SVG carrying only a viewBox has no intrinsic size — it takes
   whatever its container offers. That is invisible while each icon has a
   class with a size on it, and produces a glyph stretched across its
   whole button the first time one does not.

   Deliberately the weakest rule that can do the job: at (0,1,0) it loses
   to `.icon-btn svg`, `.side__link svg` and every other sized-icon rule
   in the codebase, so it changes nothing that already works and only
   catches what would otherwise have no size at all. */
.icon {
  inline-size: 20px;
  block-size: 20px;
  flex: none;
}

figure {
  margin: 0;
}

figcaption {
  margin-block-start: var(--space-3);
  font-size: var(--step--1);
  line-height: var(--lh-snug);
  color: var(--ink-muted);
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* The browser's own autofill styling repaints the field in a flat yellow
   that has nothing to do with the theme, and `background-color` cannot
   override it. A very long inset shadow in the field's own colour is the
   only reliable way to repaint it. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 100px var(--panel) inset;
  caret-color: var(--ink);
  transition: background-color 8000s ease-in-out 0s;
}

table {
  border-collapse: collapse;
  width: 100%;
}


/* ==========================================================================
   FIGURES THAT SIT IN COLUMNS

   Inter's default figures are PROPORTIONAL: a "1" is narrow and a "0" is
   wide. Measured on the subset this site ships, "111" sets 27px narrower
   than "000" at 40px. In prose that is correct and invisible. In a column
   of prices it means ₦11,000 and ₦50,000 are different lengths, the
   thousands separators do not line up down the column, and a figure that
   changes in place — a score, a countdown, a running total — visibly
   jitters as its digits swap.

   `tabular-nums` puts every digit on the same advance width. It inherits,
   so setting it on `table` covers every cell.

   Deliberately NOT global. Tabular figures in a sentence are too wide and
   too even; proportional is what body copy wants.
   ========================================================================== */

table,
.plan__price,
.plan__money,
.stat__value,
.metric__value,
.figures__value,
.deflist__value,
.hero__proof-value,
.weak__value,
.result__score,
.scorerow__score,
.cbt__figure,
.tnum {
  font-variant-numeric: tabular-nums;
}

th {
  text-align: start;
  font-weight: var(--weight-semibold);
}

hr {
  border: none;
  block-size: 1px;
  background: var(--grad-rule);
  margin-block: var(--space-7);
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  padding: 0.12em 0.36em;
  background: var(--glass-2);
  border: 1px solid var(--edge);
  border-radius: var(--r-1);
}

kbd {
  padding: 0.12em 0.45em;
  background: var(--glass-3);
  border: 1px solid var(--edge-strong);
  border-block-end-width: 2px;
  border-radius: var(--r-2);
  font-size: 0.82em;
}


/* ==========================================================================
   PROSE
   Long-form article body, held to a readable measure.
   ========================================================================== */

.prose {
  max-width: var(--measure);
  color: var(--ink-muted);
}

.prose > * + * {
  margin-block-start: var(--space-4);
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--ink);
}

.prose h2 {
  margin-block-start: var(--space-7);
  margin-block-end: var(--space-3);
}

.prose h3 {
  margin-block-start: var(--space-6);
  margin-block-end: var(--space-2);
}

.prose strong {
  color: var(--ink);
  font-weight: var(--weight-semibold);
}

.prose blockquote {
  margin: var(--space-6) 0;
  padding-inline-start: var(--space-5);
  border-inline-start: 2px solid var(--edge-gold);
  color: var(--ink);
  font-size: var(--step-1);
  line-height: var(--lh-snug);
}


/* ==========================================================================
   ACCESSIBILITY HELPERS
   ========================================================================== */

/* Visually hidden but available to a screen reader. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip link: off-screen until focused, then pinned to the top-left. */
.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-5);
  background: var(--gold-500);
  color: var(--ink-on-accent);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--step--1);
  text-decoration: none;
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2);
  transform: translateY(calc(-100% - var(--space-4)));
  transition: transform var(--dur-base) var(--ease-spring);
}

.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--ink-on-accent);
}


/* ==========================================================================
   REDUCED MOTION
   Motion is removed, not merely shortened. motion.js reads the same query
   and never starts Lenis or ScrollTrigger, so nothing is left animating
   off-screen with a 0.01ms duration.
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Anything the motion layer would have revealed must be visible, since
     the script that would have revealed it never runs. */
  [data-gsap],
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}


/* ==========================================================================
   NO JAVASCRIPT
   ==========================================================================
   The theme toggle is the one control that cannot work without script —
   it writes to localStorage and sets an attribute. Offering a button
   that does nothing is worse than not offering it.
   ========================================================================== */

.no-js [data-theme-toggle] {
  display: none;
}


/* ==========================================================================
   A QUIET LINK
   ==========================================================================
   For a secondary action inside a block of text — "Reply", "Cancel
   reply" — where a full link colour would compete with the content it
   sits beside.

   It keeps the underline. An underline is the only cue that survives when
   somebody cannot distinguish the colour, and dropping it to make a link
   look quiet is making it invisible to the people who most need it.
   ========================================================================== */

.link-quiet {
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  color: var(--ink-muted);
  text-decoration: underline;
  text-decoration-color: var(--edge-control);
  text-underline-offset: 0.18em;
  transition: color var(--dur-fast) var(--ease-out),
              text-decoration-color var(--dur-fast) var(--ease-out);
}

.link-quiet:hover {
  color: var(--action);
  text-decoration-color: currentColor;
}


/* A tighter prose rhythm, for a comment rather than an article. The
   article measure and its generous block spacing are right for eight
   hundred words and wrong for two sentences. */
.prose--tight {
  max-width: none;
  color: var(--ink);
}

.prose--tight > * + * {
  margin-block-start: var(--space-3);
}
