/* DigitalCubeDesigns — Claude-inspired aesthetic */

:root {
  /* Warm Anthropic palette */
  --cream: #F5F1EA;
  --cream-deep: #EDE6DA;
  --paper: #FAF7F2;
  --ink: #1A1613;
  --ink-soft: #2A2420;
  --muted: #6B5F54;
  --muted-light: #A89B8D;
  --line: #E5DDD0;
  --line-soft: #EFE8DC;

  /* Brand accent — Anthropic terracotta */
  --terracotta: #CC785C;
  --terracotta-deep: #B8654A;
  --terracotta-soft: #E8A590;
  --clay: #D4A27F;
  --sand: #E8DCC8;

  /* DigitalCube brand blue + yellow (from logo) */
  --brand-blue: #1DA1DB;
  --brand-blue-soft: #7BC7E8;
  --brand-yellow: #FFCE1F;

  /* Supporting */
  --ink-black: #141210;
  --gold: #C4A06C;

  /* Typography */
  --font-serif: 'Fraunces', 'Tiempos', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Spacing */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows — warm, soft */
  --shadow-xs: 0 1px 2px rgba(42, 36, 32, 0.04);
  --shadow-sm: 0 2px 8px rgba(42, 36, 32, 0.06);
  --shadow-md: 0 8px 24px rgba(42, 36, 32, 0.08);
  --shadow-lg: 0 20px 50px rgba(42, 36, 32, 0.12);
  --shadow-xl: 0 32px 80px rgba(42, 36, 32, 0.16);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --cream: #17140F;
  --cream-deep: #100E0A;
  --paper: #1D1915;
  --ink: #F5F1EA;
  --ink-soft: #E8DFD2;
  --muted: #A89B8D;
  --muted-light: #6B5F54;
  --line: #2A2420;
  --line-soft: #221E19;
  --ink-black: #FAF7F2;
  --terracotta: #E8A590;
  --terracotta-deep: #CC785C;
  --sand: #2A2420;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.7);
}

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

html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100vw; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

/* Mobile overflow guard — prevent any wide child from breaking layout */
@media (max-width: 768px) {
  img, video, iframe { max-width: 100%; height: auto; }
  .trust-marquee, .marquee, [class*="marquee"] { max-width: 100vw; overflow: hidden; }
  .container, section, footer, nav { max-width: 100vw; overflow-x: clip; }
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s var(--ease);
  backdrop-filter: blur(0px);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--cream) 85%, transparent);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  padding: 14px 48px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: -0.02em;
}
.nav-logo-mark {
  width: 28px; height: 28px;
  position: relative;
  display: grid;
  place-items: center;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a {
  position: relative;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--terracotta);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 16px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--terracotta);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--terracotta) 35%, transparent);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  background: var(--paper);
  border-color: var(--ink);
}
.btn-terracotta {
  background: var(--terracotta);
  color: #fff;
}
.btn-terracotta:hover {
  background: var(--terracotta-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--terracotta) 45%, transparent);
}
.btn-lg { padding: 16px 28px; font-size: 15px; }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all 0.3s var(--ease);
}
.theme-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: rotate(20deg);
}

/* ---------- LAYOUT ---------- */
.section {
  padding: 120px 48px;
  position: relative;
}
.container {
  max-width: 1240px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--terracotta);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 48px 100px;
  position: relative;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.85;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}
.hero-tag-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 8px var(--terracotta);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}
.hero-tag-badge {
  padding: 2px 8px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hero h1 {
  font-size: clamp(48px, 6vw, 88px);
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-bottom: 28px;
}
.hero h1 .accent {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 300;
}
.hero-typing {
  display: inline-block;
  min-width: 1ch;
  position: relative;
}
.hero-typing-cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  background: var(--terracotta);
  margin-left: 4px;
  vertical-align: -0.05em;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}
