/*
 * TorqueSpec marketing site. Dark, minimal, one big phone.
 * Brand rule: orange appears ONLY inside the logo mark. No orange anywhere else.
 */
:root {
  --ink: #070b14;
  --ink-2: #0d1422;
  --surface: #111a2a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f5f8;
  --muted: #9aa6b8;
  --blue: #367be9;
  --blue-light: #7db4f9;
  --radius: 22px;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1180px;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Decorative glows may extend past the edges; never let them cause sideways scroll. */
main {
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.sr-only,
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Type ---------- */
h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

h1 {
  font-size: clamp(40px, 6.2vw, 84px);
}

h2 {
  font-size: clamp(38px, 5.6vw, 72px);
}

h3 {
  font-size: 20px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-light);
}

.lede,
.body {
  margin: 24px 0 0;
  max-width: 34ch;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: linear-gradient(var(--ink) 40%, transparent);
}

.nav-logo img {
  height: 28px;
  width: auto;
}

.nav-cta {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Signup form ---------- */
.signup {
  display: flex;
  gap: 10px;
  margin-top: 36px;
  max-width: 460px;
}

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

.signup input[type="email"]:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.signup button {
  height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.15s,
    filter 0.15s;
}

.signup button:hover {
  filter: brightness(1.08);
}

.signup button:active {
  transform: scale(0.98);
}

/* ---------- Phone frame ---------- */
.phone {
  position: relative;
  margin: 0;
  width: min(360px, 78vw);
  aspect-ratio: 1206 / 2622;
  padding: 11px;
  border-radius: 56px;
  background: linear-gradient(145deg, #2a3446, #0c121d 55%, #1b2434);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 50px 120px -30px rgba(0, 0, 0, 0.8);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 46px;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  align-items: center;
  gap: 40px;
  max-width: var(--max);
  min-height: calc(100svh - 80px);
  margin: 0 auto;
  padding: 24px var(--gutter) 80px;
}

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1600px;
}

.glow {
  position: absolute;
  width: 140%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(54, 123, 233, 0.6),
    rgba(54, 123, 233, 0.2) 38%,
    transparent 66%
  );
  filter: blur(14px);
}

.phone--hero {
  width: min(380px, 70vw);
  transform: rotateY(-18deg) rotateX(8deg) rotateZ(4deg);
  transform-style: preserve-3d;
  transition: transform 0.2s linear;
  will-change: transform;
}

/* ---------- Feature sections ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(32px, 8vw, 120px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  border-top: 1px solid var(--line);
}

.feature--flip {
  grid-template-columns: auto 1fr;
}

.feature--flip .feature-copy {
  order: 2;
}

.points {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 20px;
  max-width: 40ch;
}

.points li {
  padding-left: 22px;
  border-left: 2px solid var(--blue);
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

.points strong {
  display: block;
  color: var(--text);
  font-weight: 700;
}

/* ---------- Spec panel close-up ---------- */
.hud {
  position: relative;
  margin: 0;
  width: min(560px, 90vw);
}

.hud::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(54, 123, 233, 0.35), transparent);
  filter: blur(20px);
}

.hud img {
  width: 100%;
  border-radius: 30px;
  /* Trim the app's light background at the crop's corners. */
  clip-path: inset(6px round 26px);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  transform: perspective(1400px) rotateX(10deg) rotateY(-8deg);
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) clamp(80px, 14vh, 160px);
}

.card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--ink-2);
  border: 1px solid var(--line);
}

.card p {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

.card--soon {
  border-style: dashed;
}

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(125, 180, 249, 0.14);
  color: var(--blue-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 3px;
}

/* ---------- Final CTA ---------- */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  border-top: 1px solid var(--line);
  background: radial-gradient(60% 50% at 50% 0%, rgba(54, 123, 233, 0.18), transparent 70%);
}

.cta-mark {
  margin-bottom: 28px;
}

.cta .body {
  max-width: 40ch;
}

.cta .signup {
  width: 100%;
  justify-content: center;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer img {
  height: 22px;
  width: auto;
  opacity: 0.85;
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Without JS, show everything. */
.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .phone--hero {
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Grid children may shrink below their longest word/line (prevents sideways scroll). */
.hero > *,
.feature > * {
  min-width: 0;
}

@media (max-width: 820px) {
  .hero,
  .feature,
  .feature--flip {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }
  .hero {
    min-height: auto;
    padding-top: 32px;
  }
  .feature--flip .feature-copy {
    order: 0;
  }
  .lede,
  .body,
  .points {
    margin-left: auto;
    margin-right: auto;
  }
  .points li {
    text-align: left;
  }
  .signup {
    margin-left: auto;
    margin-right: auto;
  }
  .phone--hero {
    transform: rotateY(-10deg) rotateX(6deg) rotateZ(2deg);
  }
}

@media (max-width: 520px) {
  .signup {
    flex-direction: column;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .nav-cta {
    padding: 10px 14px;
  }
  .footer {
    flex-direction: column;
  }
}
