@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Fredoka:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #1A1030;
  --bg-alt: #241645;
  --card: #2A1B4D;
  --line: #3D2A66;
  --teal: #00A6A0;
  --teal-dark: #008680;
  --orange: #FF9816;
  --orange-dark: #E67E00;
  --blue: #4EA8FF;
  --red: #FF5C6C;
  --cream: #F5F2FA;
  --grey: #B3A6D6;
  --ease: cubic-bezier(0.16,1,0.3,1);
  --ease-bounce: cubic-bezier(0.34,1.56,0.64,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--cream); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img, video { max-width: 100%; }
h1, h2, h3, .nav-logo, .footer-brand, .btn-primary, .service-card h3, .price {
  font-family: 'Fredoka', 'Poppins', sans-serif;
}
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.page-head { padding: 150px 0 40px; }
.page-head .section-label { margin-bottom: 14px; }
.page-head h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 700; letter-spacing: -1px; max-width: 780px; line-height: 1.2; }
.page-head .lead { font-size: 18px; color: var(--grey); max-width: 620px; margin-top: 18px; }
.breadcrumb { font-size: 13px; color: var(--grey); margin-bottom: 18px; }
.breadcrumb a { color: var(--teal); }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== Reveal / scroll animations ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-1 { transition-delay: 0.05s; }
.reveal-2 { transition-delay: 0.15s; }
.reveal-3 { transition-delay: 0.25s; }
.reveal-4 { transition-delay: 0.35s; }

.reveal-mask { overflow: hidden; }
.reveal-mask .reveal-mask-inner {
  transform: translateY(110%);
  opacity: 0;
  transition: transform 1s var(--ease), opacity 0.7s ease;
  display: block;
}
.reveal-mask.is-visible .reveal-mask-inner { transform: translateY(0); opacity: 1; }

/* IMPORTANT: the observed element itself must never be collapsed via clip-path —
   a clip-path that reduces an element's visible area to zero can stop some browsers'
   IntersectionObserver from ever reporting it as intersecting. So the trigger element
   (.reveal-clip) stays a normal, always-hit-testable box; the actual clip animation
   plays on its direct child image instead. */
.reveal-clip img { clip-path: inset(0 0 100% 0); opacity: 0; transform: scale(1.06); transition: clip-path 1s var(--ease), opacity 0.6s ease, transform 1s var(--ease); }
.reveal-clip.is-visible img { clip-path: inset(0 0 0 0); opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-mask .reveal-mask-inner, .reveal-clip, .cycle-word, .marquee-track, .logo-grid-h, .portfolio-hscroll, .poster-marquee-track, .icon-3d, .video-card .thumb-wrap img, .play-btn::before {
    transition: none !important; animation: none !important;
  }
  .reveal, .reveal-clip img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .reveal-mask .reveal-mask-inner { transform: none !important; opacity: 1 !important; }
}

/* ===== Page loader ===== */
#pageLoader {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#pageLoader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#pageLoader .loader-mark { font-family: 'Fredoka', sans-serif; font-size: 16px; letter-spacing: 3px; color: var(--grey); position: relative; }
#pageLoader .loader-mark span { color: var(--teal); }
#pageLoader .loader-bar { position: absolute; bottom: -14px; left: 0; height: 2px; width: 100%; background: var(--line); overflow: hidden; }
#pageLoader .loader-bar::after { content: ""; position: absolute; inset: 0; background: var(--orange); transform: scaleX(0); transform-origin: left; animation: loaderFill 0.9s var(--ease) forwards 0.1s; }
@keyframes loaderFill { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { #pageLoader { display: none; } }

/* ===== Custom cursor (desktop only) ===== */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9998;
  border-radius: 50%; transform: translate(-50%,-50%);
  transition: opacity 0.3s ease;
}
.cursor-dot { width: 6px; height: 6px; background: var(--orange); }
.cursor-ring { width: 34px; height: 34px; border: 1.5px solid var(--teal); opacity: 0.7; transition: width 0.25s var(--ease-bounce), height 0.25s var(--ease-bounce), opacity 0.3s ease, border-color 0.25s ease; }
.cursor-ring.grow { width: 56px; height: 56px; border-color: var(--orange); }
.cursor-ring.play::after { content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--cream); }
body.no-native-cursor, body.no-native-cursor a, body.no-native-cursor button { cursor: none; }
@media (hover: none), (max-width: 900px) { .cursor-dot, .cursor-ring { display: none !important; } body.no-native-cursor { cursor: auto; } }

