/* TechnoLogic Digital — site styles.
 * Entry point. Imports the design-system tokens, then adds site-specific
 * composition classes. The design-system components.css provides .tl-*
 * primitives (button, nav, card, accordion, circle CTA, eyebrow) used
 * directly from the markup where possible.
 */

@import url("tokens/fonts.css");
@import url("tokens/colors.css");
@import url("tokens/typography.css");
@import url("tokens/spacing.css");
@import url("tokens/base.css");
@import url("tokens/components.css");

/* ---------------------------------------------------------------
   Global
   --------------------------------------------------------------- */

html { scroll-behavior: smooth; overflow-x: hidden; }
body { min-height: 100vh; overflow-x: hidden; width: 100%; }
img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute; left: 12px; top: -40px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-inverse); color: var(--text-inverse);
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  z-index: 100;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 16px; }

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

.section {
  padding: var(--section-pad-y) 0;
  border-top: 1px solid var(--border-hairline);
}
.section--alt { background: var(--surface-section); }
.section--flush { border-top: 0; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 767px) {
  .section { padding: var(--space-20) 0; }
}

/* ---------------------------------------------------------------
   Nav — floating pill, centred, fixed
   --------------------------------------------------------------- */

.nav-wrap {
  position: fixed;
  top: 20px; left: 0; right: 0;
  z-index: 40;
  display: flex; justify-content: center;
  padding: 0 16px;
  pointer-events: none;
  transition: top var(--dur-base) var(--ease-out);
}
.nav-wrap.is-condensed { top: 12px; }
.nav-wrap > .tl-nav { pointer-events: auto; }

.tl-nav { width: 100%; max-width: var(--nav-max); height: 60px; padding: 8px 8px 8px 22px; }
.tl-nav__brand { display: flex; align-items: center; }
.tl-nav__brand img { display: block; height: 30px; width: auto; }
.tl-nav__links a { text-decoration: none; }
.tl-nav__cta {
  display: inline-flex; align-items: center;
  height: 44px; padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--surface-inverse); color: var(--text-inverse);
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
  transition:
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}
.tl-nav__cta:hover { box-shadow: var(--shadow-cta-glow); color: var(--text-inverse); }
.tl-nav__cta:active { transform: scale(0.97); }

.tl-nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: transparent; color: var(--text-strong);
  cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease-out);
}
.tl-nav__toggle:hover { background: var(--white-a06); }
.tl-nav__toggle svg { display: block; }

@media (max-width: 767px) {
  .tl-nav { height: auto; padding: 6px 6px 6px 18px; }
  .tl-nav__brand img { height: 26px; }
  .tl-nav__links, .tl-nav__cta { display: none; }
  .tl-nav__toggle { display: inline-flex; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .tl-nav__links { gap: 2px; }
  .tl-nav__link { padding: 6px 10px; font-size: 12px; }
}

/* ---------------------------------------------------------------
   Mobile menu overlay
   --------------------------------------------------------------- */

.menu {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5, 5, 5, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding: 28px 24px 32px;
  display: flex; flex-direction: column; gap: 40px;
  transform: translateY(-10px); opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dur-base) var(--ease-out),
    opacity var(--dur-base) var(--ease-out);
}
.menu.is-open { transform: none; opacity: 1; pointer-events: auto; }
.menu__top { display: flex; align-items: center; justify-content: space-between; }
.menu__top img { height: 26px; width: auto; display: block; }
.menu__close {
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: transparent; color: var(--text-strong);
  cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
}
.menu__links { display: flex; flex-direction: column; gap: 4px; margin-top: 24px; }
.menu__link {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.05;
  color: var(--text-strong); padding: 12px 0;
}
.menu__cta {
  margin-top: auto;
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 26px;
  border-radius: var(--radius-pill);
  background: var(--surface-inverse); color: var(--text-inverse);
  font-size: 15px; font-weight: 500; align-self: stretch;
}
body.menu-open { overflow: hidden; }

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(140px, 22vw, 220px) 0 clamp(96px, 14vw, 160px);
  text-align: center;
}
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 100%);
}
.hero__bg svg {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 120%; max-width: 1600px; height: 100%;
}
.hero__glow {
  position: absolute; left: 50%; top: 50%;
  width: min(900px, 90vw); aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: var(--glow-hero);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 36px; padding: 0 var(--gutter);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(64px, 8.6vw, 124px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--text-strong);
  text-wrap: nowrap;
}
.accent {
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--text-accent-word);
  letter-spacing: -0.045em;
}
.hero__lead {
  max-width: 540px;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6; font-weight: 300;
  color: var(--text-body);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition:
    box-shadow var(--dur-base) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--surface-inverse); color: var(--text-inverse); }
