/* ==========================================================================
   NEXINFUSE — COMING SOON STYLES
   --------------------------------------------------------------------------
   ▶ BRAND COLOURS & SIZES: edit the :root block right below.
     The 3D scene reads --c-blue, --c-cyan, --c-green and --c-lime from
     here too, so changing them recolours the animation as well.
   ========================================================================== */

:root {
  /* ---- Brand colours (taken from the Nexinfuse logo) ---- */
  --c-bg:        #050B1A;   /* page background (night navy) */
  --c-surface:   #0B1630;   /* cards, inputs, countdown tiles */
  --c-surface-2: #10204A;   /* hover / raised surfaces */
  --c-border:    #1E2E57;   /* subtle outlines */
  --c-blue:      #0A5BD9;   /* brand blue (left of the infinity loop) */
  --c-cyan:      #00E5FF;   /* electric cyan */
  --c-green:     #3FE000;   /* infinity green */
  --c-lime:      #B6F500;   /* lime accent */
  --c-silver:    #D9DEE8;   /* the logo's silver triangle */
  --c-text:      #F4F7FB;   /* main text */
  --c-muted:     #A9B4C8;   /* secondary text */
  --c-error:     #FF8A8A;   /* form error text */
  --c-on-accent: #04121F;   /* dark text on bright buttons */

  /* ---- Gradients ---- */
  --grad-brand: linear-gradient(90deg, var(--c-cyan), var(--c-green));
  --grad-loop:  linear-gradient(90deg, var(--c-blue), var(--c-cyan) 35%, var(--c-green) 70%, var(--c-lime));

  /* ---- Type ---- */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* ---- Layout ---- */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 68px;
}

/* ---------- Self-hosted font (variable weight 300–700, Latin only) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-text);
  background-color: var(--c-bg);
  /* soft brand glows + faint grid, drawn with CSS only (no image download) */
  background-image:
    radial-gradient(900px 600px at 85% -10%, rgba(10, 91, 217, .28), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(0, 229, 255, .10), transparent 60%),
    radial-gradient(800px 600px at 100% 100%, rgba(63, 224, 0, .08), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(217, 222, 232, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 222, 232, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 75%);
}

img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--c-cyan); text-underline-offset: 3px; }
a:hover { color: var(--c-text); }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--c-cyan);
  color: var(--c-on-accent);
  font-weight: 700;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Small coloured dots used in "Secure • Intelligent • Infinite" */
.dot {
  display: inline-block;
  width: .42em; height: .42em;
  margin: 0 .5em .12em;
  border-radius: 50%;
  vertical-align: middle;
}
.dot--cyan  { background: var(--c-cyan);  box-shadow: 0 0 10px var(--c-cyan); }
.dot--green { background: var(--c-green); box-shadow: 0 0 10px var(--c-green); }

.eyebrow {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--c-silver);
}
.eyebrow--plain { color: var(--c-cyan); letter-spacing: .2em; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn--primary {
  background: var(--grad-brand);
  color: var(--c-on-accent);
  box-shadow: 0 6px 24px -8px rgba(0, 229, 255, .6);
}
.btn--primary:hover { color: var(--c-on-accent); transform: translateY(-1px); box-shadow: 0 10px 30px -8px rgba(63, 224, 0, .6); }
.btn--primary:active { transform: translateY(0); }
.btn--primary[disabled] { opacity: .7; cursor: progress; transform: none; }
.btn--ghost {
  background: rgba(11, 22, 48, .6);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--c-cyan); color: var(--c-text); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: .92rem; }

/* spinner shown while the form is sending */
.btn.is-loading .btn__label::before {
  content: "";
  display: inline-block;
  width: 1em; height: 1em;
  margin-right: .5em;
  vertical-align: -0.15em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: linear-gradient(to bottom, rgba(5, 11, 26, .9), rgba(5, 11, 26, .55));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(30, 46, 87, .5);
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; border-radius: 8px; }
.brand__logo { height: 32px; width: auto; }

/* ==========================================================================
   Hero (3D visual + headline + countdown + form)
   ========================================================================== */
.hero { position: relative; padding-block: 8px 56px; overflow-x: clip; }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

/* ---- 3D visual ---- */
.hero__visual {
  position: relative;
  width: 100%;
  height: clamp(190px, 50vw, 320px);
  margin-inline: auto;
  pointer-events: none;           /* never blocks clicks on the form */
}
.hero__poster,
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__poster { padding: 4% 2%; transition: opacity .9s ease; }
.hero__poster-glow { opacity: .55; }
.hero__canvas { opacity: 0; transition: opacity 1.2s ease; }
/* main.js adds .is-3d once the WebGL scene has drawn its first frame */
.hero__visual.is-3d .hero__canvas { opacity: 1; }
.hero__visual.is-3d .hero__poster { opacity: 0; }

