/* TangiCred homepage styles — extracted from index.html (v2 refactor) */

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

:root {
  --bg: #131C2B;
  --bg-alt: #182338;
  --text: #F2F4F8;
  --text-secondary: #D6DDE8;
  --text-muted: #A3AFC3;
  --accent: #FF7A00;
  --accent-hover: #FF9333;
  --accent-soft: rgba(255, 122, 0, 0.18);
  --border: rgba(201, 209, 223, 0.12);
  --border-strong: rgba(201, 209, 223, 0.26);
  --max-w: 880px;
  --font: 'Satoshi', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Fraunces', 'Iowan Old Style', 'Cambria', Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 200;
  border-radius: 3px;
  text-decoration: none;
}

.skip-link:focus { top: 0.75rem; }

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ── Fixed motion stage (the cinematic background) ── */
/* Static engineered backdrop (2026-07-20, replaced the 4-act video stage).
   Two very low-opacity brand-orange glows over a vertical navy gradient, plus a
   fine grid — the visual language of infrastructure rather than motion graphics.
   No motion: nothing competes with body copy, and no reduced-motion fallback is
   needed. Costs ~0 bytes against the 43 MB of video it replaces. */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(ellipse 95% 65% at 10% 92%, rgba(255, 122, 0, 0.18) 0%, transparent 58%),
    radial-gradient(ellipse 75% 55% at 88% 6%,  rgba(255, 122, 0, 0.08) 0%, transparent 62%),
    linear-gradient(180deg, #152031 0%, #121B29 55%, #0E1622 100%);
}

/* Fine grid: 1px lines at 3% over a 72px cell. Reads as structure up close and
   vanishes at a glance — enough to feel engineered, not enough to notice. */
.bg-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 209, 223, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 209, 223, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 78%);
}

.bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 2.4s var(--ease);
  will-change: opacity;
}

/* Video reads as ambient light, not footage: dimmed well below full strength
   and slightly desaturated, over the dark stage colour */
.bg-layer.is-active { opacity: 0.55; }

.bg-layer video,
.bg-layer .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.8);
}

.bg-layer .poster {
  background-size: cover;
  background-position: center;
}

/* Vignette + readability scrim that floats above the video, below content */
.bg-scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Lightened 2026-07-20: this held contrast over moving video. With a static
     backdrop contrast is controlled directly, so a heavy scrim would only mute
     the gradient beneath it. Kept as a soft vignette. */
  background:
    linear-gradient(to bottom, rgba(14,20,32,0.16) 0%, transparent 26%, transparent 74%, rgba(9,13,21,0.26) 100%),
    radial-gradient(125% 85% at 50% 45%, transparent 60%, rgba(9,13,21,0.28) 100%);
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 20, 32, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* ── Hero ── */
.hero {
  padding: 9rem 0 8rem;
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 500;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.75rem;
  max-width: 16ch;
}

.hero-details {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 2rem;
}

.stage-line {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.01em;
  padding: 0.5rem 1rem 0.5rem 0.875rem;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  background: rgba(255, 122, 0, 0.04);
  margin-bottom: 3rem;
}

.stage-line::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
  50% { box-shadow: 0 0 0 7px rgba(255,122,0,0.05); }
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* scroll cue */
/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  padding: 0.9375rem 2rem;
  border-radius: 999px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #1A0F00;
  box-shadow: 0 8px 30px -8px rgba(255,122,0,0.5);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px -8px rgba(255,122,0,0.6);
}

.btn-ghost {
  background: rgba(14,20,32,0.35);
  color: var(--text-secondary);
  border-color: var(--border-strong);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-secondary);
}

/* ── Sections ── */
section {
  padding: 5rem 0;
  position: relative;
}

section[id] { scroll-margin-top: 4.5rem; }

/* a glass card holds the copy so it reads cleanly over moving video */
.panel {
  position: relative;
  max-width: calc(var(--max-w) - 0px);
  margin: 0 auto;
  padding: 3rem 3rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(25,36,54,0.60), rgba(19,28,43,0.62));
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.45);
}

.panel .container { padding: 0; max-width: none; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.section-label::before {
  content: "";
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--accent);
}

section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 500;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 96;
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--text);
  margin-bottom: 2rem;
  max-width: 32ch;
}

section p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 38rem;
}

section p + p { margin-top: 1.5rem; }

.section-cta { margin-top: 2.5rem; }

/* ── Lists ── */
.problem-list, .validation-list, .tech-list { list-style: none; margin-top: 1.5rem; max-width: 640px; }

.validation-list li, .tech-list li {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
}

.validation-list li::before, .tech-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.tech-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 2rem;
}

.tech-list li::before { top: 1.2rem; }

/* ── Company details ── */
.company-details {
  margin-top: 1.5rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 480px;
  background: rgba(14,20,32,0.4);
}

.company-details p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

.company-details strong { color: var(--text); font-weight: 600; }

/* ── Pull-quote ── */
.pull-quote {
  margin: 2.25rem 0 0.5rem;
  padding: 0 0 0 1.75rem;
  border-left: 1px solid var(--accent);
  max-width: 38rem;
}

.pull-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.5vw, 1.6875rem);
  font-style: italic;
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 72;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.005em;
  max-width: none;
}