.btn--primary:hover { box-shadow: var(--shadow-cta-glow); color: var(--text-inverse); }
.btn--ghost { background: transparent; color: var(--text-strong); border-color: var(--border-subtle); }
.btn--ghost:hover { border-color: var(--border-strong); background: var(--white-a04); color: var(--text-strong); }

@media (max-width: 767px) {
  .hero { padding: 128px 0 88px; }
  .hero__title {
    font-size: clamp(48px, 13.5vw, 68px);
    max-width: 100%;
    text-wrap: wrap;
  }
  .hero__actions { flex-direction: column; width: 100%; }
  .btn { justify-content: center; width: 100%; height: 52px; }
}

/* ---------------------------------------------------------------
   Manifesto — words dim by default, brighten as section scrolls
   --------------------------------------------------------------- */

.manifesto {
  display: flex; flex-direction: column; align-items: center;
  gap: 36px; text-align: center;
}
.manifesto__eye { color: var(--text-faint); }
.manifesto__text {
  max-width: 900px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text-strong);
}
/* Only dim initial words when JS is active; the JS-driven brighten
 * only makes sense with scroll-based enhancement. */
.js .manifesto__word {
  color: var(--ink-700);
  transition: color 400ms var(--ease-out);
  will-change: color;
}
@media (max-width: 767px) {
  .manifesto { text-align: left; align-items: flex-start; }
  .manifesto__text { font-size: 28px; line-height: 1.2; }
}

/* ---------------------------------------------------------------
   Rails marquee
   --------------------------------------------------------------- */

.rails {
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  padding: clamp(28px, 4vw, 44px) 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.rails__track {
  display: flex;
  gap: clamp(40px, 5vw, 64px);
  width: max-content;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-faint);
  white-space: nowrap;
  animation: rails-slide 48s linear infinite;
}
.rails:hover .rails__track { animation-play-state: paused; }
@keyframes rails-slide { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------
   Section head — mono eyebrow + display h2 (+ optional right blurb)
   --------------------------------------------------------------- */

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 56px);
}
.sec-head__title { display: flex; flex-direction: column; gap: 24px; }
.sec-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--text-strong);
}
.sec-head__blurb {
  max-width: 360px;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--text-body);
}
@media (max-width: 767px) {
  .sec-head { flex-direction: column; align-items: flex-start; margin-bottom: 32px; gap: 20px; }
  .sec-head__blurb { max-width: none; }
}

/* ---------------------------------------------------------------
   Services grid
   --------------------------------------------------------------- */

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 767px) { .services { grid-template-columns: 1fr; gap: 12px; } }

.service {
  min-height: 260px;
  box-sizing: border-box;
  padding: 32px;
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  transition:
    background var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}
.service:hover { background: var(--surface-raised); border-color: var(--border-subtle); }
.service__meta { display: flex; justify-content: space-between; align-items: flex-start; }
.service__index {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--text-numeral);
}
.service__arrow { color: var(--text-faint); }
.service__body { display: flex; flex-direction: column; gap: 12px; }
.service h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 28px);
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.service p {
  font-size: 15px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--text-body);
  max-width: 440px;
}
@media (max-width: 767px) {
  .service { padding: 24px; min-height: 0; gap: 28px; }
}

/* ---------------------------------------------------------------
   Approach — 3 steps
   --------------------------------------------------------------- */

.approach {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border-hairline);
}
.approach__step {
  padding: 40px 40px 0 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--border-hairline);
}
.approach__step:nth-child(2) { padding: 40px; }
.approach__step:last-child { padding: 40px 0 0 40px; border-right: 0; }
.approach__num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-numeral);
}
.approach__step h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.approach__step p {
  font-size: 15px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--text-body);
}
@media (max-width: 1023px) {
  .approach { grid-template-columns: 1fr; }
  .approach__step,
  .approach__step:nth-child(2),
  .approach__step:last-child {
    padding: 28px 0;
    border-right: 0;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-hairline);
  }
  .approach__step:last-child { border-bottom: 0; }
  .approach__num { font-size: 40px; width: 56px; flex-shrink: 0; }
  .approach__body { display: flex; flex-direction: column; gap: 8px; }
  .approach__step h3 { font-size: 22px; }
}

/* ---------------------------------------------------------------
   Audience — 2 col split (title | list)
   --------------------------------------------------------------- */

.audience {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 80px;
}
.audience__intro { display: flex; flex-direction: column; gap: 24px; }
.audience__intro h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--text-strong);
}
.audience__intro p {
  max-width: 420px;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--text-body);
}
.audience__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-hairline);
}
.audience__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-hairline);
  transition: transform var(--dur-base) var(--ease-out);
}
.audience__row:hover { transform: translateX(6px); }
.audience__row-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.audience__row-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-body);
  text-align: right;
}
@media (max-width: 1023px) {
  .audience { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 767px) {
  .audience__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 20px 0;
  }
  .audience__row-desc { text-align: left; }
}

