/* ============================================================
   Telesource Hub — corporate facade style system (cluster: moto-uk)
   Tokens per docs/02 §7. Cross-cluster variants MUST change
   prefix + tokens + structure (docs/02 §3.5).
   ============================================================ */

:root {
  --th-navy: #0e2038;
  --th-navy-2: #16304f;
  --th-navy-deep: #0a1930;
  --th-ink: #1c2b3a;
  --th-slate: #51617a;
  --th-slate-light: #9fb0c5;
  --th-brass: #c08a1e;
  --th-brass-2: #a8791a;
  --th-bg: #ffffff;
  --th-bg-alt: #f5f7fa;
  --th-line: #e3e8ef;
  --th-red: #b3362b;
  --th-green: #2e7d4f;
  --th-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --th-font-body: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --th-radius: 10px;
  --th-shadow: 0 10px 30px rgba(14, 32, 56, .08);
  --th-shadow-lift: 0 18px 44px rgba(14, 32, 56, .14);
  --th-max: 1140px;
  --th-section-y: clamp(64px, 9vw, 116px);
  --th-header-h: 72px;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--th-font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--th-ink);
  background: var(--th-bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--th-font-display); color: var(--th-navy); line-height: 1.15; margin: 0 0 .6em; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--th-navy); }

.th-container { max-width: var(--th-max); margin: 0 auto; padding: 0 24px; }
.th-section { padding: var(--th-section-y) 0; }
.th-section--alt { background: var(--th-bg-alt); }
.th-section--dark { background: var(--th-navy); color: #dbe4f0; }
.th-section--dark h2 { color: #fff; }

.th-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--th-navy); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 8px 0;
}
.th-skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--th-brass); outline-offset: 2px; }

::selection { background: var(--th-brass); color: var(--th-navy-deep); }

/* ---------- type helpers ---------- */

.th-eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--th-brass-2); margin: 0 0 1rem;
}
.th-section--dark .th-eyebrow, .th-hero .th-eyebrow { color: var(--th-brass); }

.th-h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 1rem; }
.th-lede { font-size: 1.15rem; color: var(--th-slate); max-width: 46rem; }
.th-section--dark .th-lede { color: var(--th-slate-light); }

/* ---------- buttons ---------- */

.th-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.55rem; border-radius: 8px; border: 1px solid transparent;
  font: 600 .95rem/1 var(--th-font-body); letter-spacing: .02em;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.th-btn:hover { transform: translateY(-1px); box-shadow: var(--th-shadow); }
.th-btn:active { transform: translateY(0); }

.th-btn--navy { background: var(--th-navy); color: #fff; }
.th-btn--navy:hover { background: var(--th-navy-2); }

.th-btn--brass { background: var(--th-brass); color: var(--th-navy-deep); }
.th-btn--brass:hover { background: #cf9a2e; }

.th-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.th-btn--ghost:hover { border-color: var(--th-brass); color: var(--th-brass); box-shadow: none; }

/* ---------- header ---------- */

.th-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.th-header--scrolled { border-bottom-color: var(--th-line); box-shadow: 0 4px 18px rgba(14, 32, 56, .06); }

.th-header__in { display: flex; align-items: center; gap: 2rem; height: var(--th-header-h); }

.th-brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--th-navy); }
.th-brand__mark { width: 34px; height: 34px; color: var(--th-navy); flex: none; }
.th-brand__word { font-family: var(--th-font-display); font-size: 1.22rem; font-weight: 500; letter-spacing: .01em; }
.th-brand__word b { font-weight: 700; color: var(--th-brass-2); }

.th-nav { display: flex; gap: 1.7rem; margin-left: auto; }
.th-nav__link {
  text-decoration: none; font-weight: 500; font-size: .97rem; color: var(--th-slate);
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.th-nav__link:hover { color: var(--th-navy); }
.th-nav__link[aria-current="page"] { color: var(--th-navy); border-bottom-color: var(--th-brass); }

.th-header__cta { flex: none; }

.th-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; margin-left: auto;
  background: none; border: 1px solid var(--th-line); border-radius: 8px; cursor: pointer;
}
.th-burger span { display: block; height: 2px; background: var(--th-navy); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.th-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.th-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.th-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.th-hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(192, 138, 30, .14), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 90px),
    linear-gradient(180deg, var(--th-navy) 0%, var(--th-navy-deep) 100%);
  color: #dbe4f0;
  padding: clamp(72px, 10vw, 130px) 0 clamp(56px, 8vw, 96px);
}

.th-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }

