/* ==========================================================================
   Rush Webworks — styles.css
   Clean, minimal, one accent color. Mobile-first.
   ========================================================================== */

:root {
  --accent: #2b59ff;
  --accent-dark: #1e42d8;
  --accent-soft: #eaefff;
  --ink: #10182b;
  --ink-soft: #4b5568;
  --bg: #fdfdfb;
  --bg-alt: #f4f5f2;
  --card: #ffffff;
  --line: #e5e7e2;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(16, 24, 43, 0.08);
  --shadow-md: 0 8px 24px rgba(16, 24, 43, 0.1);
  --shadow-lg: 0 16px 40px rgba(16, 24, 43, 0.14);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* Keep the hidden attribute working even on elements with their own display rules */
[hidden] { display: none !important; }

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ===== Type ===== */
h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 { font-size: 1.2rem; font-weight: 700; }

.accent { color: var(--accent); }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.eyebrow-lg { font-size: 1.05rem; letter-spacing: 0.1em; }

.desktop-break { display: none; }
@media (min-width: 720px) { .desktop-break { display: block; } }

/* ===== Buttons & links ===== */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(43, 89, 255, 0.3);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(43, 89, 255, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(43, 89, 255, 0.25);
}

.btn-large { padding: 0.9rem 2.1rem; font-size: 1.05rem; }
.btn-small { padding: 0.5rem 1.2rem; font-size: 0.92rem; }
.btn-block { display: block; width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 24, 43, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-sm);
}


.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Inline SVG lockup: height sets the size, width follows the 1581:147 viewBox */
.logo svg {
  height: 24px;
  width: auto;
  aspect-ratio: 1581 / 147;
  transition: opacity 0.18s ease;
}

.logo:hover svg { opacity: 0.85; }

/* Logo underscore blink is driven from main.js — Chrome doesn't repaint
   CSS keyframe animations on SVG tspans. */

@media (max-width: 430px) {
  .site-header .logo svg { height: 19px; }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a:not(.btn) {
  position: relative;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.18s ease;
}

.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.site-nav a:not(.btn):hover { color: #fff; }
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }

.site-nav a:not(.btn).active { color: #fff; }
.site-nav a:not(.btn).active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.05rem;
  }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 1rem; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  background: var(--bg);
}

/* Slow drifting glow behind the hero */
.hero::before {
  content: "";
  position: absolute;
  top: -240px;
  right: -160px;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 89, 255, 0.24), rgba(43, 89, 255, 0.08) 45%, transparent 68%);
  animation: heroDrift 22s ease-in-out infinite;
  pointer-events: none;
}

/* Wanders a four-point loop instead of a back-and-forth line */
@keyframes heroDrift {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(-260px, 140px) scale(1.15); }
  50%  { transform: translate(-120px, 300px) scale(0.92); }
  75%  { transform: translate(-380px, 80px) scale(1.22); }
  100% { transform: translate(0, 0) scale(1); }
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 920px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
}

.hero-copy { max-width: 640px; }

/* ===== Hero browser mockup: a site that builds itself on loop ===== */
.hero-visual { display: flex; justify-content: center; }

/* Nudge the mockup up and toward the right edge on desktop */
@media (min-width: 920px) {
  .hero-visual {
    justify-content: flex-end;
    margin-top: -60px;
    margin-right: -34px;
  }
}

/* Gentle float so the mockup never sits still between build loops */
.hero-browser { animation: browserFloat 5.5s ease-in-out infinite; }

@keyframes browserFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.hero-browser {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hb-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}

.hb-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d3d5d0;
}

.hb-url {
  flex: 1;
  margin-left: 8px;
  height: 20px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.hb-body { padding: 24px 26px 28px; }

.hb-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.hb-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
}

.hb-navline {
  width: 34px;
  height: 7px;
  border-radius: 4px;
  background: var(--line);
}