/* ===== Nav ===== */
nav { position: fixed; top:0; left:0; right:0; z-index: 100; background: rgba(26,16,48,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); transition: padding 0.35s var(--ease), background 0.35s ease; opacity: 0; transform: translateY(-16px); }
nav.nav-ready { opacity: 1; transform: translateY(0); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), padding 0.35s var(--ease), background 0.35s ease; }
nav.nav-compact { background: rgba(26,16,48,0.96); }
nav.nav-compact .nav-inner { padding: 12px 28px; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; transition: padding 0.35s var(--ease); }
.nav-logo { font-weight: 700; font-size: 19px; letter-spacing: 0.3px; display: flex; align-items: center; gap: 8px; }
.nav-logo span { color: var(--teal); }
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; color: var(--grey); align-items: center; }
.nav-links a { position: relative; transition: color 0.25s ease; }
.nav-links a::after { content: ""; position: absolute; left:0; bottom:-4px; width:0; height:2px; background: var(--orange); transition: width 0.3s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--cream); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { background: var(--orange); color: #2A1400; padding: 10px 20px; border-radius: 40px; font-weight: 700; font-size: 14px; transition: all 0.25s var(--ease-bounce); white-space: nowrap; }
.nav-cta:hover { background: #FFAA3D; transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 20px rgba(255,152,22,0.35); }

.nav-dropdown { position: relative; }
.nav-dropdown-panel {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, 8px);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px;
  min-width: 230px; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, transform 0.25s ease;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-dropdown:hover .nav-dropdown-panel, .nav-dropdown:focus-within .nav-dropdown-panel { opacity: 1; visibility: visible; transform: translate(-50%, 4px); }
.nav-dropdown-panel a { padding: 10px 14px; border-radius: 10px; font-size: 14px; color: var(--cream); }
.nav-dropdown-panel a:hover { background: var(--bg-alt); color: var(--teal); }
.nav-dropdown-panel a::after { display: none; }

.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; cursor: pointer; }
.nav-burger span { width: 22px; height: 2px; background: var(--cream); transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 82vw); background: var(--bg-alt); border-left: 1px solid var(--line); z-index: 99; padding: 100px 28px 40px; display: flex; flex-direction: column; gap: 6px; transform: translateX(100%); transition: transform 0.4s var(--ease); overflow-y: auto; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { padding: 14px 6px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 500; }
.mobile-menu .mm-sub { padding-left: 16px; font-size: 14.5px; color: var(--grey); border-bottom: none; padding-top: 6px; padding-bottom: 6px; }
.mobile-menu .mm-group-label { padding: 14px 6px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--orange); font-weight: 700; }
.mobile-menu .nav-cta { margin-top: 18px; text-align: center; }
.menu-backdrop { position: fixed; inset: 0; background: rgba(10,6,20,0.6); z-index: 98; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.menu-backdrop.open { opacity: 1; visibility: visible; }
@media (max-width: 900px) { .nav-links { display: none; } .nav-burger { display: flex; } .nav-cta.desktop-only { display: none; } }

/* ===== Back to top ===== */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; background: var(--teal); color: #072424;
  display: flex; align-items: center; justify-content: center; font-size: 18px; border: none; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-bounce), visibility 0.3s ease, background 0.25s ease;
  box-shadow: 0 10px 24px rgba(0,166,160,0.35);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--orange); }

