/* ==========================================================================
   Phntm Labs — styles
   Black and white only. Square corners, 1px borders, no shadows/gradients.
   ========================================================================== */

:root {
  --bg: #000000;
  --bg-alt: #0A0A0C;
  --text: #FFFFFF;
  --text-2: #B4B4BD;
  --label: #86868F;
  --border: #1C1C21;
  --border-2: #26262B;
  --ink-2: #4A4A52; /* secondary text on the white pricing card */

  --font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1120px;
  --gutter: 32px;
  --nav-h: 72px;
  --section-y: 120px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Accessibility helpers ---------- */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 400;
}
.skip-link:focus { top: 16px; }

/* ---------- Cursor (the only highlight) ---------- */
.cursor {
  display: inline-block;
  width: 0.16em;
  height: 0.8em;
  margin-left: 0.08em;
  background: var(--text);
  vertical-align: baseline;
  animation: blink 1.1s steps(1, end) infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: baseline;
  font-size: 22px;
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}
.logo .cursor { width: 0.2em; margin-left: 0.14em; }
.logo-labs {
  margin-left: 14px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--label);
  transform: translateY(-1px);
}

/* ---------- Type ---------- */
.label {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 20px;
}
.label-sm { margin-bottom: 14px; }

.section-title {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 200;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 820px;
}
.section-title-narrow { max-width: 680px; }

.section-lead {
  margin-top: 16px;
  max-width: 640px;
  color: var(--text-2);
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 13px; }
.btn-block { display: flex; width: 100%; }

.btn-solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-solid:hover { background: var(--bg); color: var(--text); }

.btn-outline { background: transparent; color: var(--text); border-color: #4A4A52; }
.btn-outline:hover { border-color: var(--text); }

.btn-dark { background: var(--bg); color: var(--text); border-color: var(--bg); }
.btn-dark:hover { background: #fff; color: #000; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid var(--border);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.nav-menu { display: flex; align-items: center; gap: 36px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 14px;
  color: var(--text-2);
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid #4A4A52;
  border-radius: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 1px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bg-alt); }
.section-compact { padding: 96px 0; }

/* Hero */
.hero { padding: 120px 0 128px; }
.hero-title {
  font-size: clamp(44px, 6.4vw, 88px);
  font-weight: 200;
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
}
.hero-lead {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-2);
  margin-bottom: 40px;
}
.tagline {
  margin-top: 56px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}
.tagline-dim { color: var(--label); }
.tagline-bright { color: var(--text); margin-left: 0.6em; }

/* Problems */
.problems {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 72px;
}
.problem { padding: 4px 32px 8px; }
.problem:first-child { padding-left: 0; }
.problem + .problem { border-left: 1px solid var(--border-2); }
.problem-num {
  display: block;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--label);
  margin-bottom: 12px;
}
.problem h3,
.card h3,
.step h3 {
  font-size: 19px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.problem p,
.card p:not(.label),
.step p,
.two-col p:not(.label) {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
}

/* Services */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.cards-4 { grid-template-columns: repeat(2, 1fr); }
.card {
  border: 1px solid var(--border-2);
  padding: 36px 32px 40px;
}
.card h3 { font-size: 21px; font-weight: 300; margin-bottom: 16px; }

.addon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 24px 32px;
  border: 1px dashed #4A4A52;
}
.addon .label { margin-bottom: 6px; }
.addon h3 { font-size: 17px; font-weight: 400; line-height: 1.4; }
.addon-note { font-size: 14px; color: var(--text-2); }

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 56px;
}
.step { border-top: 1px solid #4A4A52; padding-top: 24px; }
.step .label { display: block; }

.works-with {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
  margin-top: 64px;
}
.works-with .label { margin: 0; }
.works-with ul { display: flex; flex-wrap: wrap; gap: 12px 36px; }
.works-with li { font-size: 14px; color: var(--text); }

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 56px;
  align-items: stretch;
}