/* ---------------------------------------------------------------
   FAQ — 2 col split, using .tl-acc from tokens
   --------------------------------------------------------------- */

.faq {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 80px;
  align-items: start;
}
.faq__intro { display: flex; flex-direction: column; gap: 24px; }
.faq__intro h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--text-strong);
}
.faq__still {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-strong);
  align-self: flex-start;
  text-decoration: none;
}
.faq__still::after {
  content: "";
  width: 48px;
  height: 1px;
  background: var(--text-strong);
  transition: width var(--dur-base) var(--ease-out);
}
.faq__still:hover::after { width: 72px; }

.tl-acc__trigger { font-size: clamp(20px, 1.8vw, 24px); }

@media (max-width: 1023px) {
  .faq { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------------------------------------------------------------
   Closing CTA
   --------------------------------------------------------------- */

.closing {
  position: relative;
  overflow: hidden;
  padding: clamp(96px, 14vw, 160px) 0;
  border-top: 1px solid var(--border-hairline);
}
.closing__wash {
  position: absolute;
  left: 22%;
  top: 5%;
  width: min(800px, 80vw);
  aspect-ratio: 1 / 1;
  background: var(--glow-accent);
  pointer-events: none;
}
.closing__inner {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
}
.closing__copy { display: flex; flex-direction: column; gap: 28px; max-width: 640px; }
.closing__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(60px, 8vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--text-strong);
}
.closing__lead {
  max-width: 460px;
  font-size: clamp(16px, 1.4vw, 17px);
  line-height: 1.6;
  font-weight: 300;
  color: var(--text-body);
}
.closing__circle {
  flex-shrink: 0;
  width: 220px; height: 220px;
  border-radius: 999px;
  background: var(--surface-inverse); color: var(--text-inverse);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition:
    transform var(--dur-slow) var(--ease-out),
    box-shadow var(--dur-slow) var(--ease-out);
}
.closing__circle:hover {
  transform: scale(1.06);
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.16);
  color: var(--text-inverse);
}
@media (max-width: 1023px) {
  .closing__inner { flex-direction: column; align-items: flex-start; }
  .closing__circle { width: 168px; height: 168px; font-size: 22px; }
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border-hairline);
  padding: 80px 0 40px;
  background: var(--surface-section);
}
.footer__inner { display: flex; flex-direction: column; gap: 72px; }
.footer__top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.footer__logo { height: 56px; width: auto; display: block; }
.footer__cols {
  display: flex;
  gap: 96px;
  flex-wrap: wrap;
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  font-weight: 300;
}
.footer__col-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-label-accent);
  margin-bottom: 6px;
}
.footer__col a { color: var(--text-body); }
.footer__col a:hover { color: var(--text-strong); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
  flex-wrap: wrap;
}
.footer__bottom a { color: var(--text-faint); }
.footer__bottom a:hover { color: var(--text-strong); }

@media (max-width: 767px) {
  .footer { padding: 56px 0 32px; }
  .footer__logo { height: 48px; }
  .footer__inner { gap: 48px; }
  .footer__cols { gap: 36px 24px; display: grid; grid-template-columns: repeat(2, 1fr); }
  .footer__col:last-child { grid-column: span 2; }
}

/* ---------------------------------------------------------------
   Motion — hero rise + scroll reveal
   --------------------------------------------------------------- */

.rise { opacity: 0; animation: rise 900ms var(--ease-out) forwards; }
.rise.rise--d1 { animation-delay: 120ms; }
.rise.rise--d2 { animation-delay: 240ms; }
.rise.rise--d3 { animation-delay: 360ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* Reveal styles only apply when JS bootstraps and marks html.js.
 * Without JS, content renders as-is (progressive enhancement). */
.js [data-reveal],
.js [data-reveal-stagger] > * {
  opacity: 0; transform: translateY(24px);
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out);
}
.js [data-reveal].is-in,
.js [data-reveal-stagger].is-in > * {
  opacity: 1; transform: none;
}
.js [data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: 80ms; }
.js [data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: 160ms; }
.js [data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: 240ms; }
.js [data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: 320ms; }
.js [data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: 400ms; }

/* Hero SVG background flowing animation */
@keyframes drift-a { from { transform: translate3d(0,0,0); } to { transform: translate3d(-60px, 24px, 0); } }
@keyframes drift-b { from { transform: translate3d(0,0,0); } to { transform: translate3d(50px, -30px, 0); } }
@keyframes flow    { to { stroke-dashoffset: -600; } }
@keyframes pulse   { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.7; } }

.drift-a { animation: drift-a 28s ease-in-out infinite alternate; }
.drift-b { animation: drift-b 34s ease-in-out infinite alternate; }
.flow      { animation: flow 14s linear infinite; }
.flow-slow { animation: flow 22s linear infinite; }
.pulse-a   { animation: pulse 5s ease-in-out infinite; }
