/* DeTrust CyberTech & Solutions — Thayon-style one-pager */

:root {
  color-scheme: light;   /* keep form controls light on Android/Chrome dark mode */
  --navy-deep: #0c1b33;
  --navy: #1f3864;
  --ink: #17233a;
  --muted: #5a6a85;
  --line: #e3e8f0;
  --bg: #fafbfd;
  --bg-alt: #f1f4f9;
  --accent: #c00000;
  --white: #ffffff;
  --radius: 14px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;   /* stop iOS bumping font sizes in landscape */
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;               /* guard against 100vw side-scroll on iOS */
  -webkit-tap-highlight-color: transparent;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  /* respect the notch / home-indicator side insets when viewport-fit=cover */
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 251, 253, 0.85);
  -webkit-backdrop-filter: blur(10px);   /* Safari / iOS needs the prefix */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);  /* clear the notch in landscape */
}

.nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px max(24px, env(safe-area-inset-right)) 14px max(24px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy-deep);
  text-decoration: none;
}
.brand span { color: var(--accent); }

.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--navy-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn-primary { background: var(--navy-deep); color: var(--white); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(12, 27, 51, 0.25); }
.btn-light { background: var(--white); color: var(--navy-deep); }
.btn-outline { border-color: rgba(255, 255, 255, 0.5); color: var(--white); }

/* ---------- Hero (pinned scroll-scrub) ---------- */
.hero-scroll { position: relative; height: 100vh; height: 100dvh; }
.hero-scroll.scrub { height: 300vh; height: 300dvh; } /* JS enables the track only when it can scrub */

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;          /* dynamic viewport unit avoids the iOS address-bar jump */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.hero-canvas,
.hero-fallback img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;    /* let touch scrolling pass straight through the hero */
}
.hero-canvas { z-index: 1; }
.hero-fallback img { z-index: 0; }

/* Light scrim keeps the navy headline legible over the bright imagery */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(250,251,253,0.62) 0%, rgba(250,251,253,0.30) 60%, rgba(250,251,253,0.10) 100%),
    linear-gradient(180deg, rgba(250,251,253,0.30) 0%, rgba(250,251,253,0.10) 40%, rgba(250,251,253,0.42) 100%);
}

.hero {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 24px;
}
.hero h1 { text-shadow: 0 1px 28px rgba(250, 251, 253, 0.65); }
.hero-sub { text-shadow: 0 1px 18px rgba(250, 251, 253, 0.7); }

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(12, 27, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 27, 51, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 30%, transparent 78%);
  pointer-events: none;
}

.hero .container { position: relative; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.12;
  color: var(--navy-deep);
  max-width: 820px;
  margin: 0 auto 20px;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 36px;
}

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  color: var(--navy-deep);
  margin-bottom: 34px;
  max-width: 720px;
}

.section-lede {
  color: var(--muted);
  max-width: 680px;
  margin: -14px 0 34px;
}

/* ---------- Cards ---------- */
.cards-3, .cards-2 { display: grid; gap: 24px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.card p { font-size: 0.95rem; color: var(--ink); }

.section-alt .card { box-shadow: 0 1px 3px rgba(12, 27, 51, 0.05); }

.center .btn { margin-top: 34px; }

/* ---------- Track record ---------- */
.result-client {
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 10px;
}
.result-client span {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
}
.result-note { font-size: 0.92rem; margin-bottom: 18px; }

.stats {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  flex-wrap: wrap;
}
.stats dt {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-deep);
}
.stats dd { font-size: 0.78rem; color: var(--muted); }

/* ---------- Insights ---------- */
.takeaway { color: var(--ink); margin-bottom: 14px; }
.insight-links { font-size: 0.9rem; }
.insight-links a { color: var(--navy); font-weight: 600; text-decoration: none; }
.insight-links a:hover { text-decoration: underline; }

/* ---------- Founder ---------- */
.founder-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}

.founder-mark {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--navy-deep), var(--navy));
  color: var(--white);
  font-family: var(--font-display);
  font-size: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.founder-creds {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 16px;
}

blockquote {
  margin-top: 26px;
  border-left: 3px solid var(--accent);
  padding-left: 18px;
}
blockquote p { font-style: italic; color: var(--ink); }
blockquote cite { display: block; margin-top: 8px; font-size: 0.85rem; color: var(--muted); font-style: normal; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  padding: 100px 0;
}

.cta-band .hero-grid-bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse 70% 90% at 50% 50%, black 30%, transparent 75%);
}

.cta-band h2 { color: var(--white); margin: 0 auto 18px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- Contact form ---------- */
.cta-lede {
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin: 0 auto 36px;
  position: relative;
}

.contact-form {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  text-align: left;
}
.field { display: flex; flex-direction: column; }
.field-wide { grid-column: 1 / -1; }

.contact-form label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 7px;
}
.contact-form label .opt { font-weight: 400; color: rgba(255, 255, 255, 0.5); }

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 16px;              /* >=16px stops iOS Safari auto-zooming on focus */
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.10);
}
.contact-form textarea { resize: vertical; min-height: 96px; }

.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cf-submit { margin-top: 4px; }
.cf-submit .btn { width: 100%; cursor: pointer; }

.cta-alt {
  position: relative;
  margin-top: 26px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}
.cta-alt a { color: rgba(255, 255, 255, 0.92); font-weight: 600; }
.cta-alt a:hover { color: var(--white); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 max(28px, env(safe-area-inset-bottom));
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.site-footer a { color: var(--muted); }

/* ---------- Motion foundation ---------- */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;
}

/* Scroll reveal (JS adds .reveal, then .revealed) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 100ms);
}
.reveal.revealed { opacity: 1; transform: none; }

/* Hero entrance (JS adds spans) */
.hero h1 .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.hero.entered h1 .w { opacity: 1; transform: none; }
.hero .hero-sub, .hero .btn {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.hero.entered .hero-sub { opacity: 1; transform: none; transition-delay: 0.45s; }
.hero.entered .btn { opacity: 1; transform: none; transition-delay: 0.65s; }

/* Marquee */
.marquee-strip { padding: 8px 0 40px; }
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 36px;
  width: max-content;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Hover micro-interactions */
.card { transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out); }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(12, 27, 51, 0.10); }
.btn:active { transform: translateY(0) scale(0.98); }
.insight-links a, .nav-links a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.3s var(--ease-out), color 0.2s ease;
  padding-bottom: 2px;
}
.insight-links a:hover, .nav-links a:hover { background-size: 100% 1px; text-decoration: none; }

/* Reduced motion: disable everything */
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero h1 .w, .hero .hero-sub, .hero .btn {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .marquee-track { animation: none; }
  .card, .btn { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards-3 { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
  .founder-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero { padding: 0 20px; }
  .section { padding: 64px 0; }
  .contact-form { grid-template-columns: 1fr; }
}
