@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-0: #020617;
  --bg-1: #0f172a;
  --surface: rgba(15, 23, 42, 0.78);
  --surface-strong: rgba(30, 41, 59, 0.92);
  --tx-1: #f8fafc;
  --tx-2: #cbd5e1;
  --tx-3: #94a3b8;
  --tx-4: #64748b;
  --brand: #f97316;
  --brand-soft: rgba(249, 115, 22, 0.14);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --green: #22c55e;
  --blue: #60a5fa;
  --amber: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

body.light-mode {
  --bg-0: #ffffff;
  --bg-1: #f8fafc;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --tx-1: #0f172a;
  --tx-2: #1e293b;
  --tx-3: #475569;
  --tx-4: #64748b;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.18);
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--tx-1);
  background:
    radial-gradient(circle at 78% 12%, rgba(249, 115, 22, 0.16), transparent 30rem),
    linear-gradient(135deg, var(--bg-0), var(--bg-1) 52%, var(--bg-0));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { border: 0; font: inherit; cursor: pointer; }

.plans-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}
.plans-brand, .plans-actions, .plans-nav { display: flex; align-items: center; }
.plans-brand { gap: 10px; font-size: 17px; font-weight: 900; letter-spacing: 0; }
.plans-brand img { width: 38px; height: 38px; border-radius: 10px; }
.plans-nav { justify-content: center; gap: 6px; }
.plans-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--tx-3);
  font-size: 13px;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease;
}
.plans-nav a:hover { color: var(--tx-1); background: rgba(148, 163, 184, 0.1); }
.plans-actions { gap: 10px; justify-content: flex-end; }

.theme-toggle, .app-link, .primary-cta, .secondary-cta, .plan-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.theme-toggle {
  color: var(--tx-2);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
}
.theme-toggle-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: inset -5px -3px 0 rgba(2, 6, 23, 0.85);
}
body.light-mode .theme-toggle-icon { box-shadow: none; }
.app-link, .primary-cta, .plan-button {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.22);
}
.secondary-cta {
  color: var(--tx-2);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
}