.th-hero__title {
  color: #fff; font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 600;
  margin: 0 0 1.1rem; letter-spacing: -.01em;
}
.th-hero__title em { font-style: normal; color: var(--th-brass); }
.th-hero__sub { font-size: 1.14rem; color: var(--th-slate-light); max-width: 34rem; margin-bottom: 2rem; }
.th-hero__actions { display: flex; gap: .9rem; flex-wrap: wrap; }

.th-hero__wall { display: grid; grid-template-columns: 1.25fr .75fr; grid-template-rows: repeat(2, 200px); gap: 14px; }
.th-hero__shot {
  margin: 0; overflow: hidden; border-radius: var(--th-radius); position: relative;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .38);
}
.th-hero__shot--1 { grid-row: 1 / 3; }
.th-hero__shot::after {
  content: ""; position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, .14);
  border-radius: inherit; pointer-events: none;
}
.th-hero__shot--2::before, .th-hero__shot--3::before {
  content: ""; position: absolute; inset: 10px -10px -10px 10px;
  border: 1px solid rgba(192, 138, 30, .55); border-radius: var(--th-radius); z-index: -1;
}
.th-hero__shot img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--th-focus, 50% 50%);
  transform: scale(var(--th-zoom, 1)); transform-origin: var(--th-focus, 50% 50%);
}

/* ---------- photo primitive (crops marketplace watermarks via framing) ---------- */

.th-photo { overflow: hidden; border-radius: var(--th-radius); }
.th-photo img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--th-focus, 50% 50%);
  transform: scale(var(--th-zoom, 1)); transform-origin: var(--th-focus, 50% 50%);
}

/* ---------- stats band ---------- */

