:root {
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --accent-light: #e0f2fe;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Scroll-reveal: elements fade/slide up once as they enter the viewport
   (see the IntersectionObserver in pricing.html). Falls back to always-
   visible if JS is off, and is disabled entirely for reduced-motion. */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].gw-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

header.site .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
}

header.site .back-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

header.site .back-link:hover {
  color: var(--text);
}

h1 {
  font-size: 32px;
  margin: 0 0 10px;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  max-width: 620px;
  margin-bottom: 32px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Grid items default to a content-based automatic minimum size, so a wide
   descendant (an unwrapped table, a long unbreakable string) can force the
   whole track - and the page - wider than the viewport. min-width: 0 lets
   the item shrink to the track's actual size instead. */
.grid-2 > * {
  min-width: 0;
}

@media (max-width: 800px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="color"],
.field input[type="number"],
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.price {
  font-size: 40px;
  font-weight: 800;
  display: inline-block;
}

.price.gw-pulse {
  animation: gw-price-pulse 0.4s ease;
}

@keyframes gw-price-pulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.08);
    color: var(--accent-dark, var(--accent));
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .price.gw-pulse {
    animation: none;
  }
}

.price small {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.msg {
  font-size: 13px;
  margin-top: 10px;
}

.msg.error {
  color: #dc2626;
}

.msg.ok {
  color: #16a34a;
}

code.key {
  display: inline-block;
  background: #0f172a;
  color: #22d3ee;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  letter-spacing: 0.03em;
}

textarea.embed {
  width: 100%;
  min-height: 90px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  resize: vertical;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

table.admin {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.admin th,
table.admin td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge.active {
  background: #dcfce7;
  color: #166534;
}

.badge.past_due {
  background: #fef9c3;
  color: #854d0e;
}

.badge.canceled,
.badge.inactive {
  background: #fee2e2;
  color: #991b1b;
}

/* ---------- Landing page (pricing.html) ---------- */

.btn.large {
  padding: 14px 26px;
  font-size: 15px;
  border-radius: 10px;
}

.btn {
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--accent-dark);
}

.btn.large:hover:not(:disabled) {
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 65%, transparent);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn.secondary:hover {
  background: var(--bg);
}

a.btn {
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: background 0.15s ease;
  }
  .btn:active:not(:disabled) {
    transform: none;
  }
}

nav.site {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  transition: box-shadow 0.25s ease;
}

nav.site.gw-scrolled {
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.35);
}

nav.site .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 16px;
  height: 16px;
}

nav.site .nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

nav.site .nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

nav.site .nav-links a:hover {
  color: var(--text);
}

nav.site .nav-links a.nav-secondary {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.85;
}

nav.site .nav-links a.nav-secondary:hover {
  opacity: 1;
  color: var(--accent-dark);
}

nav.site .nav-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  flex-shrink: 0;
}

/* Scroll-spy nav: a pill slides behind whichever section link matches the
   section currently in view (see the IntersectionObserver in pricing.html),
   and the link itself "pops" with a small bounce the moment it goes active. */
.nav-scroll-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-scroll-links a {
  position: relative;
  z-index: 1;
  padding: 7px 12px;
  border-radius: 999px;
  transition: color 0.2s ease;
}

.nav-pill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 30px;
  width: 0;
  margin-top: -15px;
  border-radius: 999px;
  background: var(--accent-light);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s ease;
}

.nav-pill.gw-active {
  opacity: 1;
}

.nav-scroll-links a.gw-current {
  color: var(--accent-dark);
  animation: gw-nav-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gw-nav-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-pill {
    transition: opacity 0.2s ease;
  }
  .nav-scroll-links a.gw-current {
    animation: none;
  }
}

.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.nav-hamburger svg .gw-bar-mid {
  transition: opacity 0.15s ease;
}

.nav-hamburger svg .gw-bar-top,
.nav-hamburger svg .gw-bar-bottom {
  transform-origin: 10px 10px;
  transition: transform 0.2s ease;
}

.nav-hamburger.gw-open svg .gw-bar-mid {
  opacity: 0;
}

.nav-hamburger.gw-open svg .gw-bar-top {
  transform: translateY(5px) rotate(45deg);
}

.nav-hamburger.gw-open svg .gw-bar-bottom {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 8px 24px 16px;
  box-shadow: 0 16px 32px -20px rgba(15, 23, 42, 0.3);
}