.plan {
  background: var(--text);
  color: var(--bg);
  padding: 40px 36px 36px;
}
.plan :focus-visible { outline-color: #000; }
.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.plan-name { color: var(--bg); font-weight: 500; margin: 0; }
.badge {
  flex-shrink: 0;
  border: 1px solid var(--bg);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}
.plan-price {
  font-size: clamp(36px, 4vw, 46px);
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.plan-terms {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-2);
}
.plan-list {
  margin: 28px 0 32px;
  padding-left: 18px;
  list-style: disc;
}
.plan-list li { font-size: 15px; line-height: 1.5; padding: 4px 0; }

.alacarte {
  border: 1px solid var(--border-2);
  padding: 40px 32px 36px;
}
.alacarte .label { margin-bottom: 28px; }
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
}
.price-row dt,
li.price-row { font-size: 15px; font-weight: 400; color: var(--text); }
.alacarte { display: flex; flex-direction: column; }
.alacarte-lead { font-size: 15px; color: var(--text-2); margin-bottom: 12px; }
.alacarte-note { margin-top: auto; padding-top: 28px; font-size: 14px; color: var(--label); }
.price-row dd { font-size: 14px; color: var(--text-2); text-align: right; white-space: nowrap; }

/* Privacy + partners */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.col-title {
  font-size: clamp(22px, 2vw, 25px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 14px;
}

/* Final CTA */
.cta { padding: 160px 0; text-align: center; }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta-title {
  max-width: 820px;
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 200;
  line-height: 1.12;
  letter-spacing: -0.04em;
}
.cta-text {
  max-width: 560px;
  margin: 28px 0 36px;
  color: var(--text-2);
}
.contact {
  margin-top: 28px;
  font-size: 13px;
  color: var(--label);
}
.contact a { color: var(--text-2); }
.contact a:hover { color: var(--text); }
.contact span { margin: 0 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-note { font-size: 13px; color: var(--label); }

.nw { white-space: nowrap; }

/* ---------- Scroll reveal (only when JS has opted in) ---------- */
.reveal-on .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--delay, 0ms);
}
.reveal-on .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  :root { --section-y: 96px; }
  .cards, .cards-4 { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .problems { grid-template-columns: 1fr; }
  .problem,
  .problem:first-child { padding: 28px 0; }
  .problem:first-child { padding-top: 0; }
  .problem + .problem { border-left: 0; border-top: 1px solid var(--border-2); }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .addon { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --nav-h: 64px; --section-y: 80px; }

  .nav-toggle { display: inline-flex; }
  .js .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .js .nav-menu.is-open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  .nav-menu .btn { margin-top: 20px; min-height: 48px; font-size: 14px; }

  /* Without JS, keep the links reachable under the logo */
  html:not(.js) .nav { height: auto; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .nav-menu { width: 100%; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
  html:not(.js) .nav-links { flex-direction: row; gap: 20px; }
  html:not(.js) .nav-links a { border: 0; padding: 0; font-size: 14px; }

  .hero { padding: 72px 0 88px; }
  .hero-title { font-size: clamp(40px, 11.5vw, 56px); margin-bottom: 24px; }
  .hero-lead { font-size: 16px; margin-bottom: 32px; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
  .tagline { margin-top: 40px; }

  .problems, .cards, .steps, .pricing { margin-top: 40px; }
  .card { padding: 28px 24px 32px; }
  .addon { padding: 22px 24px; }
  .works-with { flex-direction: column; align-items: flex-start; margin-top: 48px; }
  .works-with ul { gap: 10px 24px; }

  .plan { padding: 32px 24px 28px; }
  .plan-name { letter-spacing: 0.25em; }
  .badge { letter-spacing: 0.12em; padding: 4px 7px; font-size: 10px; }
  .alacarte { padding: 32px 24px 24px; }
  .price-row { flex-direction: column; gap: 4px; }
  .price-row dd { text-align: left; white-space: normal; }

  .two-col { grid-template-columns: 1fr; gap: 48px; }
  .section-compact { padding: 80px 0; }
  .cta { padding: 112px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .plan-head { flex-direction: column-reverse; align-items: flex-start; gap: 14px; }
  .plan-price { font-size: 9vw; white-space: nowrap; }
}

/* ---------- Reduced motion: no blinking, no animation ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; opacity: 1; }
  .reveal-on .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Case studies ---------- */
.hero-sub { padding: 104px 0 96px; }
.nav-links a[aria-current="page"] { color: var(--text); }

.case {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 64px;
  align-items: start;
}
.case .section-title { margin-bottom: 28px; }
.case-body { font-size: 17px; line-height: 1.7; color: var(--text-2); max-width: 620px; }
.case-facts { border-top: 1px solid #4A4A52; }
.case-fact { padding: 24px 0; border-bottom: 1px solid var(--border-2); }
.case-fact dt { margin-bottom: 12px; }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.case-tags li { font-size: 14px; padding: 6px 12px; border: 1px solid var(--border-2); }
.case-result { font-size: 19px; font-weight: 300; line-height: 1.45; }

.case-teaser {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 32px;
  border: 1px solid var(--border-2);
  transition: border-color 0.2s ease;
}
.case-teaser:hover { border-color: var(--text); }
.case-teaser p:not(.label) { color: var(--text-2); max-width: 560px; }
.case-teaser-link { font-size: 14px; white-space: nowrap; }

@media (max-width: 960px) {
  .case { grid-template-columns: 1fr; gap: 40px; }
  .case-teaser { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
}

/* ---------- Trusted by ---------- */
.trusted {
  padding: 48px 0 56px;
  border-top: 1px solid var(--border);
}
.trusted-title { text-align: center; margin-bottom: 28px; }

.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px 96px;
}
.logo-row img {
  width: auto;
  height: 60px;
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.logo-row img:hover { filter: none; opacity: 1; }

@media (max-width: 760px) {
  .trusted { padding: 36px 0 44px; }
  .logo-row { gap: 20px 48px; }
  .logo-row img { height: 48px; }
}

/* ---------- Hero art: a quiet "automation running" feed ---------- */
.hero-inner { position: relative; }
.hero-art { display: none; }

@media (min-width: 1180px) {
  .hero-lead { max-width: 640px; }
  .hero-art {
    display: block;
    position: absolute;
    top: 50%;
    right: var(--gutter);
    width: 300px;
    transform: translateY(-50%);
  }
  /* faint dot grid behind the feed */
  .hero-art::before {
    content: "";
    position: absolute;
    inset: -56px -40px;
    background-image: radial-gradient(var(--border-2) 1px, transparent 1px);
    background-size: 20px 20px;
    -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
            mask-image: radial-gradient(closest-side, #000, transparent);
    z-index: -1;
  }
}

.flow {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
/* the thin line linking each step */
.flow::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 12px;
  bottom: 12px;
  border-left: 1px dashed #3A3A42;
}
.flow-item {
  position: relative;
  margin-left: 40px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  animation: flow-step 10s ease-in-out infinite;
}
.flow-item::before {          /* node on the line */
  content: "";
  position: absolute;
  left: -24px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  background: var(--bg);
  border: 1px solid #6A6A73;
}
.flow-item:last-child { border-color: #4A4A52; }
.flow-item:last-child::before { background: var(--text); border-color: var(--text); }
.flow-time {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--label);
}
.flow-text { display: block; font-size: 14px; line-height: 1.45; color: var(--text); }

/* Each step appears in turn, the full story holds, then it all fades and replays */
.flow-item:nth-child(1) { animation-name: flow-step-1; }
.flow-item:nth-child(2) { animation-name: flow-step-2; }
.flow-item:nth-child(3) { animation-name: flow-step-3; }
.flow-item:nth-child(4) { animation-name: flow-step-4; }

@keyframes flow-step-1 { 0%, 2% { opacity: 0; transform: translateY(6px); } 7%, 88% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
@keyframes flow-step-2 { 0%, 14% { opacity: 0; transform: translateY(6px); } 19%, 88% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
@keyframes flow-step-3 { 0%, 26% { opacity: 0; transform: translateY(6px); } 31%, 88% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
@keyframes flow-step-4 { 0%, 38% { opacity: 0; transform: translateY(6px); } 43%, 88% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
