/* ---------- WTF UX Audit — design tokens ---------- */
:root {
  --paper: #FAFAF7;
  --ink: #0A0A0A;
  --ink-2: #1A1A1A;
  --muted: #6E6E6E;
  --hair: #E5E5E0;
  --hair-2: #D4D4CE;

  --blue: #1640FF;
  --red: #FF3D00;
  --amber: #FFCC00;

  --display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ui: "Inter Tight", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

button { font: inherit; }
a { color: inherit; }

/* ---------- chrome ---------- */
.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 32px;
  z-index: 5;
  pointer-events: none;
}
.chrome > * { pointer-events: auto; }
.mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mark-dot {
  width: 12px;
  height: 12px;
  background: var(--red);
  border-radius: 999px;
  display: inline-block;
}
.nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-family: var(--mono);
  font-weight: 500;
}
.nav a {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1.5px solid transparent;
  padding-bottom: 1px;
  transition: border-color .15s ease, color .15s ease;
}
.nav a:hover { border-bottom-color: var(--ink); }
.nav a.price { color: var(--red); }

.foot {
  position: fixed;
  bottom: 22px;
  left: 32px;
  right: 32px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  z-index: 4;
  pointer-events: none;
  letter-spacing: 0.01em;
}
.foot > * { pointer-events: auto; }
.foot .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #2BCB6E;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: 2px;
  box-shadow: 0 0 0 4px rgba(43, 203, 110, 0.18);
}

/* ---------- stage ---------- */
.stage {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 72px 32px 64px;
}
.stage > [data-screen-view][hidden] { display: none !important; }

/* ---------- HERO / LANDING ---------- */
.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1640px;
  width: 100%;
  margin: 0 auto;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.eyebrow .pill {
  background: var(--ink);
  color: var(--paper);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow .arrow {
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-left: 2px;
}

.headline {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, min(9.5vw, 14vh), 168px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--blue);
  margin: 0 0 18px 0;
  max-width: 22ch;
  text-wrap: balance;
}
.headline .hl {
  color: var(--red);
  background: var(--amber);
  padding: 0 0.08em;
  margin: 0 0.04em 0 0.02em;
  display: inline-block;
  transform: rotate(-1.2deg);
  line-height: 0.85;
}
.headline .ink { color: var(--ink); }
.headline .qmark { color: var(--ink); }

.sub {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(20px, min(1.7vw, 3vh), 26px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  max-width: 64ch;
  margin: 0 0 28px 0;
}
.sub strong { font-weight: 700; }

/* ---------- form ---------- */
.form {
  display: flex;
  align-items: stretch;
  gap: 14px;
  max-width: 920px;
  width: 100%;
}
.input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.url-input {
  flex: 1;
  height: 84px;
  width: 100%;
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: 14px;
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: -0.01em;
  padding: 0 24px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.url-input::placeholder { color: #B5B5AF; }
.url-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(22, 64, 255, 0.14);
}

.btn-primary {
  height: 84px;
  padding: 0 38px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: transform .12s ease, background .15s ease;
}
.btn-primary:hover { background: var(--red); border-color: var(--red); transform: translateY(-1px); }
.btn-primary .arr {
  display: inline-block;
  transition: transform .15s ease;
}
.btn-primary:hover .arr { transform: translateX(4px); }

.tagline-row {
  margin-top: 12px;
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.tagline-row .check::before {
  content: "✓";
  color: var(--ink);
  margin-right: 6px;
  font-weight: 700;
}

/* ---------- LOADING ---------- */
.loader {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1640px;
  width: 100%;
  margin: 0 auto;
}
.loader-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.04em;
}
.loader-line {
  display: flex;
  align-items: baseline;
  gap: 28px;
  color: var(--hair-2);
  transition: color .3s ease;
}
.loader-line.done { color: var(--ink); }
.loader-line.active { color: var(--blue); }
.loader-line .num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  letter-spacing: 0.02em;
  min-width: 60px;
  align-self: center;
}
.loader-line .label {
  display: inline-block;
}
.loader-line.done .label::after {
  content: " ✓";
  color: var(--red);
  font-family: var(--display);
}
.loader-line.active::after {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.4em;
  background: var(--blue);
  border-radius: 999px;
  align-self: center;
  animation: pulse 0.9s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.loader-meta {
  margin-top: 48px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 18px;
  align-items: center;
}
.loader-meta .url-chip {
  background: #fff;
  border: 1.5px solid var(--hair-2);
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--ink);
}

/* ---------- RESULT ---------- */
.result {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1640px;
  width: 100%;
  margin: 0 auto;
  gap: 64px;
}

.result-url {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 1px;
  align-self: flex-start;
  word-break: break-all;
  max-width: 60ch;
}

.screenshot-frame {
  align-self: center;
  width: 100%;
  max-width: 1100px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  aspect-ratio: 1366 / 768;
}
.screenshot-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 1100px;
  width: 100%;
}
.card .roast-col { width: 100%; }

/* roast text column */
.roast-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.roast-q {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}
.roast-body {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 2.5vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
}
.roast-body .mk-blue { color: var(--blue); }
.roast-body .mk-red {
  color: var(--red);
  background: var(--amber);
  padding: 0 0.06em;
  display: inline-block;
}
.roast-body em {
  font-style: italic;
  color: var(--blue);
  font-weight: 700;
}