main { overflow: hidden; }
.plans-hero {
  min-height: clamp(560px, calc(100svh - 170px), 680px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: 52px;
  padding: 54px clamp(24px, 6vw, 92px) 44px;
}
.hero-copy { max-width: 650px; animation: riseIn 560ms ease both; }
.eyebrow {
  margin-bottom: 13px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 { font-size: clamp(72px, 13vw, 164px); line-height: 0.86; font-weight: 900; letter-spacing: 0; }
.hero-lead {
  max-width: 560px;
  margin-top: 24px;
  color: var(--tx-2);
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 650;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.primary-cta, .secondary-cta { min-height: 50px; padding-inline: 22px; font-size: 14px; }

.service-board {
  position: relative;
  min-height: 500px;
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.09), transparent 36%), var(--surface-strong);
  box-shadow: var(--shadow);
  animation: boardIn 680ms 120ms ease both;
}
.service-board::before {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.board-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}
.board-row span, .board-tile span, .board-flow span {
  color: var(--tx-4);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.board-row strong { color: var(--tx-1); font-size: 25px; font-weight: 900; }
.board-row small { grid-column: 1 / -1; color: var(--tx-3); font-size: 13px; font-weight: 700; }
.board-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}
.board-tile {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.board-tile:hover { transform: translateY(-3px); border-color: rgba(249, 115, 22, 0.45); }
.board-tile strong { font-size: 23px; font-weight: 900; }
.board-tile.active { color: var(--amber); background: rgba(245, 158, 11, 0.11); }
.board-tile.done { color: var(--green); background: rgba(34, 197, 94, 0.11); }
.board-tile.warn { color: var(--blue); background: rgba(96, 165, 250, 0.11); }
.board-flow {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 12px 18px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.board-flow i { height: 2px; background: linear-gradient(90deg, var(--brand), transparent); }

.plans-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 clamp(24px, 6vw, 92px);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--border);
}
.plans-strip div { padding: 22px; background: var(--surface); }
.plans-strip strong { display: block; font-size: 15px; font-weight: 900; }
.plans-strip span { display: block; margin-top: 5px; color: var(--tx-3); font-size: 13px; font-weight: 650; }

.section-block { padding: 82px clamp(24px, 6vw, 92px); }
.section-heading { max-width: 760px; margin-bottom: 28px; }
.section-heading h2 { font-size: clamp(32px, 5vw, 58px); line-height: 1; font-weight: 900; letter-spacing: 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.plan-card {
  position: relative;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.plan-card.highlighted {
  border-color: rgba(249, 115, 22, 0.48);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.11), transparent 48%), var(--surface-strong);
  box-shadow: var(--shadow);
}
.popular-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(249, 115, 22, 0.28);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.plan-kicker { color: var(--tx-4); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.plan-head h3 { margin-top: 8px; font-size: 34px; line-height: 1; font-weight: 900; }
.plan-head p { min-height: 72px; margin-top: 12px; color: var(--tx-3); font-size: 14px; font-weight: 650; }
.price { margin: 24px 0 18px; color: var(--tx-1); font-size: clamp(28px, 3.6vw, 42px); font-weight: 900; }
.price span { color: var(--tx-4); font-size: 14px; font-weight: 800; }
.plan-card ul { display: grid; gap: 11px; margin-bottom: 22px; list-style: none; }
.plan-card li { position: relative; padding-left: 20px; color: var(--tx-2); font-size: 14px; font-weight: 700; }
.plan-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.plan-button { margin-top: auto; width: 100%; }

.module-table { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.module-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr) minmax(120px, 0.45fr);
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.module-row:last-child { border-bottom: 0; }
.module-head {
  color: var(--tx-4);
  background: rgba(148, 163, 184, 0.08);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.module-row strong { font-size: 14px; font-weight: 900; }
.module-row span { color: var(--tx-3); font-size: 13px; font-weight: 650; }
.module-row em { color: var(--brand); font-style: normal; font-size: 14px; font-weight: 900; text-align: right; }

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.payment-copy h3 { font-size: 28px; line-height: 1.08; font-weight: 900; }
.payment-copy p { margin-top: 12px; color: var(--tx-3); font-size: 15px; font-weight: 650; }
.payment-list { display: grid; gap: 10px; }
.payment-list div { padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: rgba(148, 163, 184, 0.06); }
.payment-list strong, .payment-list span { display: block; }
.payment-list strong { font-size: 14px; font-weight: 900; }
.payment-list span { margin-top: 4px; color: var(--tx-3); font-size: 13px; font-weight: 650; }

.plans-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px clamp(24px, 6vw, 92px) 34px;
  color: var(--tx-4);
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 750;
}
.plans-footer a { color: var(--brand); }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes boardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 980px) {
  .plans-header { grid-template-columns: auto auto; justify-content: space-between; }
  .plans-nav { display: none; }
  .plans-hero, .payment-layout { grid-template-columns: 1fr; }
  .plans-hero { min-height: auto; padding-top: 48px; }
  .service-board { min-height: 420px; }
  .pricing-grid, .plans-strip { grid-template-columns: 1fr; }
}

@media (max-width: 660px) {
  .plans-header { height: auto; min-height: 68px; padding: 10px 16px; }
  .plans-brand span, #theme-label { display: none; }
  .app-link, .theme-toggle { min-height: 38px; padding-inline: 12px; }
  .plans-hero, .section-block { padding-inline: 16px; }
  .plans-strip { margin-inline: 16px; }
  .plans-hero { gap: 24px; padding-top: 44px; padding-bottom: 28px; }
  h1 { font-size: clamp(56px, 18vw, 84px); }
  .hero-lead { margin-top: 18px; font-size: 20px; }
  .service-board { min-height: auto; padding: 12px; }
  .board-row { padding: 14px; }
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
  .board-tile { min-height: 104px; padding: 13px; }
  .board-tile strong { font-size: 20px; }
  .board-flow { display: none; }
  .plan-card { min-height: auto; }
  .module-row, .module-head { grid-template-columns: 1fr; gap: 5px; }
  .module-row em { text-align: left; }
  .plans-footer { align-items: flex-start; flex-direction: column; padding-inline: 16px; }
}
