/* ==========================================================================
   TAHSANGROW — SHARED DESIGN SYSTEM & MOTION TOKENS (PHASE 1)
   Inspired by WebAngles reference · Strictly White (#FFFFFF), Slate & Brand Blue (#1D5CFF)
   Font: DM Sans across all headings, body, buttons, chips, and navigation
   ========================================================================== */

:root {
  /* 1. Typography (Section 5 — DM Sans everywhere) */
  --font-heading: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: var(--font-body);
  --serif: var(--font-heading);
  --mono: var(--font-body);

  /* 2. Extracted Site Colours (Section 6 — Never invent a new blue) */
  --bg: #FFFFFF;
  --bg-page: #F8FAFC;
  --bg-soft: #EFF6FF;
  --surface: #FFFFFF;
  --text: #0F172A;
  --text-heading: #0F172A;
  --text-body: #475569;
  --text-muted: #64748B;
  --text-on-dark: #F8FAFC;

  --brand: #1D5CFF;
  --brand-strong: #134BDF;
  --brand-soft: #EFF6FF;
  --brand-sky: #38BDF8;
  --accent: #1D5CFF;
  --accent-hover: #134BDF;
  --accent-soft: #EFF6FF;

  --navy: #040A18;
  --bg-dark: #040A18;
  --border: rgba(29, 92, 255, 0.12);
  --border-strong: rgba(29, 92, 255, 0.28);
  --divider: #E2E8F0;
  --glow: rgba(29, 92, 255, 0.28);

  /* 3. Shape & Depth Tokens (Section 6) */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-card: 0 10px 40px -12px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 20px 48px -12px rgba(29, 92, 255, 0.14);
  --shadow-glow: 0 0 60px -10px var(--glow);

  /* 4. Motion Tokens (Section 6 & 7) */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.25s;
  --dur-base: 0.6s;
  --dur-slow: 1s;
  --reveal-distance: 40px;
}

/* Mobile motion tuning (Section 9: tighter reveal distance, faster 60fps transitions) */
@media (max-width: 768px) {
  :root {
    --reveal-distance: 16px;
    --dur-fast: 0.18s;
    --dur-base: 0.38s;
    --dur-slow: 0.6s;
  }
}

/* ==========================================================================
   GLOBAL DM SANS TYPOGRAPHY ENFORCEMENT (Section 5)
   ========================================================================== */
html,
body,
button,
input,
select,
textarea,
.btn,
.tag,
.chip,
.eyebrow,
.sec-tag,
.nav-links a,
.mega-item-title,
.mega-item-desc,
.mega-col-title,
.footer,
.work-meta,
.pf-cat,
.pf-title,
.wa-ai-card-title,
.wa-ai-card-points li,
.wa-ai-card-cta,
[class*="title"],
[class*="heading"],
[class*="badge"],
[class*="label"],
[class*="meta"] {
  font-family: var(--font-body) !important;
}