.fix-card {
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: 28px 32px;
}
.fix-card .lbl {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fix-card .lbl .sq {
  width: 10px; height: 10px; background: var(--amber); display: inline-block;
}
.fix-card p {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: pretty;
}

/* result actions row */
.cta-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-top: 8px;
}
.cta {
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 22px 24px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 132px;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.cta:hover { transform: translateY(-2px); }
.cta .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.cta .kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.cta .price {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.cta .price.free { color: #2BCB6E; }
.cta .price.paid { color: var(--red); }
.cta h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22px, 1.8vw, 30px);
  letter-spacing: -0.025em;
  margin: auto 0 0;
  line-height: 1.05;
}
.cta.primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.cta.primary .kicker, .cta.primary .price.free { color: rgba(255,255,255,0.7); }
.cta.primary .price.free { color: var(--amber); }
.cta.audit {
  background: var(--amber);
  border-color: var(--ink);
}

/* clean state */
.clean {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  max-width: 1640px;
  width: 100%;
  margin: 0 auto;
}
.clean-tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.clean-tag .url { color: var(--ink); border-bottom: 1.5px solid var(--ink); padding-bottom: 1px; }
.clean-headline {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(56px, 8vw, 144px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin: 0 0 32px;
  max-width: 18ch;
}
.clean-headline .green { color: #1F8A4F; }
.clean-sub {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 40px;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

/* ---------- inline error banner ---------- */
.error-banner {
  border: 2px solid var(--ink);
  background: var(--amber);
  color: var(--ink);
  border-radius: 14px;
  padding: 22px 24px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-top: 24px;
  max-width: 920px;
}
.error-banner .err-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 8px;
}

/* ---------- caret while streaming ---------- */
.streaming::after {
  content: "▍";
  display: inline-block;
  margin-left: 4px;
  color: var(--blue);
  animation: caret 0.8s steps(1) infinite;
  font-weight: 400;
}
@keyframes caret {
  50% { opacity: 0; }
}

/* ---------- mobile: tablet + most phones ---------- */
@media (max-width: 768px) {
  .chrome { padding: 16px 18px; }
  .mark { font-size: 16px; }
  .nav { gap: 14px; font-size: 13px; }

  .foot { bottom: 12px; left: 16px; right: 16px; font-size: 11px; }

  .stage { padding: 72px 18px 64px; }

  .eyebrow { margin-bottom: 16px; font-size: 12px; }

  .headline { margin-bottom: 14px; }
  .sub { margin: 0 0 22px; }

  .form {
    flex-direction: column;
    gap: 12px;
  }
  .url-input {
    height: 64px;
    font-size: 17px;
    padding: 0 18px;
    border-radius: 12px;
  }
  .btn-primary {
    height: 60px;
    width: 100%;
    justify-content: center;
    font-size: 20px;
    border-radius: 12px;
    padding: 0 24px;
  }

  .tagline-row {
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 12px;
    margin-top: 14px;
  }

  .error-banner { font-size: 18px; padding: 18px 20px; }

  .loader-stack {
    font-size: clamp(32px, 8vw, 56px);
    gap: 6px;
    margin-top: 16px;
  }
  .loader-line { gap: 14px; }
  .loader-line .num { min-width: 48px; font-size: 12px; }
  .loader-meta { margin-top: 32px; gap: 12px; flex-wrap: wrap; }

  .result { gap: 36px; }
  .result-url { font-size: 12px; max-width: 100%; }
  .screenshot-frame { border-radius: 10px; }

  .roast-col { gap: 22px; }
  .roast-body { font-size: clamp(24px, 5.5vw, 32px); }

  .fix-card { padding: 20px 18px; border-radius: 12px; }
  .fix-card p { font-size: clamp(18px, 4.5vw, 22px); }

  .cta-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cta {
    min-height: 0;
    padding: 18px 20px;
    border-radius: 12px;
  }
  .cta h3 { font-size: clamp(20px, 5vw, 26px); margin-top: 10px; }

  .clean-headline { margin-bottom: 24px; }
  .clean-sub { font-size: 18px; margin-bottom: 32px; }
}

/* ---------- mobile: small phones (iPhone SE-class) ---------- */
@media (max-width: 420px) {
  .chrome { padding: 14px 14px; }
  .nav { gap: 10px; font-size: 12px; }

  .foot { bottom: 10px; left: 14px; right: 14px; font-size: 10px; }

  .stage { padding: 56px 14px 48px; }

  .headline { font-size: clamp(40px, min(12vw, 13vh), 72px); }
  .sub { font-size: 17px; }

  .url-input {
    height: 60px;
    font-size: 16px;
    padding: 0 14px;
  }
  .btn-primary { height: 56px; font-size: 18px; }

  .tagline-row { font-size: 11px; gap: 8px 14px; }

  .loader-stack { font-size: clamp(28px, 9vw, 44px); }
  .loader-line { gap: 10px; }
  .loader-line .num { min-width: 40px; font-size: 11px; }

  .result { gap: 28px; }
  .roast-body { font-size: clamp(22px, 6.2vw, 28px); }
  .fix-card { padding: 18px 16px; }

  .clean-headline { font-size: clamp(40px, 11vw, 64px); }
  .clean-sub { font-size: 16px; }
}
