/* NextScalp Journal landing. Independent stylesheet. Dark-first, monochrome plus one emerald accent. */

/* Fonts (self-hosted) */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

/* Tokens */
:root {
  --bg: #0a0b0d;
  --bg-deep: #060708;
  --surface: #101216;
  --surface-2: #15181d;
  --surface-3: #1c1f25;
  --border: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.12);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-faint: #8e9099;
  --accent: #34d399;
  --accent-dim: #10b981;
  --accent-soft: rgba(52, 211, 153, 0.1);
  --danger: #fb7185;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-body: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --shadow-soft: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  --shadow-card:
    0 20px 40px -24px rgba(0, 0, 0, 0.55),
    0 1px 0 0 rgba(255, 255, 255, 0.04) inset;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --maxw: 1180px;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,
svg,
figure {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  list-style: none;
  padding: 0;
}
em {
  font-style: normal;
}
::selection {
  background: var(--accent);
  color: #04130d;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #04130d;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* Layout helpers */
.section {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 8rem) 1.5rem;
}
.section__head {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 1rem + 2.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.section__title em {
  color: var(--accent);
}
.section__lead {
  margin-top: 1.1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 60ch;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.7rem 1.25rem;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease),
    background 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
}
.btn--lg {
  padding: 0.9rem 1.6rem;
  font-size: 1.02rem;
}
.btn--primary {
  background: var(--accent);
  color: #04130d;
}
.btn--primary:hover {
  background: #4ade9f;
  transform: translateY(-1px);
}
.btn--primary:active {
  transform: translateY(0) scale(0.985);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 13, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 64px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand__mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%2334d399'/><rect x='9' y='9.7' width='14.7' height='2.4' rx='1.2' fill='%2304130d'/><rect x='9' y='14.8' width='11.5' height='2.4' rx='1.2' fill='%2304130d'/><rect x='9' y='19.9' width='9' height='2.4' rx='1.2' fill='%2304130d'/></svg>")
    center / cover no-repeat;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.brand__name em {
  color: var(--accent);
}
.nav__links {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.nav__links a:hover {
  color: var(--text);
}
.nav__cta {
  display: flex;
  gap: 0.6rem;
}
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  margin-left: auto;
  cursor: pointer;
}
.nav__burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.2s var(--ease),
    opacity 0.2s var(--ease);
}
.nav__burger[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.nav__burger[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.nav__mobile:not([hidden]) {
  display: flex;
}
.nav__mobile a {
  padding: 0.7rem 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.nav__mobile a:last-child {
  border-bottom: 0;
}

/* Hero */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 1.5rem clamp(3rem, 6vw, 5rem);
  min-height: min(82svh, 760px);
  display: flex;
  align-items: center;
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 1rem + 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-top: 0.5rem;
}
.hero__sub {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: var(--text-muted);
  max-width: 54ch;
}
.hero__cta {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.hero__glow {
  position: absolute;
  z-index: 1;
  top: -10%;
  right: -8%;
  width: 60vw;
  max-width: 720px;
  aspect-ratio: 1;
  background: radial-gradient(
    circle at center,
    var(--accent-soft),
    transparent 62%
  );
  filter: blur(20px);
  pointer-events: none;
}

/* Trust band */
.trust {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
}
.trust__list {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text-muted);
}
.trust__list li {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.trust__ico {
  color: var(--accent);
  font-size: 1rem;
}

/* Generic grids */
.grid {
  display: grid;
  gap: 1rem;
}
.grid--2x2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Problem blind-spot cards */
.blind {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition:
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.blind:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}
.blind h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.blind p {
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* Duality */
.duality__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.duality__card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  min-height: 220px;
}
.duality__card--mirror {
  background:
    linear-gradient(180deg, var(--accent-soft), transparent), var(--surface);
  border-color: rgba(52, 211, 153, 0.28);
}
.duality__kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.2rem;
}
.duality__card--mirror .duality__kicker {
  color: var(--accent);
}
.duality__card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.duality__card p {
  color: var(--text-muted);
}
.duality__line {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1.4vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 30ch;
}

/* Pipeline */
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  counter-reset: step;
}
.pipeline__step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
}
.pipeline__n {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.pipeline__step h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0.7rem 0 0.4rem;
}
.pipeline__step p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Split (text + screenshot) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.split + .split {
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}
.split__text h2,
.split__text h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.split__text h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}
.split__text > p {
  color: var(--text-muted);
}
.split--rev .split__text {
  order: 2;
}