/* ===== Hero ===== */
.hero { position: relative; min-height: 0; display: flex; align-items: flex-start; padding: 116px 0 60px; overflow: hidden;
  background: radial-gradient(ellipse 700px 500px at 85% 10%, rgba(0,166,160,0.16), transparent 60%), radial-gradient(ellipse 500px 400px at 10% 90%, rgba(255,152,22,0.1), transparent 60%), var(--bg); }
.hero-grid { display: flex; flex-direction: column; align-items: center; gap: 44px; width: 100%; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .hero { min-height: 0; align-items: flex-start; padding: 110px 0 50px; } }

/* ===== Mobile: center text & media for a cleaner visual hierarchy ===== */
@media (max-width: 900px) {
  .hero-inner { text-align: center; margin: 0 auto; }
  .hero-ctas { justify-content: center; }
  .stat-pill { margin-left: auto; margin-right: auto; }

  .page-head .container, .content-block { text-align: center; }
  .page-head h1, .page-head .lead, .breadcrumb, .page-head .section-label { margin-left: auto; margin-right: auto; }
  .content-block .hero-ctas { justify-content: center; }
  .keyword-list { justify-content: center; }
  .two-col { text-align: center; }
  .two-col > div:last-child { margin: 0 auto; max-width: 340px; }
  .project-meta { justify-content: center; text-align: center; }
  .content-block p { text-align: center; }

  .section-label { justify-content: center; width: 100%; }
  h2 { margin-left: auto; margin-right: auto; text-align: center; }
  .section-lead { margin-left: auto; margin-right: auto; text-align: center; }
  .drag-hint { justify-content: center; }

  .contact-form-wrap { text-align: center; }
  .contact-form-wrap .flabel, .chip-row, .form-row { justify-content: center; }
  .footer-inner { text-align: center; align-items: center; }
  .footer-brand-block { flex-direction: column; }
}
.hero-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.hero-hello { color: var(--orange); font-weight: 600; font-size: 17px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(32px, 5.5vw, 56px); font-weight: 700; line-height: 1.2; letter-spacing: -1px; }
.hero h1 .cycle-wrap { color: var(--teal); display: inline-block; position: relative; min-width: 1px; }
.cycle-word { display: inline-block; }
.hero-word { display: inline-block; opacity: 0; transform: translateY(24px) rotateX(-40deg); filter: blur(6px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease); transform-origin: bottom; }
.hero-word.is-visible { opacity: 1; transform: translateY(0) rotateX(0); filter: blur(0); }

.hero .role { font-size: clamp(18px, 2.2vw, 22px); color: var(--grey); margin-top: 22px; font-weight: 400; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-ctas { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; align-items: center; justify-content: center; }
.btn-primary { background: var(--orange); color: #2A1400; padding: 17px 32px; border-radius: 50px; font-weight: 700; font-size: 16px; box-shadow: 0 14px 30px rgba(255,152,22,0.25); transition: all 0.25s var(--ease-bounce); display: inline-block; position: relative; overflow: hidden; }
.btn-primary::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,255,255,0.35), transparent 60%); opacity: 0; transition: opacity 0.4s ease; }
.btn-primary:hover { background: #FFAA3D; transform: translateY(-3px) scale(1.03); box-shadow: 0 18px 34px rgba(255,152,22,0.4); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(-1px) scale(0.99); }
.btn-ghost { color: var(--cream); font-weight: 500; font-size: 15px; padding: 17px 6px; border-bottom: 1px solid var(--line); transition: border-color 0.25s ease, color 0.25s ease; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.stat-pill { display: inline-flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); padding: 8px 18px; border-radius: 40px; font-size: 14px; color: var(--grey); margin-bottom: 26px; }
.stat-pill b { color: var(--teal); font-weight: 700; }

.hero-photo-wrap { position: relative; max-width: 340px; margin: 0 auto; width: 100%; }
.hero-photo { border-radius: 26px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/5; background: var(--card); position: relative; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(26,16,48,0.5)); pointer-events: none; }
.hero-photo-badge { position: absolute; bottom: 18px; left: 18px; background: rgba(26,16,48,0.85); backdrop-filter: blur(8px); border: 1px solid var(--line); padding: 10px 16px; border-radius: 14px; font-size: 13px; }
.hero-photo-badge b { color: var(--teal); display: block; font-size: 15px; }
@media (max-width: 900px) { .hero-photo-wrap { max-width: 300px; margin: 0 auto; } }