.th-stats { background: var(--th-navy-deep); color: var(--th-slate-light); padding: 2.6rem 0; }
.th-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.th-stats__value {
  font-family: var(--th-font-display); font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  color: var(--th-brass); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.th-stats__label { font-size: .92rem; margin-top: .35rem; }
.th-stats__asof { text-align: center; font-size: .8rem; color: #5c6f88; margin-top: 1.6rem; letter-spacing: .04em; }

/* ---------- services cards ---------- */

.th-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.th-card {
  background: #fff; border: 1px solid var(--th-line); border-radius: var(--th-radius);
  padding: 1.9rem 1.7rem; position: relative;
  transition: box-shadow .2s ease, transform .2s ease;
}
.th-card::before {
  content: ""; position: absolute; top: -1px; left: 1.7rem; right: auto; width: 44px; height: 3px;
  background: var(--th-brass); border-radius: 0 0 3px 3px;
}
.th-card:hover { box-shadow: var(--th-shadow-lift); transform: translateY(-3px); }
.th-card__title { font-size: 1.3rem; }
.th-card__text { color: var(--th-slate); margin: 0; }

/* ---------- industries tiles ---------- */

.th-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.th-tile {
  position: relative; border-radius: var(--th-radius); overflow: hidden;
  aspect-ratio: 4 / 4.6; background: var(--th-navy);
  display: flex; align-items: flex-end;
  box-shadow: var(--th-shadow);
}
.th-tile__media { position: absolute; inset: 0; display: block; }
.th-tile__media img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--th-focus, 50% 50%);
  transform: scale(var(--th-zoom, 1)); transform-origin: var(--th-focus, 50% 50%);
  transition: transform .5s ease;
}
.th-tile:hover .th-tile__media img { transform: scale(calc(var(--th-zoom, 1) * 1.05)); }
.th-tile__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 25, 48, .05) 30%, rgba(10, 25, 48, .92) 88%);
}
.th-tile__body { position: relative; padding: 1.4rem 1.4rem 1.5rem; color: #e6edf6; }
.th-tile__name { color: #fff; font-size: 1.35rem; margin-bottom: .45rem; }
.th-tile__text { font-size: .95rem; line-height: 1.55; color: #c3cfdf; margin-bottom: .8rem; }
.th-tile__cta {
  color: var(--th-brass); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.th-tile__cta:hover { color: #d9a43a; }
.th-tile a.th-tile__media { outline-offset: -3px; }

/* ---------- brand cards ---------- */

.th-brandcards { display: grid; gap: 2rem; }
.th-brandcard {
  display: grid; grid-template-columns: 1.08fr .92fr;
  border: 1px solid var(--th-line); border-radius: var(--th-radius);
  overflow: hidden; background: #fff;
  transition: box-shadow .25s ease;
}
.th-brandcard:hover { box-shadow: var(--th-shadow-lift); }
.th-brandcard__media { display: grid; grid-template-columns: 1.25fr .75fr; gap: 10px; padding: 14px; background: var(--th-bg-alt); }
.th-brandcard__media .th-photo { aspect-ratio: 3.4 / 4; box-shadow: var(--th-shadow); }
.th-brandcard__media .th-photo:last-child { transform: translateY(14px); }
.th-brandcard__body { padding: clamp(1.6rem, 3vw, 2.6rem); display: flex; flex-direction: column; justify-content: center; }
.th-brandcard__name { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.th-brandcard__tagline { color: var(--th-slate); }
.th-brandcard__skus { font-size: .95rem; color: var(--th-slate); }
.th-brandcard__skus strong { color: var(--th-brass-2); font-variant-numeric: tabular-nums; }
.th-brandcard__link {
  margin-top: 1.1rem; font-weight: 600; text-decoration: none; color: var(--th-navy);
  border-bottom: 2px solid var(--th-brass); align-self: flex-start; padding-bottom: 2px;
}
.th-brandcard__link:hover { color: var(--th-brass-2); }

/* ---------- process ---------- */

.th-process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; counter-reset: step; }
.th-process__step { position: relative; padding-top: 3.6rem; }
.th-process__step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--th-brass); color: var(--th-brass-2);
  font-family: var(--th-font-display); font-weight: 600;
}
.th-process__step::after {
  content: ""; position: absolute; top: 1.3rem; left: 3rem; right: -1.6rem; height: 1px;
  background: var(--th-line);
}
.th-process__step:last-child::after { display: none; }
.th-process__step h3 { font-size: 1.12rem; margin-bottom: .4rem; }
.th-process__step p { color: var(--th-slate); font-size: .97rem; margin: 0; }

/* ---------- CTA band ---------- */

.th-cta {
  background:
    radial-gradient(800px 300px at 15% 120%, rgba(192, 138, 30, .18), transparent 60%),
    var(--th-navy);
  text-align: center; color: #dbe4f0;
}
.th-cta h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: .8rem; }
.th-cta p { color: var(--th-slate-light); max-width: 36rem; margin: 0 auto 1.8rem; }

/* ---------- contact ---------- */

.th-contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }

.th-contact__aside h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.th-contact__list { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.th-contact__list li { display: flex; gap: .8rem; padding: .8rem 0; border-top: 1px solid var(--th-line); }
.th-contact__list li:first-child { border-top: 0; }
.th-contact__step {
  flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--th-brass);
  color: var(--th-brass-2); display: grid; place-items: center;
  font-family: var(--th-font-display); font-size: .9rem; font-weight: 600; margin-top: .1rem;
}
.th-contact__meta { margin-top: 1.8rem; font-size: .97rem; color: var(--th-slate); }
.th-contact__meta a { font-weight: 600; }

.th-formcard {
  background: #fff; border: 1px solid var(--th-line); border-radius: var(--th-radius);
  padding: clamp(1.6rem, 3vw, 2.4rem); box-shadow: var(--th-shadow);
}
.th-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.th-form__row { display: flex; flex-direction: column; gap: .4rem; }
.th-form__row--full { grid-column: 1 / -1; }
.th-form__row label { font-weight: 600; font-size: .92rem; color: var(--th-navy); }
.th-form__row label .th-req { color: var(--th-brass-2); }
.th-form__row input, .th-form__row select, .th-form__row textarea {
  font: inherit; color: var(--th-ink);
  border: 1px solid #cdd7e2; border-radius: 8px; padding: .7rem .85rem; background: #fff;
}
.th-form__row textarea { min-height: 130px; resize: vertical; }
.th-form__row input:focus, .th-form__row select:focus, .th-form__row textarea:focus {
  outline: none; border-color: var(--th-brass); box-shadow: 0 0 0 3px rgba(192, 138, 30, .18);
}
.th-form__row input[aria-invalid="true"], .th-form__row textarea[aria-invalid="true"] { border-color: var(--th-red); }
.th-form__err { font-size: .84rem; color: var(--th-red); min-height: 1.1em; }
.th-form__consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--th-slate); }
.th-form__consent input { margin-top: .3rem; }
.th-form__consent a { color: var(--th-navy); }
.th-form__hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.th-form__actions { display: flex; align-items: center; gap: 1rem; margin-top: .4rem; }
.th-form__note { font-size: .84rem; color: var(--th-slate); }

.th-form__state { border-radius: var(--th-radius); padding: 1.3rem 1.4rem; margin-bottom: 1.2rem; font-size: .97rem; display: none; }
.th-form__state--ok { display: block; background: rgba(46, 125, 79, .09); border: 1px solid rgba(46, 125, 79, .4); color: var(--th-green); }
.th-form__state--err { display: block; background: rgba(179, 54, 43, .07); border: 1px solid rgba(179, 54, 43, .4); color: var(--th-red); }
.th-form__state[hidden] { display: none; }

