/* ==========================================================================
   TM School — 2026 Redesign
   Modern EdTech · Vanilla CSS · BEM · Design System
   Font: Bricolage Grotesque (display) + Manrope (text)
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------------- */
:root {
  /* Neutrals — clean white + charcoal */
  --c-bg:        #ffffff;
  --c-bg-soft:   #f6f6f6;
  --c-bg-mint:   #fdecec;   /* light red tint (eyebrows/badges) */
  --c-ink:       #1e1e1e;   /* near-black */
  --c-ink-2:     #2b2b2b;
  --c-gray:      #5f5f5f;
  --c-gray-soft: #9a9a9a;
  --c-line:      rgba(30, 30, 30, 0.12);
  --c-line-soft: rgba(30, 30, 30, 0.07);

  /* Brand — accent red (primary) */
  --c-accent:      #c30101;
  --c-accent-600:  #a60000;
  --c-accent-700:  #a60000;
  --c-accent-ink:  #8f0101;
  --c-green-deep:  #232323;   /* charcoal — dark sections */
  --c-lime:        #ff6f61;   /* coral-red — accent on dark */

  /* CTA red */
  --c-red:      #c30101;
  --c-red-600:  #a60000;

  /* On-dark */
  --c-on-dark:      #f2f2f2;
  --c-on-dark-soft: rgba(242, 242, 242, 0.62);
  --c-line-dark:    rgba(242, 242, 242, 0.14);

  /* Type — Montserrat (brand font) */
  --font-display: "Montserrat", "Space Grotesk", sans-serif;
  --font-sans:    "Montserrat", -apple-system, system-ui, sans-serif;

  --fs-eyebrow: 0.8rem;
  --fs-body:    clamp(1rem, 1vw, 1.08rem);
  --fs-lead:    clamp(1.1rem, 1.35vw, 1.32rem);
  --fs-h4:      clamp(1.15rem, 1.5vw, 1.4rem);
  --fs-h3:      clamp(1.5rem, 2.5vw, 2.1rem);
  --fs-h2:      clamp(2.1rem, 4.4vw, 3.6rem);
  --fs-h1:      clamp(2.7rem, 6vw, 5.2rem);
  --fs-mega:    clamp(3rem, 8vw, 6.5rem);

  /* Layout */
  --container:    1400px;
  --container-nar: 900px;
  --gutter:       clamp(1.15rem, 4vw, 2.75rem);
  --section-y:    clamp(2.4rem, 4.5vw, 4rem);

  --r-sm:   12px;
  --r-md:   18px;
  --r-lg:   26px;
  --r-xl:   34px;
  --r-pill: 999px;

  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.32, 0.72, 0, 1);

  --shadow-xs:   none;
  --shadow-card: none;
  --shadow-lift: none;
  --shadow-accent: none;
  --shadow-green:  none;
}

/* ---------------------------------------------------------------------------
   2. Reset & base
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { width: 0; height: 0; background: transparent; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.022em;
}

::selection { background: var(--c-green-deep); color: #fff; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; border-radius: 6px; }

/* ---------------------------------------------------------------------------
   3. Layout primitives
   --------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--container-nar); }

.section { padding-block: var(--section-y); position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-accent-700);
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--c-bg-mint);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-accent); }
.eyebrow--dark { background: rgba(239,106,95,0.14); color: var(--c-lime); }
@media (max-width: 560px) {
  .csec__head .eyebrow, .eyebrow--center {
    white-space: normal; font-size: 0.74rem; letter-spacing: 0.01em; line-height: 1.35;
    gap: 0.5em; padding: 0.45rem 0.95rem 0.45rem 0.8rem; max-width: 100%;
    text-align: left; align-items: flex-start;
  }
  .csec__head .eyebrow::before, .eyebrow--center::before { flex: none; width: 7px; height: 7px; margin-top: 0.42em; }
}
.eyebrow--dark::before { background: var(--c-lime); }

.section__head { max-width: 44ch; margin-bottom: clamp(1.4rem, 2.2vw, 2rem); }
.section__head--wide { max-width: none; }
.section__head--wide .section__title,
.section__title--nowrap { white-space: nowrap; }
@media (max-width: 620px) {
  .section__head--wide .section__title,
  .section__title--nowrap { white-space: normal; }
}
.section__title { font-size: var(--fs-h2); margin-top: 1.1rem; }
.section__title--sm { font-size: clamp(1.9rem, 3vw, 2.8rem); }
.section__lead { margin-top: 1.2rem; font-size: var(--fs-lead); color: var(--c-gray); max-width: 52ch; line-height: 1.5; }

.text-accent { color: var(--c-accent); }
.hl {
  color: var(--c-accent);
  background: linear-gradient(180deg, transparent 62%, rgba(195,1,1,0.18) 62%);
  padding: 0 0.05em;
}

/* ---------------------------------------------------------------------------
   4. Buttons
   --------------------------------------------------------------------------- */
.btn {
  --bg: var(--c-accent);
  --fg: #ffffff;
  position: relative;
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 1rem 1.5rem;
  border-radius: var(--r-pill);
  background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em;
  transition: transform 0.35s var(--ease-soft), background 0.3s var(--ease), box-shadow 0.35s var(--ease);
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease-soft); }
.btn__icon { display: inline-flex; align-items: center; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:hover svg { transform: translateX(3px); }

.btn--accent { --bg: var(--c-red); box-shadow: var(--shadow-accent); }
.btn--accent:hover { --bg: var(--c-red-600); }

.btn--green { --bg: var(--c-green-deep); box-shadow: var(--shadow-green); }
.btn--green:hover { --bg: var(--c-accent-700); }

.btn--ink { --bg: var(--c-ink); --fg: #fff; }
.btn--ink:hover { --bg: var(--c-ink-2); }

.btn--ghost { --bg: transparent; --fg: var(--c-ink); border: 1.5px solid var(--c-line); }
.btn--ghost:hover { --bg: var(--c-bg-soft); border-color: var(--c-ink); }

.btn--light { --bg: #fff; --fg: var(--c-ink); }
.btn--on-dark { --bg: transparent; --fg: var(--c-on-dark); border: 1.5px solid var(--c-line-dark); }
.btn--on-dark:hover { --bg: rgba(255,255,255,0.06); }

.btn--sm { padding: 0.72rem 1.15rem; font-size: 0.9rem; }
.btn--lg { padding: 1.15rem 1.9rem; font-size: 1.05rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 700; color: var(--c-accent-700);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* rating stars inline */
.stars { display: inline-flex; gap: 2px; color: var(--c-accent); }
.stars svg { width: 15px; height: 15px; }

/* ---------------------------------------------------------------------------
   5. Reveal
   --------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); will-change: transform, opacity; }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.07s; }
.reveal[data-delay="2"] { transition-delay: 0.14s; }
.reveal[data-delay="3"] { transition-delay: 0.21s; }
.reveal[data-delay="4"] { transition-delay: 0.28s; }
.reveal[data-delay="5"] { transition-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