.nav-mobile-menu a {
  padding: 13px 2px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.nav-mobile-menu a:last-child {
  border-bottom: none;
}

.nav-mobile-menu a.btn {
  text-align: center;
  margin-top: 10px;
}

@media (max-width: 860px) {
  nav.site .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .nav-mobile-menu.gw-open {
    display: flex;
  }
}

.hero {
  padding: 72px 20px 20px;
  text-align: center;
  background: radial-gradient(60% 60% at 50% 0%, var(--accent-light) 0%, transparent 100%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 42px;
  line-height: 1.15;
  max-width: 780px;
  margin: 0 auto 16px;
}

.hero .lead {
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero-note {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 30px;
  }
}

.section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px 20px;
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 40px;
}

.section-head .eyebrow {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: 28px;
  margin: 0 0 10px;
}

.section-head p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -20px rgba(15, 23, 42, 0.25);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

/* Restarts the stagger every 4 cards (one grid row at 4 columns), so any
   number of feature cards cascades in per-row instead of ever-later. */
.feature-grid > [data-reveal]:nth-child(4n + 1) {
  transition-delay: 0ms;
}
.feature-grid > [data-reveal]:nth-child(4n + 2) {
  transition-delay: 80ms;
}
.feature-grid > [data-reveal]:nth-child(4n + 3) {
  transition-delay: 160ms;
}
.feature-grid > [data-reveal]:nth-child(4n + 4) {
  transition-delay: 240ms;
}

.feature-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-light);
  font-size: 18px;
  margin-bottom: 14px;
  transition: transform 0.25s ease;
}

.feature-card:hover .icon {
  transform: scale(1.12) rotate(-4deg);
}

@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .feature-card .icon {
    transition: none;
  }
  .feature-card:hover {
    transform: none;
  }
  .feature-card:hover .icon {
    transform: none;
  }
}

.feature-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.browser-mock {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

.browser-mock .chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.browser-mock .chrome .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
}

.browser-mock .chrome .url {
  margin-left: 8px;
  font-size: 11.5px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  flex: 1;
}

.showcase-caption {
  min-height: 60px;
  margin-bottom: 14px;
}

.gw-carousel-slide h3 {
  font-size: 15px;
  margin: 0 0 4px;
}

.gw-carousel-slide p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.showcase-frame {
  background: var(--card);
}

.gw-carousel-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
}

.gw-carousel {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.gw-carousel-track {
  display: flex;
  transition: transform 0.35s ease, height 0.25s ease;
  align-items: flex-start;
}

.gw-carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.gw-carousel-arrow {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gw-carousel-arrow:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.gw-carousel-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.gw-carousel-arrow:disabled:hover {
  border-color: var(--border);
  color: var(--text);
}

.gw-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}

.gw-carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
}

.gw-carousel-dot.gw-active {
  width: 22px;
  background: var(--accent);
}

@media (max-width: 560px) {
  .gw-carousel-wrap {
    gap: 8px;
  }
  .gw-carousel-arrow {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }
}

.pricing-card {
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .pricing-card {
    transition: none;
  }
  .pricing-card:hover {
    transform: none;
  }
}

.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.pricing-card .plan-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 22px;
  font-size: 14px;
  color: var(--text);
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
}

.feature-list li::before {
  content: "✓";
  color: var(--accent-dark);
  font-weight: 800;
  flex-shrink: 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.addon-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 4px;
  cursor: pointer;
}

.addon-check input {
  margin-top: 2px;
}

.addon-check strong {
  color: var(--accent-dark);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.faq-item:first-child {
  padding-top: 0;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}

.faq-q h3 {
  font-size: 15px;
  margin: 0;
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.25s ease;
}

.faq-item.gw-open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-dark);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease;
}

.faq-item.gw-open .faq-answer {
  max-height: 320px;
  opacity: 1;
  margin-top: 8px;
}

.faq-item p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

#faq-list > [data-reveal]:nth-child(1) {
  transition-delay: 0ms;
}
#faq-list > [data-reveal]:nth-child(2) {
  transition-delay: 50ms;
}
#faq-list > [data-reveal]:nth-child(3) {
  transition-delay: 100ms;
}
#faq-list > [data-reveal]:nth-child(4) {
  transition-delay: 150ms;
}
#faq-list > [data-reveal]:nth-child(5) {
  transition-delay: 200ms;
}

@media (prefers-reduced-motion: reduce) {
  .faq-chevron,
  .faq-answer {
    transition: none;
  }
}

/* ---------- Portal: hold-to-cancel button + cancellation modal ---------- */

.gw-hold-btn {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: #dc2626;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  transition: border-color 0.15s ease;
}

.gw-hold-btn:hover,
.gw-hold-btn.gw-holding {
  border-color: #dc2626;
}

.gw-hold-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: #dc2626;
  opacity: 0.16;
  pointer-events: none;
}

.gw-hold-label {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .gw-hold-fill {
    transition: none !important;
  }
}

.gw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.gw-modal-backdrop[hidden] {
  display: none;
}

.gw-modal {
  background: var(--card);
  border-radius: 14px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 64px -20px rgba(15, 23, 42, 0.45);
  animation: gw-modal-in 0.2s ease;
}

@keyframes gw-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gw-modal {
    animation: none;
  }
}

.gw-modal h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.gw-modal-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 10px;
}

.gw-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gw-radio:hover {
  border-color: var(--accent);
}

.gw-radio input {
  margin: 0;
}

.gw-radio:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
}

#cancel-reason-details {
  width: 100%;
  min-height: 70px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}

#cancel-reason-details[hidden] {
  display: none;
}

.gw-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.gw-modal-actions .btn {
  flex: 1;
  width: auto;
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

footer.site .footer-links {
  margin: 8px 0 0;
}

footer.site .footer-links a {
  color: var(--muted);
  text-decoration: none;
}

footer.site .footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}