.hero-sub {
  font-size: 19px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.55;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  margin-bottom: 56px;
}
.hero-stats {
  display: flex;
  gap: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hero-stat-num {
  font-family: var(--font-serif);
  font-size: 36px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* Hero visual card */
.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  max-height: 560px;
}
.hero-card {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}
.hero-card-main {
  inset: 10% 5% 10% 5%;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: float-main 8s ease-in-out infinite;
}
@keyframes float-main {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
}
.hero-card-float {
  animation: float-a 6s ease-in-out infinite;
}
@keyframes float-a {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}
.hero-card-b {
  animation: float-b 7s ease-in-out infinite;
  animation-delay: -2s;
}
@keyframes float-b {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(10px) rotate(-4deg); }
}

/* ---------- SERVICES ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.service-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  cursor: pointer;
  transition: all 0.5s var(--ease);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), 
    color-mix(in srgb, var(--terracotta) 10%, transparent), 
    transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.service-card:hover {
  border-color: var(--terracotta);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.service-card:hover::before { opacity: 1; }
.service-card:hover .service-arrow {
  transform: translate(4px, -4px);
  color: var(--terracotta);
}
.service-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--sand);
  display: grid;
  place-items: center;
  color: var(--terracotta);
  margin-bottom: 24px;
  transition: all 0.5s var(--ease);
}
.service-card:hover .service-icon {
  background: var(--terracotta);
  color: var(--cream);
  transform: scale(1.05) rotate(-4deg);
}
.service-card h3 {
  font-size: 24px;
  margin-bottom: 12px;
}
.service-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}
.service-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.service-tags {
  display: flex;
  gap: 6px;
}
.service-tag {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--cream);
  border-radius: 100px;
  color: var(--muted);
}
.service-arrow {
  color: var(--muted);
  transition: all 0.4s var(--ease);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 48px;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s var(--ease);
  position: relative;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--cream);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all 0.3s;
}
.modal-close:hover {
  background: var(--ink);
  color: var(--cream);
}
.modal-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: var(--terracotta);
  color: var(--cream);
  display: grid;
  place-items: center;
  margin-bottom: 28px;
}
.modal h2 {
  font-size: 40px;
  margin-bottom: 16px;
}
.modal-lead {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.55;
}
.modal h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
}
.modal-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}
.modal-feature {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: 14px;
  padding: 12px;
  background: var(--cream);
  border-radius: var(--radius);
}
.modal-feature-check {
  color: var(--terracotta);
  flex-shrink: 0;
  margin-top: 2px;
}
.modal-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.modal-stack-chip {
  font-size: 12px;
  padding: 6px 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}

/* ---------- HOW IT WORKS ---------- */
.steps {
  position: relative;
  margin-top: 72px;
}
.steps-line {
  position: absolute;
  top: 40px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--line);
}
.steps-line-fill {
  height: 100%;
  background: var(--terracotta);
  width: 0%;
  transition: width 1.2s var(--ease);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
}
.step {
  position: relative;
  text-align: center;
}
.step-num-wrap {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 32px;
}
.step-num {
  position: relative;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--ink);
  transition: all 0.5s var(--ease);
  z-index: 2;
}
.step.active .step-num {
  background: var(--terracotta);
  color: var(--cream);
  border-color: var(--terracotta);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--terracotta) 15%, transparent);
}
.step-num-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--terracotta);
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.8s;
}
.step.active .step-num-glow { opacity: 0.4; }
.step h3 {
  font-size: 26px;
  margin-bottom: 12px;
}
.step p {
  color: var(--muted);
  font-size: 15px;
  max-width: 280px;
  margin: 0 auto;
}
.step-meta {
  margin-top: 20px;
  display: inline-block;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--muted-light);
  padding: 4px 10px;
  background: var(--paper);
  border-radius: 100px;
  border: 1px solid var(--line);
}