.cf-turnstile { margin: .6rem 0 .4rem; }

/* ---------- legal prose ---------- */

.th-prose { max-width: 760px; }
.th-prose h1 { font-size: clamp(2rem, 4vw, 2.7rem); }
.th-prose h2 { font-size: 1.3rem; margin: 2em 0 .5em; }
.th-prose ul { padding-left: 1.2rem; }
.th-prose li { margin-bottom: .5rem; }
.th-prose .th-updated { color: var(--th-slate); font-style: italic; }

/* ---------- about / page head ---------- */

.th-pagehead { padding: clamp(48px, 7vw, 84px) 0 clamp(28px, 4vw, 44px); }
.th-pagehead h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); max-width: 22ch; }
.th-pagehead .th-lede { margin-top: .6rem; }

.th-feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.th-feature + .th-feature { margin-top: var(--th-section-y); }
.th-feature h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }

/* ---------- 404 ---------- */

.th-404 { text-align: center; padding: clamp(80px, 14vw, 160px) 24px; }
.th-404__code { font-family: var(--th-font-display); font-size: clamp(5rem, 16vw, 9rem); color: var(--th-navy); line-height: 1; }
.th-404__code em { font-style: normal; color: var(--th-brass); }

/* ---------- footer ---------- */

.th-footer { background: var(--th-navy-deep); color: var(--th-slate-light); margin-top: 0; }
.th-footer__grid {
  display: grid; grid-template-columns: 1.4fr .8fr .9fr .8fr; gap: 2.4rem;
  padding-top: clamp(48px, 7vw, 72px); padding-bottom: 2.4rem;
}
.th-brand--footer { color: #fff; margin-bottom: 1rem; }
.th-brand--footer .th-brand__word { font-size: 1.15rem; }
.th-footer__tagline { font-size: .95rem; margin-bottom: 1rem; }
.th-footer__head {
  font-family: var(--th-font-body); font-size: .8rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: #7e91a9; margin: 0 0 1rem;
}
.th-footer__link {
  display: block; color: #c3cfdf; text-decoration: none; font-size: .97rem; padding: .28rem 0;
}
a.th-footer__link:hover { color: var(--th-brass); }
.th-footer__note { font-size: .84rem; color: #7e91a9; margin-top: .9rem; }
.th-footer__legal { border-top: 1px solid rgba(255, 255, 255, .09); padding-top: 1.4rem; padding-bottom: 1.6rem; }
.th-footer__legal p { margin: 0; font-size: .88rem; color: #7e91a9; }

/* ---------- reveal (JS-gated: initial hidden state only under html.js) ---------- */

html.js .th-reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
html.js .th-reveal--in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .th-reveal { opacity: 1; transform: none; transition: none; }
  .th-tile__media img, .th-btn, .th-card { transition: none !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .th-hero__grid { grid-template-columns: 1fr; }
  .th-hero__wall { grid-template-rows: repeat(2, 170px); }
  .th-tiles { grid-template-columns: repeat(2, 1fr); }
  .th-cards { grid-template-columns: 1fr; }
  .th-brandcard { grid-template-columns: 1fr; }
  .th-brandcard__media .th-photo:last-child { transform: none; }
  .th-contact { grid-template-columns: 1fr; }
  .th-feature { grid-template-columns: 1fr; }
  .th-footer__grid { grid-template-columns: 1fr 1fr; }
  .th-process { grid-template-columns: 1fr 1fr; gap: 2rem 1.4rem; }
  .th-process__step:nth-child(2)::after { display: none; }
}

@media (max-width: 680px) {
  .th-nav {
    display: none; position: absolute; top: var(--th-header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--th-line); box-shadow: var(--th-shadow);
    padding: .6rem 24px 1rem;
  }
  .th-nav--open { display: flex; }
  .th-nav__link { padding: .8rem 0; border-bottom: 1px solid var(--th-line); font-size: 1.05rem; }
  .th-nav__link:last-child { border-bottom: 0; }
  .th-header__cta { display: none; }
  .th-burger { display: flex; }
  .th-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem .8rem; }
  .th-tiles { grid-template-columns: 1fr; }
  .th-process { grid-template-columns: 1fr; }
  .th-process__step::after { display: none; }
  .th-form__grid { grid-template-columns: 1fr; }
  .th-footer__grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .th-hero__wall { grid-template-columns: 1fr; grid-template-rows: 220px 130px; }
  .th-hero__shot--3 { display: none; }
  .th-hero__shot--1 { grid-row: 1; grid-column: 1; }
  .th-hero__shot--2 { grid-row: 2; grid-column: 1; }
}
