/* CircuitSavvy */

:root {
  --navy: #0B1B34;
  --navy-2: #13294B;
  --text: #0B1B34;
  --slate: #4A5A70;
  --slate-light: #A9B6C8;
  --bg: #FFFFFF;
  --bg-soft: #F4F7FB;
  --line: #E3E9F1;

  --blue: #0073F3;

  --sky: #8FD0FF;          /* light blue: accents on dark */
  --sky-deep: #1E90E8;     /* light blue that still reads on white */
  --sky-pale: #D6ECFF;     /* light blue fills */

  --font: "Helvetica Neue", Helvetica, "Nimbus Sans", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 30px 60px -18px rgb(11 27 52 / 0.28), 0 14px 30px -20px rgb(11 27 52 / 0.35);
  --shadow-sm: 0 12px 30px -14px rgb(11 27 52 / 0.25);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, p, ol, dl, dd { margin: 0; }
ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

body {
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.wrap {
  width: 100%;
  max-width: 1232px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 16px + 2vw);
}

h2 {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

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

/* Buttons and links ------------------------------------------------------ */
.arrow {
  width: 10px;
  height: 10px;
  margin-left: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.arrow__line { opacity: 0; transition: opacity 0.2s; }
.arrow__head { transition: transform 0.2s var(--ease); }
a:hover .arrow__line { opacity: 1; }
a:hover .arrow__head { transform: translateX(3px); }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px 12px 22px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn:hover { background: var(--blue); box-shadow: 0 10px 24px -10px rgb(0 115 243 / 0.7); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--sky); color: var(--navy); box-shadow: none; }

.link {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.link:hover { color: var(--navy); }
.link--inline { display: inline; }

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(96px, 14vw, 180px) clamp(120px, 14vw, 200px);
}

/* Gradient sky with a slanted bottom edge */
.hero__sky {
  position: absolute;
  inset: 0 0 12% 0;
  z-index: -1;
  overflow: hidden;
  background: var(--navy) url("images/hero-launch.webp") 50% 40% / cover no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% 58%, 0 100%);
  animation: fade 1.2s ease both;
}
.hero__sky::after {            /* dim the photo so the page stays in front */
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(8 18 36 / 0.66);
}


.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: center;
}
.hero__text { grid-column: 1 / span 7; position: relative; z-index: 2; }