/* ---------- PORTFOLIO ---------- */
.portfolio-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 48px;
  gap: 32px;
  flex-wrap: wrap;
}
.portfolio-filters {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 100px;
}
.filter-btn {
  padding: 8px 18px;
  font-size: 13px;
  color: var(--muted);
  border-radius: 100px;
  transition: all 0.3s var(--ease);
  position: relative;
}
.filter-btn.active {
  background: var(--ink);
  color: var(--cream);
}
.filter-btn:not(.active):hover { color: var(--ink); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: all 0.5s var(--ease);
}
.project.wide { grid-column: span 2; }
.project:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--terracotta);
}
.project-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: transform 0.6s var(--ease);
}
.project:hover .project-visual {
  transform: scale(1.05);
}
.project-overlay {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top,
    color-mix(in srgb, var(--ink) 88%, transparent) 0%,
    color-mix(in srgb, var(--ink) 60%, transparent) 40%,
    transparent 70%);
  color: var(--cream);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.5s var(--ease);
}
.project:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
}
.project-cat {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta-soft);
  margin-bottom: 8px;
}
.project-name {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 6px;
  color: var(--cream);
}
.project-desc {
  font-size: 13px;
  color: color-mix(in srgb, var(--cream) 80%, transparent);
  margin-bottom: 14px;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--cream);
}
.project-badge {
  position: absolute;
  top: 16px; left: 16px;
  padding: 4px 10px;
  font-size: 11px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink);
}

/* ---------- TESTIMONIALS ---------- */
.testimonials {
  background: var(--cream-deep);
  padding: 120px 48px;
}
.carousel {
  position: relative;
  margin-top: 56px;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.8s var(--ease);
}
.testimonial {
  flex: 0 0 calc(50% - 12px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  backdrop-filter: blur(20px);
  position: relative;
  transition: transform 0.6s var(--ease);
}
.testimonial-quote-mark {
  font-family: var(--font-serif);
  font-size: 72px;
  line-height: 0.5;
  color: var(--terracotta);
  opacity: 0.3;
  margin-bottom: 12px;
}
.testimonial-text {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 32px;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.testimonial-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 18px;
  flex-shrink: 0;
}
.testimonial-meta-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.testimonial-meta-role {
  font-size: 13px;
  color: var(--muted);
}
.carousel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
}
.carousel-dots {
  display: flex;
  gap: 8px;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: all 0.3s;
  cursor: pointer;
}
.carousel-dot.active {
  background: var(--terracotta);
  width: 24px;
  border-radius: 100px;
}
.carousel-arrows {
  display: flex;
  gap: 10px;
}
.carousel-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: all 0.3s var(--ease);
}
.carousel-arrow:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* ---------- PRICING ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.plan {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: all 0.4s var(--ease);
}
.plan:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.plan.featured {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
  transform: scale(1.02);
}
.plan.featured:hover { transform: scale(1.02) translateY(-4px); }
.plan.featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--terracotta), var(--gold), var(--terracotta));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  animation: border-rotate 4s linear infinite;
  background-size: 300% 300%;
}
@keyframes border-rotate {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
.plan-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  padding: 5px 12px;
  background: var(--terracotta);
  color: var(--cream);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 100px;
  text-transform: uppercase;
}
.plan-name {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 6px;
}
.plan-tag {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}
.plan.featured .plan-tag { color: color-mix(in srgb, var(--cream) 70%, transparent); }
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.plan.featured .plan-price { border-color: color-mix(in srgb, var(--cream) 20%, transparent); }
.plan-price-num {
  font-family: var(--font-serif);
  font-size: 56px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: inherit;
}
.plan.featured .plan-price-num { color: var(--cream); }
.plan-price-unit {
  font-size: 14px;
  color: var(--muted);
}
.plan-features {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan-feature {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: 14px;
}
.plan-feature-check {
  color: var(--terracotta);
  flex-shrink: 0;
  margin-top: 2px;
}
.plan.featured .plan-feature-check { color: var(--terracotta-soft); }
.plan-cta {
  width: 100%;
  justify-content: center;
}

/* ---------- FINAL CTA ---------- */
.final-cta {
  padding: 140px 48px;
  position: relative;
}
.final-cta-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 64px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.final-cta-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--terracotta), transparent 70%);
  opacity: 0.4;
  filter: blur(40px);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  animation: cta-glow 8s ease-in-out infinite;
}
@keyframes cta-glow {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  50% { transform: translateX(-30%) translateY(60px) scale(1.2); }
}
.final-cta-glow-b {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold), transparent 70%);
  opacity: 0.25;
  filter: blur(40px);
  bottom: -150px;
  right: 10%;
  animation: cta-glow-b 10s ease-in-out infinite;
}
@keyframes cta-glow-b {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-40px) scale(1.1); }
}
.final-cta h2 {
  font-size: clamp(40px, 5.5vw, 72px);
  margin-bottom: 24px;
  position: relative;
  color: var(--cream);
  letter-spacing: -0.03em;
}
.final-cta h2 .accent {
  font-style: italic;
  color: var(--terracotta-soft);
  font-weight: 300;
}
.final-cta p {
  font-size: 18px;
  color: color-mix(in srgb, var(--cream) 70%, transparent);
  max-width: 580px;
  margin: 0 auto 40px;
  position: relative;
}
.final-cta-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  position: relative;
}
.final-cta .btn-primary {
  background: var(--cream);
  color: var(--ink);
}
.final-cta .btn-primary:hover {
  background: var(--terracotta);
  color: var(--cream);
}
.final-cta .btn-secondary {
  background: transparent;
  color: var(--cream);
  border-color: color-mix(in srgb, var(--cream) 30%, transparent);
}
.final-cta .btn-secondary:hover {
  background: color-mix(in srgb, var(--cream) 10%, transparent);
  border-color: var(--cream);
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 72px 48px 32px;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand {
  max-width: 320px;
}
.footer-brand-desc {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.55;
}
.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all 0.3s var(--ease);
}
.footer-social a:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--cream);
  transform: translateY(-2px);
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.2s;
  display: inline-block;
}
.footer-col a:hover {
  color: var(--terracotta);
  transform: translateX(2px);
}
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom-links {
  display: flex;
  gap: 24px;
}

