/* ==========================================================================
   base.css
   Reset, page layout and the shared components every page uses. Colors,
   spacing and motion come from tokens.css; theme.css restyles these
   components to TrainOn's product look. The home hero is in hero.css.
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  line-height: 1.5;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
p,
ul,
figure,
blockquote {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
}
.wrap {
  max-width: calc(1200px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
h1,
h2,
blockquote {
  text-wrap: balance;
}
/* body copy never ends on a single word (inherited, so bold runs and captions follow) */
h3,
p,
li,
figcaption {
  text-wrap: pretty;
}
h2 {
  font-size: clamp(34px, 4.4vw, 56px);
}
section {
  position: relative;
  padding: var(--space-section) 0;
}
/* Scroll reveals: hidden and lowered until site.js adds .in (end state shown when no motion) */
.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
}
.js-motion [data-reveal].in {
  opacity: 1;
  transform: none;
}
.js-motion .rv {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
}
.js-motion .rv.in {
  opacity: 1;
  transform: none;
}
/* ==========================================================================
   Header
   ========================================================================== */
.hdr {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}
.hdr-in {
  pointer-events: auto;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-16);
}
.brand .logo {
  height: 19px;
  width: auto;
  color: var(--color-text);
  position: relative;
}
/* Tapping the logo flashes the power "O" like a power button: a quick teal pulse with a soft glow
   behind it that fades straight back (nav.js adds .tap). 76% / 38% is the center of the O. */
.brand {
  position: relative;
}
.brand::before {
  content: "";
  position: absolute;
  left: 76%;
  top: 38%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--accent-rgb) / 0.45), rgb(var(--accent-rgb) / 0) 68%);
  opacity: 0;
  pointer-events: none;
}
.brand.tap::before {
  animation: brand-tap-glow 0.32s ease-out;
}
.brand.tap .logo-o {
  animation: brand-tap-o 0.32s ease-out;
}
@keyframes brand-tap-glow {
  35% {
    opacity: 1;
  }
}
@keyframes brand-tap-o {
  35% {
    color: var(--color-accent);
  }
}
.nav-links {
  display: flex;
  gap: var(--sp-34);
  font-size: 15px;
}
.btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-line);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.menu-btn i {
  width: 16px;
  height: 1.5px;
  background: #fff;
  display: block;
}
/* ==========================================================================
   Button row
   ========================================================================== */
.cta-row {
  display: flex;
  gap: var(--sp-12);
  flex-wrap: wrap;
}
/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  border: 1px solid var(--color-line);
  padding: clamp(var(--sp-22), 2.4vw, var(--sp-34));
  position: relative;
  overflow: hidden;
}
.card h3 {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
/* ==========================================================================
   Closing call to action, skip link
   ========================================================================== */
.cta-panel {
  text-align: center;
  padding: clamp(var(--sp-48), 7vw, 96px) var(--sp-24);
}
.cta-panel h2 {
  max-width: 20ch;
  margin: 0 auto;
}
.cta-panel .btn {
  margin-top: var(--sp-34);
}
.cta-panel .micro {
  margin-top: var(--sp-20);
  color: #bfe9ec;
  font-size: 15px;
}
.cta-panel > * {
  position: relative;
}
.skip {
  position: absolute;
  left: 8px;
  top: -60px;
}
.skip:focus {
  top: 8px;
  background: #fff;
  color: #000;
  padding: var(--sp-8) var(--sp-12);
  z-index: 99;
}
@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .hdr-cta {
    display: none;
  }
}
/* ==========================================================================
   Smooth scrolling (Lenis)
   ========================================================================== */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}
.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch] {
  overscroll-behavior: contain;
}
.lenis.lenis-smooth iframe {
  pointer-events: none;
}
/* ==========================================================================
   Buttons and calls to action
   ========================================================================== */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--dur-fast),
    color var(--dur-fast);
}
/* ==========================================================================
   Page hero entrance: shared keyframes (home hero and inner pages)
   ========================================================================== */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes hero-line-up {
  from {
    transform: translate3d(0, 112%, 0);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes hero-show {
  to {
    opacity: 1;
  }
}
/* ==========================================================================
   Closing section and footer
   ========================================================================== */
#close {
  padding-bottom: clamp(var(--sp-36), 5vw, var(--sp-64));
}
#close .wrap {
  position: relative;
  z-index: 1;
}
/* Footer: TrainOn's own from trainon.io. Lavender panel with Night ink and a full-width wordmark. */
.site-footer {
  --ink: var(--fg-black);
  background: #c1c1d1;
  color: var(--ink);
  padding: clamp(var(--sp-48), 6vw, 96px) 0 clamp(var(--sp-32), 4vw, 56px);
}
/* links first, so the component rules below can override */
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.site-footer a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8) var(--sp-32);
}
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--sp-32);
}
.footer-nav a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-social {
  display: flex;
  gap: var(--sp-8);
  margin-right: -12px; /* glyphs line up with the wrap edge; the 44px tap areas overhang */
}
.footer-social a {
  width: 44px;
  height: 44px;
  justify-content: center;
}
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--sp-24);
  margin-top: clamp(var(--sp-48), 8vw, 140px);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--ink);
  font-size: 14px;
}
.footer-legal {
  display: flex;
  gap: var(--sp-24);
  margin-right: auto;
  font-size: 16px;
}
.jt-credit {
  color: rgb(var(--night-rgb) / 0.7) !important; /* gray on lavender, 5.3:1 */
}
.footer-word {
  margin-top: clamp(var(--sp-32), 5vw, 72px);
  aspect-ratio: 127/23;
  background: var(--ink);
  -webkit-mask: url("../img/trainon-wordmark.svg") center/100% 100% no-repeat;
  mask: url("../img/trainon-wordmark.svg") center/100% 100% no-repeat;
}
@media (max-width: 760px) {
  .footer-top,
  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-social {
    margin: 0 0 0 -12px;
  }
}
