/* ============================================================
   TRUPOINT SYSTEMS — THE JOURNEY TO THE POINT
   A single cinematic stage. Scroll scrubs the timeline;
   scenes enter and exit; one particle object travels the site.
   Brand tokens per brand-guidelines v1.1.
   ============================================================ */

:root {
  --bg: #0a1522;            /* Deep Navy */
  --bg-2: #0d1b2c;
  --line: rgba(122, 148, 170, 0.22);
  --line-soft: rgba(122, 148, 170, 0.12);
  --text: #e9f1f6;          /* Off-White */
  --muted: #7a94aa;         /* Steel */
  --accent: #2dd4bf;        /* Signal Teal */
  --accent-soft: rgba(45, 212, 191, 0.12);
  --sans: "Poppins", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #0a1522; }

a { color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 64px); }

h1, h2 { font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); }
h1 em, h2 em { font-style: normal; font-weight: 300; color: var(--muted); }

.eyebrow {
  display: block;
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

.mono-caps {
  font-size: 0.64rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}

/* Film grain */
.grain {
  position: fixed; inset: 0; z-index: 70;
  pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ INTRO ============ */
.intro {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.intro.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.intro__inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.intro__mark { width: 92px; height: 92px; margin-bottom: 14px; }
.im-ring {
  stroke-dasharray: 818; stroke-dashoffset: 818;
  transform: rotate(-90deg); transform-origin: center;
  animation: draw-ring 1.1s var(--ease) 0.1s forwards;
}
.im-dot { transform-origin: center; transform: scale(0); animation: pop-dot 0.5s var(--ease) 1s forwards; }
.im-ticks { opacity: 0; animation: fade-in 0.5s ease 1.2s forwards; }
.im-north { opacity: 0; transform: translateY(10px); animation: north-rise 0.6s var(--ease) 1.3s forwards; }
@keyframes draw-ring { to { stroke-dashoffset: 0; } }
@keyframes pop-dot { to { transform: scale(1); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes north-rise { to { opacity: 1; transform: none; } }
.intro__word {
  font-weight: 300; font-size: 1.6rem;
  opacity: 0; transform: translateY(10px);
  animation: rise-in 0.7s var(--ease) 1.4s forwards;
}
.intro__word strong { font-weight: 700; }
.intro__sub {
  font-size: 0.64rem; letter-spacing: 0.3em; color: var(--text);
  opacity: 0; animation: fade-in 0.7s ease 1.6s forwards;
}
.intro__tagline {
  font-weight: 300; font-size: 0.76rem; color: var(--muted);
  margin-top: 8px; opacity: 0;
  animation: fade-in 0.7s ease 1.8s forwards;
}
.intro__tagline i { font-style: normal; color: var(--accent); }
@keyframes rise-in { to { opacity: 1; transform: none; } }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 3.5vw, 44px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand__icon { width: 30px; height: 30px; display: block; }
.brand__word {
  display: flex; align-items: baseline;
  font-weight: 300; font-size: 1.06rem; color: var(--text);
}
.brand__word strong { font-weight: 700; }
.brand__sub { font-size: 0.52rem; letter-spacing: 0.34em; color: var(--muted); margin-left: 10px; }
.nav__meta { position: absolute; left: 50%; transform: translateX(-50%); }
.nav__chapter {
  font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted);
}
.nav__cta {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--text);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px 20px;
  transition: border-color 0.25s, background 0.25s;
}
.nav__cta:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ============ WAYPOINTS ============ */
.way {
  position: fixed; right: clamp(16px, 2.6vw, 34px); top: 50%;
  transform: translateY(-50%);
  z-index: 95;
  display: flex; flex-direction: column; gap: 16px;
}
.way button {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: none; border: none; cursor: pointer;
  position: relative;
}
.way button i {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(233, 241, 246, 0.28);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.way button.is-active i {
  background: var(--accent);
  transform: scale(1.6);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.7);
}
.way button span {
  position: absolute; right: 30px; top: 50%; transform: translateY(-50%) translateX(6px);
  font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
  opacity: 0; transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.way button:hover span { opacity: 1; transform: translateY(-50%); }

/* ============ MERIDIAN ============ */
.meridian {
  position: fixed; left: 0; right: 0; top: 0; height: 2px;
  z-index: 110; background: rgba(122, 148, 170, 0.15);
}
.meridian span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), #6ee7d8);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.55);
}

/* ============ HINT ============ */
.hint {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 95;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: opacity 0.6s;
}
.hint.is-hidden { opacity: 0; }
.hint__line {
  width: 1px; height: 40px;
  background: linear-gradient(var(--accent), transparent);
  animation: hint-drop 2s var(--ease) infinite;
}
@keyframes hint-drop {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  60% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============ STAGE & SCENES ============ */
.stage { position: fixed; inset: 0; z-index: 1; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
/* phones: fade the object out under the content band so text always wins */
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, rgba(10,21,34,0) 30%, rgba(10,21,34,0.6) 48%, rgba(10,21,34,0.94) 62%);
  display: none;
}
@media (max-width: 900px) { .stage::after { display: block; } }

.scene {
  position: absolute; inset: 0;
  z-index: 1;
  display: flex; align-items: center;
  padding: 92px clamp(24px, 6vw, 84px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.scene.is-live { visibility: visible; }
.scene.is-live.is-front { pointer-events: auto; }

.scene__box { max-width: 620px; will-change: transform, opacity; }
.scene__box--wide { max-width: 900px; }
.scene__box--center { max-width: 640px; margin: 0 auto; text-align: center; }
.scene--point { align-items: flex-end; padding-bottom: 10vh; }  /* keep clear air between the point and the words */
.scene--approach { align-items: flex-end; padding-bottom: 9vh; } /* object above, content below — same layout as the close */
.scene--approach .scene__box { max-width: 880px; margin: 0 auto; }

.scene__lede { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); margin-top: 22px; max-width: 52ch; }
.scene__box--center .scene__lede { margin-left: auto; margin-right: auto; }

/* Position — scrub-lit statement */
.statement {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 500; line-height: 1.4; letter-spacing: -0.015em;
}
.statement .w { color: rgba(233, 241, 246, 0.14); transition: color 0.25s linear; }
.statement .w.is-lit { color: var(--text); }

/* Products */
.prodcards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.prodcard {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(13, 27, 44, 0.82);
  backdrop-filter: blur(8px);
  padding: 24px 22px;
}
.prodcard__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.prodcard__appicon { border-radius: 7px; }
.prodcard__head h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
.chip {
  margin-left: auto;
  font-size: 0.56rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid rgba(45, 212, 191, 0.5); color: var(--accent);
  border-radius: 2px; padding: 4px 9px; white-space: nowrap;
}
.chip--muted { border-color: var(--line); color: var(--muted); }
.prodcard__tag { font-weight: 300; font-style: italic; margin-bottom: 10px; }
.prodcard p:not(.prodcard__tag) { color: var(--muted); font-size: 0.85rem; line-height: 1.55; }
.prodcard a {
  display: inline-block; margin-top: 14px;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
}
.prodcard a:hover { text-decoration: underline; }

/* Capabilities — progressive highlight */
.capslist { list-style: none; margin-top: 30px; counter-reset: cap; }
.capslist li {
  display: flex; align-items: baseline; gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line-soft);
  opacity: 0.3;
  transition: opacity 0.4s, padding-left 0.4s var(--ease);
}
.capslist li.is-on { opacity: 1; padding-left: 8px; }
.capslist li::before {
  counter-increment: cap; content: "0" counter(cap);
  font-size: 0.68rem; color: var(--accent); letter-spacing: 0.12em;
}
.capslist strong { font-weight: 600; font-size: 1.02rem; }
.capslist span { color: var(--muted); font-size: 0.82rem; margin-left: auto; text-align: right; }

/* Defence / AI point lists */
.pointlist { list-style: none; margin-top: 30px; display: grid; gap: 14px; }
.pointlist li {
  color: var(--muted); font-size: 0.95rem;
  padding-left: 22px; position: relative;
}
.pointlist li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.pointlist strong { color: var(--text); font-weight: 600; }

/* Approach — phase line */
.phaseline {
  list-style: none;
  margin-top: 44px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  position: relative;
}
.phaseline::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: 5px; height: 1px;
  background: var(--line);
}
.phaseline::after {
  content: ""; position: absolute; left: 8px; top: 5px; height: 1px;
  width: calc(var(--p, 0) * (100% - 16px));
  background: var(--accent);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.6);
}
.phaseline li { position: relative; padding-top: 24px; opacity: 0.35; transition: opacity 0.4s; }
.phaseline li.is-on { opacity: 1; }
.phaseline li i {
  position: absolute; top: 0; left: 8px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--muted);
  transition: border-color 0.3s, background 0.3s;
  z-index: 1;
}
.phaseline li.is-on i { border-color: var(--accent); background: var(--accent); }
.phaseline strong { display: block; font-weight: 600; font-size: 0.98rem; }
.phaseline span { color: var(--muted); font-size: 0.78rem; line-height: 1.4; display: block; margin-top: 4px; }

