/* ─── DESIGN TOKENS — NUIT & INDIGO ─── */
:root {
  --bg-primary:    #0f172a;
  --bg-secondary:  #1e293b;
  --bg-tertiary:   #334155;
  --accent:        #6366f1;
  --accent-light:  #818cf8;
  --accent-glow:   rgba(99,102,241,0.15);
  --text-primary:  #f8fafc;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;
  --border:        rgba(99,102,241,0.2);
  --border-subtle: rgba(248,250,252,0.06);
}

/* ─── RESET & BASE ─── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Instrument Sans', sans-serif;
  line-height: 1.7;
  background-image:
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(0deg,  rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
h1, h2, h3, h4 { font-family: 'Syne', sans-serif; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--text-primary); }
h2 { font-size: clamp(22px, 2.8vw, 36px); }
h3 { font-size: clamp(16px, 1.6vw, 20px); font-weight: 700; }
p  { color: var(--text-secondary); }
a, button { transition: color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease; }

/* ─── UTILITIES ─── */
.btn-primary {
  display: inline-block; background: var(--accent); color: #fff;
  font-family: 'Instrument Sans', sans-serif; font-weight: 500; font-size: 15px;
  padding: 12px 24px; border-radius: 8px; text-decoration: none; border: none; cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.nav-cta { padding: 9px 18px !important; font-size: 13px !important; transform: translateZ(0); -webkit-transform: translateZ(0); }
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); }
.nav-cta:hover { transform: translateY(-2px) translateZ(0) !important; }

.btn-ghost {
  display: inline-block; background: transparent; color: var(--text-primary);
  font-family: 'Instrument Sans', sans-serif; font-weight: 500; font-size: 15px;
  padding: 13px 28px; border-radius: 8px; border: 1px solid var(--border); text-decoration: none; cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn-ghost:hover {
  background: rgba(99,102,241,0.08);
  border-color: var(--accent-light);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 96px 0; }

.tag {
  display: inline-block; font-family: 'Instrument Sans', sans-serif;
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px; border: 1px solid var(--border);
  color: var(--accent-light); background: var(--accent-glow);
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.85s cubic-bezier(0.22,1,0.36,1), transform 0.85s cubic-bezier(0.22,1,0.36,1); will-change: transform, opacity; }
.reveal.visible { opacity: 1; transform: translateY(0); will-change: auto; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}
.scroll-hint { animation: bounce 1.8s ease-in-out infinite; color: var(--accent); }

/* ─── NAVIGATION ─── */
.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(15,23,42,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-subtle); }
.nav-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.nav-logo { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px; color: var(--text-primary); text-decoration: none; margin-right: auto; }
.nav-logo span { color: var(--accent); }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu > a { color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; position: relative; }
.nav-menu > a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.2s ease; }
.nav-menu > a:hover { color: var(--text-primary); }
.nav-menu > a:hover::after { width: 100%; }
.nav-menu > a[aria-current="page"] { color: var(--text-primary); }
.nav-menu > a[aria-current="page"]::after { width: 100%; }
/* Prevent underline animation on the CTA button inside nav */
.nav-menu > a.btn-primary::after { display: none !important; }
.lang-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.lang-toggle-btn:hover { color: var(--text-primary); border-color: var(--accent-light); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; }

