/* ═══════════════════════════════════════════════
   CINEMATIC LAYER — premium.css
   Global enhancements. Loads last. Overrides only
   what needs upgrading. Never touches hero/nav/menu.
   ═══════════════════════════════════════════════ */

/* ── 01. Text selection ── */
::selection {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.problem ::selection,
.process ::selection,
.casestudy ::selection,
.intake ::selection,
.contact ::selection,
.cta-final ::selection,
footer ::selection {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

/* ── 02. Film grain overlay ── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 160px;
  animation: grain-shift 8s linear infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 2%); }
  50%  { transform: translate(2%, -2%); }
  75%  { transform: translate(-1%, 1%); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

/* ── 03. Scroll progress bar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: var(--scroll-pct, 0%);
  background: linear-gradient(90deg, var(--olive) 0%, rgba(255, 255, 255, 0.10) 100%);
  z-index: 9998;
  pointer-events: none;
  transform-origin: left;
  transition: width 0.08s linear;
}

/* ── 04. Custom cursor ── */
.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--olive);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, opacity 0.3s ease;
}

.cursor-ring {
  position: fixed;
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9996;
  transform: translate(-50%, -50%);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease,
              opacity 0.3s ease;
}

.cursor-dot.hovering {
  width: 10px;
  height: 10px;
  background: var(--olive);
}

.cursor-ring.hovering {
  width: 54px;
  height: 54px;
  border-color: var(--olive);
  opacity: 0.55;
}

.has-cursor,
.has-cursor * {
  cursor: none !important;
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring { display: none !important; }
}

/* ── 05. Scroll reveal ── */
.tm-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.tm-reveal.tm-revealed {
  opacity: 1;
  transform: none;
}

/* ── 06. Navbar enhanced ── */
.navbar {
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 8px 32px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

/* ── 07. Button: inner shine ── */
.btn-primary {
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.06), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
  pointer-events: none;
}

.btn-primary:hover {
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.07);
}

/* No glow on dark section buttons — black absorbs nothing */
.problem .btn-primary,
.process .btn-primary,
.intake .btn-primary,
.cta-final .btn-primary,
.footer-cta-strip .btn-primary,
.mobile-cta-bar .btn-primary,
.navbar .btn.btn-primary,
.mobile-overlay .btn.btn-primary {
  box-shadow: none;
}

.problem .btn-primary:hover,
.process .btn-primary:hover,
.intake .btn-primary:hover,
.cta-final .btn-primary:hover,
.mobile-cta-bar .btn-primary:hover {
  box-shadow: none;
}

.navbar .btn.btn-primary::after,
.mobile-overlay .btn.btn-primary::after,
.mobile-cta-bar .btn-primary::after {
  display: none;
}

/* ── 08. Logos: section label refinement ── */
.logos-header-label {
  letter-spacing: 0.18em;
}

/* ── 09. Problem: ambient stat backdrop ── */
.problem {
  isolation: isolate;
}

.problem-container {
  position: relative;
}

.problem-container::after {
  content: "96%";
  position: absolute;
  right: -20px;
  top: -80px;
  font-size: clamp(10rem, 22vw, 20rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.02);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

.problem-intro,
.problem-list,
.problem-close {
  position: relative;
  z-index: 1;
}

/* ── 10. Problem item: border reveal more vivid ── */
.problem-item {
  cursor: default;
}

/* ── 11. Services: heading size push ── */
.services-heading {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
}

/* ── 12. Process: vertical connector line ── */
.process-steps {
  position: relative;
}

.process-steps::before {
  content: "";
  position: absolute;
  left: 35px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.05) 8%,
    rgba(255, 255, 255, 0.05) 92%,
    transparent
  );
  pointer-events: none;
}

@media (max-width: 900px) {
  .process-steps::before { left: 25px; }
}

@media (max-width: 600px) {
  .process-steps::before { display: none; }
}

/* ── 13. Proof: number typography push ── */
.proof-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
}

/* ── 14. Case Study: live pulsing dot on tag ── */
.casestudy-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.casestudy-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--olive);
  flex-shrink: 0;
  opacity: 0.85;
}

/* ── 15. Transformation: dramatic word scale (desktop only — mobile handled in transformation.css) ── */
@media (min-width: 601px) {
  .transformation-before-word,
  .transformation-after-word {
    font-size: clamp(2rem, 5.5vw, 3.8rem);
  }

  .transformation-row {
    min-height: 96px;
  }
}

/* ── 16. Transformation: arrow more cinematic ── */
@media (min-width: 601px) {
  .transformation-arrow {
    font-size: 1.4rem;
    letter-spacing: -0.02em;
  }
}