/* ---------- SECTION HEADER ---------- */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.section-head.left {
  text-align: left;
  margin: 0;
}
.section-head h2 {
  font-size: clamp(36px, 4.5vw, 56px);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.section-head h2 .accent {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 300;
}
.section-head p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.55;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .section, .hero, .testimonials, .final-cta { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 100px; }
  .hero-content { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-height: 400px; }
  .services-grid, .steps-grid, .portfolio-grid, .pricing-grid { grid-template-columns: 1fr; }
  .testimonial { flex: 0 0 calc(100% - 8px); }
  .modal-features { grid-template-columns: 1fr; }
  .modal { padding: 32px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .final-cta-inner { padding: 56px 28px; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .project.wide { grid-column: span 1; }
}

/* ---------- TIGHTER MOBILE (≤640px) ---------- */
@media (max-width: 640px) {
  /* Reduce excessive section padding */
  .section { padding: 56px 18px; }
  .hero { padding: 88px 18px 40px; }
  .testimonials { padding: 56px 0; }
  .final-cta { padding: 56px 18px; }
  .final-cta-inner { padding: 40px 22px; border-radius: 18px; }

  /* Typography scale-down */
  .section-title, .hero h1 { font-size: 38px !important; line-height: 1.08; }
  .section-eyebrow { font-size: 11px; }
  .hero-stats { gap: 16px; }
  .hero-stats .stat-num { font-size: 28px; }

  /* Footer — tighter, single column */
  .footer { padding: 48px 20px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; margin-bottom: 36px; }
  .footer-brand { max-width: 100%; }
  .footer-brand-desc { font-size: 13px; }
  .footer-col h4 { margin-bottom: 14px; }
  .footer-col ul { gap: 8px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    padding-top: 20px;
    font-size: 12px;
  }
  .footer-bottom-links { gap: 18px; flex-wrap: wrap; }

  /* Nav tighter */
  .nav { padding: 12px 16px; }
  .nav-logo img { height: 30px !important; }
  .nav-right .btn { padding: 8px 14px !important; font-size: 13px; }

  /* Modal padding */
  .modal { padding: 28px 20px; border-radius: 16px; }
}
}