/* gentle "breathing" for the static artwork (skipped for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .hero__poster { animation: float 7s ease-in-out infinite; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ---- Text column ---- */
.hero__content { position: relative; z-index: 1; text-align: center; }
.hero__content > * + * { margin-top: 18px; }

.hero__title {
  font-size: clamp(2.75rem, 11vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}
.hero__tagline {
  font-size: clamp(1.1rem, 3.6vw, 1.4rem);
  color: var(--c-silver);
  max-width: 40ch;
  margin-inline: auto;
}

/* ---- Audience chips ---- */
/* phones: one full-width row per audience */
.audience {
  display: grid;
  gap: 8px;
  max-width: 400px;
  margin-inline: auto;
}
.chip {
  --chip: var(--c-cyan);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px 8px 14px;
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--chip);
  border-radius: var(--radius-sm);
  background: rgba(11, 22, 48, .7);
  color: var(--c-text);
  text-decoration: none;
  line-height: 1.25;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.chip strong { font-size: .92rem; font-weight: 600; }
.chip span  { font-size: .78rem; color: var(--chip); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.chip:hover { color: var(--c-text); background: var(--c-surface-2); border-color: var(--chip); transform: translateY(-1px); }
.chip--blue  { --chip: #4D9BFF; }   /* lighter blue for readable text on navy */
.chip--cyan  { --chip: var(--c-cyan); }
.chip--green { --chip: var(--c-green); }

/* ---- Countdown ---- */
.countdown { margin-top: 32px !important; }
.countdown__title {
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--c-muted);
}
.countdown__title time { color: var(--c-text); font-weight: 600; }
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2vw, 14px);
  max-width: 460px;
  margin: 12px auto 0;
}
.tile {
  position: relative;
  padding: 12px 4px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 32, 74, .9), rgba(11, 22, 48, .9));
  text-align: center;
  overflow: hidden;
}
.tile::after {             /* thin brand line on top of each tile */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad-loop);
  opacity: .8;
}
.tile__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.tile__label {
  display: block;
  margin-top: 2px;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
@media (prefers-reduced-motion: no-preference) {
  .tile__num.tick { animation: tick .45s ease; }
}
@keyframes tick {
  0%   { transform: translateY(-30%); opacity: 0; }
  100% { transform: translateY(0);    opacity: 1; }
}
/* state after the launch time has passed */
.countdown.is-live .tile__num { color: var(--c-green); }

/* ---- Notify-me form ---- */
.notify {
  margin-top: 28px !important;
  padding: 22px clamp(16px, 4vw, 26px) 20px;
  border: 1px solid var(--c-border);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(11, 22, 48, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: left;
  max-width: 560px;
  margin-inline: auto;
}
.notify__title { font-size: 1.3rem; }
.notify__sub { margin-top: 4px; color: var(--c-muted); font-size: .95rem; }

.form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--c-silver);
}
.optional { font-weight: 400; color: var(--c-muted); }

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background-color: var(--c-bg);
  color: var(--c-text);
  font: inherit;
  font-size: 1rem;              /* 16px stops iOS from zooming in */
  transition: border-color .2s, box-shadow .2s;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A9B4C8' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field input::placeholder { color: #6F7C95; }
.field input:hover,
.field select:hover { border-color: #33477A; }
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--c-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, .25);
}
.field input[aria-invalid="true"] { border-color: var(--c-error); }
.field__error {
  margin-top: 6px;
  font-size: .88rem;
  color: var(--c-error);
}
.field--submit { width: 100%; }
.form__consent {
  font-size: .8rem;
  color: var(--c-muted);
  line-height: 1.5;
}

/* Honeypot: moved off-screen so people never see it (bots still fill it) */
.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form__status:empty { display: none; }
.form__status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  outline: none;
}
.form__status.is-success {
  border: 1px solid rgba(63, 224, 0, .45);
  background: rgba(63, 224, 0, .08);
}
.form__status.is-success strong { color: var(--c-green); }
.form__status.is-error {
  border: 1px solid rgba(255, 138, 138, .45);
  background: rgba(255, 138, 138, .08);
}
.form__status a { color: var(--c-cyan); }
.linklike {
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-cyan);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
/* after a successful sign-up the form itself is hidden */
.notify.is-done .form { display: none; }
.notify.is-done .form__status { margin-top: 16px; }

/* ==========================================================================
   What's coming (4 cards)
   ========================================================================== */