h1, h2, h3, h4, h5, h6,
.hero h1,
.page-hero h1,
.p-hero h1,
.sec-head h2,
.cta-band h2 {
  font-family: var(--font-heading) !important;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

/* Refined Hero Heading Scale for Inner Pages (Services, About, Work, Packages, Team, Contact & all 14 Service Sub-Pages) */
.page-hero h1,
.p-hero h1 {
  font-size: clamp(2.35rem, 4.6vw, 4.1rem) !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.03em !important;
  max-width: 20ch;
  margin-bottom: 1.35rem !important;
  text-shadow: none !important;
}

/* Remove background text shadows from all headings, stats strips, and hero containers */
h1, h2, h3, h4, h5, h6,
.stat strong,
.stat span,
.stats-strip,
.stats-strip * {
  text-shadow: none;
}

.page-hero p,
.p-hero-sub {
  font-size: clamp(0.98rem, 1.15vw, 1.08rem) !important;
  line-height: 1.68 !important;
  max-width: 60ch;
  text-shadow: none !important;
}

@media (max-width: 640px) {
  .page-hero h1,
  .p-hero h1 {
    font-size: clamp(2.05rem, 6.8vw, 2.55rem) !important;
    line-height: 1.1 !important;
  }
}

body {
  font-size: 16px;
  line-height: 1.62;
  color: var(--text);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  color: var(--text-body);
  line-height: 1.65;
}

/* ==========================================================================
   7.10 PAGE TRANSITION & 7.1 NAVBAR LOAD / CONDENSE (Section 7.1, 7.8, 7.10)
   ========================================================================== */
html.js body {
  opacity: 1;
}

/* Navbar stays immediately visible from first paint (no opacity-0 flash on cold load) */
html.js .header {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Navbar condensed blurred state past 80px scroll (Section 7.8) */
.header.light.stuck,
.header.light.tg-nav-condensed {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  border-bottom: 1px solid rgba(29, 92, 255, 0.1) !important;
  box-shadow: 0 8px 30px -12px rgba(15, 23, 42, 0.06) !important;
  transition: background var(--dur-fast) var(--ease-out),
              padding var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform 0.35s var(--ease-out) !important;
}

.header.dark.stuck,
.header.dark.tg-nav-condensed {
  background: rgba(4, 10, 24, 0.78) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Nav link left-to-right underline draw (Section 7.5 & 8.1) */
.nav-links > li > a,
.mega-item-title {
  position: relative;
}

.nav-links > li > a::after {
  content: "";
  position: absolute;
  left: 1rem !important;
  right: 1rem !important;
  width: auto !important;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0) !important;
  transform-origin: left center;
  transition: transform 0.28s var(--ease-out) !important;
  pointer-events: none;
}

.nav-links > li > a:hover::after,
.nav-links > li > a.active::after {
  transform: scaleX(1) !important;
}

/* Home Page / Light Header: Blue active text & blue underline */
.header.light .nav-links > li > a.active,
.mega-item[aria-current="page"] .mega-item-title {
  color: var(--brand) !important;
}

.header.light .nav-links > li > a::after {
  background: var(--brand) !important;
}

/* All Other Pages / Dark Mode Header: White text, white active state & white underline */
.header.dark .nav-links > li > a {
  color: rgba(255, 255, 255, 0.85) !important;
}

.header.dark .nav-links > li > a:hover,
.header.dark .nav-links > li > a.active {
  color: #FFFFFF !important;
}

.header.dark .nav-links > li > a::after,
.header.dark .nav-links > li > a:hover::after,
.header.dark .nav-links > li > a.active::after {
  background: #FFFFFF !important;
}

/* Services Mega-Menu 0.25s fade + slide-down & column stagger (Section 8.1) */
.has-mega-menu .mega-menu {
  background-color: #FFFFFF !important;
  background: linear-gradient(168deg, #FFFFFF 0%, #F8FBFF 48%, #F1F6FF 100%) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: opacity 0.25s var(--ease-out),
              transform 0.25s var(--ease-out),
              visibility 0.25s !important;
}

.has-mega-menu .mega-col,
.has-mega-menu .mega-featured-card {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity 0.26s var(--ease-out), transform 0.26s var(--ease-out);
}

.has-mega-menu:hover .mega-col,
.has-mega-menu:hover .mega-featured-card,
.has-mega-menu:focus-within .mega-col,
.has-mega-menu:focus-within .mega-featured-card,
.has-mega-menu.open .mega-col,
.has-mega-menu.open .mega-featured-card {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
}

.has-mega-menu:hover .mega-col:nth-child(1),
.has-mega-menu.open .mega-col:nth-child(1) { transition-delay: 0.02s; }
.has-mega-menu:hover .mega-col:nth-child(2),
.has-mega-menu.open .mega-col:nth-child(2) { transition-delay: 0.06s; }
.has-mega-menu:hover .mega-col:nth-child(3),
.has-mega-menu.open .mega-col:nth-child(3) { transition-delay: 0.10s; }
.has-mega-menu:hover .mega-col:nth-child(4),
.has-mega-menu.open .mega-col:nth-child(4) { transition-delay: 0.14s; }
.has-mega-menu:hover .mega-featured-card,
.has-mega-menu.open .mega-featured-card    { transition-delay: 0.18s; }

/* Mobile menu link stagger (0.06s apart, Section 7.8) */
.mobile-menu .mm-main-list > li,
.mobile-menu > .container > ul > li {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 0.36s var(--ease-out), transform 0.36s var(--ease-out);
}

.mobile-menu.open .mm-main-list > li,
.mobile-menu.open > .container > ul > li {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.mobile-menu.open .mm-main-list > li:nth-child(1),
.mobile-menu.open > .container > ul > li:nth-child(1) { transition-delay: 0.04s; }
.mobile-menu.open .mm-main-list > li:nth-child(2),
.mobile-menu.open > .container > ul > li:nth-child(2) { transition-delay: 0.09s; }
.mobile-menu.open .mm-main-list > li:nth-child(3),
.mobile-menu.open > .container > ul > li:nth-child(3) { transition-delay: 0.14s; }
.mobile-menu.open .mm-main-list > li:nth-child(4),
.mobile-menu.open > .container > ul > li:nth-child(4) { transition-delay: 0.19s; }
.mobile-menu.open .mm-main-list > li:nth-child(5),
.mobile-menu.open > .container > ul > li:nth-child(5) { transition-delay: 0.24s; }
.mobile-menu.open .mm-main-list > li:nth-child(6),
.mobile-menu.open > .container > ul > li:nth-child(6) { transition-delay: 0.29s; }
.mobile-menu.open .mm-main-list > li:nth-child(7),
.mobile-menu.open > .container > ul > li:nth-child(7) { transition-delay: 0.34s; }

/* ==========================================================================
   7.1 HERO LOAD SEQUENCE & HEADLINE MASK REVEAL (Instant First Paint, Zero Re-hide)
   ========================================================================== */
.tg-line-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.tg-line-inner {
  display: inline-block;
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

/* Hero Eyebrow, Subheadline, and CTA stay visible immediately on first paint */
html.js [data-hero-step] {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* Above-the-fold hero elements with .reveal never snap to opacity:0 when JS boots */
html.js .hero .reveal,
html.js .p-hero .reveal,
html.js .page-hero .reveal {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
}

/* ==========================================================================
   7.2 SCROLL REVEALS & STAGGER SYSTEM
   ========================================================================== */
html.js [data-anim="fade-up"],
html.js .reveal:not(.in):not(.tg-in) {
  opacity: 0;
  transform: translate3d(0, var(--reveal-distance), 0);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  transition-delay: calc(var(--stagger-idx, 0) * 0.045s);
}

html.js [data-anim="scale-up"] {
  opacity: 0;
  transform: translate3d(0, calc(var(--reveal-distance) * 0.75), 0) scale(0.97);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  transition-delay: calc(var(--stagger-idx, 0) * 0.045s);
}

html.js [data-anim="fade-up"].tg-in,
html.js [data-anim="scale-up"].tg-in,
html.js .reveal.in,
html.js .reveal.tg-in {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
}

/* Image Frame Scale-Down Reveal (1.08 -> 1 inside overflow:hidden rounded frame) */
html.js [data-anim-img] {
  overflow: hidden;
}

html.js [data-anim-img] > img {
  transform: scale(1.08);
  transition: transform 1.05s var(--ease-out);
}

html.js [data-anim-img].tg-in > img {
  transform: scale(1);
}

/* ==========================================================================
   7.3 SCROLL-LINKED STATEMENT TEXT REVEAL (SCRUB)
   ========================================================================== */
.tg-scrub-text .tg-scrub-word {
  display: inline-block;
  opacity: 0.16;
  transition: opacity 0.12s linear;
  will-change: opacity;
}

.tg-scrub-text .tg-scrub-word.is-lit {
  opacity: 1;
}

/* ==========================================================================
   7.4 MARQUEE / TICKER WITH EDGE MASK & PAUSE ON HOVER
   ========================================================================== */
.marquee,
.logo-strip,
.ticker-wrap,
.tg-marquee-mask {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.marquee:hover .marquee-track,
.ticker-wrap:hover .ticker-track,
.tg-marquee-mask:hover .tg-marquee-track {
  animation-play-state: paused !important;
}

/* ==========================================================================
   7.5 HOVER & MICRO-INTERACTIONS (BUTTONS, CARDS, CHIPS, PORTFOLIO)
   ========================================================================== */
/* Buttons: lift 2-3px, arrow shifts 4px right, active press scales 0.97 */
.btn,
.wa-ai-card-cta,
.cap-card-btn {
  transition: transform 0.28s var(--ease-out),
              background-color 0.28s var(--ease-out),
              border-color 0.28s var(--ease-out),
              color 0.28s var(--ease-out) !important;
}

.btn:hover,
.wa-ai-card-cta:hover {
  transform: translate3d(var(--mag-x, 0px), calc(var(--mag-y, 0px) - 2px), 0);
}

.btn:active,
.wa-ai-card-cta:active {
  transform: scale(0.97) !important;
}

.btn svg,
.wa-ai-card-cta svg,
.mega-featured-link svg {
  transition: transform 0.28s var(--ease-out);
}

.btn:hover svg,
.wa-ai-card-cta:hover svg,
.mega-featured-link:hover svg {
  transform: translate3d(4px, 0, 0);
}

/* Cards: translateY(-6px), blue border tint, soft cursor spotlight */
.wa-ai-card,
.bento-card,
.cap-card,
.price-card,
.team-card,
.value-card,
.svc-card,
.sys-card,
.lay-card,
.proc-step,
.pf-item,
.svc-group-card,
.story-card,
.testi-card {
  position: relative;
  transition: transform 0.38s var(--ease-out),
              border-color 0.35s var(--ease-out),
              box-shadow 0.38s var(--ease-out),
              background-color 0.35s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .wa-ai-card:hover,
  .bento-card:hover,
  .cap-card:hover,
  .price-card:hover,
  .team-card:hover,
  .value-card:hover,
  .svc-card:hover,
  .sys-card:hover,
  .lay-card:hover {
    transform: translate3d(0, -6px, 0);
    border-color: rgba(29, 92, 255, 0.32) !important;
    box-shadow: var(--shadow-card-hover);
  }

  #work #portfolioGrid .pf-item:hover,
  #work #portfolioGrid .pf-item:hover .pf-thumb,
  #work #portfolioGrid .pf-item:hover .pf-mockup,
  #work #portfolioGrid .pf-item:hover .pf-arrow {
    box-shadow: none !important;
  }

  /* Portfolio / project card image zoom 1.05x on hover */
  .pf-item .pf-thumb img,
  .wa-ai-card .wa-ai-card-media img,
  .team-card img {
    transition: transform 0.55s var(--ease-out);
  }

  .pf-item:hover .pf-thumb img,
  .wa-ai-card:hover .wa-ai-card-media img,
  .team-card:hover img {
    transform: scale(1.05);
  }
}

/* Chips / tags gentle blue tint on hover */
.chip,
.tag,
.sec-tag,
.eyebrow,
.stack-pill,
.pf-cat {
  transition: background-color 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out),
              color 0.25s var(--ease-out),
              transform 0.25s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .chip:hover,
  .tag:hover,
  .stack-pill:hover {
    background-color: var(--brand-soft);
    border-color: rgba(29, 92, 255, 0.28);
    color: var(--brand);
  }
}

/* Highlighted Pricing Tier subtle animated blue border glow (Section 7.5 & 7.9) */
.price-card.featured,
.price-card.popular,
.price-card.recommended {
  border-color: var(--brand) !important;
  box-shadow: 0 20px 55px -12px rgba(29, 92, 255, 0.22) !important;
}

/* ==========================================================================
   7.6 PROCESS STEPS CONNECTING LINE DRAW & 7.7 FAQ ACCORDION
   ========================================================================== */
.proc-step,
.process-step {
  position: relative;
}

.proc-step.tg-step-active,
.process-step.tg-step-active {
  border-color: rgba(29, 92, 255, 0.38) !important;
}

/* FAQ Accordion smooth height & 45deg icon rotation (Section 7.7) */
.faq-item .faq-a {
  transition: max-height 0.4s var(--ease-in-out), opacity 0.3s var(--ease-out);
}

.faq-item:not(.open) .faq-a {
  opacity: 0;
}

.faq-item.open .faq-a {
  opacity: 1;
  transition-delay: 0s, 0.1s;
}

.faq-item .faq-q svg,
.faq-item .faq-icon,
.faq-item .faq-plus {
  transition: transform 0.35s var(--ease-in-out), color 0.25s var(--ease-out);
}

.faq-item.open .faq-q svg,
.faq-item.open .faq-icon,
.faq-item.open .faq-plus {
  transform: rotate(45deg);
  color: var(--brand);
}

/* ==========================================================================
   7.9 AMBIENT BLUE GLOW BLOBS & GROUP-SPECIFIC SERVICE SUB-PAGE TOUCHES
   ========================================================================== */
.tg-ambient-glow {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 92, 255, 0.18) 0%, rgba(56, 189, 248, 0.08) 45%, transparent 72%);
  filter: blur(48px);
  will-change: transform, opacity;
  animation: tgBlobDrift 16s var(--ease-in-out) infinite alternate;
}

.tg-ambient-glow--secondary {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(29, 92, 255, 0.07) 50%, transparent 72%);
  animation-duration: 20s;
  animation-direction: alternate-reverse;
}

/* Stronger glow on dark navy hero/CTA sections & AI Automation pages */
.p-hero .tg-ambient-glow,
.page-hero .tg-ambient-glow,
.cta-band .tg-ambient-glow,
body[data-service-group="ai-automation"] .tg-ambient-glow {
  background: radial-gradient(circle, rgba(29, 92, 255, 0.32) 0%, rgba(56, 189, 248, 0.14) 48%, transparent 72%);
}

@keyframes tgBlobDrift {
  0% {
    transform: translate3d(-18px, -12px, 0) scale(0.96);
  }
  50% {
    transform: translate3d(16px, 14px, 0) scale(1.04);
  }
  100% {
    transform: translate3d(-8px, 20px, 0) scale(0.98);
  }
}

/* Group 1: Web Development — subtle floating browser/mockup frame */
body[data-service-group="web-dev"] .browser-frame,
body[data-service-group="web-dev"] .code-window,
body[data-service-group="web-dev"] .mock-window {
  animation: tgBrowserFloat 9s var(--ease-in-out) infinite alternate;
}

@keyframes tgBrowserFloat {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -8px, 0); }
}