.marquee-strip { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-block; animation: marquee 26s linear infinite; will-change: transform; }
.marquee-strip:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-block; padding: 0 24px; font-size: 17px; font-weight: 600; color: var(--grey); }
.marquee-track span b { color: var(--teal); font-weight: 700; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

section { padding: 90px 0; }
.section-label { display: inline-flex; align-items: center; gap: 10px; color: var(--orange); font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 18px; }
.section-label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 700; letter-spacing: -0.5px; max-width: 640px; line-height: 1.25; }
.section-lead { font-size: 17px; color: var(--grey); max-width: 560px; margin-top: 16px; }

.drag-hint { display: flex; align-items: center; gap: 10px; color: var(--teal); font-size: 14px; font-weight: 600; margin-top: 18px; letter-spacing: 0.5px; }
.drag-hint .arrow-anim { display: inline-flex; gap: 3px; }
.drag-hint .arrow-anim span { animation: slide-hint 1.4s ease-in-out infinite; opacity: 0.4; }
.drag-hint .arrow-anim span:nth-child(2) { animation-delay: 0.15s; }
.drag-hint .arrow-anim span:nth-child(3) { animation-delay: 0.3s; }
@keyframes slide-hint { 0%,100% { opacity: 0.3; transform: translateX(0); } 50% { opacity: 1; transform: translateX(4px); } }

.hscroll { display: flex; gap: 20px; overflow-x: auto; padding: 44px 4px 20px; margin: 0 -4px; scroll-snap-type: x proximity; cursor: grab; scrollbar-width: none; -ms-overflow-style: none; user-select: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll.dragging { cursor: grabbing; scroll-snap-type: none; }
.hscroll.dragging * { pointer-events: none; }

.service-card { flex: 0 0 auto; width: 280px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 34px 26px; scroll-snap-align: start; transition: transform 0.3s var(--ease-bounce), border-color 0.3s ease, box-shadow 0.3s ease; }
.service-card:hover { transform: translateY(-8px); border-color: var(--teal-dark); box-shadow: 0 20px 40px rgba(0,0,0,0.28); }
.service-card.static { width: auto; }

.icon-3d {
  width: 68px; height: 68px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  margin-bottom: 22px;
  background: linear-gradient(145deg, var(--teal), var(--teal-dark));
  box-shadow:
    0 10px 0 -2px rgba(0,0,0,0.15),
    0 14px 24px rgba(0,166,160,0.35),
    inset 0 2px 4px rgba(255,255,255,0.25),
    inset 0 -3px 6px rgba(0,0,0,0.25);
  transform: perspective(400px) rotateX(8deg) rotateY(-8deg);
  transition: transform 0.4s var(--ease-bounce), box-shadow 0.4s ease;
}
.service-card:hover .icon-3d {
  transform: perspective(400px) rotateX(-4deg) rotateY(8deg) translateY(-4px) scale(1.08);
  box-shadow:
    0 14px 0 -2px rgba(0,0,0,0.15),
    0 20px 32px rgba(0,166,160,0.45),
    inset 0 2px 4px rgba(255,255,255,0.3),
    inset 0 -3px 6px rgba(0,0,0,0.25);
}
.service-card.orange-icon .icon-3d {
  background: linear-gradient(145deg, var(--orange), var(--orange-dark));
  box-shadow:
    0 10px 0 -2px rgba(0,0,0,0.15),
    0 14px 24px rgba(255,152,22,0.35),
    inset 0 2px 4px rgba(255,255,255,0.25),
    inset 0 -3px 6px rgba(0,0,0,0.25);
}
.service-card.orange-icon:hover .icon-3d {
  box-shadow:
    0 14px 0 -2px rgba(0,0,0,0.15),
    0 20px 32px rgba(255,152,22,0.45),
    inset 0 2px 4px rgba(255,255,255,0.3),
    inset 0 -3px 6px rgba(0,0,0,0.25);
}

.icon-3d.has-img { padding: 0; overflow: hidden; background: none; box-shadow: 0 10px 24px rgba(0,0,0,0.35); }
.icon-3d.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 20px; }
.service-card:hover .icon-3d.has-img { box-shadow: 0 16px 30px rgba(0,0,0,0.45); }

