/* ============================================================
   FLOW OPS GLOBAL — Main Stylesheet
   Brand: vivid ultramarine + deep ink, on bone paper
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Brand */
  --signal: #1f0e81;       /* Brand deep ultramarine — primary accent */
  --signal-hover: #160a5e;
  --signal-light: #6d5fff;  /* Lighter variant for dark backgrounds */
  --signal-soft: rgba(31, 14, 129, 0.12);
  --signal-glow: rgba(31, 14, 129, 0.35);

  /* Ink (near-black, slightly cool) */
  --ink: #0a0a14;
  --ink-2: #15152a;
  --ink-3: #1f1f3d;

  /* Paper / neutrals */
  --paper: #f4f1ea;
  --paper-2: #eae5d8;
  --bone: #d9d2bf;

  /* Rules */
  --rule: #2a2a52;
  --rule-light: #c9c2ad;

  /* Text dimming */
  --text-dim: rgba(244, 241, 234, 0.62);
  --text-dim-dark: rgba(10, 10, 20, 0.62);

  /* Type */
  --display: 'Archivo', system-ui, -apple-system, sans-serif;
  --body: 'Archivo', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 2px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Subtle paper grain on light surfaces */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

/* ---------- HEADER / NAV ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--rule-light);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 38px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--signal);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--signal); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--signal);
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-cta:hover {
  background: var(--signal-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px var(--signal-glow);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule-light);
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.menu-toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu — hidden at desktop, only activated in mobile media query below */
.mobile-menu { display: none; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: clamp(60px, 9vw, 120px) 0 clamp(60px, 8vw, 100px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 28px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--signal);
}

.hero-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 7.5vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  color: var(--ink);
}
.hero-title em {
  font-style: italic;
  font-weight: 700;
  color: var(--signal);
}
.hero-title .accent-stroke {
  position: relative;
  display: inline-block;
}
.hero-title .accent-stroke::after {
  content: '';
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.08em;
  height: 0.14em;
  background: var(--signal);
  opacity: 0.18;
  z-index: -1;
}

.hero-lede {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.78;
  max-width: 540px;
  margin: 0 0 40px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--body);
}
.btn-primary {
  background: var(--signal);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--signal-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px var(--signal-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn .arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- HERO VISUAL ---------- */
.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 60%, var(--ink-3) 100%);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 30px 60px -25px rgba(10, 10, 20, 0.45),
    0 15px 30px -15px rgba(10, 10, 20, 0.3);
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-visual-content {
  position: absolute;
  inset: 0;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--paper);
  z-index: 2;
}

.visual-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.visual-label .live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.visual-label .live-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal-light);
  box-shadow: 0 0 0 0 var(--signal-light);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(109, 95, 255, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(109, 95, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(109, 95, 255, 0); }
}

.visual-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
  position: relative;
}

.schematic {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  position: relative;
}
.schematic svg { width: 100%; height: 100%; }

.visual-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.visual-meta-item .num {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--paper);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.visual-meta-item .num .accent { color: var(--signal-light); }
.visual-meta-item .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- TICKER ---------- */
.ticker {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  position: relative;
  z-index: 2;
}
.ticker-track {
  display: flex;
  gap: 64px;
  animation: scroll 40s linear infinite;
  width: max-content;
  white-space: nowrap;
}
.ticker-item {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 64px;
}
.ticker-item::after {
  content: '◆';
  color: var(--signal-light);
  font-size: 8px;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- SECTION HEADERS ---------- */
.section {
  padding: clamp(80px, 11vw, 140px) 0;
  position: relative;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  margin-bottom: clamp(50px, 7vw, 90px);
  align-items: start;
}

.section-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink);
  opacity: 0.6;
  padding-top: 12px;
  border-top: 1px solid var(--ink);
  display: inline-block;
}

.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 4.8vw, 62px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}
.section-title em { font-style: italic; color: var(--signal); font-weight: 700; }

.section-intro {
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.65;
  color: var(--ink);
  opacity: 0.78;
  max-width: 640px;
}

/* ---------- MODULES ---------- */
.modules {
  background: var(--ink);
  color: var(--paper);
}
.modules .section-num { color: var(--paper); opacity: 0.6; border-color: var(--paper); }
.modules .section-title { color: var(--paper); }
.modules .section-title em { color: var(--signal-light); }
.modules .section-intro { color: var(--paper); opacity: 0.78; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.module-card {
  background: var(--ink);
  padding: 40px 32px 44px;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  position: relative;
  transition: background 0.4s ease;
  cursor: pointer;
}
.module-card:hover { background: var(--ink-2); }
.module-card:hover .module-arrow { transform: translate(4px, -4px); color: var(--signal-light); }
.module-card:hover .module-icon { color: var(--signal-light); }

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}
.module-icon {
  width: 44px;
  height: 44px;
  color: var(--paper);
  transition: color 0.3s ease;
}
.module-arrow {
  color: var(--paper);
  opacity: 0.6;
  transition: transform 0.3s ease, color 0.3s ease;
  font-size: 22px;
  line-height: 1;
}

