/* =========================================================
   InfraLynx — Launch Website v1.0
   Mobile-first, no frameworks
   ========================================================= */

:root {
  --navy: #14243F;
  --navy-deep: #0D182C;
  --navy-soft: #1D3254;
  --orange: #F39A54;
  --orange-dark: #E07F35;
  --light: #F5F3EE;
  --grey: #4E5A6B;
  --white: #FFFFFF;
  --line: rgba(20, 36, 63, 0.10);
  --line-dark: rgba(245, 243, 238, 0.14);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 36, 63, 0.06), 0 8px 24px rgba(20, 36, 63, 0.06);
  --shadow-hover: 0 2px 4px rgba(20, 36, 63, 0.08), 0 18px 40px rgba(20, 36, 63, 0.12);
  --header-h: 68px;
  --gutter: 20px;
  --container: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--grey);
  background: var(--light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 6.2vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.accent { color: var(--orange); }

.eyebrow {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: .9rem;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--orange); color: var(--navy);
  padding: .6rem 1rem; z-index: 1000; font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .8rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--orange); color: var(--navy); }
.btn-primary:hover { background: #F6AD72; }

.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

.btn-sm { min-height: 40px; padding: .5rem 1.1rem; font-size: .88rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(20, 36, 63, 0.0);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s var(--ease);
}
.site-header.is-scrolled,
.site-header.nav-open {
  background: rgba(13, 24, 44, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-dark);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--white);
}
.brand-mark { width: 50px; height: 50px; flex-shrink: 0; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .12em;
}
.brand-tag {
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-top: 3px;
}

/* Mobile nav (default) */
.nav-toggle {
  width: 44px; height: 44px;
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  background: transparent; border: 0; cursor: pointer; padding: 0;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--white); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--navy-deep);
  padding: 1rem var(--gutter) 1.75rem;
  border-top: 1px solid var(--line-dark);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.nav-open .main-nav { opacity: 1; transform: none; visibility: visible; }

.main-nav ul { display: flex; flex-direction: column; }
.main-nav li a {
  display: block;
  padding: .9rem 0;
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--line-dark);
}
.main-nav li a:hover, .main-nav li a.is-active { color: var(--orange); }
.nav-portal { margin-top: 1.25rem; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse at 75% 30%, rgba(243,154,84,.14), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(54,96,160,.35), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--light);
  overflow: hidden;
  padding: calc(var(--header-h) + 3rem) 0 5rem;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,24,44,.85) 0%, rgba(13,24,44,.45) 55%, rgba(13,24,44,.15) 100%);
}
.hero-content { position: relative; z-index: 1; }
.hero .eyebrow { color: var(--orange); }
.hero h1 { color: var(--white); max-width: 22ch; }
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 38rem;
  color: rgba(245,243,238,.82);
  margin: 1.25rem 0 2.25rem;
}
.hero-actions { display: flex; flex-direction: column; gap: .85rem; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 1.75rem; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(255,255,255,.4); border-radius: 14px; z-index: 1;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  background: var(--orange); border-radius: 2px;
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(12px); opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-light { background: var(--light); }
.section-white { background: var(--white); }
.section-dark {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: rgba(245,243,238,.82);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .eyebrow { color: var(--orange); }

.section-head { max-width: 46rem; margin-bottom: 2.5rem; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card:hover::before { transform: scaleX(1); }

.section-white .card { background: var(--light); border-color: transparent; box-shadow: none; }
.section-white .card:hover { background: var(--white); box-shadow: var(--shadow-hover); }

.card-icon, .why-icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(20,36,63,.06);
  margin-bottom: 1.25rem;
}
.card-icon svg, .why-icon svg, .contact-lines svg, .social svg {
  width: 24px; height: 24px;
  fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.card-icon svg circle { fill: var(--orange); stroke: var(--orange); }

.tick-list li {
  position: relative;
  padding: .45rem 0 .45rem 1.4rem;
  border-top: 1px solid var(--line);
  font-size: .95rem;
}
.tick-list li:first-child { border-top: 0; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; border: 2px solid var(--orange);
}

/* ---------- Divisions ---------- */
.division {
  position: relative;
  background: var(--light);
  border-radius: var(--radius);
  padding: 2.25rem 1.75rem 2rem;
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.division:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.division h3 { font-size: 1.5rem; margin-bottom: .35rem; }
.division-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .1em;
  color: var(--orange-dark);
  margin-bottom: 1.25rem;
}
.division-lead { color: var(--grey); margin-bottom: 1.5rem; }

.division-featured { background: var(--navy); border-color: var(--navy); color: rgba(245,243,238,.82); }
.division-featured h3 { color: var(--white); }
.division-featured .division-lead { color: rgba(245,243,238,.7); }
.division-featured .tick-list li { border-color: var(--line-dark); }
.division-featured .division-num { color: var(--orange); }

/* ---------- Technology flow ---------- */
.flow {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 2.25rem;
  counter-reset: flow;
}
.flow-step {
  position: relative;
  border: 1px solid var(--line-dark);
  background: rgba(255,255,255,.04);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  display: flex; flex-direction: column; gap: .35rem;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.flow-step:hover { border-color: rgba(243,154,84,.6); background: rgba(243,154,84,.06); }
.flow-step::before {
  counter-increment: flow;
  content: "0" counter(flow);
  font-family: var(--font-head);
  font-size: .75rem; font-weight: 600; letter-spacing: .1em;
  color: var(--orange);
}
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute; left: 50%; bottom: -1.75rem;
  width: 12px; height: 12px; margin-left: -6px;
  border-right: 2px solid var(--orange); border-bottom: 2px solid var(--orange);
  transform: rotate(45deg);
  opacity: .85;
}
.flow-label { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; color: var(--white); }
.flow-items { font-size: .95rem; color: rgba(245,243,238,.72); }
.flow-step-final { background: rgba(243,154,84,.1); border-color: rgba(243,154,84,.45); }

.flow-statement {
  margin: 3rem auto 0;
  max-width: 40rem;
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--light);
  padding-top: 2rem;
  border-top: 1px solid var(--line-dark);
}
.flow-statement strong { color: var(--orange); font-weight: 600; }

/* ---------- Why ---------- */
.why { padding: .5rem 0; }
.why-icon { background: var(--white); box-shadow: var(--shadow); }
.why h3 { font-size: 1.3rem; }
.steps { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.steps span {
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--navy); background: var(--white); border: 1px solid var(--line);
  border-radius: 100px; padding: .3rem .8rem;
}

/* ---------- Engagements ---------- */
.card-engagement h3 { font-size: 1.15rem; }
.card-engagement p { margin: 0; font-size: .95rem; }

/* ---------- About ---------- */
.about { display: grid; gap: 1.5rem; }
.about-body .lead {
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: var(--navy);
  font-weight: 500;
  line-height: 1.45;
}
.about-body { border-left: 3px solid var(--orange); padding-left: 1.5rem; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 2.5rem; align-items: start; }
.contact-intro p { max-width: 32rem; margin-bottom: 1.75rem; }
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  color: var(--grey);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.contact-card h3 { color: var(--navy); font-size: 1.6rem; margin-bottom: .15rem; }
.contact-role { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-dark); margin-bottom: .75rem; }
.contact-title { font-weight: 600; color: var(--navy); margin-bottom: .75rem; }
.contact-remit { margin-bottom: 1.5rem; }
.contact-lines li {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 0; border-top: 1px solid var(--line);
}
.contact-lines a { text-decoration: none; color: var(--navy); font-weight: 500; word-break: break-word; }
.contact-lines a:hover { color: var(--orange-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(245,243,238,.7); padding: 3.5rem 0 1.5rem; font-size: .92rem; }
.footer-inner { display: grid; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line-dark); }
.footer-pillars { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.footer-pillars li { position: relative; }
.footer-pillars li + li::before { content: "·"; position: absolute; left: -.75rem; color: var(--orange); }
.footer-nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-content: start; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--orange); }
.footer-social { display: flex; gap: .6rem; }
.social {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-dark);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.social svg { width: 18px; height: 18px; stroke: var(--light); }
.social:hover { border-color: var(--orange); background: rgba(243,154,84,.1); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-top: 1.5rem; font-size: .82rem; }
.footer-base p { margin: 0; }
.footer-base a { text-decoration: none; }
.footer-base a:hover { color: var(--orange); }