/* ─── FOOTER ─── */
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--accent); padding: 48px 0; margin-top: 96px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; flex-wrap: wrap; }
.footer-left p { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.footer-copy { margin-top: 16px !important; }
.footer-right { display: flex; flex-direction: column; gap: 12px; }
.footer-right a { color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.footer-right a:hover { color: var(--accent-light); }

/* ─── STATS BAR ─── */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item { padding: 24px 16px; text-align: center; border-right: 1px solid var(--border-subtle); }
.stat-item:last-child { border-right: none; }
.stat-num   { display: block; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 24px; color: var(--accent); }
.stat-label { display: block; font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ─── CARDS (shared) ─── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { border-color: var(--accent-light); box-shadow: 0 6px 24px rgba(99,102,241,0.12); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }
.hero h1 { font-size: clamp(32px, 4.5vw, 62px); }
.hero-sub { font-size: 17px; max-width: 540px; margin: 24px auto 0; color: var(--text-secondary); }
.hero-buttons { display: flex; gap: 16px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.hero-coming { margin-top: 48px; font-size: 13px; color: var(--text-muted); font-style: italic; }
.scroll-indicator { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); }

/* ─── WHY SECTION ─── */
.why-grid { display: grid; grid-template-columns: 40% 60%; gap: 80px; align-items: start; }
.why-headline { font-size: clamp(20px, 2.4vw, 30px); margin-bottom: 20px; }
.why-body { color: var(--text-secondary); font-size: 16px; line-height: 1.8; }
.why-cards { display: flex; flex-direction: column; gap: 16px; }
.why-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, opacity 0.85s cubic-bezier(0.22,1,0.36,1), transform 0.85s cubic-bezier(0.22,1,0.36,1);
}
.why-card:hover { border-color: var(--accent-light); border-left-color: var(--accent); box-shadow: 0 6px 24px rgba(99,102,241,0.12); }
.why-card-icon { flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.why-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.why-card p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* ─── SECTION HEADERS (centered) ─── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header .tag { margin-bottom: 16px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { max-width: 560px; margin: 0 auto; }

/* ─── PORTFOLIO TEASER / PORTFOLIO PAGE ─── */
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.portfolio-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, opacity 0.85s cubic-bezier(0.22,1,0.36,1), transform 0.85s cubic-bezier(0.22,1,0.36,1);
  cursor: pointer;
}
.portfolio-card:hover { border-color: var(--accent-light); box-shadow: 0 6px 24px rgba(99,102,241,0.12); }
.portfolio-img {
  height: 280px;
  background: var(--bg-tertiary);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden;
}
.portfolio-img-teaser {
  height: 260px;
  background: var(--bg-tertiary);
  position: relative;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}
.portfolio-preview-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg-tertiary);
}
.portfolio-preview-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 100%;
  border: none;
  pointer-events: none;
  transform-origin: top left;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.portfolio-preview-wrap iframe.loaded { opacity: 1; }

/* Portfolio screens: 1920×1080, scaled via zoom (crisp) */
.portfolio-screen .portfolio-preview-wrap {
  border-radius: 15px;
}
.portfolio-screen .portfolio-preview-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  border: none;
  pointer-events: none; /* JS enables when screen is flat */
  /* zoom set by JS — no transform-origin needed */
  opacity: 0;
  transition: opacity 0.4s ease;
}
.portfolio-screen .portfolio-preview-wrap iframe.loaded {
  opacity: 1;
}
.portfolio-screen.interactive {
  border-color: rgba(99,102,241,0.55);
  cursor: default;
}
.portfolio-screen.interactive .portfolio-preview-wrap::after {
  content: 'Défiler pour explorer';
}
html[lang="en"] .portfolio-screen.interactive .portfolio-preview-wrap::after {
  content: 'Scroll to explore';
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.82);
  color: var(--text-secondary);
  font-size: 11px;
  font-family: 'Instrument Sans', sans-serif;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  pointer-events: none;
  opacity: 1;
  transition: opacity 1s ease 2s; /* fade out after 2s */
  white-space: nowrap;
}
.portfolio-screen.interactive.hint-gone .portfolio-preview-wrap::after {
  opacity: 0;
}
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(99,102,241,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay a { color: #fff; font-weight: 500; font-size: 15px; text-decoration: none; }
.portfolio-body { padding: 24px; }
.portfolio-body h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.portfolio-body p { font-size: 14px; color: var(--text-secondary); }
.portfolio-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ─── PRICING ─── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; max-width: 960px; margin: 0 auto; }
.pricing-card-wrapper { position: relative; display: flex; flex-direction: column; }
.pricing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  position: relative;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, opacity 0.85s cubic-bezier(0.22,1,0.36,1), transform 0.85s cubic-bezier(0.22,1,0.36,1);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pricing-card:hover { border-color: var(--accent-light); box-shadow: 0 6px 24px rgba(99,102,241,0.12); }
.pricing-card.featured { border: 2px solid var(--accent); box-shadow: 0 0 48px rgba(99,102,241,0.22); }
/* Spacer so cards without a badge align their tier-label at the same height */
.pricing-badge-spacer { height: 34px; }
.pricing-badge-above {
  text-align: center;
  margin-bottom: 8px;
}
.pricing-tier-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.pricing-price {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 30px;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
  white-space: nowrap;
}
.pricing-price .suffix {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
}
.pricing-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}
.pricing-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; flex: 1; }
.pricing-feature { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.pricing-feature.included { color: var(--text-primary); }
.pricing-feature svg { flex-shrink: 0; }
.pricing-note { font-style: italic; font-size: 13px; color: var(--text-muted); margin-top: 16px; }
.pricing-price-row { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.pricing-price-row .pricing-price,
.pricing-price-row .pricing-original-price { margin-bottom: 0; }
.pricing-original-price { font-size: 16px; color: var(--text-muted); text-decoration: line-through; }
.pricing-intro-note { font-size: 12px; color: var(--accent-light); font-style: italic; margin-top: 4px; margin-bottom: 8px; }

/* ─── PROCESS TIMELINE ─── */
.process-section { padding: 64px 0; }
.process-section h2 { text-align: center; margin-bottom: 48px; }
.process-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: center;
}
.process-step { flex: 1; max-width: 220px; text-align: center; }
.process-circle {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  margin: 0 auto 12px;
}
.process-step h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.process-step p { font-size: 13px; color: var(--text-secondary); }
.process-arrow {
  font-size: 20px;
  color: var(--accent);
  margin-top: 10px;
  flex-shrink: 0;
}

/* ─── FAQ ─── */
.faq-list { max-width: 760px; margin: 0 auto; }
details { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; background: var(--bg-secondary); }
summary { padding: 20px 24px; cursor: pointer; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 20px; color: var(--accent); }
details[open] summary::after { content: '−'; }
.faq-answer { padding: 0 24px 20px; color: var(--text-secondary); font-size: 15px; line-height: 1.7; }

/* ─── CTA BANNER ─── */
.cta-banner {
  background: var(--bg-secondary);
  text-align: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner .container { position: relative; }
.cta-banner h2 { margin-bottom: 16px; }
.cta-banner p { max-width: 480px; margin: 0 auto 32px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ─── CONTACT ─── */
.contact-grid { display: grid; grid-template-columns: 45% 55%; gap: 80px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 32px; }
.contact-info h2 { margin-bottom: 8px; }
.contact-rows { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.contact-row { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--text-secondary); }
.contact-row a { color: var(--text-secondary); text-decoration: none; }
.contact-row a:hover { color: var(--accent-light); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  width: 100%;
  transition: border-color 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); outline: none; }
.form-group select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.form-group select option { background: var(--bg-secondary); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-submit { width: 100%; font-family: 'Instrument Sans', sans-serif; font-weight: 500; font-size: 15px; padding: 14px; }
.form-success { text-align: center; padding: 60px 32px; }
.success-icon { width: 56px; height: 56px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; margin: 0 auto 24px; }
.form-success h3 { font-family: 'Syne', sans-serif; font-size: 22px; margin-bottom: 12px; }

/* ─── PAGE HERO (non-home pages) ─── */
.page-hero { padding-top: 72px; padding-bottom: 56px; text-align: center; }
.page-hero h1 { font-size: clamp(26px, 3.2vw, 44px); margin-bottom: 14px; }
.page-hero p  { font-size: 15px; max-width: 520px; margin: 0 auto; }

/* ─── PORTFOLIO SCREENS (3D scroll) ─── */
.portfolio-project-section {
  padding: 80px 0 100px;
  border-bottom: 1px solid var(--border-subtle);
}
.portfolio-project-section:last-of-type {
  border-bottom: none;
  padding-bottom: 60px;
}
.portfolio-project-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 44px;
}
.portfolio-project-header h2 {
  font-size: clamp(24px, 3vw, 40px);
  margin-bottom: 10px;
}
.portfolio-screen-scene {
  display: flex;
  justify-content: center;
  padding: 0 16px;
}
.portfolio-screen {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #0d0d1a;
  border: 2px solid rgba(99,102,241,0.35);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(99,102,241,0.08),
    0 9px 20px rgba(0,0,0,0.4),
    0 37px 37px rgba(0,0,0,0.3),
    0 84px 50px rgba(0,0,0,0.18),
    0 0 80px rgba(99,102,241,0.07);
  transform: perspective(1200px) rotateX(18deg) scale(1.06);
  will-change: transform;
}
.portfolio-project-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.portfolio-project-footer .btn-ghost { padding: 8px 20px; font-size: 14px; }

/* ─── PORTFOLIO CALLOUT ─── */
.portfolio-callout {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  max-width: 640px;
  margin: 56px auto 0;
  text-align: center;
}
.portfolio-callout p { margin-bottom: 24px; }

/* ─── PRICING TEASER (home) ─── */
.pricing-teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pricing-teaser-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, opacity 0.85s cubic-bezier(0.22,1,0.36,1), transform 0.85s cubic-bezier(0.22,1,0.36,1);
}
.pricing-teaser-card:hover { border-color: var(--accent-light); box-shadow: 0 6px 24px rgba(99,102,241,0.12); }
.pricing-teaser-card.featured { border: 2px solid var(--accent); position: relative; }
.pricing-teaser-card .pricing-tier-label { margin-bottom: 8px; }
.pricing-teaser-price { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 26px; color: var(--text-primary); margin-bottom: 8px; white-space: nowrap; }
.section-cta { text-align: center; margin-top: 48px; }

/* ─── PHONE MOCKUP (portfolio, mobile only) ─── */
.portfolio-phone { display: none; width: 280px; margin: 0 auto; }
.phone-shell {
  background: #10101f;
  border: 1.5px solid rgba(99,102,241,0.45);
  border-radius: 42px;
  padding: 14px 9px 22px;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(99,102,241,0.08),
    0 24px 56px rgba(0,0,0,0.55),
    0 4px 16px rgba(0,0,0,0.4),
    0 0 64px rgba(99,102,241,0.07);
}
/* left volume buttons */
.phone-shell::before {
  content: '';
  position: absolute;
  top: 72px;
  left: -3px;
  width: 3px;
  height: 52px;
  background: rgba(99,102,241,0.3);
  border-radius: 2px 0 0 2px;
  box-shadow: 0 34px 0 rgba(99,102,241,0.3);
}
/* right power button */
.phone-shell::after {
  content: '';
  position: absolute;
  top: 90px;
  right: -3px;
  width: 3px;
  height: 38px;
  background: rgba(99,102,241,0.3);
  border-radius: 0 2px 2px 0;
}
.phone-notch {
  width: 72px;
  height: 22px;
  background: #08081a;
  border-radius: 0 0 16px 16px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.phone-speaker {
  width: 28px;
  height: 4px;
  background: #1e1e38;
  border-radius: 2px;
}
.phone-camera {
  width: 7px;
  height: 7px;
  background: #1a1a32;
  border-radius: 50%;
  border: 1px solid rgba(99,102,241,0.2);
}
.phone-screen {
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 390 / 844;
  background: var(--bg-tertiary);
}
.phone-screen .portfolio-preview-wrap { border-radius: 0; }
.phone-screen .portfolio-preview-wrap iframe {
  width: 390px;
  height: 844px;
  pointer-events: auto;
  transform-origin: top left;
  /* CSS default so the iframe is never shown unscaled before JS runs.
     262px inner width (280px shell − 18px padding) / 390px viewport = 0.672 */
  transform: scale(0.672);
  /* Override the base rule's opacity: 0 — phone iframes are always visible */
  opacity: 1;
  transition: none;
}
.phone-home-bar {
  width: 68px;
  height: 4px;
  background: rgba(255,255,255,0.14);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ─── RESPONSIVE BREAKPOINTS ─── */
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .two-col,
  .three-col,
  .four-col,
  .pricing-grid,
  .portfolio-grid,
  .contact-grid,
  .why-grid { grid-template-columns: 1fr !important; }
  .pricing-teaser-grid { grid-template-columns: 1fr !important; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--border-subtle); }
  .stat-item:nth-last-child(-n+2) { border-bottom: none; }
  .portfolio-project-section { padding: 56px 0 64px; }
  .portfolio-screen { display: none; }
  .portfolio-phone  { display: block; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .process-row { flex-direction: column; align-items: center; }
  .process-arrow { transform: rotate(90deg); }
  .form-row { grid-template-columns: 1fr; }
  .cta-buttons { flex-direction: column; align-items: center; }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .section { padding: 80px 0; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .pricing-teaser-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── MOBILE BOTTOM NAV ─── */
.mobile-bottom-nav { display: none; }

@keyframes iconBounce {
  0%,100% { transform: translateY(0); }
  20%      { transform: translateY(-5px); }
  40%      { transform: translateY(0); }
  60%      { transform: translateY(-2px); }
  80%      { transform: translateY(0); }
}

@media (max-width: 768px) {
  /* Disable backdrop-filter on nav — it clips fixed children to the nav's own height */
  .site-nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg-primary); }
  /* Hamburger + overlay nav replaced by bottom nav */
  .nav-toggle { display: none !important; }
  .nav-menu   { display: none !important; }
  /* Push page content above the bottom pill */
  body { padding-bottom: 92px; }

  /* ── Pill container ── */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 20px;
    left: 16px;
    right: 16px;
    z-index: 300;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 6px 4px;
    justify-content: space-around;
    align-items: stretch;
    box-shadow:
      0 4px 6px rgba(0,0,0,0.3),
      0 12px 28px rgba(0,0,0,0.45),
      0 0 0 1px rgba(99,102,241,0.06);
  }

  /* ── Each item (link or button) ── */
  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px 14px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: var(--text-muted);
    font-family: 'Instrument Sans', sans-serif;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-nav-item.active { color: var(--accent); }

  /* ── Icon ── */
  .mobile-nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .mobile-nav-icon svg { width: 22px; height: 22px; }
  .mobile-nav-item.active .mobile-nav-icon svg {
    animation: iconBounce 0.5s ease forwards;
  }

  /* ── Label ── */
  .mobile-nav-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
  }

  /* ── Underline — width set via --lineWidth by JS ── */
  .mobile-nav-item::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    height: 2px;
    width: 0;
    background: var(--accent);
    border-radius: 1px;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .mobile-nav-item.active::after { width: var(--lineWidth, 0px); }
}

