/* ============================================================
   TURBOPORTAL — LANDING
   World: turbocharger telemetry / motorsport engineering.
   ============================================================ */

/* ===== COLOR TOKENS — swap these to recolor the whole world =====
   60 / 30 / 10 split:
     60%  ground   -> --ink, --ink-2, --ink-3   (graphite black)
     30%  brand    -> --boost, --boost-2         (boost orange)
     10%  accent   -> --redline, --spark         (crimson + spark yellow)
*/
:root {
  /* 60 — ground */
  --ink:    #0c0d10;
  --ink-2:  #131519;
  --ink-3:  #1a1d23;
  --line:   #262a32;
  --line-2: #363b45;

  /* 30 — brand orange */
  --boost:   #ff6b1a;
  --boost-2: #ff8a3d;
  --boost-ink:#1a0d04;   /* text that sits ON orange */

  /* 10 — accents */
  --redline: #e11d2c;
  --spark:   #ffc24b;

  /* foreground (tinted cool from the graphite ground, never flat gray) */
  --fg:      #f4f5f7;
  --fg-dim:  #a6adb8;
  --fg-mut:  #979dab;

  --radius: 4px;
  --maxw: 1200px;
  --shadow: 0 18px 40px -18px rgba(0,0,0,.8), 0 2px 8px -2px rgba(0,0,0,.6);
  --shadow-boost: 0 16px 30px -14px rgba(0,0,0,.72), 0 2px 6px -2px rgba(0,0,0,.6);

  --font-display: "Saira Condensed", "Saira", system-ui, sans-serif;
  --font-ui: "Saira", system-ui, sans-serif;
  --font-mono: "Martian Mono", ui-monospace, "SF Mono", monospace;
}

/* ===== reset / base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--ink);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  /* faint machined vignette so the ground has depth, not a flat fill */
  background-image:
    radial-gradient(1200px 600px at 78% -8%, rgba(255,107,26,.10), transparent 60%),
    radial-gradient(900px 500px at 8% 108%, rgba(225,29,44,.07), transparent 55%);
  background-attachment: fixed;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* browser surfaces carry the theme too */
::selection { background: var(--boost); color: var(--boost-ink); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--ink); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--boost); }
:focus-visible { outline: 2px solid var(--boost); outline-offset: 2px; border-radius: 2px; }

/* ===== typographic system ===== */
.kicker-row { /* a label used as data, not an eyebrow over the H1 */ }
.mono {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-mut);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 0.98; margin: 0; text-transform: uppercase; overflow-wrap: break-word; }

/* ===== shell / nav ===== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.brand span b { color: var(--boost); font-weight: 700; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: .92rem; color: var(--fg-dim); }
.nav a { position: relative; padding: 4px 0; transition: color .15s; }
.nav a:hover { color: var(--fg); }
.nav a::after { content:""; position:absolute; left:0; bottom:-2px; height:2px; width:0; background:var(--boost); transition: width .22s cubic-bezier(.2,.8,.2,1); }
.nav a:hover::after { width:100%; }

/* ===== buttons ===== */
.btn {
  --_bg: var(--boost);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  font-size: .95rem; padding: 13px 24px; border-radius: var(--radius);
  background: var(--_bg); color: var(--boost-ink); border: 0; cursor: pointer;
  box-shadow: var(--shadow-boost);
  transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .2s, filter .14s;
  position: relative;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -16px rgba(0,0,0,.8), 0 3px 8px -2px rgba(0,0,0,.6); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--fg); border: 1px solid var(--line-2); box-shadow: none; }
.btn--ghost:hover { border-color: var(--boost); color: var(--boost-2); transform: translateY(-2px); box-shadow:none; }
.btn--block { width: 100%; padding: 16px; font-size: 1.02rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.3); }

/* small drawn icon pieces share one stroke weight */
.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== HERO (landing) ===== */
.hero { position: relative; padding: 76px 0 40px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 6.2vw, 5.4rem); }
.hero h1 em { font-style: normal; color: var(--boost); }
.hero__sub { margin: 22px 0 0; max-width: 46ch; color: var(--fg-dim); font-size: 1.12rem; line-height: 1.6; letter-spacing: -0.005em; }
.hero__cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

