/* justproblems — landing */

:root {
  --bg:       oklch(0.965 0.008 85);
  --bg-sub:   oklch(0.94 0.008 85);
  --fg:       oklch(0.18 0.005 60);
  --fg-mute:  oklch(0.46 0.005 60);
  --fg-dim:   oklch(0.62 0.005 60);
  --rule:     oklch(0.86 0.008 70);
  --field:    oklch(0.99 0.005 85);
  --accent:   oklch(0.55 0.13 35);
  --on-accent: oklch(0.97 0.008 85);

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--on-accent); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "calt" 0;
  letter-spacing: -0.01em;
}
.small { font-size: 13px; }
.dim { color: var(--fg-mute); }

/* ===== TOPBAR ===== */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.topbar .container {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
}
.status-dot .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@media (max-width: 480px) {
  .status-text { display: none; }
}

/* ===== HERO ===== */
.hero {
  padding: 96px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg-sub);
}
.hero-meta-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
}
.headline {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(32px, 5.6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 32px;
  text-wrap: balance;
}
.headline span { display: block; }
.headline span:first-child { color: var(--fg-mute); }
.headline-em { margin-top: 6px; }
.sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-mute);
  max-width: 56ch;
  margin: 0;
  text-wrap: pretty;
}
.sub .quoted {
  color: var(--fg);
  font-style: italic;
}
.sub-em {
  color: var(--fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
@media (max-width: 600px) {
  .hero { padding: 56px 0 40px; }
  .sub { font-size: 16px; }
}

/* ===== OFFER ===== */
.offer {
  padding: 64px 0 32px;
}
.offer-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--rule);
}
.spots {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.offer-body p {
  font-size: 20px;
  line-height: 1.5;
  margin: 0 0 18px;
  color: var(--fg);
  text-wrap: pretty;
}
.offer-body p:last-of-type { color: var(--fg-mute); }
.offer-note {
  margin-top: 24px;
  font-size: 12px;
}
@media (max-width: 600px) {
  .offer-body p { font-size: 18px; }
}

/* ===== FORM ===== */
.form-section {
  padding: 32px 0 88px;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--rule);
  background: var(--bg-sub);
  padding: 28px;
  border-radius: 2px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: -0.01em;
}
.input {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  background: var(--field);
  color: var(--fg);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.15s ease;
  width: 100%;
}
.input::placeholder { color: var(--fg-dim); }
.input:focus { border-color: var(--fg); }
.input.err-state { border-color: var(--accent); }
.field-error {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  display: none;
}
.field-error.visible { display: block; }
.cta {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 16px 20px;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.08s ease, background 0.15s ease;
  width: 100%;
}
.cta:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.cta:active:not(:disabled) { transform: translateY(1px); }
.cta:disabled { opacity: 0.6; cursor: progress; }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-foot {
  text-align: center;
  margin: 4px 0 0;
  font-size: 12px;
}

/* receipt */
.receipt {
  border: 1px solid var(--rule);
  background: var(--bg-sub);
  padding: 32px;
  border-radius: 2px;
  display: none;
}
.receipt.visible { display: block; }
.receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--rule);
}
.receipt-title {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.receipt-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 16px;
  margin: 0 0 24px;
}
.receipt-grid dt {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-mute);
  align-self: center;
}
.receipt-grid dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  word-break: break-word;
}
.receipt-note {
  color: var(--fg-mute);
  margin: 0 0 24px;
  font-size: 15px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.link-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-mute);
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { color: var(--accent); }

/* ===== SECTION HEAD ===== */
.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}
.section-head .mono { white-space: nowrap; }
.rule-line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ===== SAMPLE DIG ===== */
.sample {
  padding: 72px 0;
  border-top: 1px solid var(--rule);
  background: var(--bg-sub);
}
.sample-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 12px 0;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
}
.sample-meta-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
}
.sample-meta .sep { opacity: 0.5; }
@media (max-width: 480px) {
  .sample-meta .sep { display: none; }
}
.dig-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.dig-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.dig-row:last-child { border-bottom: none; }
.dig-rank {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dig-rank .rank-num {
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--fg-mute);
  letter-spacing: -0.03em;
  line-height: 1;
}
.dig-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.dig-problem {
  font-size: 17px;
  line-height: 1.4;
  margin: 0 0 12px;
  font-weight: 500;
  text-wrap: pretty;
}
.dig-quote {
  margin: 0 0 10px;
  padding: 12px 16px;
  border-left: 2px solid var(--accent);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-mute);
  font-style: italic;
}
.quote-mark {
  color: var(--accent);
  font-family: var(--font-mono);
  font-style: normal;
}
.dig-cope {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 10px;
  padding-top: 8px;
}
.cope-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  white-space: nowrap;
}
.cope-text {
  font-size: 14px;
  color: var(--fg);
  text-wrap: pretty;
}
.dig-src {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  display: inline-block;
  padding-top: 2px;
}
.sample-foot {
  margin: 32px 0 0;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--fg-mute);
}
@media (max-width: 600px) {
  .dig-row { grid-template-columns: 56px 1fr; gap: 16px; }
}

/* ===== HOW IT WORKS ===== */
.how {
  padding: 72px 0;
  border-top: 1px solid var(--rule);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.step {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  align-items: start;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 32px;
  color: var(--fg-dim);
  font-weight: 400;
  line-height: 1;
  padding-top: 4px;
}
.step-title {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.step-text {
  margin: 0;
  color: var(--fg-mute);
  font-size: 16px;
  text-wrap: pretty;
}
@media (max-width: 600px) {
  .step { grid-template-columns: 48px 1fr; gap: 16px; }
  .step-num { font-size: 24px; }
}

/* ===== COMPARE ===== */
.compare {
  padding: 72px 0;
  border-top: 1px solid var(--rule);
}
.compare-table {
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.compare-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-sub);
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
}
.col-us { color: var(--accent); }
.compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.compare-row:last-child { border-bottom: none; }
.compare-cell-other {
  color: var(--fg-mute);
  text-decoration: line-through;
  text-decoration-color: color-mix(in oklch, var(--fg-mute) 50%, transparent);
  text-decoration-thickness: 1px;
}
.compare-cell-us {
  color: var(--fg);
  font-weight: 500;
}
@media (max-width: 600px) {
  .compare-head,
  .compare-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .compare-row { padding: 14px 16px; }
  .compare-cell-other { font-size: 14px; }
}

/* ===== FOOTER ===== */
.footer {
  padding: 48px 0 64px;
  border-top: 1px solid var(--rule);
}
.footer .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-line {
  margin: 0;
  font-size: 14px;
  color: var(--fg-mute);
  font-style: italic;
}