.coming { padding-block: clamp(56px, 9vw, 110px); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(28px, 5vw, 48px); }
.section-head__title { margin-top: 10px; font-size: clamp(1.6rem, 4.4vw, 2.5rem); }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.card {
  --accent: var(--c-cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 22px;
  border: 1px solid var(--c-border);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, rgba(16, 32, 74, .75), rgba(11, 22, 48, .75));
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.card:hover,
.card:target {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px -22px var(--accent);
}
.card--blue  { --accent: #4D9BFF; }
.card--cyan  { --accent: var(--c-cyan); }
.card--teal  { --accent: #2EF2B0; }
.card--green { --accent: var(--c-green); }

.card__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.card__icon svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card__title { font-size: 1.2rem; }
.card__text { color: var(--c-muted); font-size: .97rem; flex: 1; }
.tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.coming__cta { margin-top: clamp(32px, 5vw, 48px); text-align: center; }

/* Scroll-reveal (only when JS is running and motion is OK) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .reveal:nth-child(2) { transition-delay: .08s; }
  .js .reveal:nth-child(3) { transition-delay: .16s; }
  .js .reveal:nth-child(4) { transition-delay: .24s; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--c-border);
  background: rgba(3, 7, 18, .6);
  padding-top: 40px;
}
.site-footer__inner {
  display: grid;
  gap: 28px;
  justify-items: center;
  text-align: center;
}
.site-footer__logo { height: 30px; width: auto; margin-inline: auto; }
.site-footer__line {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.contact a,
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--c-silver);
  text-decoration: none;
}
.contact a:hover, .social a:hover { color: var(--c-cyan); }
.contact svg, .social svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.social { display: flex; gap: 8px; }
.social:not(:has(li:not([hidden]))) { display: none; }   /* hide the row when every link is empty */
.social a {
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--c-border);
  border-radius: 50%;
}
.social a:hover { border-color: var(--c-cyan); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin-top: 32px;
  padding-block: 18px 28px;
  border-top: 1px solid rgba(30, 46, 87, .5);
  font-size: .85rem;
  color: var(--c-muted);
}
.site-footer__bottom a { color: var(--c-muted); }
.site-footer__bottom a:hover { color: var(--c-cyan); }

/* ==========================================================================
   Privacy / 404 pages
   ========================================================================== */
.page { padding-block: 48px 80px; }
.page .container { max-width: 760px; }
.page h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin-bottom: 8px; }
.page h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.page p, .page li { color: var(--c-silver); }
.page p + p { margin-top: 12px; }
.page ul { list-style: disc; padding-left: 1.3em; }
.page li + li { margin-top: 6px; }
.page .updated { color: var(--c-muted); font-size: .9rem; }
.page--center { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.page--center .btn { margin-top: 24px; }

/* ==========================================================================
   Responsive layout
   ========================================================================== */

/* Tablet */
@media (min-width: 640px) {
  .audience { display: flex; flex-wrap: wrap; justify-content: center; max-width: none; gap: 10px; }
  .chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; }
  .form { grid-template-columns: 1fr auto; align-items: end; }
  .field--email, .form__consent { grid-column: 1 / -1; }
  .field--submit { width: auto; min-width: 170px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop: text on the left, 3D on the right */
@media (min-width: 1000px) {
  .hero { padding-block: 24px 72px; }
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 24px;
    min-height: calc(100vh - var(--header-h) - 40px);
  }
  .hero__visual {
    order: 2;
    height: min(560px, 70vh);
    width: 118%;               /* lets the glow spill slightly past the column */
    margin-right: -9%;
  }
  .hero__content { order: 1; text-align: left; }
  .hero__title { font-size: clamp(3.6rem, 5.4vw, 4.6rem); white-space: nowrap; }
  .hero__tagline { margin-inline: 0; }
  .audience { justify-content: flex-start; }
  .countdown__grid { margin-inline: 0; }
  .notify { margin-inline: 0; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .site-footer__inner {
    grid-template-columns: auto 1fr auto;
    justify-items: start;
    align-items: center;
    text-align: left;
  }
  .site-footer__logo { margin-inline: 0; }
  .contact { justify-content: center; justify-self: center; }
  .site-footer__bottom { justify-content: space-between; }
}

/* Very small phones */
@media (max-width: 360px) {
  .chip { padding: 6px 12px; }
  .tile__label { letter-spacing: .06em; }
}

/* ==========================================================================
   Reduced motion: switch off every transition & animation
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Windows high-contrast mode: keep outlines visible */
@media (forced-colors: active) {
  .btn, .chip, .tile, .card, .notify, .field input, .field select { border: 1px solid CanvasText; }
  .text-gradient { color: CanvasText; background: none; }
}