.icon-3d.has-img { padding: 0; overflow: hidden; }
.icon-3d.has-img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.service-card h3 { font-size: 20px; font-weight: 700; color: var(--cream); margin-bottom: 10px; }
.service-card p { font-size: 14.5px; color: var(--grey); }
.service-card .card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--teal); position: relative; }
.service-card .card-link .arrow { transition: transform 0.3s var(--ease-bounce); }
.service-card:hover .card-link .arrow { transform: translateX(4px); }

.stats-bar { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 50px 0; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
@media (max-width: 640px) { .stats-row { grid-template-columns: 1fr; gap: 30px; } }
.stats-row .num { font-family: 'JetBrains Mono', monospace; font-size: 38px; font-weight: 700; color: var(--orange); }
.stats-row .lbl { color: var(--grey); font-size: 14px; margin-top: 8px; }

.logo-grid-h { display: flex; gap: 16px; overflow-x: auto; padding: 6px 4px 10px; scroll-snap-type: x proximity; cursor: grab; scrollbar-width: none; user-select: none; }
.logo-grid-h::-webkit-scrollbar { display: none; }
.logo-grid-h.dragging { cursor: grabbing; }
.logo-marquee-track { animation-duration: 22s; }
.logo-tile { width: 150px; height: 150px; background: #F5F2FA; border-radius: 18px; display: flex; align-items: center; justify-content: center; padding: 20px; transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s ease, filter 0.3s ease; filter: grayscale(0.15); }
.logo-marquee-track .logo-tile { flex: 0 0 auto; }
.logo-tile:hover { transform: translateY(-5px) scale(1.04); box-shadow: 0 14px 28px rgba(0,166,160,0.25); filter: grayscale(0); }
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ===== Poster infinite marquee (style: continuous auto-scrolling thumbnail slider) ===== */
.poster-marquee-wrap { overflow: hidden; margin-top: 30px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.poster-marquee-track { display: flex; gap: 18px; width: max-content; animation: posterMarquee 38s linear infinite; }
.poster-marquee-wrap:hover .poster-marquee-track { animation-play-state: paused; }
.poster-marquee-track .portfolio-item { width: 260px; flex: 0 0 auto; }
@keyframes posterMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.icon-3d { animation: iconFloat 3.1s ease-in-out infinite; }
.service-card:hover .icon-3d { animation-play-state: paused; }
@keyframes iconFloat {
  0%, 100% { transform: perspective(400px) rotateX(8deg) rotateY(-8deg) translateY(0); }
  50% { transform: perspective(400px) rotateX(8deg) rotateY(-8deg) translateY(-6px); }
}

.portfolio-hscroll { display: flex; gap: 18px; overflow-x: auto; padding: 6px 4px 16px; scroll-snap-type: x proximity; cursor: grab; scrollbar-width: none; user-select: none; }
.portfolio-hscroll::-webkit-scrollbar { display: none; }
.portfolio-hscroll.dragging { cursor: grabbing; }
.portfolio-item { flex: 0 0 auto; width: 260px; aspect-ratio: 1/1; border-radius: 18px; overflow: hidden; position: relative; border: 1px solid var(--line); scroll-snap-align: start; display: block; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease), clip-path 1s var(--ease), opacity 0.6s ease; }
.portfolio-item:hover img { transform: scale(1.08); }
.portfolio-item.reveal-clip.is-visible:hover img { transform: scale(1.08); }
.portfolio-item .overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent 55%); opacity: 0; transition: opacity 0.35s ease; display: flex; align-items: flex-end; padding: 16px; }
.portfolio-item:hover .overlay { opacity: 1; }
.portfolio-item .overlay span { color: white; font-size: 13px; font-weight: 600; }