/* Group 2: Video Editing — soft play-icon pulse on thumbnails */
body[data-service-group="video-editing"] .play-badge,
body[data-service-group="video-editing"] .video-play-btn,
body[data-service-group="video-editing"] [class*="play"] svg {
  animation: tgPlayPulse 2.8s var(--ease-in-out) infinite;
}

@keyframes tgPlayPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* Group 3: Graphic Design — gentle 3D tilt/lift on mockup cards */
@media (hover: hover) and (pointer: fine) {
  body[data-service-group="graphic-design"] .lay-card:hover,
  body[data-service-group="graphic-design"] .sys-card:hover,
  body[data-service-group="graphic-design"] .pf-item:hover {
    transform: translate3d(0, -6px, 0) rotate(-0.6deg);
  }
}

/* Group 4: AI Automation — pulsing node/connector accent */
body[data-service-group="ai-automation"] .chat-sim,
body[data-service-group="ai-automation"] .n8n-canvas {
  box-shadow: 0 0 60px -12px rgba(29, 92, 255, 0.26);
}

/* ==========================================================================
   8.5 FLAGSHIP CONTACT FORM & PROJECT INTAKE ARCHITECTURE (#contactForm)
   ========================================================================== */
form#contactForm,
form#contactForm.contact-form {
  position: relative;
  padding: 2.75rem 2.75rem 2.4rem;
  border-radius: 26px;
  background: #FFFFFF;
  border: 1px solid rgba(29, 92, 255, 0.14);
  box-shadow: 0 24px 64px -20px rgba(15, 23, 42, 0.08),
              0 4px 20px -4px rgba(29, 92, 255, 0.05);
  overflow: hidden;
}