.pull-quote p + p { margin-top: 0.25rem; }

/* ── Team ── */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 3rem;
  margin-top: 2.75rem;
  max-width: 760px;
}

.team-member { padding-top: 1.5rem; border-top: 1px solid var(--border); }

.team-member h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.team-role {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.team-member p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: none;
}

/* ── Contact ── */
/* Underlined, not colour-only. This link sits inside a paragraph, so colour
   alone leaves colour-blind readers no cue that it is a link (WCAG 1.4.1 Use of
   Colour). Nav links are exempt: they sit in a <nav> landmark whose links are
   identifiable by position and role. Offset + thin stroke keeps it unobtrusive. */
.contact-email {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(255, 122, 0, 0.55);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.contact-email:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

/* ── Footer ── */
footer {
  position: relative;
  border-top: 1px solid var(--border);
  padding: 4rem 0 3rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.8;
  background: rgba(14,20,32,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

footer address { font-style: normal; }
footer a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--text); }
.footer-policies { list-style: none; }
.footer-policies li + li { margin-top: 0.375rem; }

.footer-copyright {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Scroll-reveal animation ──
   Hidden state only applies when JS is running (html.js set inline in <head>),
   so users without JS still see all content. */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

html.js .reveal.in { opacity: 1; transform: none; }

/* stagger children */
html.js .reveal[data-delay="1"] { transition-delay: 0.08s; }
html.js .reveal[data-delay="2"] { transition-delay: 0.16s; }
html.js .reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ── Responsive ── */
@media (max-width: 760px) {
  .panel { padding: 2rem 1.5rem; border-radius: 14px; }
}

@media (max-width: 640px) {
  .hero { padding: 6rem 0 5rem; min-height: 88vh; }
  .hero h1 { font-size: 2.25rem; }
  .hero-ctas { flex-direction: column; }
  .btn { width: 100%; justify-content: center; text-align: center; }
  section { padding: 3.5rem 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .company-details { max-width: 100%; }
  .tech-list, .team-grid { grid-template-columns: 1fr; }
  .team-grid { gap: 2rem; }
}

/* ── Reduced motion: kill all video + reveal animation, show static ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bg-layer { transition: none; }
  .bg-layer video { display: none; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .stage-line::before { animation: none; }
}

/* ═══════════ v2 cinematic layer ═══════════ */

/* Scroll progress bar (under the sticky nav) */
/* Nav current-section highlight */
.nav-links a.is-current { color: var(--text); }
.nav-links a { position: relative; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
  transition: right 0.35s var(--ease);
}
.nav-links a.is-current::after { right: 0; }

/* Foreground parallax planes (dust global, streak hero) — composited with
   screen blend so their black background disappears over the dark stage */
.fg-dust {
  position: fixed;
  inset: -12% 0;
  z-index: -1;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  mix-blend-mode: screen;
}

.fg-dust { background-image: url('/assets/img/fg/dust.v2.webp'); opacity: 0.22; }

/* Panel specular highlight tracking the cursor (tier 1 sets --spec-x/y) */
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--spec-x, 50%) var(--spec-y, 50%),
              rgba(255,255,255,0.055), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.panel.has-spec::after { opacity: 1; }

/* SplitText line masks get their overflow from GSAP's mask wrapper; keep
   headings stable pre-split */
.sl { will-change: transform; }

/* ── Technology horizontal rail (desktop tier-1 upgrades the list) ── */
html.cine .tech-rail { overflow: hidden; }

@media (min-width: 768px) and (pointer: fine) {
  html.cine .tech-rail-track {
    display: flex;
    gap: 1.25rem;
    width: max-content;
    max-width: none;
    margin-top: 2rem;
  }

  html.cine .tech-rail-track li {
    flex: 0 0 auto;
    width: 300px;
    padding: 1.75rem 1.75rem 1.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(18,27,42,0.55), rgba(14,20,32,0.6));
    font-size: 1.0625rem;
  }

  html.cine .tech-rail-track li::before { left: 1.25rem; top: 2.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fg-dust { display: none; }
}

/* Under tier 1, GSAP owns all transforms: reveals become opacity-only so the
   CSS transform transition can't fight scroll-scrubbed y/tilt writes. */
html.cine .reveal {
  transform: none;
  transition: opacity 0.9s var(--ease);
}

/* Hero entrance is fully GSAP-choreographed in tier 1 */
html.cine .hero .reveal { opacity: 1; transition: none; }

/* Kontact Ring imagery (concept renders, CEO 2026-07-28) */
.ring-hero {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 1.75rem 0;
  border: 1px solid var(--border);
}
.ring-explainer { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.ring-explainer img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  justify-self: center;
}
.render-note { color: var(--text-muted); font-size: 0.85rem; }
@media (min-width: 1024px) {
  .ring-explainer { grid-template-columns: 3fr 2fr; align-items: start; }
  .ring-explainer img { justify-self: end; }
}

.nfcd-photo {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 1.5rem 0 1.75rem;
}
.ring-reveal { margin-top: 1.75rem; }
.ring-reveal summary {
  list-style: none;
  cursor: pointer;
  width: max-content;
}
.ring-reveal summary::-webkit-details-marker { display: none; }
.ring-reveal[open] summary { margin-bottom: 0.5rem; }
