/* StudyTravelPlus site tokens (website rebuild, Option C direction).
   Source: Brand Kit v1.2 and Hybrid Master Website Specification v1.1,
   sections 6.2 and 6.3. Loaded before style.css on every page.
   Tool pages keep their own tokens in tools-base.css (lead chat owns it).

   Measured contrast (WCAG 2), 22 November 2026:
   Deep on Paper 13.64:1 · Muted on Paper 6.82:1, on white 7.69:1, on Aloe 6.14:1
   Rust on Paper 5.33:1, on Aloe 4.80:1 · White on Rust 6.01:1
   Deep on Coral 5.89:1 · Aloe on Deep 12.28:1, on Juniper 9.76:1
   Control border #5D706D on Paper 4.65:1, on white 5.24:1
   Button rule (owner decision EG-06, 22 Nov 2026): Coral buttons only on
   dark sections (Deep, Juniper); Rust buttons on light sections. Coral is
   never text on Paper (2.32:1). */

@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-Latin-Variable.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette */
  --stp-deep: #0F2926;
  --stp-juniper: #173B37;
  --stp-rust: #A84326;
  --stp-aloe: #DCE9DF;
  --stp-paper: #F5F1E8;
  --stp-coral: #EF8354;
  --stp-white: #FFFFFF;

  /* Text and controls */
  --stp-ink: #0F2926;
  --stp-muted: #435754;
  --stp-control-border: #5D706D;
  --stp-hairline: #0F292633;
  --stp-on-dark: #F5F1E8;
  --stp-on-dark-muted: #DCE9DF;
  --stp-focus: #A84326;
  --stp-focus-on-dark: #EF8354;

  /* Buttons */
  --stp-btn-light-bg: #A84326;
  --stp-btn-light-text: #FFFFFF;
  --stp-btn-dark-bg: #EF8354;
  --stp-btn-dark-text: #0F2926;

  /* Type */
  --stp-font-display: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --stp-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --stp-text-base: 1.0625rem;
  --stp-text-small: 0.9375rem;
  --stp-h1: clamp(2.25rem, 5vw, 4.25rem);
  --stp-h2: clamp(1.75rem, 3vw, 2.5rem);
  --stp-h3: clamp(1.25rem, 2vw, 1.5rem);
  --stp-leading: 1.6;

  /* Space, shape, depth */
  --stp-space-1: 0.5rem;
  --stp-space-2: 1rem;
  --stp-space-3: 1.5rem;
  --stp-space-4: 2rem;
  --stp-space-6: 3rem;
  --stp-space-8: 4rem;
  --stp-space-12: 6rem;
  --stp-container: 77.5rem;
  --stp-radius-sm: 0.75rem;
  --stp-radius: 1.25rem;
  --stp-radius-lg: 1.75rem;
  --stp-radius-pill: 999px;
  --stp-shadow: 0 1.25rem 2.5rem rgba(15, 41, 38, 0.13);
  --stp-shadow-lift: 0 1.875rem 3.125rem rgba(0, 0, 0, 0.35);
  --stp-target: 2.75rem;

  /* Motion (applied only inside the no-preference query below) */
  --stp-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --stp-duration: 0.6s;

  /* Sticky header offset; the shell sets the real value in step 3 */
  --stp-header-offset: 0px;
}

html {
  scroll-padding-top: calc(var(--stp-header-offset) + 1rem);
}

/* Resting state is always visible and unmoved. Motion is opt-in, never a
   global duration override (spec 6.3). */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .stp-anim {
    transition: transform var(--stp-duration) var(--stp-ease),
      background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
  }
  .stp-float { animation: stp-float 7s ease-in-out infinite; }
  .stp-dash { animation: stp-dash 3s linear infinite; }
  .stp-pulse { animation: stp-pulse 2.4s ease-in-out infinite; }
}

@keyframes stp-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes stp-dash { to { stroke-dashoffset: -40; } }
@keyframes stp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Windows high-contrast and other forced-colour modes */
@media (forced-colors: active) {
  .stp-btn, .stp-card { border: 1px solid CanvasText; }
  :focus-visible { outline: 3px solid Highlight; }
}

/* Wordmark: always the brand kit SVG, never typed text */
.stp-wordmark { display: inline-flex; align-items: center; min-height: var(--stp-target); }
.stp-wordmark img { display: block; height: 2.125rem; width: auto; }

/* Display type: Sora for headings site-wide */
h1, h2, h3 { font-family: var(--stp-font-display); }