/* The Point */
.point__actions {
  margin-top: 34px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.point__mail {
  color: var(--accent); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.point__mail:hover { text-decoration: underline; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  font-weight: 500; font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 16px 30px;
  cursor: pointer;
  background: transparent;
  transition: background 0.3s;
}
.btn::after { content: "→"; color: var(--accent); transition: transform 0.3s var(--ease); }
.btn:hover { background: var(--accent-soft); }
.btn:hover::after { transform: translateX(4px); }
.btn--full { width: 100%; }

/* ============ TRACK ============ */
.track { height: 900vh; position: relative; z-index: 0; }

/* ============ CONTACT SHEET ============ */
.sheet {
  position: relative; z-index: 60;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  box-shadow: 0 -40px 120px rgba(0, 0, 0, 0.5);
}
.contact { padding: clamp(90px, 12vh, 150px) 0; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 110px); align-items: start; }
.contact__details { margin-top: 40px; display: flex; flex-direction: column; gap: 22px; }
.contact__details > div { display: flex; flex-direction: column; gap: 2px; }
.contact__details .eyebrow { margin-bottom: 4px; color: var(--muted); }
.contact__details a, .contact__details span:not(.eyebrow) {
  font-size: 1.02rem; font-weight: 500; text-decoration: none;
}
.contact__details a { color: var(--accent); }
.contact__details a:hover { text-decoration: underline; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  background: transparent;
  border: none; border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: var(--sans); font-size: 0.98rem;
  padding: 9px 2px 12px;
  outline: none; border-radius: 0;
  transition: border-color 0.3s;
  resize: vertical;
}
.field select { appearance: none; cursor: pointer; }
.field select option { background: var(--bg-2); }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--accent); }
.form .btn--full { grid-column: 1 / -1; margin-top: 12px; }
.form__note { grid-column: 1 / -1; font-size: 0.84rem; color: var(--accent); min-height: 1.2em; }