.module-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--signal-light);
  margin-bottom: 14px;
}

.module-name {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--paper);
}

.module-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
  flex: 1;
}

/* ---------- APPROACH ---------- */
.approach {
  background: var(--paper);
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
  margin-bottom: clamp(70px, 8vw, 110px);
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse .feature-visual { order: 2; }

.feature-visual {
  position: relative;
  aspect-ratio: 5/4;
  background: var(--paper-2);
  border: 1px solid var(--rule-light);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature-visual.dark { background: var(--ink); border-color: var(--ink); }

.feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-mark {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim-dark);
  z-index: 2;
}
.feature-visual.dark .placeholder-mark { color: var(--text-dim); }
.placeholder-mark::before {
  content: '◊ ';
  color: var(--signal);
}

.feature-content .eyebrow { margin-bottom: 20px; }

.feature-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}

.feature-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  opacity: 0.8;
  margin: 0 0 28px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}
.feature-list li {
  padding: 14px 0;
  border-top: 1px solid var(--rule-light);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
  color: var(--ink);
}
.feature-list li:last-child { border-bottom: 1px solid var(--rule-light); }
.feature-list li .marker {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--signal);
  min-width: 28px;
  font-weight: 600;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.feature-link:hover { color: var(--signal); border-color: var(--signal); }
.feature-link:hover .arrow { transform: translateX(4px); }
.feature-link .arrow { transition: transform 0.25s ease; }

/* ---------- IMPACT ---------- */
.impact {
  background: var(--paper-2);
  padding: clamp(70px, 9vw, 110px) 0;
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule-light);
  border: 1px solid var(--rule-light);
}

.impact-card {
  background: var(--paper-2);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.impact-num {
  font-family: var(--display);
  font-size: clamp(48px, 5.8vw, 76px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.impact-num .sym { color: var(--signal); }
.impact-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.7;
}
.impact-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  opacity: 0.7;
  margin-top: 8px;
}

/* ---------- CTA STRIP ---------- */
.cta-strip {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(70px, 9vw, 110px) 0;
  position: relative;
  overflow: hidden;
}
.cta-strip::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(109, 95, 255, 0.22), transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(109, 95, 255, 0.12), transparent 55%);
  pointer-events: none;
}
.cta-strip .container { position: relative; z-index: 1; }
.cta-strip-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
.cta-title {
  font-family: var(--display);
  font-size: clamp(38px, 5.2vw, 64px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--paper);
}
.cta-title em { font-style: italic; color: var(--signal-light); font-weight: 700; }
.cta-actions { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.cta-strip .btn-primary { background: var(--signal-light); color: var(--ink); font-weight: 600; }
.cta-strip .btn-primary:hover { background: var(--paper); color: var(--signal); }
.cta-strip .btn-ghost { color: var(--paper); border-color: var(--paper); }
.cta-strip .btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 36px;
  border-top: 1px solid var(--rule);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 70px;
}
.footer-brand .brand-logo { height: 44px; margin-bottom: 24px; }
.footer-tag {
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 320px;
  margin: 0 0 24px;
  font-weight: 400;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal-light);
  margin: 0 0 22px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  font-size: 14.5px;
  color: var(--paper);
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.footer-col a:hover { opacity: 1; color: var(--signal-light); }

.footer-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- FADE-IN ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .section-head { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .cta-strip-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .nav .nav-cta { display: none; }
  .menu-toggle { display: flex; }

  .brand-logo { height: 32px; }

  .mobile-menu {
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    z-index: 49;
    padding: 40px var(--gutter);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .mobile-menu.open { transform: translateX(0); }
  .mobile-menu a {
    font-family: var(--display);
    font-weight: 600;
    font-size: 38px;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule-light);
    color: var(--ink);
  }
  .mobile-menu .nav-cta {
    margin-top: 30px;
    align-self: flex-start;
    font-family: var(--body);
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.02em;
    border-bottom: none;
    padding: 16px 28px;
    color: var(--paper);
    background: var(--signal);
  }

  .feature-row { grid-template-columns: 1fr; gap: 32px; }
  .feature-row.reverse .feature-visual { order: 0; }

  .module-grid { grid-template-columns: 1fr; }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 38px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }

  .module-card { min-height: 320px; }
  .visual-meta { grid-template-columns: 1fr 1fr; gap: 14px; }
}

@media (max-width: 420px) {
  .impact-grid { grid-template-columns: 1fr; }
  .visual-meta { grid-template-columns: 1fr; }
}