/* ─── ROI CALCULATOR ─── */
.roi-section {
  padding: 56px 0 96px;
}
.roi-headline {
  text-align: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 3.5vw, 38px);
  margin-bottom: 24px;
}
.slider-wrap {
  max-width: 680px;
  margin: 0 auto 24px;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-secondary);
}
.slider-header span:last-child {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--accent-light);
}
/* Range input — filled track via CSS variable --fill */
#contractSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  margin-bottom: 8px;
  background: linear-gradient(
    to right,
    var(--accent) var(--fill, 42.86%),
    rgba(255,255,255,0.1) var(--fill, 42.86%)
  );
}
#contractSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.35);
  cursor: grab;
  transition: box-shadow 0.15s ease;
}
#contractSlider::-webkit-slider-thumb:active {
  cursor: grabbing;
  box-shadow: 0 0 0 6px rgba(99,102,241,0.25);
}
#contractSlider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.35);
  cursor: grab;
}
#contractSlider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
}
.slider-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
/* Calc grid */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  max-width: 680px;
  margin: 0 auto 20px;
}
.calc-cell {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 24px;
  text-align: center;
  flex: 1 1 160px;
  transition: border-color 0.2s ease;
}
.calc-cell:hover { border-color: rgba(99,102,241,0.4); }
.calc-label {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.calc-number {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(17px, 2vw, 22px);
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.15;
  transition: color 0.2s ease;
  word-break: break-all;
}
.calc-number.result { color: var(--accent-light); }
.calc-sub {
  font-size: 12px;
  color: var(--text-secondary);
}
.calc-operator {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-secondary);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.calc-op-sub {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
/* Calc footer */
.calc-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 28px;
}
.calc-package { text-align: center; }
.calc-package p:first-child {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.calc-package-price {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--text-primary) !important;
}
.roi-badge {
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 10px;
  padding: 12px 20px;
  text-align: center;
  line-height: 1.5;
}
.roi-badge strong {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--accent-light);
  display: block;
  margin-top: 2px;
}
@media (max-width: 640px) {
  .roi-section { padding: 48px 0; }
  .roi-headline { margin-bottom: 20px; }
  .slider-wrap { margin-bottom: 20px; }
  .calc-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }
  .calc-operator { flex-direction: row; gap: 6px; }
  .calc-operator { font-size: 16px; }
  .calc-cell { padding: 14px 18px; }
  .calc-footer { padding: 14px 18px; gap: 16px; }
}