.hb-pill {
  margin-left: auto;
  width: 64px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.hb-line {
  width: var(--w, 70%);
  height: 11px;
  border-radius: 6px;
  background: var(--line);
  margin-bottom: 10px;
}

.hb-line-lg {
  height: 17px;
  background: #232c44;
}

.hb-cta {
  width: 112px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  margin: 18px 0 22px;
}

.hb-blocks {
  display: flex;
  gap: 10px;
}

.hb-blocks span {
  flex: 1;
  height: 56px;
  border-radius: 8px;
  background: var(--accent-soft);
}

/* Assembly loop: ~9s cycle. Base styles above are the finished state;
   keyframes start each piece hidden, so reduced-motion just shows it built. */
.hb-logo,
.hb-navline,
.hb-pill,
.hb-blocks span {
  animation: hbFade 7s ease infinite backwards;
}

.hb-line { animation: hbType 7s ease infinite backwards; }
.hb-cta { animation: hbPop 7s ease infinite backwards; }

.hb-logo { animation-delay: 0.2s; }
.hb-navline:nth-of-type(2) { animation-delay: 0.5s; }
.hb-navline:nth-of-type(3) { animation-delay: 0.65s; }
.hb-pill { animation-delay: 0.85s; }
.hb-line-lg { animation-delay: 1.15s; }
.hb-line:not(.hb-line-lg) { animation-delay: 1.55s; }
.hb-cta { animation-delay: 1.95s; }
.hb-blocks span:nth-child(1) { animation-delay: 2.25s; }
.hb-blocks span:nth-child(2) { animation-delay: 2.4s; }
.hb-blocks span:nth-child(3) { animation-delay: 2.55s; }

@keyframes hbFade {
  0% { opacity: 0; transform: translateY(6px); }
  3.5% { opacity: 1; transform: translateY(0); }
  88% { opacity: 1; transform: translateY(0); }
  94%, 100% { opacity: 0; transform: translateY(6px); }
}

@keyframes hbType {
  0% { width: 0; opacity: 0; }
  1% { opacity: 1; }
  8% { width: var(--w, 70%); }
  88% { width: var(--w, 70%); opacity: 1; }
  94%, 100% { opacity: 0; width: var(--w, 70%); }
}

@keyframes hbPop {
  0% { opacity: 0; transform: scale(0.85); }
  4% { opacity: 1; transform: scale(1); }
  88% { opacity: 1; transform: scale(1); }
  94%, 100% { opacity: 0; transform: scale(0.85); }
}

/* ===== Who we build for ticker ===== */
.ticker {
  overflow: hidden;
  padding: 0.95rem 0;
  border-block: 1px solid var(--line);
  background: var(--bg);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  width: max-content;
  animation: tickerScroll 40s linear infinite;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-track span {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.ticker-track .tick-dot { color: var(--accent); }

@keyframes tickerScroll {
  to { transform: translateX(-50%); }
}

.hero-sub {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 620px;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-trust {
  list-style: none;
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem 1.5rem;
}

.hero-trust li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--accent);
}

.hero-trust strong {
  color: var(--ink);
  font-size: 1rem;
}

/* Desktop: trust items span the full hero width in one row of four */
@media (min-width: 920px) {
  .hero-inner .hero-trust {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 0.25rem;
    gap: 1.25rem;
  }
}

/* ===== Stats band ===== */
.stats {
  background: var(--ink);
  padding: clamp(2.5rem, 6vw, 3.75rem) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.5rem;
  text-align: center;
}

@media (min-width: 760px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-num {
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}

/* ===== Sections ===== */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }

/* Dark navy section variant (matches stats band and footer) */
.section-dark { background: var(--ink); }
.section-dark .section-head h2 { color: #fff; }
.section-dark .section-sub { color: rgba(255, 255, 255, 0.72); }
.section-dark .eyebrow { color: var(--accent-soft); }

/* FAQ: navy behind the heading, then a long slow fade down into the
   light contact section below. Card text stays dark-on-white, so it
   remains readable as the background lightens toward the bottom. */
#faq {
  background: linear-gradient(to bottom, var(--ink) 0%, var(--ink) 20%, var(--bg) 100%);
}

/* "just ask" link in the dark FAQ intro */
.just-ask {
  color: #5b82ff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(91, 130, 255, 0.45);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.just-ask:hover {
  color: #9db4ff;
  border-color: #9db4ff;
}

/* In-card text link (guarantee cards on the pricing page) */
.card-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent-soft);
  transition: border-color 0.18s ease;
}

.card-link:hover { border-color: var(--accent); }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.section-sub {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ===== How it works ===== */
.steps {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
}

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 12px;
  margin-bottom: 1.1rem;
}

.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--ink-soft); font-size: 0.97rem; }

/* ===== Pricing ===== */
.plan-toggle {
  display: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin: 0 auto 1.75rem;
  width: fit-content;
}

.plan-toggle-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: none;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.6rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.plan-toggle-btn.active {
  background: var(--accent);
  color: #fff;
}

.pricing-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  max-width: 860px;
  margin-inline: auto;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.1rem 1.9rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.price-card-featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-md);
}

.price-badge {
  position: absolute;
  top: -13px;
  left: 1.9rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
}