/* Portfolio grid (dedicated page) */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 860px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .portfolio-grid { grid-template-columns: 1fr; } }
.portfolio-grid .portfolio-item { width: 100%; }
.portfolio-grid .portfolio-item.featured { grid-column: span 2; aspect-ratio: 16/10; }
@media (max-width: 560px) { .portfolio-grid .portfolio-item.featured { grid-column: span 1; } }

.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 44px; }
@media (max-width: 780px) { .video-grid { grid-template-columns: 1fr; } }
.video-card { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--card); position: relative; cursor: pointer; }
.video-card .thumb-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.video-card .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); animation: kenBurns 9s ease-in-out infinite alternate; }
.video-card:hover .thumb-wrap img { animation-play-state: paused; transform: scale(1.09); }
@keyframes kenBurns { from { transform: scale(1); } to { transform: scale(1.055); } }
.video-card .thumb-wrap::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 35%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-20deg); transition: left 1s var(--ease); pointer-events: none; z-index: 2;
}
.video-card:hover .thumb-wrap::after { left: 130%; }
.video-card .thumb-overlay { position: absolute; inset: 0; background: rgba(10,6,20,0.25); display: flex; align-items: center; justify-content: center; transition: background 0.3s ease; }
.video-card:hover .thumb-overlay { background: rgba(10,6,20,0.4); }
.play-btn { width: 62px; height: 62px; border-radius: 50%; background: rgba(245,242,250,0.15); backdrop-filter: blur(6px); border: 1.5px solid rgba(245,242,250,0.5); display: flex; align-items: center; justify-content: center; transition: transform 0.3s var(--ease-bounce), background 0.3s ease; position: relative; }
.play-btn::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1.5px solid rgba(245,242,250,0.45); animation: playPulse 2.4s ease-out infinite; }
.video-card:hover .play-btn::before { border-color: rgba(255,152,22,0.55); }
@keyframes playPulse { 0% { transform: scale(0.7); opacity: 0.85; } 100% { transform: scale(1.55); opacity: 0; } }
.video-card:hover .play-btn { transform: scale(1.1); background: var(--orange); border-color: var(--orange); }

/* ===== Video cards: fly-in from alternating sides with spin + zoom (homepage) ===== */
.video-card.fly-reveal { opacity: 0; transition: opacity 1s var(--ease), transform 1s var(--ease); }
.video-card.fly-reveal:nth-child(odd) { transform: translateX(-90px) rotate(-10deg) scale(0.8); }
.video-card.fly-reveal:nth-child(even) { transform: translateX(90px) rotate(10deg) scale(0.8); }
.video-card.fly-reveal.is-visible { opacity: 1; transform: translateX(0) rotate(0deg) scale(1); }
.video-card.fly-reveal:nth-child(1) { transition-delay: 0s; }
.video-card.fly-reveal:nth-child(2) { transition-delay: 0.12s; }
.video-card.fly-reveal:nth-child(3) { transition-delay: 0.24s; }
.video-card.fly-reveal:nth-child(4) { transition-delay: 0.36s; }
.video-card.fly-reveal:nth-child(5) { transition-delay: 0.48s; }
.video-card.fly-reveal:nth-child(6) { transition-delay: 0.6s; }
.video-card.fly-reveal:nth-child(7) { transition-delay: 0.72s; }
.video-card.fly-reveal:nth-child(8) { transition-delay: 0.84s; }
@media (prefers-reduced-motion: reduce) {
  .video-card.fly-reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
}
.play-btn::after { content: ""; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--cream); margin-left: 4px; }
.video-card .vcap { padding: 16px 20px; font-size: 14px; color: var(--grey); }