form#contactForm.contact-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1D5CFF 0%, #38BDF8 55%, rgba(29, 92, 255, 0.08) 100%);
  pointer-events: none;
}

.cf-header {
  margin-bottom: 1.85rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #F1F5F9;
}

.cf-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: #EFF6FF;
  border: 1px solid rgba(29, 92, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1D5CFF;
  margin-bottom: 0.95rem;
}

.cf-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1D5CFF;
  box-shadow: 0 0 0 3px rgba(29, 92, 255, 0.18);
}

form#contactForm .cf-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0F172A;
}

form#contactForm .cf-subtitle {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: #475569;
}

form#contactForm .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

form#contactForm .field {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

form#contactForm .field label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
  color: #1E293B;
  transition: color 0.2s var(--ease-out);
}

form#contactForm .field:focus-within label {
  color: #1D5CFF;
}

.cf-req {
  color: #1D5CFF;
  font-weight: 700;
}

.cf-opt {
  font-size: 0.74rem;
  font-weight: 500;
  color: #94A3B8;
  margin-left: 2px;
}

form#contactForm .field input,
form#contactForm .field select,
form#contactForm .field textarea {
  width: 100%;
  padding: 0.92rem 1.1rem;
  border-radius: 14px;
  background-color: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  font-size: 0.94rem;
  font-weight: 500;
  color: #0F172A;
  transition: border-color 0.22s var(--ease-out),
              background-color 0.22s var(--ease-out),
              box-shadow 0.22s var(--ease-out);
}