.price-tag {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.price-was {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: #d92d20;
  text-decoration-thickness: 2.5px;
  margin-right: 0.55rem;
}

.price-amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-right: 0.35rem;
}

.price-desc {
  margin-top: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.price-features,
.check-list {
  list-style: none;
  margin: 1.4rem 0 1.8rem;
}

.price-features li,
.check-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.8rem;
  font-size: 0.95rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.price-features li:last-child,
.check-list li:last-child { border-bottom: none; }

.price-features li::before,
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b59ff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4 10-11'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* Keep both plan buttons pinned to the bottom so the cards always match */
.price-card .btn { margin-top: auto; }

.pricing-note {
  text-align: center;
  margin-top: 2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Mobile: show toggle, one card at a time */
@media (max-width: 640px) {
  .plan-toggle { display: flex; }
  .pricing-grid[data-active-plan="basic"] .price-card[data-plan="upgraded"],
  .pricing-grid[data-active-plan="upgraded"] .price-card[data-plan="basic"] {
    display: none;
  }
}

/* ===== Why us ===== */
.why-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.why-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

/* Accent bar sweeps across the top on hover */
.why-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #5b82ff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.why-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(43, 89, 255, 0.35);
}

.why-card:hover::before { transform: scaleX(1); }

.why-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-radius: 14px;
  margin-bottom: 1.15rem;
  box-shadow: 0 6px 16px rgba(43, 89, 255, 0.35);
  transition: transform 0.25s ease;
}

.why-card:hover .why-icon { transform: scale(1.08) rotate(-5deg); }

.why-icon svg { width: 26px; height: 26px; }

.why-card h3 { font-size: 1.12rem; margin-bottom: 0.45rem; }
.why-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* ===== Updates callout ===== */
.update-strip {
  background: var(--ink);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 3.75rem) 0;
}

.update-strip-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.75rem;
}

.update-copy { flex: 1 1 340px; }

/* Fake code editor: lines type on rapidly, hold, then re-run */
.update-code { flex: 1 1 320px; }

.code-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 1.15rem 1.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.75;
  box-shadow: inset 0 0 48px rgba(43, 89, 255, 0.08);
}

.code-line {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  animation: codeType 8s steps(26, end) infinite backwards;
}

.code-line:nth-child(1) { animation-delay: 0.2s; }
.code-line:nth-child(2) { animation-delay: 0.85s; }
.code-line:nth-child(3) { animation-delay: 1.5s; }
.code-line:nth-child(4) { animation-delay: 2.15s; }
.code-line:nth-child(5) { animation-delay: 2.8s; }
.code-line:nth-child(6) { animation-delay: 3.6s; }

/* Types in the first ~0.55s of each line's cycle, holds, loop clears it */
@keyframes codeType {
  0% { width: 0; }
  7% { width: 100%; }
  100% { width: 100%; }
}

/* Blinking block cursor at the end of the last line */
.code-line:last-child::after {
  content: "\258B";
  color: #7fe0a8;
  animation: codeCursor 0.9s step-end infinite;
}

@keyframes codeCursor {
  50% { opacity: 0; }
}