.hero h1 {
  font-size: clamp(3.25rem, 7.2vw, 6.75rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.05em;
  padding-bottom: 0.08em;       /* room for the descender of y */
  color: #fff;
  animation: rise 1s var(--ease) 0.15s both;
}
.hero__sub {
  margin-top: 18px;
  max-width: 30ch;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.3;
  color: #D5DEEA;
  animation: rise 1s var(--ease) 0.3s both;
}
.hero .btn { margin-top: 36px; animation: rise 1s var(--ease) 0.45s both; }

/* Floating cards */
.hero__stage {
  grid-column: 8 / -1;
  position: relative;
  height: clamp(360px, 36vw, 480px);
}
.float { position: absolute; }
.float > .card { animation: bob 7s ease-in-out infinite; }
.float--main { top: 0; right: -4%; width: 104%; animation: card-in 1.1s var(--ease) 0.5s both; }
.float--side { bottom: -18%; left: -16%; width: 40%; animation: card-in 1.1s var(--ease) 0.7s both; }
.float--side > .card { animation-duration: 8s; animation-delay: -2s; }
.float--stat { top: -14%; left: -6%; animation: card-in 1.1s var(--ease) 0.9s both; }
.float--stat > .card { animation-duration: 6s; animation-delay: -4s; }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card--photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.float--side img { aspect-ratio: 3 / 4; }
.card--stat {
  display: grid;
  gap: 2px;
  padding: 18px 24px 16px;
  min-width: 190px;
}
.card--stat strong {
  color: var(--sky-deep);
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  justify-self: start;
}
.card--stat span { font-size: 0.9375rem; color: var(--slate); }

/* Impact ----------------------------------------------------------------- */
.impact {
  position: relative;
  color: #fff;
  background: var(--navy);
  padding-block: clamp(96px, 12vw, 160px);
  overflow: hidden;
}
.impact::before {              /* dot grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / 0.14) 1px, transparent 1.5px);
  background-size: 22px 22px;
  pointer-events: none;
}
.impact .wrap { position: relative; }
.impact h2 { max-width: 14ch; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
  margin-top: clamp(56px, 7vw, 96px);
}
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 22px;
}
.stat::before,
.stat::after {                 /* thin rule with a light-blue top segment */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: rgb(255 255 255 / 0.16);
}
.stat::after { bottom: 62%; background: var(--sky); }
.stat dd {
  order: 1;
  font-size: clamp(3.5rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  justify-self: start;
  width: fit-content;
  padding-bottom: 0.05em;
}
.stat dt {
  order: 2;
  margin-top: 12px;
  max-width: 18ch;
  color: var(--slate-light);
}

/* Process ---------------------------------------------------------------- */
.process {
  background: var(--bg-soft);
  padding-block: clamp(96px, 12vw, 160px);
}
.steps {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(40px, 5vw, 64px);
}
.step {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.step--wide { grid-column: span 7; }
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.step__img { overflow: hidden; aspect-ratio: 16 / 9; }
.step__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.step:hover .step__img img { transform: scale(1.04); }

.step__body { padding: 28px 32px 34px; }
.step__num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sky-pale);
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
}
.step h3 {
  margin-top: 18px;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.step p { margin-top: 10px; color: var(--slate); max-width: 46ch; }

/* Team ------------------------------------------------------------------- */
.team { padding-block: clamp(96px, 12vw, 160px); }
.member {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  margin-top: clamp(40px, 5vw, 64px);
  padding: clamp(20px, 3vw, 32px);
  border-radius: calc(var(--radius) + 6px);
  background: #fff;
  border: 1.5px solid var(--sky);
  box-shadow: var(--shadow-sm);
}
.member__photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: var(--radius);
}
.member h3 {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.member__body > p:not(.member__links) {
  margin-top: 16px;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  color: var(--slate);
  max-width: 40ch;
}
.member__links { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 28px; }

/* Contact ---------------------------------------------------------------- */
.contact {
  position: relative;
  isolation: isolate;
  padding-block: clamp(120px, 14vw, 200px) clamp(96px, 11vw, 150px);
  background: var(--bg-soft);
  overflow: hidden;
}
.contact__ribbon {             /* slanted light-blue band */
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 70%;
  z-index: -1;
  overflow: hidden;
  background: var(--sky-pale);
  clip-path: polygon(0 38%, 100% 0, 100% 22%, 0 60%);
}
.contact__inner { max-width: 760px; }
.contact h2 { font-size: clamp(3rem, 7vw, 5.5rem); letter-spacing: -0.045em; }
.contact p { margin-top: 20px; font-size: clamp(1.125rem, 1.6vw, 1.375rem); color: var(--slate); max-width: 44ch; }
.contact .btn { margin-top: 32px; }

/* Footer ----------------------------------------------------------------- */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding-block: 28px;
  font-size: 0.875rem;
  color: var(--slate);
}
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Motion ----------------------------------------------------------------- */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes card-in { from { opacity: 0; transform: translateY(60px) scale(0.96); } }
@keyframes bob { 50% { transform: translateY(-10px); } }
@keyframes reveal { from { opacity: 0; transform: translateY(40px); } }

/* Scroll reveals only where the browser supports scroll-driven animation;
   everywhere else the content is simply visible. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero__text { grid-column: 1 / -1; }
  .hero__stage {
    grid-column: 2 / -1;
    margin-top: 56px;
    height: clamp(300px, 62vw, 460px);
  }
  .hero__sky { bottom: 30%; clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%); }
  .step, .step--wide { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .hero__stage { grid-column: 1 / -1; height: 78vw; }
  .float--main { right: 0; width: 88%; }
  .float--side { left: 0; width: 38%; bottom: -12%; }
  .float--stat { top: -12%; left: auto; right: 4%; }
  .card--stat { min-width: 0; padding: 12px 16px; }
  .card--stat strong {
  color: var(--sky-deep); font-size: 2.25rem; }
  .card--stat span { font-size: 0.8125rem; }
  .stats { grid-template-columns: 1fr; }
  .member { grid-template-columns: 1fr; }
  .member__photo { max-width: 260px; }
  .step__body { padding: 24px 22px 28px; }
}
