/*
  Pricing — embedded as a panel inside the home horizontal scroll view.
  Shares the visual family with .hpan__fcard: white card on cream bg,
  hairline border, 24px radius, soft shadow, Geist typography, honey
  accent (#FFC201) for the featured tier.

  No html/body resets here — hpan.css owns the page chrome on home.
*/

:root {
  --p-fg: #0a0a0a;
  --p-muted: rgba(0, 0, 0, 0.55);
  --p-faint: rgba(0, 0, 0, 0.4);
  --p-border: #DDDDE1;
  --p-card-bg: #ffffff;
  --p-honey: #FFC201;
  --p-honey-deep: #C99300;
  --p-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
  --p-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.10);
}

/* ── Panel container ────────────────────────────────────────── */
.hpan__panel--pricing {
  padding: 0;
  align-items: center;
}

.hpan__panel--pricing .hpan__panel-inner {
  background: transparent;
  /* Narrower container — 3 cards centered, each card lands in the
     ~280-310px range, which reads as tidy rather than wide. */
  width: min(960px, 96vw);
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  /* Top reserves room for the floating title (which is absolutely
     positioned and sits above the panel like the macbook-hint).
     Bottom trimmed so the transition into About doesn't feel empty. */
  padding:
    clamp(120px, 18vh, 200px)
    clamp(4px, 1vw, 16px)
    clamp(56px, 9vh, 110px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  /* Tighter gap — toggle and cards sit closer now that the title
     no longer occupies in-flow space. */
  gap: clamp(12px, 1.6vh, 20px);
  font-family: 'Geist', system-ui, sans-serif;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  color: var(--p-fg);
}

/* ── Header — floats above the panel like the macbook-hint pattern.
   Anchored to the .hpan__panel--pricing (which is position: relative).
   Pointer-events: none so it never blocks clicks on the cards. ── */
.pricing__head {
  position: absolute;
  top: clamp(36px, 6vh, 80px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  text-align: center;
  max-width: 92vw;
}

.pricing__title {
  margin: 0 0 8px;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--p-fg);
}

.pricing__sub {
  margin: 0 auto;
  max-width: 460px;
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--p-muted);
}

/* ── Toggle ────────────────────────────────────────────────── */
.pricing__toggle-wrap {
  display: flex;
  justify-content: center;
}

.pricing__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px;
  background: var(--p-card-bg);
  border: 1px solid var(--p-border);
  border-radius: 999px;
  box-shadow: var(--p-shadow);
}

.pricing__toggle-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}

.pricing__toggle-btn:hover {
  color: var(--p-fg);
}

.pricing__toggle-btn.is-active {
  background-color: var(--p-fg);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.pricing__save-badge {
  position: absolute;
  top: -10px;
  right: -22px;
  padding: 3px 10px;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5C3B00;
  background: var(--p-honey);
  border-radius: 999px;
  transform: rotate(6deg);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(255, 194, 1, 0.35);
}

/* ── Cards grid ─────────────────────────────────────────────── */
.pricing__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.6vw, 24px);
  align-items: stretch;
}

.pricing__card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.2vw, 28px);
  background: var(--p-card-bg);
  border: 1px solid var(--p-border);
  border-radius: 24px;
  box-shadow: var(--p-shadow);
  transition:
    transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 220ms ease;
}

.pricing__card:hover {
  transform: translateY(-2px);
  border-color: #C9C9D0;
  box-shadow: var(--p-shadow-hover);
}

/* Featured (Pro) — honey-accented border, lifted shadow */
.pricing__card--featured {
  border-color: var(--p-honey);
  box-shadow:
    0 0 0 1px var(--p-honey),
    0 12px 28px -8px rgba(255, 194, 1, 0.28),
    0 6px 14px -6px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.pricing__card--featured:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px var(--p-honey),
    0 16px 32px -8px rgba(255, 194, 1, 0.36),
    0 8px 18px -6px rgba(0, 0, 0, 0.10);
}

.pricing__card--soon {
  opacity: 0.7;
}

.pricing__card--soon:hover {
  transform: none;
  border-color: var(--p-border);
  box-shadow: var(--p-shadow);
}

/* Badges */
.pricing__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  user-select: none;
}

.pricing__badge--popular {
  background: var(--p-honey);
  color: #5C3B00;
}

.pricing__badge--soon {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.5);
}

/* Card head */
.pricing__card-head {
  margin-bottom: 12px;
}

.pricing__card-name {
  margin: 0 0 6px;
  font-size: clamp(22px, 1.9vw, 26px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--p-fg);
}