form#contactForm .field select {
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.05rem center;
}

form#contactForm .field input:hover,
form#contactForm .field select:hover,
form#contactForm .field textarea:hover {
  border-color: #CBD5E1;
  background-color: #FFFFFF;
}

form#contactForm .field input:focus,
form#contactForm .field select:focus,
form#contactForm .field textarea:focus {
  border-color: #1D5CFF;
  background-color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(29, 92, 255, 0.1);
  outline: none;
}

form#contactForm .field input::placeholder,
form#contactForm .field textarea::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

form#contactForm .field textarea {
  min-height: 124px;
  line-height: 1.6;
}

form#contactForm .cf-submit-btn {
  width: 100%;
  height: 54px;
  margin-top: 0.35rem;
  border-radius: 14px;
  background: #1D5CFF;
  border: 1px solid #1D5CFF;
  color: #FFFFFF;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

form#contactForm .cf-submit-btn:hover {
  background: #134BDF;
  border-color: #134BDF;
}

.cf-trust-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1.25rem;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid #F1F5F9;
}

.cf-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.cf-trust-item svg {
  width: 14px;
  height: 14px;
  color: #1D5CFF;
  flex-shrink: 0;
}

/* Left-column "What happens next?" card */
.cf-next-card {
  margin-top: 2.25rem;
  padding: 1.75rem 1.85rem;
  background: #FFFFFF;
  border: 1px solid rgba(29, 92, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 12px 32px -16px rgba(15, 23, 42, 0.06);
}

.cf-next-title {
  margin: 0 0 1.15rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.02em;
}

.cf-next-steps {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cf-next-step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  font-size: 0.89rem;
  color: #475569;
  line-height: 1.55;
}

.cf-step-num {
  font-size: 0.74rem;
  font-weight: 700;
  color: #1D5CFF;
  background: #EFF6FF;
  border: 1px solid rgba(29, 92, 255, 0.16);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 1px;
}

@media (max-width: 640px) {
  form#contactForm,
  form#contactForm.contact-form {
    padding: 1.75rem 1.35rem 1.65rem;
    border-radius: 20px;
  }

  form#contactForm .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ==========================================================================
   9. ACCESSIBILITY & REDUCED MOTION (Section 9)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html.js [data-anim],
  html.js .reveal,
  html.js [data-hero-step],
  html.js .tg-line-inner,
  html.js [data-anim-img] > img,
  .tg-scrub-text .tg-scrub-word,
  .has-mega-menu .mega-col,
  .mobile-menu ul > li {
    opacity: 1 !important;
    transform: none !important;
  }

  .tg-ambient-glow {
    animation: none !important;
  }
}