.footer { border-top: 1px solid var(--line-soft); padding: 56px 0; }
.footer__inner { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.footer__lockup { height: 100px; width: auto; display: block; }
.footer__legal { color: rgba(122, 148, 170, 0.65); font-size: 0.76rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .scene { padding: 88px clamp(20px, 6vw, 40px); align-items: flex-end; padding-bottom: 72px; }
  .scene__box { max-width: 100%; }
  .prodcards { grid-template-columns: 1fr; gap: 12px; }
  .prodcard { padding: 18px 16px; background: #0d1b2c; }  /* opaque on phones — nothing shows through */
  .prodcard p:not(.prodcard__tag) { font-size: 0.82rem; }
  .phaseline { grid-template-columns: 1fr 1fr; gap: 20px 14px; }
  .phaseline::before, .phaseline::after { display: none; }
  .capslist span { display: none; }
  .nav__meta { display: none; }
  .way { display: none; }
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
  .form { grid-template-columns: 1fr; }
  .footer__lockup { height: 80px; }
  h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); }
  h2 { font-size: clamp(1.7rem, 7vw, 2.6rem); }
}

/* ============ REDUCED MOTION — static, stacked fallback ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .intro, .hint, #field, .track, .way { display: none; }
  .stage { position: static; }
  .scene {
    position: static; opacity: 1; visibility: visible; pointer-events: auto;
    padding: 70px clamp(24px, 6vw, 84px);
  }
  .capslist li, .phaseline li { opacity: 1; }
  .statement .w { color: var(--text); }
}