.pricing__card-tag {
  margin: 0;
  font-size: 13px;
  color: var(--p-muted);
}

/* Price */
.pricing__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}

.pricing__amount {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--p-fg);
}

.pricing__period {
  font-size: 14px;
  color: var(--p-faint);
}

.pricing__annual-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--p-faint);
}

/* CTA */
.pricing__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 14px 0 18px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.pricing__cta--ghost {
  background: transparent;
  border: 1px solid var(--p-border);
  color: var(--p-fg);
}

.pricing__cta--ghost:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: #C9C9D0;
  transform: translateY(-1px);
}

.pricing__cta--solid {
  background: var(--p-fg);
  color: #ffffff;
  border: 1px solid var(--p-fg);
}

.pricing__cta--solid:hover {
  background: #000;
  transform: translateY(-1px);
}

/* Features */
.pricing__features-eyebrow {
  margin: 0 0 8px;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-faint);
}

.pricing__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pricing__features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.72);
}

.pricing__features li svg {
  flex-shrink: 0;
  color: var(--p-honey-deep);
}

/* ── Waitlist modal — refined typography + spacing.
   Match the rest of the home page: Geist, soft cream surface, hairline
   border, honey focus ring, generous breathing room. ───────────────── */

.waitlist-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.42);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  z-index: 100;
  padding: 16px;
  opacity: 0;
  transition: opacity 200ms ease-out;
}

.waitlist-overlay--active {
  display: flex;
  opacity: 1;
}

.waitlist-panel {
  position: relative;
  width: min(440px, 100%);
  background: #ffffff;
  border: 1px solid var(--p-border);
  border-radius: 20px;
  padding: 32px 28px 24px;
  box-shadow:
    0 24px 56px -16px rgba(0, 0, 0, 0.32),
    0 8px 20px -8px rgba(0, 0, 0, 0.18);
  text-align: center;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  animation: waitlistPanelEnter 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes waitlistPanelEnter {
  0%   { transform: translateY(8px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0)   scale(1);    opacity: 1; }
}

.waitlist-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  border-radius: 8px;
  display: grid;
  place-items: center;
  transition: background-color 140ms ease, color 140ms ease;
}

.waitlist-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--p-fg);
}

.waitlist-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--p-fg);
}

.waitlist-desc {
  margin: 0 auto 20px;
  max-width: 320px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--p-muted);
}

.waitlist-desc strong {
  color: var(--p-fg);
  font-weight: 600;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.waitlist-input {
  appearance: none;
  border: 1px solid var(--p-border);
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  color: var(--p-fg);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.waitlist-input::placeholder {
  color: rgba(0, 0, 0, 0.36);
}

.waitlist-input:focus {
  outline: none;
  border-color: var(--p-honey);
  box-shadow: 0 0 0 3px rgba(255, 194, 1, 0.22);
}

.waitlist-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.waitlist-submit {
  appearance: none;
  border: 0;
  padding: 12px 20px;
  background: var(--p-fg);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.waitlist-submit:hover:not(:disabled) {
  background: #000;
  transform: translateY(-1px);
}

.waitlist-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.waitlist-note {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  min-height: 1em;
}

.waitlist-legal {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--p-faint);
}

.waitlist-legal a {
  color: var(--p-muted);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 2px;
}

.waitlist-legal a:hover {
  color: var(--p-fg);
}

/* ── Responsive ────────────────────────────────────────────── */

/* Mobile (< 1024px) — pricing becomes a vertical-flow section that
   coexists with the hpan.css mobile vertical-stack mode. The floating
   absolute title goes back into normal flow. */
@media (max-width: 1023px) {
  .hpan__panel--pricing {
    padding: clamp(56px, 9vh, 96px) clamp(16px, 5vw, 28px);
  }
  .hpan__panel--pricing .hpan__panel-inner {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  /* Title back in flow — the absolute floating treatment only makes
     sense inside a fixed-height horizontal panel. */
  .pricing__head {
    position: static;
    transform: none;
    pointer-events: auto;
    max-width: 100%;
  }
  .pricing__cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pricing__card--featured {
    transform: none;
  }
  .pricing__card--featured:hover {
    transform: translateY(-2px);
  }
}

/* Waitlist modal: keep usable on small phones. */
@media (max-width: 480px) {
  .waitlist-panel {
    padding: 28px 22px 20px;
    border-radius: 18px;
  }
  .waitlist-title {
    font-size: 20px;
  }
}