/* ---------- Reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Breakpoints
   ========================================================= */

/* Large phones / small tablets */
@media (min-width: 560px) {
  :root { --gutter: 28px; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet */
@media (min-width: 768px) {
  .section { padding: 6rem 0; }
  .grid { gap: 1.5rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .why-grid { gap: 2.5rem; }
  .contact { grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: center; }
  .about { grid-template-columns: 1fr 1.3fr; gap: 4rem; align-items: start; }
  .footer-inner { grid-template-columns: 1.4fr 1.4fr auto; align-items: start; }
}

/* Desktop nav */
@media (min-width: 1024px) {
  :root { --header-h: 78px; --gutter: 40px; }
  .nav-toggle { display: none; }
  .main-nav {
    position: static; transform: none; opacity: 1; visibility: visible;
    background: transparent; padding: 0; border: 0;
    display: flex; align-items: center; gap: 2rem;
  }
  .main-nav ul { flex-direction: row; gap: 2rem; }
  .main-nav li a {
    padding: .4rem 0; border: 0; font-size: .95rem;
    position: relative; color: rgba(245,243,238,.85);
  }
  .main-nav li a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: var(--orange); transform: scaleX(0); transition: transform .25s var(--ease);
  }
  .main-nav li a:hover::after, .main-nav li a.is-active::after { transform: scaleX(1); }
  .main-nav li a:hover, .main-nav li a.is-active { color: var(--white); }
  .nav-portal { margin: 0; width: auto; }

  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .hero { padding-top: calc(var(--header-h) + 2rem); }

  /* Horizontal architecture flow */
  .flow { grid-template-columns: repeat(5, 1fr); gap: 2.25rem; }
  .flow-step { min-height: 170px; }
  .flow-step:not(:last-child)::after {
    left: auto; right: -1.55rem; top: 50%; bottom: auto;
    margin: -6px 0 0 0;
    transform: rotate(-45deg);
  }
}

/* Wide desktop */
@media (min-width: 1440px) {
  :root { --container: 1320px; }
}

/* 4K / very large screens: scale everything up proportionally */
@media (min-width: 2200px) {
  html { font-size: 125%; }
  :root { --container: 1600px; }
}
@media (min-width: 3200px) {
  html { font-size: 150%; }
  :root { --container: 1800px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