.c-tag { color: #5b82ff; }
.c-attr { color: #9db4ff; }
.c-str { color: #7fe0a8; }
.c-dim { color: rgba(255, 255, 255, 0.45); }
.c-ok { color: #7fe0a8; font-weight: 600; }
.code-line { color: #eaefff; }

.update-icon {
  flex-shrink: 0;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border-radius: 16px;
}

.update-icon svg { width: 30px; height: 30px; }

.update-copy h2 {
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
}

.update-copy p {
  margin-top: 0.55rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 640px;
}

@media (max-width: 560px) {
  .update-strip { padding-block: 2rem; }
  .update-strip-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  /* Fill width AND reset flex — in a column, flex-basis:320px becomes HEIGHT,
     which was forcing a 320px-tall box with dead space below the code. */
  .update-copy,
  .update-code { width: 100%; flex: none; }
}

/* ===== Portfolio ===== */
.work-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  max-width: 900px;
  margin-inline: auto;
}

.work-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.work-card:hover,
.work-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  outline: none;
}

.work-preview {
  padding: 2.25rem 2.25rem 0;
  display: flex;
  justify-content: center;
}

.work-preview-green { background: linear-gradient(135deg, #1d4d3b, #2f7a58); }
.work-preview-purple { background: linear-gradient(135deg, #3b1d4d, #7a2f6b); }

/* Mini browser mockup used as an honest placeholder until real screenshots go in */
.mock-browser {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 10px 10px 0 0;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transform: translateY(6px);
  transition: transform 0.3s ease;
}

.work-card:hover .mock-browser { transform: translateY(0); }

.mock-dots {
  display: flex;
  gap: 5px;
  padding: 9px 12px;
  background: #f0f1ee;
}
.mock-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d3d5d0;
}

.mock-body { padding: 16px 18px 22px; }
.mock-line {
  height: 8px;
  border-radius: 4px;
  background: #e6e8e3;
  margin-bottom: 8px;
  width: 70%;
}
.mock-line-lg { height: 14px; width: 88%; background: #d6d9d2; }
.mock-blocks {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.mock-blocks span {
  flex: 1;
  height: 34px;
  border-radius: 6px;
  background: var(--accent-soft);
}

.work-info {
  padding: 1.3rem 1.6rem 1.4rem;
}
.work-info p { color: var(--ink-soft); font-size: 0.92rem; }

/* Slide-up detail overlay */
.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 43, 0.94);
  color: #fff;
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.work-card:hover .work-overlay,
.work-card:focus-visible .work-overlay,
.work-card.open .work-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.work-overlay p {
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.85);
}

.work-link {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  width: fit-content;
  padding-bottom: 2px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.work-link:hover { color: var(--accent-soft); }

/* ===== FAQ ===== */
.faq-inner { max-width: 760px; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item.open {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  color: var(--ink);
  background: none;
  border: none;
  padding: 1.15rem 1.4rem;
  cursor: pointer;
  transition: color 0.18s ease;
}

.faq-question:hover { color: var(--accent); }

.faq-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.28s ease;
  margin-top: -4px;
}

.faq-item.open .faq-chevron { transform: rotate(225deg); margin-top: 4px; }

/* Smooth height animation via the grid 0fr -> 1fr trick */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}

.faq-answer > p {
  overflow: hidden;
  min-height: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  padding: 0 1.4rem;
  transition: padding 0.32s ease;
}

.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-item.open .faq-answer > p { padding: 0 1.4rem 1.25rem; }

/* ===== Portfolio page ===== */
.page-hero {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, rgba(43, 89, 255, 0.07), transparent),
    var(--bg);
}

.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
}

.page-hero .section-sub { max-width: 620px; }

.project-feature {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 860px) {
  .project-feature {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
  .project-feature.flip .project-shot { order: 2; }
}

.project-shot {
  border-radius: var(--radius);
  padding: 2.75rem 2.75rem 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.project-shot .mock-browser {
  max-width: 400px;
  transform: translateY(6px);
}

.project-copy h2 { margin: 0.35rem 0 0.75rem; }
.project-copy > p { color: var(--ink-soft); }

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.center-head {
  text-align: center;
  margin-inline: auto;
  margin-bottom: 0;
}

.cta-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.work-more {
  text-align: center;
  margin-top: 2.5rem;
}

/* ===== Comparison table (pricing page) ===== */
.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--card);
}

.compare-table {
  width: 100%;
  min-width: 760px; /* keeps columns readable; narrow screens scroll sideways */
  border-collapse: collapse;
  font-size: 0.93rem;
}

.compare-table th,
.compare-table td {
  padding: 0.95rem 1.1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table thead th {
  font-size: 0.95rem;
  font-weight: 700;
  padding-top: 1.2rem;
}

.compare-table thead th span {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.compare-table td {
  color: var(--ink-soft);
}

/* Highlight our column */
.compare-table .compare-us {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}

.compare-table thead .compare-us {
  color: var(--accent);
  border-top: 3px solid var(--accent);
}

.compare-note {
  margin-top: 1.1rem;
  font-size: 0.87rem;
  color: var(--ink-soft);
}

/* ===== Homepage booking embed (Calendly inline) ===== */
.booking-embed {
  max-width: 780px;
  margin: 0 auto 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.booking-embed .calendly-inline-widget {
  min-width: 320px;
  height: 660px;
}

/* Placeholder mini calendar shown until the Calendly URL is dropped in */
.cal-mock {
  padding: 1.8rem 1.8rem 0.4rem;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cal-mock span {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--bg-alt);
}

.cal-mock span.open { background: var(--accent-soft); }
.cal-mock span.today { background: var(--accent); }

.booking-embed .booking-note {
  padding: 0 1.5rem 1.5rem;
  margin-top: 1rem;
}

/* Embed nested inside the get-started booking card: lighter chrome */
.booking-embed-inline {
  box-shadow: none;
  border-radius: 10px;
  margin: 0.5rem auto 0;
}

/* ===== Typewriter headline (get-started page) ===== */
.typed { color: var(--accent); white-space: nowrap; }

.type-caret {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 3px;
  background: var(--accent);
  vertical-align: -0.08em;
  animation: caretBlink 0.9s step-end infinite;
}

@keyframes caretBlink {
  50% { opacity: 0; }
}

/* ===== Booking card (get-started page) ===== */
.booking-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.6rem, 4vw, 2.5rem);
}

.booking-card .check-list {
  margin-top: 0;
}

.booking-note {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.87rem;
  color: var(--ink-soft);
}

/* ===== Contact form ===== */
.contact-inner { max-width: 660px; }
.contact-inner .section-head { margin-inline: auto; text-align: center; }

.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.6rem, 4vw, 2.5rem);
}

.form-progress {
  height: 6px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
}

.form-progress-bar {
  height: 100%;
  width: 33.34%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.form-step-label {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-step {
  border: none;
  min-width: 0; /* fieldsets refuse to shrink below content width without this */
  display: none;
  margin-top: 1.4rem;
  animation: stepIn 0.32s ease;
}

.form-step.active { display: block; }

@keyframes stepIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.field { margin-bottom: 1.2rem; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.94rem;
  margin-bottom: 0.45rem;
}

.optional { font-weight: 400; color: var(--ink-soft); }

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea { resize: vertical; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 89, 255, 0.15);
}

.field input.invalid,
.field textarea.invalid {
  border-color: #d92d20;
}

.form-error {
  color: #d92d20;
  font-size: 0.9rem;
  min-height: 1.3rem;
  margin-top: 0.4rem;
}

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.form-nav .btn { min-width: 110px; }
.form-nav #formNext,
.form-nav #formSubmit { margin-left: auto; }

.booking-alt {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.booking-alt a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.35rem;
  transition: color 0.18s ease;
}

.booking-alt a:hover { color: var(--accent-dark); text-decoration: underline; }

.form-success {
  text-align: center;
  padding: 1.5rem 0.5rem 0.5rem;
}

.success-check {
  width: 58px;
  height: 58px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
}

.success-check svg { width: 28px; height: 28px; }

.form-success p {
  margin-top: 0.6rem;
  color: var(--ink-soft);
}

.form-success a { color: var(--accent); font-weight: 600; }

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 3.5rem 0 0;
}

.footer-inner {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-bottom: 2.5rem;
}

.site-footer .logo svg { height: 27px; }

.footer-brand p {
  margin-top: 0.8rem;
  font-size: 0.94rem;
  max-width: 280px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.94rem;
  width: fit-content;
  transition: color 0.18s ease, transform 0.18s ease;
}

.footer-nav a:hover {
  color: #fff;
  transform: translateX(3px);
}

.footer-contact p { font-size: 0.94rem; }

.footer-email {
  display: inline-block;
  margin-top: 0.5rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.18s ease;
}

.footer-email:hover { color: var(--accent-soft); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.4rem 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger siblings inside grids */
.pricing-grid .reveal:nth-child(2),
.work-grid .reveal:nth-child(2) { transition-delay: 0.12s; }

/* Steps + Why cards: one-after-another cascade.
   Uses a one-shot animation (not a transition) so the hover lift stays instant. */
.steps .reveal,
.why-grid .reveal {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.steps .reveal.visible,
.why-grid .reveal.visible {
  animation: stepCascade 0.6s cubic-bezier(0.34, 1.45, 0.64, 1) backwards;
}

/* Cascade delays only where cards sit side by side; on stacked mobile
   layouts each card appears as it scrolls in, no artificial wait. */
@media (min-width: 760px) {
  .steps .reveal.visible:nth-child(2),
  .why-grid .reveal.visible:nth-child(2) { animation-delay: 0.6s; }

  .steps .reveal.visible:nth-child(3),
  .why-grid .reveal.visible:nth-child(3) { animation-delay: 1.2s; }

  .why-grid .reveal.visible:nth-child(4) { animation-delay: 1.8s; }
}

@keyframes stepCascade {
  from { opacity: 0; transform: translateY(26px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.why-grid .reveal:nth-child(4) { transition-delay: 0.36s; }

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }

  /* Show the hero mockup fully built, stop the ticker and glow */
  .hero-browser .hb-logo,
  .hero-browser .hb-navline,
  .hero-browser .hb-pill,
  .hero-browser .hb-line,
  .hero-browser .hb-cta,
  .hero-browser .hb-blocks span,
  .ticker-track,
  .hero::before {
    animation: none !important;
  }
}