/* Video modal */
.video-modal { position: fixed; inset: 0; z-index: 999; background: rgba(8,4,16,0.92); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s ease; }
.video-modal.open { opacity: 1; visibility: visible; }
.video-modal-inner { width: min(900px, 100%); transform: scale(0.94); transition: transform 0.35s var(--ease-bounce); }
.video-modal.open .video-modal-inner { transform: scale(1); }
.video-modal video { width: 100%; border-radius: 14px; display: block; background: #000; max-height: 80vh; }
.video-modal-close { position: absolute; top: 22px; right: 26px; width: 44px; height: 44px; border-radius: 50%; background: rgba(245,242,250,0.1); border: 1px solid var(--line); color: var(--cream); font-size: 20px; cursor: pointer; transition: background 0.25s ease, transform 0.25s ease; }
.video-modal-close:hover { background: var(--orange); transform: rotate(90deg); }

.offers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 44px; }
@media (max-width: 720px) { .offers-grid { grid-template-columns: 1fr; } }
.offer-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 38px 34px; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.offer-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.offer-card.featured { border-color: var(--teal); background: linear-gradient(160deg, rgba(0,166,160,0.12), var(--card) 55%); position: relative; }
.offer-card.featured::before { content: "Le plus complet"; position: absolute; top: -13px; left: 30px; background: var(--teal); color: #072424; font-size: 12px; font-weight: 800; padding: 5px 16px; border-radius: 20px; }
.offer-card h3 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.offer-card .price { font-family: 'JetBrains Mono', monospace; color: var(--orange); font-size: 22px; font-weight: 700; margin-bottom: 22px; }
.offer-card ul { list-style: none; display: flex; flex-direction: column; gap: 12px; flex: 1; margin-bottom: 26px; }
.offer-card li { color: var(--grey); font-size: 15px; padding-left: 24px; position: relative; }
.offer-card li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.offer-card .btn-primary { text-align: center; align-self: flex-start; }
.offer-card .price .old { text-decoration: line-through; color: var(--grey); font-size: 17px; font-weight: 500; opacity: 0; transition: opacity 0.5s ease 0.2s; }
.offer-card.is-visible .price .old { opacity: 1; }
.offer-card .price .new { opacity: 0; transform: translateX(-6px); transition: opacity 0.5s ease 0.5s, transform 0.5s var(--ease-bounce) 0.5s; }
.offer-card.is-visible .price .new { opacity: 1; transform: translateX(0); }

/* Offer banner — fills the section width, two-column layout */
.offer-banner {
  margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
  background: linear-gradient(135deg, rgba(0,166,160,0.14), var(--card) 60%);
  border: 1px solid var(--teal); border-radius: 28px; padding: 50px; position: relative;
}
.offer-banner-badge { display: inline-block; background: var(--teal); color: #072424; font-size: 12px; font-weight: 800; padding: 6px 16px; border-radius: 20px; margin-bottom: 16px; }
.offer-banner-left h3 { font-size: 27px; font-weight: 700; margin-bottom: 14px; }
.offer-banner .price { font-family: 'JetBrains Mono', monospace; color: var(--orange); font-size: 24px; font-weight: 700; margin-bottom: 28px; }
.offer-banner .price .old { text-decoration: line-through; color: var(--grey); font-size: 18px; font-weight: 500; opacity: 0; transition: opacity 0.5s ease 0.2s; }
.offer-banner.is-visible .price .old { opacity: 1; }
.offer-banner .price .new { opacity: 0; transform: translateX(-6px); transition: opacity 0.5s ease 0.5s, transform 0.5s var(--ease-bounce) 0.5s; }
.offer-banner.is-visible .price .new { opacity: 1; transform: translateX(0); }
.offer-banner-right ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.offer-banner-right li { color: var(--cream); font-size: 15.5px; padding-left: 28px; position: relative; }
.offer-banner-right li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; background: var(--teal); color: #072424; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
@media (max-width: 860px) {
  .offer-banner { grid-template-columns: 1fr; text-align: center; padding: 36px 26px; }
  .offer-banner-right ul { align-items: center; }
  .offer-banner-right li { text-align: left; }
  .offer-banner .price { justify-content: center; }
  .offer-banner .btn-primary { display: inline-block; }
}

.contact-form-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 50px; margin-top: 44px; }
@media (max-width: 640px) { .contact-form-wrap { padding: 32px 26px; } }
.contact-form-wrap h2 { max-width: none; }
.form-group { margin-top: 32px; }
.form-group .flabel { font-size: 15px; font-weight: 600; color: var(--teal); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { background: var(--bg-alt); border: 1px solid var(--line); padding: 12px 22px; border-radius: 40px; font-size: 15px; font-weight: 500; color: var(--cream); cursor: pointer; transition: all 0.25s ease; user-select: none; }
.chip:hover { border-color: var(--teal); }
.chip.selected { background: var(--teal); border-color: var(--teal); color: #072424; font-weight: 700; transform: scale(1.05); }
.contact-input { width: 100%; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; color: var(--cream); font-family: 'Poppins', sans-serif; font-size: 15px; margin-top: 8px; transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.contact-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,166,160,0.15); }
textarea.contact-input { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: 12.5px; color: var(--grey); margin-top: 14px; }

.contact-alt { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 44px; }
.contact-alt-card { flex: 1 1 220px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; align-items: center; gap: 14px; transition: transform 0.3s ease, border-color 0.3s ease; }
.contact-alt-card:hover { transform: translateY(-4px); border-color: var(--teal-dark); }
.contact-alt-card .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-alt-card .ic svg { width: 20px; height: 20px; }
.contact-alt-card .lbl { font-size: 12px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.5px; }
.contact-alt-card .val { font-size: 15px; font-weight: 600; margin-top: 2px; }

.final-cta { text-align: center; padding: 80px 28px 40px; }
.final-cta .btn-primary { margin-top: 10px; font-size: 17px; padding: 19px 40px; }

/* ===== Footer (Transforma-style layout, brand palette) ===== */
footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 46px 28px 30px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 26px; }
.footer-brand-block { display: flex; align-items: center; gap: 14px; }
.footer-mark { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(145deg, var(--teal), var(--teal-dark)); display: flex; align-items: center; justify-content: center; font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.footer-brand { font-weight: 700; font-size: 19px; }
.footer-brand span { color: var(--teal); }
.footer-tag { color: var(--grey); font-size: 13px; margin-top: 4px; }
.footer-contacts { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-contact-item { display: flex; align-items: center; gap: 10px; }
.footer-contact-item .ic { width: 38px; height: 38px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.25s ease, transform 0.25s ease; }
.footer-contact-item:hover .ic { background: var(--orange); transform: scale(1.08); }
.footer-contact-item .ic svg { width: 17px; height: 17px; stroke: var(--cream); }
.footer-contact-item .txt { font-size: 14px; font-weight: 600; }
.footer-bottom { max-width: 1100px; margin: 30px auto 0; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--grey); }
.footer-bottom a:hover { color: var(--teal); }
@media (max-width: 640px) { .footer-inner { flex-direction: column; align-items: center; text-align: center; } .footer-contacts { flex-direction: column; gap: 10px; align-items: center; } }

/* ===== Whatsapp floating button ===== */
.wa-float { position: fixed; right: 22px; bottom: 88px; z-index: 91; width: 54px; height: 54px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(37,211,102,0.4); transition: transform 0.3s var(--ease-bounce); }
.wa-float:hover { transform: scale(1.08) translateY(-2px); }
.wa-float svg { width: 26px; height: 26px; fill: white; }

/* ===== Utility for project/service pages ===== */
.content-block { max-width: 720px; }
.content-block p { color: var(--grey); font-size: 16px; margin-top: 16px; }
.content-block h2 { margin-top: 10px; }
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.keyword-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.keyword-list span { background: var(--card); border: 1px solid var(--line); padding: 7px 14px; border-radius: 20px; font-size: 13px; color: var(--grey); }

.project-hero-media { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); margin-top: 30px; }
.project-hero-media video, .project-hero-media img { width: 100%; display: block; }
.project-meta { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 30px; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-meta div .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--orange); font-weight: 700; }
.project-meta div .val { font-size: 15px; margin-top: 4px; }

.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-item h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.faq-item p { color: var(--grey); font-size: 15px; }
