/* Arklytech sales pages: /pricing (Free and Arklytech Pro) and /edge (the Edge pre-order).
   They reuse the home page's sections, phones, features, tools and FAQ (home.*.css); this
   file adds the hero's buy box, the plan cards, the comparison table and the pre-order
   steps. Every figure is written from backend/app/domain/pricing.json by site.py stamp. */

/* ---------- hero ---------- */

.sale-hero .crumbs { display: flex; margin-bottom: 18px; }
.sale-title {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.035em;
}
.sale-hero .lead { margin-top: 20px; }
.sale-hero .hero-visual .front { z-index: 1; }

.buy-box {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.buy-box .cta-row { margin-top: 22px; }
.buy-facts { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: .9688rem; }
.buy-facts li { display: flex; gap: 10px; align-items: flex-start; }
.buy-facts svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--brand-ink); }
.fine { margin-top: 14px; color: var(--label); font-size: .8438rem; }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.price .amount { font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.price .per { color: var(--ink-2); font-weight: 500; }

/* ---------- plans ---------- */

.pricing { max-width: 64rem; margin-inline: auto; }
.period {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  margin: 0 auto 28px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
/* The radios stay focusable for the keyboard; their labels are the visible switch. */
.period input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.period label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  cursor: pointer;
}
.period input:checked + label { background: var(--selected); color: var(--ink); box-shadow: inset 0 0 0 1px var(--brand); }
.period input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font: 600 .6875rem/1.3 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Without :has() both prices show, labelled; with it, the chosen period's. */
.pricing:has(#period-monthly:checked) .when-yearly,
.pricing:has(#period-yearly:checked) .when-monthly { display: none; }

.plans { display: grid; gap: 16px; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; gap: 20px; } }
.plan {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.plan h3 { font-size: 1.375rem; font-weight: 750; }
.plan-for { margin-top: 6px; color: var(--ink-2); }
.plan .price { margin-top: 22px; }
.plan > .btn, .plan .when-yearly .btn, .plan .when-monthly .btn { width: 100%; margin-top: 20px; }
.price-note { margin-top: 8px; color: var(--ink-2); font-size: .9375rem; }
.renews { margin-top: 10px; color: var(--label); font-size: .8438rem; }
.plan-pro {
  border-color: var(--brand);
  background: radial-gradient(ellipse 80% 60% at 100% 0%, var(--glow), transparent 65%), var(--surface);
  box-shadow: var(--halo), var(--shadow);
}
.ticks { display: grid; gap: 12px; margin: 24px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); list-style: none; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--brand-ink); }
.ticks .lead-in { font-weight: 600; }

.plan-notes { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
@media (min-width: 960px) { .plan-notes { grid-template-columns: repeat(3, 1fr); } }
.plan-notes li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .9375rem;
}
.plan-notes b { color: var(--ink); }
.plan-notes svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--brand-ink); }

/* ---------- comparison table ---------- */

.compare { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.compare:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.compare table { width: 100%; border-collapse: collapse; font-size: .9688rem; }
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font: 600 .78rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.compare td, .compare thead th + th { width: 22%; text-align: center; font-weight: 600; }
.compare tbody th { font-weight: 500; color: var(--ink); }
.compare .yes svg, .compare .no svg { display: inline-block; width: 20px; height: 20px; vertical-align: middle; }
.compare .yes { color: var(--brand-ink); }
.compare .no { color: var(--control); }
@media (min-width: 640px) { .compare th, .compare td { padding: 16px 24px; } }

/* ---------- pre-order steps ---------- */

.steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.steps .n { position: absolute; top: 22px; right: 22px; font: 600 .78rem/1 var(--mono); letter-spacing: .12em; color: var(--label); }
.steps h3 { font-size: 1.125rem; font-weight: 700; }
.steps p { margin-top: 8px; color: var(--ink-2); font-size: .9688rem; }

/* ---------- at a glance ---------- */

.facts { display: grid; gap: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--label); font: 600 .78rem/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.facts dd { margin: 0; text-align: right; font-weight: 600; }

/* ---------- buy band ---------- */

.buy-band .cta-row { margin-top: 24px; }
.band-price { color: var(--ink); font-weight: 750; }

/* ---------- narrow phones (320 to 419 px): the switch and the table fit without scrolling ---------- */

@media (max-width: 419.98px) {
  .period label { padding: 8px 10px; gap: 6px; }
  .badge { padding: 2px 6px; font-size: .625rem; }
  .compare table { font-size: .875rem; }
  .compare th, .compare td { padding: 12px 8px; }
  .compare tbody th { padding-left: 14px; }
  .compare td, .compare thead th + th { width: 28%; font-size: .8125rem; }
}

.buy-box .soon-note { margin-top: 12px; }