/* spec strip — mono is legitimate here: it is telemetry/measurement */
.spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 46px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--ink-2); }
.spec div { padding: 18px 20px; border-right: 1px solid var(--line); }
.spec div:last-child { border-right: 0; }
.spec dt { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-mut); margin: 0 0 8px; }
.spec dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; }
.spec dd small { color: var(--boost); font-size: .9rem; font-family: var(--font-mono); font-weight: 400; letter-spacing: 0; }

/* hero visual: the turbo, with a machined turbine ring behind it */
.hero__art { position: relative; display: grid; place-items: center; min-height: 420px; }
.hero__art .turbo { width: min(100%, 460px); z-index: 2; filter: drop-shadow(0 34px 50px rgba(0,0,0,.65)); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-14px)} }
.ring { position: absolute; inset: 0; margin: auto; width: 500px; height: 500px; z-index: 1; opacity: .5; }
.ring .spin { transform-origin: 250px 250px; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== section rhythm ===== */
section.band { padding: 80px 0; border-top: 1px solid var(--line); }
.band__head { max-width: 60ch; margin-bottom: 40px; }
.band__head h2 { font-size: clamp(1.8rem, 3.5vw, 2.9rem); }
.band__head p { color: var(--fg-dim); margin: 16px 0 0; font-size: 1.08rem; }

/* feature rows — spec-sheet, not identical cards */
.rows { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 54px 1fr auto; gap: 22px; align-items: center; padding: 26px 28px; background: var(--ink); transition: background .18s; }
.row:hover { background: var(--ink-2); }
.row__n { font-family: var(--font-mono); font-size: .7rem; color: var(--boost); letter-spacing: .1em; }
.row h3 { font-size: 1.35rem; margin-bottom: 6px; }
.row p { margin: 0; color: var(--fg-dim); max-width: 60ch; }
.row__meta { font-family: var(--font-mono); font-size: .72rem; color: var(--fg-mut); text-transform: uppercase; letter-spacing: .14em; text-align: right; }

/* ===== AUTH / CONNECTING shared center stage ===== */
.stage { min-height: 100dvh; display: grid; place-items: center; padding: 32px; position: relative; }
.stage::before { content:""; position: absolute; inset: 0; z-index:0;
  background-image: radial-gradient(700px 420px at 50% 18%, rgba(255,107,26,.14), transparent 62%);
  pointer-events: none; }
.card {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line); border-radius: 10px; padding: 36px 34px 32px;
  box-shadow: var(--shadow);
}
.card__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.card__brand img { width: 44px; height: 44px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.card__brand .t { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .02em; line-height: 1; }
.card__brand .t b { color: var(--boost); }
.card h1 { font-size: 1.7rem; margin-bottom: 6px; }
.card .lead { color: var(--fg-dim); font-size: .98rem; margin: 0 0 26px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 8px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .ic { position: absolute; left: 14px; color: var(--fg-mut); }
.field input {
  width: 100%; padding: 14px 14px 14px 44px; background: var(--ink-3); color: var(--fg);
  border: 1px solid var(--line-2); border-radius: var(--radius); font: inherit; font-size: 1rem;
  caret-color: var(--boost); transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder { color: var(--fg-mut); }
.field input:focus { outline: none; border-color: var(--boost); background: var(--ink-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--boost) 22%, transparent); }
.field--error input { border-color: var(--redline); box-shadow: 0 0 0 3px color-mix(in srgb, var(--redline) 22%, transparent); }
.err { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: var(--redline); font-size: .84rem; }
.err .ic { width: 15px; height: 15px; stroke: var(--redline); }
.form-foot { margin-top: 22px; text-align: center; font-size: .86rem; color: var(--fg-mut); }
.form-foot a { color: var(--boost-2); }
.form-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.secure { display:flex; align-items:center; justify-content:center; gap:8px; margin-top: 20px; color: var(--fg-mut); font-family: var(--font-mono); font-size: .6rem; letter-spacing:.14em; text-transform: uppercase; }
.secure .ic { width: 14px; height: 14px; stroke: var(--fg-mut); }

/* ===== CONNECTING ===== */
.connect { position: relative; z-index: 1; width: 100%; max-width: 480px; text-align: center; }
.turbine { width: 220px; height: 220px; margin: 0 auto 10px; position: relative; }
.turbine img { position:absolute; inset:0; margin:auto; width: 150px; z-index:2; filter: drop-shadow(0 14px 26px rgba(0,0,0,.6)); }
.turbine .halo { position:absolute; inset:0; border-radius:50%; background: radial-gradient(circle, rgba(255,107,26,.35), transparent 62%); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 0%,100%{opacity:.55; transform:scale(.94)} 50%{opacity:1; transform:scale(1.04)} }
.turbine .sweep { position:absolute; inset:0; }
.turbine .sweep .arc { transform-origin: 110px 110px; animation: spin 1.1s linear infinite; }
.connect h1 { font-size: 2rem; margin: 18px 0 8px; }
.connect .lead { color: var(--fg-dim); margin: 0 auto 30px; max-width: 42ch; }
.steps { display:flex; flex-direction:column; gap:2px; text-align:left; max-width: 360px; margin: 0 auto; border:1px solid var(--line); border-radius: var(--radius); overflow:hidden; background: var(--line); }
.step { display:flex; align-items:center; gap:14px; padding:14px 18px; background: var(--ink-2); font-size:.92rem; }
.step .mk { width:20px; height:20px; display:grid; place-items:center; flex:none; }
.step .mk .ic { width:18px; height:18px; }
.step--done { color: var(--fg); } .step--done .mk .ic { stroke: var(--spark); }
.step--active { color: var(--fg); } .step--active .mk { position:relative; }
.step--active .mk .ring2 { width:16px;height:16px;border:2px solid var(--line-2);border-top-color:var(--boost);border-radius:50%;animation:spin .8s linear infinite;}
.step--todo { color: var(--fg-mut); } .step--todo .mk .ic { stroke: var(--fg-mut); }
.bar { height: 4px; width: 100%; max-width: 360px; margin: 26px auto 0; background: var(--ink-3); border-radius: 999px; overflow: hidden; }
.bar i { display:block; height:100%; width:64%; background: linear-gradient(90deg, var(--boost), var(--boost-2)); border-radius: 999px; animation: load 2.4s ease-in-out infinite; }
@keyframes load { 0%{width:12%} 50%{width:72%} 100%{width:92%} }
.tip { margin-top: 22px; font-family: var(--font-mono); font-size: .72rem; letter-spacing:.14em; text-transform:uppercase; color: var(--fg-mut); }

/* ===== footer ===== */
.foot { border-top: 1px solid var(--line); padding: 34px 0; color: var(--fg-mut); font-size: .86rem; }
.foot__in { display:flex; align-items:center; gap:18px; flex-wrap: wrap; }
.foot .brand { font-size: 1rem; }
.foot .sp { margin-left: auto; }

/* ===== render-gallery helper badge (only on comps) ===== */
.comptag { position: fixed; left: 14px; bottom: 14px; z-index: 50; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-mut); background: color-mix(in srgb, var(--ink) 80%, transparent); border: 1px solid var(--line); padding: 7px 11px; border-radius: 999px; backdrop-filter: blur(6px); }
.comptag b { color: var(--boost); }

/* ===== responsive ===== */
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .hero__grid > *, .hero__art { min-width: 0; }
  .hero__status { white-space: normal; max-width: 100%; }
  .hero__art { order: -1; min-height: 300px; }
  .hero__art .turbo { width: min(72%, 320px); }
  .ring { width: 360px; height: 360px; }
  .spec { grid-template-columns: 1fr; }
  .spec div { border-right: 0; border-bottom: 1px solid var(--line); }
  .spec div:last-child { border-bottom: 0; }
  .nav { display: none; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .row__meta { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}