/* ── 16b. Transformation: sequential word reveal ── */
.transformation-row.tr-ready .transformation-before-word {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.transformation-row.tr-ready .transformation-arrow {
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.transformation-row.tr-ready .transformation-after-word {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.transformation-before-word.tr-in {
  opacity: 1 !important;
  transform: none !important;
}

.transformation-arrow.tr-in {
  opacity: 0.5 !important;
  transform: none !important;
}

.transformation-after-word.tr-in {
  opacity: 1 !important;
  transform: none !important;
}

/* ── 17. Founder: dark section ambient glow enhance ── */
.founder-ambient {
  width: 800px;
  height: 800px;
  opacity: 0.8;
}

/* ── 17b. Intake: directional stagger reveal ── */
.intake-rule--yes.tm-reveal {
  transform: translateX(-24px);
}

.intake-rule--no.tm-reveal {
  transform: translateX(24px);
}

.intake-rule--yes.tm-revealed,
.intake-rule--no.tm-revealed {
  transform: none;
}

/* ── 18. Team: card border on hover more vivid ── */
.team-card:hover .team-info {
  border-top-color: var(--olive);
}

.team-grid {
  border: 2px solid var(--border-light);
}

/* ── 19. CTA: ambient typographic word backdrop ── */
.cta-final {
  isolation: isolate;
}

.cta-final-container {
  position: relative;
  z-index: 2;
}

.cta-final-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.cta-final-backdrop-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: cta-marquee 36s linear infinite;
  will-change: transform;
}

.cta-final-backdrop-track span {
  font-size: clamp(6rem, 18vw, 16rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  user-select: none;
  line-height: 1;
  flex-shrink: 0;
}

.cta-final-backdrop-track span:nth-child(even) {
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.01);
  font-size: clamp(2rem, 5vw, 4rem);
}

@keyframes cta-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .cta-final-backdrop-track { animation: none; }
}

/* ── 20. Footer masthead: slightly more visible stroke ── */
.footer-masthead-text {
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.04);
}

/* ── 22. Section top gradient line: dark sections ── */
.process::before,
.problem::before,
.casestudy::before,
.cta-final::after {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.10) 50%, transparent 100%);
}

/* ── 23. Proof footer CTA: arrow animation ── */
.proof-footer-cta {
  position: relative;
}

.proof-footer-cta::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.proof-footer-cta:hover::after {
  transform: scaleX(1);
}

/* ── 24. Mobile CTA bar: visible blur background ── */
.mobile-cta-bar {
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

/* ── 25. Global: smoother focus rings ── */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 4px;
  border-radius: 0;
}

/* ── 26. Scrollbar: branded ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface-inverse); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.10); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--olive); }

/* ════════════════════════════════════════
   27. RESPONSIVE SYSTEM — Full pass
   ════════════════════════════════════════ */

/* ── Large desktop ≥ 1400px ── */
@media (min-width: 1400px) {
  :root {
    --layout-max: 1300px;
    --gutter: 32px;
  }
}

/* ── Tablet 768–1024px ── */
@media (max-width: 1024px) and (min-width: 769px) {
  :root {
    --space-96: 72px;
    --space-64: 48px;
  }

  .services-container {
    grid-template-columns: 260px 1fr;
    gap: 0 var(--space-48);
  }

  .casestudy-body {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-48);
  }

  .founder-container {
    gap: var(--space-48);
  }

  .contact-container {
    grid-template-columns: 300px 1fr;
    gap: var(--space-48);
  }

  .footer-top {
    grid-template-columns: 200px 1fr 1fr 1fr;
    gap: var(--space-48);
  }

  .proof-row {
    gap: var(--space-32);
  }
}

/* ── Tablet 768px ── */
@media (max-width: 900px) {
  .casestudy-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Mobile ≤ 768px: global spacing compression ── */
@media (max-width: 768px) {
  .logos-rows {
    padding-bottom: 24px;
  }

  .intake-container {
    gap: var(--space-48);
  }

  .contact-container {
    gap: var(--space-48);
  }

  .faq-container {
    gap: var(--space-32);
  }
}

/* ── Mobile ≤ 600px: comprehensive ── */
@media (max-width: 600px) {
  /* Global section breathing */
  section {
    overflow-x: hidden;
  }

  /* Casestudy */
  .casestudy-card-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .casestudy-card {
    padding: var(--space-24);
  }

  .casestudy-more {
    margin-top: var(--space-48);
  }

  /* Testimonials: single-column cards */
  .testimonials-grid {
    gap: 1px;
  }

  /* Intake */
  .intake-body {
    font-size: 0.92rem;
  }

  /* FAQ */
  .faq-answer-text {
    font-size: 0.88rem;
  }

  /* Contact form */
  .contact-steps {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  /* Footer CTA strip */
  .footer-cta-strip-label {
    font-size: 1rem;
  }

  /* Footer bottom row stacking */
  .footer-social,
  .footer-legal {
    gap: var(--space-16);
  }

  /* Process connector line hidden on mobile (set in process.css already) */

  /* Proof rows: tighter */
  .proof-num {
    font-size: clamp(2.4rem, 10vw, 4rem);
  }

  /* CTA final */
  .cta-final-heading {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }
}

/* ── Small phone ≤ 380px ── */
@media (max-width: 380px) {
  :root {
    --gutter: 14px;
  }

  .btn {
    padding: 13px 22px;
    font-size: 0.82rem;
  }

  .mobile-nav-t {
    font-size: 1.6rem;
  }

  .casestudy-card-metrics {
    grid-template-columns: 1fr;
  }

  .form-checkbox-group {
    grid-template-columns: 1fr;
  }

  .footer-top {
    gap: var(--space-24);
  }
}

/* ── iOS Safe area: bottom content ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    .contact-details,
    .intake-slots {
      padding-bottom: 0;
    }
  }
}


