:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --ink: #0f172a;
  --muted: #5b6475;
  --line: #e3e8f0;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --dark: #0b1220;
  --radius: 14px;
  --surface: #ffffff;
  --nav-bg: rgba(255,255,255,.9);
  --glow: #dbe7ff;
  --chip: #dbe7ff;
  --bar: #eef1f6;
  --bar-url: #ffffff;
  --dot: #cfd5df;
  color-scheme: light;
}

/* Dark mode */
:root[data-theme="dark"] {
  --bg: #0b1120;
  --bg-alt: #111a2c;
  --ink: #e8edf7;
  --muted: #9aa6bc;
  --line: #24314b;
  --accent: #4f8bff;
  --accent-dark: #3b74ec;
  --dark: #060a14;
  --surface: #121b2e;
  --nav-bg: rgba(11,17,32,.85);
  --glow: #1a2c55;
  --chip: #1c2d52;
  --bar: #1a2335;
  --bar-url: #0e1626;
  --dot: #3a475f;
  color-scheme: dark;
}

/* Theme toggle */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem; transition: background .2s, border-color .2s;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
body, .nav, .price-card, .step, .project-preview { transition: background-color .25s, border-color .25s, color .25s; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 10px;
  border: 2px solid var(--accent);
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--line); }
.btn-small { padding: 8px 18px; color: #fff !important; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { text-decoration: none; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

/* Typography */
.eyebrow {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .8rem;
  margin-bottom: 10px;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); line-height: 1.2; letter-spacing: -.02em; margin-bottom: 40px; }
h3 { font-size: 1.25rem; margin-bottom: 8px; }

