/* Teacher Tutors — Design Tokens (v2)
 * Mirrors the live theteachertutors.com palette and typography.
 * Hand-edited. Copied to public/css/public/ via webpack.mix.js. */

/* Gordita display font (self-hosted, files already shipped in /public/fonts/) */
@font-face {
  font-family: 'Gordita';
  src: url('/fonts/Gordita-Regular.woff2') format('woff2'),
       url('/fonts/Gordita-Regular.woff')  format('woff'),
       url('/fonts/Gordita-Regular.ttf')   format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gordita';
  src: url('/fonts/Gordita-Medium.woff2') format('woff2'),
       url('/fonts/Gordita-Medium.woff')  format('woff'),
       url('/fonts/Gordita-Medium.ttf')   format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gordita';
  src: url('/fonts/Gordita-Bold.woff2') format('woff2'),
       url('/fonts/Gordita-Bold.woff')  format('woff'),
       url('/fonts/Gordita-Bold.ttf')   format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colors — pulled from live site :root variables */
  --primary-color:   #3c6ae0;   /* blue — primary CTA + links */
  --primary-color-2: #2a55e0;   /* blue gradient end */
  --secondary-color: #262626;   /* near-black — dark buttons, display text */
  --txt-color:       #595f6f;   /* body text */
  --header-color:    #d7f7fa;   /* light teal — hero/banner background */
  --bg-color-light:  #f2f4fa;   /* subtle section background */
  --border-color:    #d1d1d1;   /* default border */
  --color3:          #5e6476;   /* meta / secondary text */

  /* Service / accent colors (multi-color card row) */
  --c-blue:    #2d69f0;
  --c-pink:    #dd246e;
  --c-purple:  #8007e6;
  --c-green:   #0cae74;

  /* Surfaces */
  --white:      #ffffff;
  --paper:      #ffffff;
  --paper-deep: #f2f4fa;
  --paper-edge: #eef0f6;

  /* Legacy editorial aliases — kept so the existing livingston.css class names
     still resolve. They now point to the live-site palette. */
  --ink:        var(--secondary-color);
  --ink-soft:   #3d3d3a;
  --ink-mute:   var(--color3);
  --amber:      var(--primary-color);
  --amber-soft: rgba(60, 106, 224, 0.12);
  --ink-amber:  var(--primary-color);
  --rule:        rgba(38, 38, 38, 0.10);
  --rule-strong: rgba(38, 38, 38, 0.20);

  /* Typography stacks */
  --font-display: 'Gordita', 'Source Sans Pro', system-ui, -apple-system, sans-serif;
  --font-body:    'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --content-max:      1180px;
  --gutter-mobile:    24px;
  --gutter-desk:      48px;
  --section-y-mobile: 64px;
  --section-y-desk:   96px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows — match live-site .services_box shadow */
  --shadow-card:   0 10px 30px rgba(38, 38, 38, 0.08);
  --shadow-card-2: 0 0 30px 4px rgba(0, 0, 0, 0.15);
}

/* ---------- Reset (minimal) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--txt-color);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* overflow-x:clip prevents horizontal page scroll WITHOUT turning body
     into a scroll container. overflow-x:hidden would silently break
     position:sticky on the header in Chrome. */
  overflow-x: clip;
}
html { overflow-x: clip; }

img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 200ms var(--ease-out);
}
a:hover { color: var(--primary-color-2); }
a:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; border-radius: 4px; }

:target, :focus { scroll-margin-top: 96px; }

/* Skip link */
.tt-skip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 12px 16px;
  background: var(--primary-color);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transform: translateY(-110%);
  transition: transform 200ms var(--ease-out);
}
.tt-skip:focus {
  transform: none;
  color: var(--white);
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Screen-reader-only utility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Container & sections ---------- */
.tt-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter-mobile);
}
@media (min-width: 992px) {
  .tt-container { padding: 0 var(--gutter-desk); }
}

.tt-section {
  padding-top: var(--section-y-mobile);
  padding-bottom: var(--section-y-mobile);
}
@media (min-width: 992px) {
  .tt-section {
    padding-top: var(--section-y-desk);
    padding-bottom: var(--section-y-desk);
  }
}

/* ---------- Typography utilities ---------- */
.tt-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin: 0 0 14px;
}

.tt-display {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
h1.tt-display { font-size: clamp(1.85rem, 4.2vw, 2.65rem); }
h2.tt-display { font-size: clamp(1.55rem, 3.5vw, 2.15rem); }
h3.tt-display { font-size: clamp(1.15rem, 2vw, 1.4rem); }

.tt-lede {
  font-family: var(--font-body);
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  line-height: 1.65;
  color: var(--txt-color);
  max-width: 38rem;
  margin: 18px 0 0;
}

.tt-meta {
  font-size: 13px;
  color: var(--color3);
  letter-spacing: 0.01em;
}

/* ---------- Buttons (mirror live site) ---------- */
.tt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tt-btn--primary {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-color-2) 100%);
  color: var(--white);
  border-color: var(--primary-color);
}
.tt-btn--primary:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--white);
}

.tt-btn--ghost {
  background: var(--white);
  color: var(--primary-color);
  border-color: var(--primary-color);
}
.tt-btn--ghost:hover {
  background: var(--primary-color);
  color: var(--white);
}

.tt-btn--dark {
  background: var(--secondary-color);
  color: var(--white);
  border-color: var(--secondary-color);
}
.tt-btn--dark:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* ---------- Reveal animation ----------
 * Progressive enhancement: the opacity:0 starting frame is ONLY applied when
 * livingston.js has confirmed it can run the IntersectionObserver (it tags
 * <html> with .js-reveal-ready). If the script fails — old mobile browser,
 * blocked JS, observer never firing — content stays visible by default
 * instead of hiding the entire page below the trust strip. */
.js-reveal-ready .tt-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  will-change: opacity, transform;
}
.js-reveal-ready .tt-reveal.is-revealed {
  opacity: 1;
  transform: none;
}

/* Staggered children: each child fades+lifts on its own intersection */
.js-reveal-ready .tt-reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.js-reveal-ready .tt-reveal-stagger.is-revealed > * { opacity: 1; transform: none; }
.js-reveal-ready .tt-reveal-stagger.is-revealed > *:nth-child(1) { transition-delay: 0ms; }
.js-reveal-ready .tt-reveal-stagger.is-revealed > *:nth-child(2) { transition-delay: 80ms; }
.js-reveal-ready .tt-reveal-stagger.is-revealed > *:nth-child(3) { transition-delay: 160ms; }
.js-reveal-ready .tt-reveal-stagger.is-revealed > *:nth-child(4) { transition-delay: 240ms; }
.js-reveal-ready .tt-reveal-stagger.is-revealed > *:nth-child(n+5) { transition-delay: 320ms; }

/* Global reduced-motion: kill every transition + animation site-wide.
   Reveal initial-state override is needed because the wildcard only neutralises
   transitions, not the opacity:0 starting frame. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .tt-reveal,
  .tt-reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