.ticks {
  margin-top: 1.3rem;
  display: grid;
  gap: 0.65rem;
}
.ticks li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text);
  font-size: 0.96rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

/* Screenshot placeholder */
.shot {
  position: relative;
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.shot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.5;
  pointer-events: none;
}
.shot--wide {
  aspect-ratio: 16 / 8;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.shot__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  background: var(--accent-soft);
  z-index: 1;
}
.shot__label {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text-faint);
  z-index: 1;
}

/* Reflect / generic cards */
.rcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition:
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.rcard:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}
.rcard h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.rcard p {
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* Ownership */
.own__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition:
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.own__card:hover {
  border-color: rgba(52, 211, 153, 0.3);
  transform: translateY(-2px);
}
.own__card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.own__card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Honest */
.honest {
  max-width: 100%;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
}
.honest__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.honest__list {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}
.honest__list li {
  position: relative;
  padding-left: 1.8rem;
  color: var(--text-muted);
  font-size: 1.02rem;
}
.honest__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 11px;
  height: 2px;
  background: var(--accent);
}
.honest__list strong {
  color: var(--text);
  font-weight: 600;
}

/* Demo block */
.demo__inner {
  max-width: 720px;
}
.demo__inner .btn {
  margin-top: 1.8rem;
}
.demo__note,
.access__note {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* Access */
.access {
  max-width: 100%;
  border-top: 1px solid var(--border);
  background: radial-gradient(
    120% 60% at 50% 0%,
    var(--accent-soft),
    transparent 70%
  );
}
.access__inner {
  max-width: 680px;
  text-align: center;
  margin: 0 auto;
}
.access__inner .section__lead {
  margin-left: auto;
  margin-right: auto;
}
.access__inner .btn {
  margin-top: 1.8rem;
}

/* FAQ */
.faq__list {
  display: grid;
  gap: 0.6rem;
  max-width: 820px;
}
.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1.4rem;
  transition: border-color 0.2s var(--ease);
}
.faq__item[open] {
  border-color: var(--border-2);
}
.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.2rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq__item summary::-webkit-details-marker {
  display: none;
}
.faq__item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.3rem;
  transition: transform 0.2s var(--ease);
}
.faq__item[open] summary::after {
  transform: rotate(45deg);
}
.faq__item p {
  color: var(--text-muted);
  padding: 0 0 1.3rem;
  max-width: 70ch;
}
.faq__item a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) 1.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem 3rem;
  justify-content: space-between;
}
.footer__brand {
  max-width: 360px;
}
.footer__brand .brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}
.footer__brand .brand__name em {
  color: var(--accent);
}
.footer__brand p {
  margin-top: 0.6rem;
  color: var(--text-faint);
  font-size: 0.92rem;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 0.7rem 1.6rem;
  padding-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.footer__links a:hover {
  color: var(--accent);
}
.footer__legal {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* Reveal (JS-gated so content is visible without JS) */
.reveal {
  opacity: 1;
}
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
.js .reveal-d1 {
  transition-delay: 0.08s;
}
.js .reveal-d2 {
  transition-delay: 0.16s;
}
.js .reveal-d3 {
  transition-delay: 0.24s;
}

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

@media (max-width: 760px) {
  .nav__links,
  .nav__cta {
    display: none;
  }
  .nav__burger {
    display: flex;
  }
  .duality__grid,
  .split,
  .grid--2x2 {
    grid-template-columns: 1fr;
  }
  .split--rev .split__text {
    order: 0;
  }
  .hero {
    min-height: auto;
    padding-top: 3.5rem;
  }
}

@media (max-width: 520px) {
  .pipeline,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
  .footer__inner {
    flex-direction: column;
    gap: 1.5rem;
  }
  .footer__links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .blind,
  .rcard,
  .own__card {
    transition: none;
  }
}