/* Mobile 60fps Scroll & Slide Optimization: remove fixed-nav blur repaints, heavy blur filters & word-scrub overhead */
@media (max-width: 768px) {
  .header.light.stuck,
  .header.light.tg-nav-condensed {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .header.dark.stuck,
  .header.dark.tg-nav-condensed {
    background: rgba(4, 10, 24, 0.95) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .tg-ambient-glow {
    filter: none !important;
    animation: none !important;
    will-change: auto !important;
    opacity: 0.65;
  }

  .tg-scrub-text .tg-scrub-word {
    opacity: 1 !important;
    will-change: auto !important;
    transition: none !important;
  }

  html.js [data-anim="fade-up"],
  html.js .reveal,
  html.js [data-anim="scale-up"] {
    transition-duration: 0.4s !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.035s) !important;
  }

  html.js [data-anim-img] > img {
    transition-duration: 0.5s !important;
  }

  body[data-service-group="web-dev"] .browser-frame,
  body[data-service-group="web-dev"] .code-window,
  body[data-service-group="web-dev"] .mock-window,
  body[data-service-group="video-editing"] .play-badge,
  body[data-service-group="video-editing"] .video-play-btn,
  body[data-service-group="video-editing"] [class*="play"] svg {
    animation: none !important;
  }

  /* ==========================================================================
     UNIFIED MOBILE BUTTON SIZE STANDARDIZATION (<= 768px)
     Applies ONLY the size & typography of the selected reference button:
     main#main-content > section#contact > ... > a.btn.btn-primary.btn-sm
     (padding: .72rem 1.35rem; font-size: .85rem; line-height: 1.2; gap: .6rem)
     Preserves each button's original width (full/half/auto), alignment, & shape.
     ========================================================================== */
  main#main-content:nth-of-type(1) > section#contact:nth-of-type(8) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > a:nth-of-type(1),
  main .btn,
  section .btn,
  .hero .btn,
  .hero-nesa .hero-buttons .btn,
  .page-hero .btn,
  .p-hero .btn,
  .hero-cta .btn,
  .p-hero-cta .btn,
  .cta-band .btn,
  .cta-actions .btn,
  .wa-ai-cta,
  .wa-ai-card-btn,
  .cap-card-btn,
  .portfolio-foot .btn,
  .price-card .btn,
  .faq-intro .btn,
  .faq-cta .btn,
  .contact-info .btn,
  .contact-form .btn,
  form#contactForm .cf-submit-btn,
  .cf-submit-btn,
  .tg-submit-btn,
  body.tg-contact-page .tg-submit-btn,
  .tg-wa-primary,
  .submit-btn,
  .fv-load-more-btn,
  .mobile-menu .mm-cta-btn {
    padding: 0.72rem 1.35rem !important;
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    gap: 0.6rem !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  .cap-card-btn .cap-btn-text {
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
  }

  main .btn svg,
  section .btn svg,
  .hero .btn svg,
  .page-hero .btn svg,
  .p-hero .btn svg,
  .wa-ai-cta svg,
  .wa-ai-card-btn svg,
  .cap-card-btn .cap-btn-arrow,
  form#contactForm .cf-submit-btn svg,
  .tg-submit-btn svg,
  .fv-load-more-btn svg,
  .mobile-menu .mm-cta-btn svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
  }

  /* ==========================================================================
     MOBILE EYEBROW BADGE SCALE (<= 768px)
     Targets selected element & all .eyebrow / .eyebrow.on-dark pills site-wide:
     0.54rem (~12% larger than 0.48rem) with proportional padding & tracking
     so pill badges stay legible, crisp, and responsive on mobile.
     ========================================================================== */
  main#main-content:nth-of-type(1) > section:nth-of-type(11) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(3) > span:nth-of-type(1),
  .eyebrow,
  .eyebrow.on-dark,
  .cta-band .eyebrow,
  .page-hero .eyebrow,
  .p-hero .eyebrow,
  .layers-section .eyebrow,
  .intro-copy .eyebrow,
  .story-sticky .eyebrow,
  .testimonials-head .eyebrow {
    font-size: 0.54rem !important;
    letter-spacing: 0.11em !important;
    line-height: 1.35 !important;
    padding: 0.32rem 0.8rem !important;
    gap: 0.45rem !important;
    margin-bottom: 1rem !important;
    max-width: 100% !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  .eyebrow::before,
  .eyebrow.on-dark::before {
    width: 4.5px !important;
    height: 4.5px !important;
    flex-shrink: 0 !important;
  }
}