/* Hero */
.hero {
  padding: 100px 0 90px;
  background: radial-gradient(1200px 500px at 80% -10%, var(--glow) 0%, transparent 60%), var(--bg);
}
.hero-inner { max-width: 820px; }
.lead { font-size: 1.2rem; color: var(--muted); margin: 22px 0 32px; max-width: 640px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-points { list-style: none; display: flex; gap: 24px; flex-wrap: wrap; margin-top: 36px; color: var(--muted); font-weight: 500; }
.hero-points li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* Sections */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: #e6ebf5; }
.section-dark .eyebrow { color: #7aa2ff; }

/* Project */
.project {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
  align-items: center;
}
.project-preview {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 25px 50px -20px rgba(15,23,42,.35);
  transition: transform .3s;
}
.project-preview:hover { transform: translateY(-4px); }
.browser-bar { display: flex; align-items: center; gap: 6px; background: var(--bar); padding: 12px 14px; }
.browser-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--dot); }
.browser-bar .url {
  flex: 1; margin-left: 10px; background: var(--bar-url); border-radius: 6px;
  padding: 4px 12px; font-size: .8rem; color: var(--muted);
}
.browser-shot { display: block; width: 100%; height: auto; background: #0e1116; }
.tag { color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.project-info > p { color: var(--muted); }
.project-info .btn { margin-top: 26px; }

/* Check lists */
.checks { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--chip); color: var(--accent);
  font-size: .75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.two-col { grid-template-columns: 1fr 1fr; gap: 12px 30px; margin: 30px 0 34px; }

/* Pricing */
.price-card {
  max-width: 820px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 46px;
  box-shadow: 0 30px 60px -30px rgba(37,99,235,.35);
  border-top: 5px solid var(--accent);
}
.price-head { text-align: center; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.price-head p { color: var(--muted); }
.price { font-size: 4.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 14px 0 12px; }
.dollar { font-size: 2rem; vertical-align: top; margin-right: 2px; }
.once { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.fine { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 16px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; background: var(--surface); }
.step p { color: var(--muted); }
.num {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}

/* Contact */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-copy h2 { margin-bottom: 18px; }
.contact-copy p { color: #aab4c8; }
.contact-list { list-style: none; margin-top: 28px; display: grid; gap: 10px; }
.contact-list a { color: #7aa2ff; }
.contact-form {
  background: #121b2e; border: 1px solid #22304d;
  border-radius: 18px; padding: 32px;
  display: grid; gap: 16px;
}
.contact-form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; color: #c7cfdf; }
.contact-form input, .contact-form textarea {
  font: inherit; color: #fff;
  background: #0b1220; border: 1px solid #2a3a5c;
  border-radius: 10px; padding: 12px 14px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form-note { font-size: .9rem; color: #7aa2ff; min-height: 1.2em; }
.tryit-summary {
  display: grid; gap: 4px; padding: 12px 14px; border-radius: 10px;
  background: rgba(79,139,255,.1); border: 1px dashed #3b5a99;
  font-size: .88rem; color: #c7cfdf; animation: rise .4s ease both;
}
.tryit-summary[hidden] { display: none; }
.tryit-summary-title { font-weight: 600; color: #7aa2ff; }
.contact-form .tryit-optout {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
  font-size: .85rem; font-weight: 500; color: #aab4c8; cursor: pointer;
}
.tryit-optout input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; padding: 0; }
.tryit-summary.excluded { opacity: .65; border-style: solid; border-color: #2a3a5c; background: transparent; }
.tryit-summary.excluded #tryit-summary-text { text-decoration: line-through; }
.tryit-summary.excluded .tryit-summary-title { color: #aab4c8; }

/* Footer */
.footer { background: var(--dark); color: #7d879b; border-top: 1px solid #1c2740; padding: 26px 0; text-align: center; font-size: .9rem; }

/* Responsive */
@media (max-width: 860px) {
  .project, .contact-inner { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .price-card { padding: 30px 22px; }
}
@media (max-width: 560px) {
  .nav-links a:not(.btn) { display: none; }
  .hero { padding: 70px 0 60px; }
  .section { padding: 70px 0; }
}

/* ===== Motion & interactivity ===== */

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 50;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), #8b5cf6, #06b6d4);
}

/* Nav: shadow on scroll + animated underline + active section */
.nav { transition: box-shadow .3s, background-color .25s; }
.nav.scrolled { box-shadow: 0 10px 30px -18px rgba(15,23,42,.45); }
.nav-links a:not(.btn) { position: relative; transition: color .2s; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transition: transform .25s;
}
.nav-links a:not(.btn):hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }
.theme-toggle span { display: inline-block; transition: transform .5s; }
.theme-toggle:hover span { transform: rotate(40deg); }

/* Hero: floating color blobs + grid */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; animation: float 18s ease-in-out infinite; }
.blob.b1 { width: 420px; height: 420px; background: #60a5fa; top: -140px; right: -80px; }
.blob.b2 { width: 340px; height: 340px; background: #a78bfa; bottom: -160px; right: 24%; animation-duration: 22s; animation-delay: -6s; }
.blob.b3 { width: 260px; height: 260px; background: #22d3ee; top: 30%; right: 6%; animation-duration: 26s; animation-delay: -12s; opacity: .35; }
:root[data-theme="dark"] .blob { opacity: .28; }
.grid-bg {
  position: absolute; inset: 0; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 75% 30%, #000 15%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 75% 30%, #000 15%, transparent 75%);
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(1.08); }
  66% { transform: translate(30px, -20px) scale(.95); }
}

/* Hero entrance */
.hero-inner > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero-inner > *:nth-child(2) { animation-delay: .1s; }
.hero-inner > *:nth-child(3) { animation-delay: .2s; }
.hero-inner > *:nth-child(4) { animation-delay: .3s; }
.hero-inner > *:nth-child(5) { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Rotating headline word */
.rotate-line { display: block; min-height: 1.1em; }
.rotator {
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.caret {
  display: inline-block; width: 3px; height: .85em; margin-left: 4px;
  background: var(--accent); vertical-align: -.06em; border-radius: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Button shine + press */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .6s; pointer-events: none;
}
.btn:hover::before { left: 125%; }
.btn-ghost::before { display: none; }
.btn:active { transform: translateY(0) scale(.98); }

/* Scrolling marquee */
.marquee { border-block: 1px solid var(--line); background: var(--surface); overflow: hidden; padding: 16px 0; }
.marquee-track { display: flex; width: max-content; animation: scroll-x 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 44px; padding-right: 44px; }
.marquee-group span { color: var(--muted); font-weight: 600; white-space: nowrap; }
.marquee-group span::before { content: "✦"; color: var(--accent); margin-right: 44px; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* Scroll reveal (only hides content when JavaScript is running) */
.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .stagger li { opacity: 0; transform: translateX(-10px); transition: opacity .4s, transform .4s; transition-delay: calc(var(--i, 0) * 60ms + .2s); }
.js .reveal.in .stagger li { opacity: 1; transform: none; }

/* Process steps */
.step { transition: transform .3s, border-color .3s, box-shadow .3s, background-color .25s; }
.step:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 20px 40px -24px rgba(37,99,235,.5); }
.js .reveal.in .num { animation: pop .5s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--d, 0s) + .25s); }
@keyframes pop { from { transform: scale(0) rotate(-20deg); } to { transform: none; } }

/* 3D tilt on project preview */
.tilt-wrap { perspective: 1000px; }
.project-preview { position: relative; transform-style: preserve-3d; transition: transform .2s ease-out, box-shadow .3s; }
.project-preview:hover { box-shadow: 0 35px 60px -25px rgba(15,23,42,.5); }
.glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.22), transparent 55%);
}
.project-preview:hover .glare { opacity: 1; }

/* Contact spotlight that follows the mouse */
.section-dark { position: relative; overflow: hidden; }
.section-dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 75%) var(--my, 30%), rgba(79,139,255,.18), transparent 60%);
}
.section-dark > .container { position: relative; }
.contact-form input, .contact-form textarea { transition: border-color .2s, box-shadow .2s; }
.contact-form input:focus, .contact-form textarea:focus { box-shadow: 0 0 0 4px rgba(79,139,255,.2); }

/* Back to top */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 1.2rem; cursor: pointer;
  box-shadow: 0 10px 25px -8px rgba(37,99,235,.6);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* Try-it website builder */
.section-intro { color: var(--muted); max-width: 620px; margin: -24px 0 40px; }
.builder { display: grid; grid-template-columns: 330px 1fr; gap: 40px; align-items: start; }
.controls { display: grid; gap: 24px; }
.control-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: .9rem; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line);
  transition: transform .2s, box-shadow .2s;
}
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); transform: scale(1.08); }
.text-input {
  width: 100%; font: inherit; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.text-input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.builder-cta { margin-top: 4px; }

.mock { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 25px 50px -20px rgba(15,23,42,.35); }
.mock-site { --c: #2563eb; background: #ffffff; color: #0f172a; transition: background-color .4s, color .4s; }
.mock-site.dark { background: #0f1420; color: #e8edf7; }
.mock-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid rgba(127,127,127,.18); font-size: .8rem; }
.mock-logo { font-weight: 800; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-links { display: flex; gap: 14px; opacity: .7; white-space: nowrap; }
.mock-hero {
  padding: 40px 22px 30px; text-align: center;
  background: radial-gradient(600px 220px at 50% 0%, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%);
}
.mock-icon { font-size: 2.4rem; display: inline-block; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.mock-name { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 8px 0 6px; overflow-wrap: anywhere; }
.mock-tag { opacity: .7; font-size: .95rem; max-width: 420px; margin: 0 auto 18px; }
.mock-cta { display: inline-block; background: var(--c); color: #fff; font-weight: 700; font-size: .85rem; padding: 10px 18px; border-radius: 8px; transition: background-color .4s; }
.mock-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 22px 26px; }
.mock-card { border: 1px solid rgba(127,127,127,.22); border-radius: 10px; padding: 14px 8px; text-align: center; font-size: .8rem; font-weight: 600; }
.mock-card::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 8px; border-radius: 8px; background: var(--c); opacity: .85; transition: background-color .4s; }
.swap { animation: swap .45s ease both; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .builder { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .mock-links { display: none; }
  .mock-services { grid-template-columns: 1fr; }
}

/* Respect visitors who turn off animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .marquee-track { animation: none !important; }
  .caret { display: none; }
}

