/* ═══════════════════════════════════════════
   BLOSSOM STUDIO — SHARED STYLESHEET
   Dùng chung cho index.html, packages.html, portfolio.html
   ═══════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-light: #1a1a1a;
  --white: #F6F1E9;
  --black: #000000;
  --muted: #888888;
  --muted-light: #666666;
  --coral: #C84B35;
  --coral-hover: #b33f2a;
  --border: rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.04);
}

/* ── RESET & BASE ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, input, select, textarea { cursor: none; }
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg); color: var(--white);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}

::selection { background: var(--coral); color: var(--white); }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--coral); border-radius: 10px; }

/* ── NOISE TEXTURE ── */
.noise-bg {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Isolate to its own compositor layer — stops it triggering full-page repaints */
  will-change: opacity;
  contain: strict;
}

/* ── PRELOADER ── */
.preloader {
  position: fixed; inset: 0; z-index: 999999; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}
.preloader.loaded { transform: translateY(-100%); }
.preloader-counter { font-family: 'Fraunces', serif; font-size: clamp(60px, 12vw, 120px); font-weight: 300; color: var(--coral); line-height: 1; }
.preloader-name { font-size: 11px; font-weight: 700; letter-spacing: 0.4em; text-transform: uppercase; color: var(--muted); margin-top: 24px; animation: pulse 2s infinite; }

/* ── CURSOR ── */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 14px; height: 14px;
  background: var(--coral); border-radius: 50%;
  pointer-events: none; z-index: 9999999;
  /* off-screen initial — JS sẽ override bằng translate(calc(cx-50%), calc(cy-50%)) */
  transform: translate(-200px, -200px);
  display: flex; align-items: center; justify-content: center;
  /* Chỉ animate width/height/color — KHÔNG dùng individual scale/translate */
  transition: width 0.35s cubic-bezier(0.22,1,0.36,1),
              height 0.35s cubic-bezier(0.22,1,0.36,1),
              background 0.3s ease,
              opacity 0.3s ease,
              border 0.3s ease;
}
.cursor.hovering {
  width: 48px; height: 48px;
  background: transparent;
  border: 1.5px solid var(--coral);
  opacity: 0.85;
}
.cursor.playing {
  width: 56px; height: 56px;
  background: var(--coral);
}
.cursor.playing::after { content: 'DRAG'; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: #fff; }
.cursor.viewing {
  width: 56px; height: 56px;
  background: var(--coral);
}
.cursor.viewing::after { content: 'VIEW'; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: #fff; }

/* ── ANIMATIONS ── */
@keyframes pulse    { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut  { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }
@keyframes marquee  { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; will-change: auto; }
.d1 { transition-delay: .15s; }
.d2 { transition-delay: .3s; }
.d3 { transition-delay: .45s; }

/* ── SMART NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 24px; display: flex; justify-content: center; pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
#nav.nav-hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }

.nav-pill {
  pointer-events: all; width: 100%; max-width: 1100px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(10,10,10,.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.05); border-radius: 100px; padding: 10px 14px 10px 24px;
  transition: background 0.4s ease, border-color 0.4s ease;
}
.nav-pill.scrolled { background: rgba(10,10,10,.92); border-color: rgba(255,255,255,.1); }

.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo-text { font-family: 'Fraunces', serif; font-weight: 500; font-size: 18px; letter-spacing: 0.02em; color: var(--white); text-transform: uppercase; }
.nav-logo-mark { width: 28px; height: 28px; flex-shrink: 0; }
.nav-logo-mark img { filter: brightness(0) invert(1); object-fit: contain; }

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; transition: color .3s; }
.nav-links a:hover { color: var(--coral); }
.nav-links a.nav-active { color: var(--coral); }

.nav-cta {
  background: transparent; color: var(--white);
  font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 14px 28px; border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.nav-cta:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.nav-mobile-btn { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.nav-mobile-btn span { display: block; height: 2px; background: var(--white); border-radius: 2px; transition: background 0.3s ease; }
.nav-mobile-btn span:first-child { width: 24px; }
.nav-mobile-btn span:last-child { width: 16px; align-self: flex-end; }

.mobile-menu { display: none; position: fixed; inset: 0; z-index: 99; background: rgba(10,10,10,.97); backdrop-filter: blur(10px); padding: 90px 32px 48px; flex-direction: column; gap: 0; overflow-y: auto; }
.mobile-menu.open { display: flex; animation: fadeIn .3s ease; }
.mobile-menu.closing { animation: fadeOut 0.28s ease forwards; }
.mobile-close { position: absolute; top: 28px; right: 28px; font-family: 'Fraunces', serif; font-size: 32px; font-weight: 400; color: var(--muted); cursor: pointer; transition: color .2s; }
.mobile-close:hover { color: var(--coral); }
.mobile-menu a { font-family: 'Fraunces', serif; font-size: 44px; font-weight: 500; color: var(--white); letter-spacing: -.01em; padding: 16px 0; border-bottom: 1px solid var(--border); transition: color 0.3s, padding 0.3s; }
.mobile-menu a:hover { color: var(--coral); padding-left: 12px; }
/* ── Override: nav-cta must stay a pill button inside mobile menu ── */
.mobile-menu a.nav-cta {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--white); background: transparent;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 100px;
  padding: 18px 32px; text-align: center;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.mobile-menu a.nav-cta:hover { background: var(--white); color: var(--black); border-color: var(--white); padding-left: 32px; }

/* ── MOBILE ACCORDION GROUP ── */
.mm-group { border-bottom: 1px solid var(--border); }
.mm-group-btn { width: 100%; background: none; border: none; font-family: 'Fraunces', serif; font-size: 44px; font-weight: 500; color: var(--white); letter-spacing: -.01em; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; transition: color 0.3s; }
.mm-group-btn:hover { color: var(--coral); }
.mm-arrow { transition: transform 0.35s cubic-bezier(0.22,1,0.36,1); flex-shrink: 0; }
.mm-group.open .mm-arrow { transform: rotate(90deg); }
.mm-sub { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.16,1,0.3,1); }
.mm-group.open .mm-sub { max-height: 260px; }
.mobile-menu .mm-sub a { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 11px 0 11px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); display: block; transition: color 0.3s, padding-left 0.3s; }
.mobile-menu .mm-sub a:last-child { border-bottom: none; margin-bottom: 8px; }
.mobile-menu .mm-sub a:hover { color: var(--coral); padding-left: 20px; }

/* ── SCROLL COMPANION ── */
.scroll-companion {
  position: fixed; bottom: 40px; left: 40px; right: auto; width: 110px; height: 110px;
  z-index: 90; pointer-events: none; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px) scale(0.9);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.scroll-companion.visible { opacity: 1; transform: translateY(0) scale(1); }
.sc-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-text-path { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.22em; fill: var(--muted); text-transform: uppercase; }
.sc-center-dot { width: 6px; height: 6px; background: var(--coral); border-radius: 50%; box-shadow: 0 0 12px rgba(200,75,53,0.6); }

/* ── SECTION UTILITIES ── */
.section { padding: 96px 24px; position: relative; z-index: 2; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.sec-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--coral); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.sec-tag::before { content: ''; width: 24px; height: 1px; background: var(--coral); }
.sec-h2 { font-family: 'Fraunces', serif; font-size: clamp(38px, 5.5vw, 64px); font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; color: var(--white); max-width: 800px; }
.sec-h2 em { font-style: italic; color: var(--coral); }
.sec-desc { font-size: 17px; color: var(--muted); line-height: 1.7; margin-top: 24px; max-width: 540px; font-weight: 300; }

/* ── BUTTONS ── */
.btn-fill {
  background: var(--coral); color: var(--white); padding: 18px;
  border-radius: 100px; display: block; text-align: center;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  transition: background 0.3s ease; border: none; cursor: pointer;
}
.btn-fill:hover { background: var(--coral-hover); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,0.15); color: var(--white);
  padding: 16px 32px; border-radius: 100px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  transition: color 0.35s cubic-bezier(0.22,1,0.36,1), border-color 0.35s;
  position: relative; overflow: hidden;
}
.btn-outline::before {
  content: ''; position: absolute; inset: 0;
  background: var(--white); transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1); z-index: 0;
}
.btn-outline:hover { color: var(--black); border-color: var(--white); }
.btn-outline:hover::before { transform: scaleX(1); }
.btn-outline span, .btn-outline svg { position: relative; z-index: 1; }
.btn-outline svg { transition: transform 0.3s ease; }
.btn-outline:hover svg { transform: translateX(4px); }

.btn-cta-premium {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--white); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px; padding: 18px 36px;
  transition: color 0.4s cubic-bezier(0.22,1,0.36,1), border-color 0.4s;
  position: relative; overflow: hidden;
}
.btn-cta-premium::before {
  content: ''; position: absolute; inset: 0;
  background: var(--white); transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1); z-index: 0;
}
.btn-cta-premium:hover { color: var(--black); border-color: var(--white); }
.btn-cta-premium:hover::before { transform: scaleX(1); }
.btn-cta-premium svg { position: relative; z-index: 1; transition: transform 0.3s ease; }
.btn-cta-premium:hover svg { transform: translateX(4px); }

/* ── CUSTOM SELECT (prevents native browser chrome on contact form) ── */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px !important;
}

footer { padding: 80px 0 64px; border-top: 1px solid var(--border); background: #050505; margin-top: 64px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 0 40px; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 60px; }
.footer-left p { color: var(--muted); font-size: 14px; max-width: 300px; line-height: 1.6; font-weight: 300; }
.footer-socials { display: flex; gap: 12px; margin-top: 24px; }
.footer-soc { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: var(--muted); transition: background 0.3s, border-color 0.3s; }
.footer-soc:hover { background: var(--coral); border-color: var(--coral); color: #fff; }
.footer-links { display: flex; gap: 64px; }
.fl-col h4 { font-size: 11px; color: var(--white); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 24px; }
.fl-col ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.fl-col a { color: var(--muted); font-size: 14px; transition: color 0.3s; font-weight: 300; }
.fl-col a:hover { color: var(--coral); }
.footer-bottom { max-width: 1180px; margin: 64px auto 0; padding: 32px 40px 48px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; color: var(--muted-light); font-size: 13px; }
.footer-bottom-links { display: flex; gap: 32px; }

/* ── CROSS-SERVICE CTA ── */
.xsvc-section { border-top: 1px solid var(--border); }
.xsvc-head { margin-bottom: 56px; text-align: center; }
.xsvc-head .sec-h2 { font-size: clamp(28px, 3.5vw, 48px); max-width: 640px; margin-left: auto; margin-right: auto; }
.xsvc-head .sec-tag { justify-content: center; }
.xsvc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.xsvc-card {
  border: 1px solid var(--border); border-radius: 20px; padding: 48px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.4s ease, background 0.4s ease;
}
.xsvc-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--coral); transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.xsvc-card:hover { border-color: rgba(200,75,53,0.35); background: rgba(200,75,53,0.03); }
.xsvc-card:hover::before { transform: scaleX(1); }
.xsvc-num { font-family: 'Fraunces', serif; font-size: 12px; color: var(--muted); margin-bottom: 32px; letter-spacing: 0.12em; display: block; }
.xsvc-icon { width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--coral); margin-bottom: 28px; flex-shrink: 0; transition: background 0.3s ease, border-color 0.3s ease; }
.xsvc-card:hover .xsvc-icon { background: var(--coral); border-color: var(--coral); color: var(--white); }
.xsvc-name { font-family: 'Fraunces', serif; font-size: clamp(28px, 3vw, 42px); font-weight: 500; color: var(--white); letter-spacing: -0.02em; margin-bottom: 16px; line-height: 1.05; }
.xsvc-desc { font-size: 15px; color: var(--muted); line-height: 1.75; font-weight: 300; margin-bottom: 0; flex: 1; }
.xsvc-cta { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--coral); margin-top: 40px; }
.xsvc-cta svg { transition: transform 0.3s ease; }
.xsvc-card:hover .xsvc-cta svg { transform: translateX(5px); }
.xsvc-cta-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.xsvc-cta-bar-text { font-family: 'Fraunces', serif; font-size: clamp(18px, 2vw, 24px); color: var(--white); font-weight: 400; line-height: 1.3; font-style: italic; max-width: 520px; }
.xsvc-cta-bar-text span { color: var(--coral); }

/* ── NAV DROPDOWN (shared — prevents per-page duplication) ── */
.nav-has-dropdown { position: relative; }
.nav-has-dropdown > a { display: flex; align-items: center; gap: 5px; }
.nav-has-dropdown > a::after {
  content: ''; width: 5px; height: 5px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease, border-color 0.25s ease;
  display: block; flex-shrink: 0;
}
.nav-has-dropdown:hover > a::after { transform: rotate(-135deg) translateY(-2px); border-color: var(--coral); }
/* Bridge pseudo fills the gap so mouse doesn't leave hover zone */
.nav-has-dropdown::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: 140%; height: 20px; }
.nav-dropdown {
  position: absolute; top: calc(100% + 20px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(10,10,10,0.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 8px;
  min-width: 180px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1); z-index: 200;
}
.nav-has-dropdown:hover .nav-dropdown { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.nav-dropdown-label { font-size: 9px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); padding: 6px 14px 4px; display: block; }
.nav-dropdown a { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: rgba(246,241,233,0.7); text-transform: uppercase; letter-spacing: 0.08em; padding: 9px 14px; border-radius: 8px; transition: background 0.15s ease, color 0.15s ease; white-space: nowrap; }
.nav-dropdown a:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.nav-dropdown a.active-item { color: var(--coral); }
.nav-dropdown-sep { height: 1px; background: rgba(255,255,255,0.07); margin: 6px 8px; }

/* ── TOUCH STATES (mobile accordion) ── */
.ha-item.open .ha-title { color: var(--coral); transform: translateX(16px); }
.ha-item.open .ha-content { grid-template-rows: 1fr; }
.ha-item.open .ha-inner p { transform: translateY(0); opacity: 1; transition-delay: 0.2s; }
.sc-item.open .sc-title { color: var(--coral); transform: translateX(12px); }
.sc-item.open .sc-arrow { background: var(--coral); border-color: var(--coral); color: #fff; transform: rotate(45deg); }
.sc-item.open .sc-content { grid-template-rows: 1fr; }
.sc-item.open .sc-inner { padding-top: 44px; opacity: 1; transform: translateY(0); }
/* sc-inner child elements also need reveal on touch — hover states alone don't fire on touch */
.sc-item.open .sc-title span { color: var(--coral); }
.sc-item.open .sc-details p { opacity: 1; transform: translateY(0); }
.sc-item.open .sc-bullet { opacity: 1; transform: translateY(0); }
.sc-item.open .sc-bullet:nth-child(2) { transition-delay: 0.15s; }
/* design.html svc-item open state for touch */
.svc-item.open .svc-name { color: var(--coral); }
.svc-item.open .svc-num { color: var(--coral); }
.svc-item.open .svc-detail { max-height: 160px; }
.svc-item.open .svc-detail-inner { opacity: 1; transform: none; }
.svc-item.open .svc-tag { color: rgba(200,75,53,0.7); border-color: rgba(200,75,53,0.2); }

/* ══════════════════════════════════════
   RESPONSIVE — SHARED BREAKPOINTS
   ══════════════════════════════════════ */

/* ── TABLET WIDE: 901–1024px ── */
@media(max-width:1024px) {
  .footer-links { flex-direction: column; gap: 32px; }
}

/* ── TABLET + LARGE PHONE: up to 900px ── */
@media(max-width:900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-mobile-btn { display: flex; }
  #nav { padding: 20px; }
  .section { padding: 56px 20px; }
  .sec-h2 { font-size: clamp(30px, 5vw, 48px); }
  .sec-desc { font-size: 15px; }
  .footer-inner { gap: 36px; padding: 0 24px; }
  .footer-bottom { padding: 32px 24px 40px; flex-direction: column; gap: 12px; align-items: flex-start; }
  .footer-links { flex-direction: column; gap: 28px; }
  .scroll-companion { display: none; }
}

/* ── MOBILE: up to 600px ── */
@media(max-width:600px) {
  #nav { padding: 14px 16px; }
  .section { padding: 48px 16px; }
  .sec-h2 { font-size: clamp(26px, 7vw, 38px); }
  .sec-tag { font-size: 10px; }
  footer { padding: 48px 0 48px; }
  .footer-inner { padding: 0 20px; }
  .footer-bottom { padding: 32px 20px 32px; flex-direction: column; gap: 10px; font-size: 12px; }
  .footer-bottom-links { flex-direction: column; gap: 8px; }
  .xsvc-grid { grid-template-columns: 1fr; }
  .xsvc-card { padding: 32px 24px; }
  .xsvc-cta-bar { flex-direction: column; align-items: flex-start; gap: 20px; }
  .mobile-menu a { font-size: 36px; padding: 14px 0; }
  .mm-group-btn { font-size: 36px; padding: 14px 0; }
  .mobile-menu a.nav-cta { font-size: 13px; padding: 16px 28px; }
}
/* ══════════════════════════════════════
   PERFORMANCE: REDUCED MOTION & TRANSPARENCY
   ══════════════════════════════════════ */

/* Disable heavy animations for users who prefer reduced motion
   (low-power mode, accessibility, older devices using OS setting) */
@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;
  }
  .reveal { opacity: 1; transform: none; transition: none; }
  .preloader { display: none; }
  .cursor { display: none; }
  .noise-bg { display: none; }
  .scroll-companion { display: none !important; }
}

/* Fallback for browsers/devices that can't handle backdrop-filter well */
@supports not (backdrop-filter: blur(1px)) {
  .nav-pill { background: rgba(10,10,10,0.94) !important; }
  .mobile-menu { background: rgba(10,10,10,0.99) !important; }
}

/* ══════════════════════════════════════
   MOBILE PERFORMANCE
   Disable compositing-heavy effects on phones/tablets.
   backdrop-filter is the #1 GPU killer on mobile.
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  /* Kill backdrop-filter entirely on mobile — biggest win */
  .nav-pill,
  .nav-dropdown,
  .mobile-menu,
  .pc-view-btn,
  .cta-popup-overlay,
  .popup-overlay,
  .cta-popup-overlay .cta-popup-box {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Increase nav-pill opacity to compensate for no blur */
  .nav-pill { background: rgba(10,10,10,0.92) !important; }

  /* Disable noise texture on mobile — SVG filter is expensive */
  .noise-bg { display: none; }

  /* Disable scroll companion on mobile */
  .scroll-companion { display: none !important; }

  /* Reduce reveal animation duration — feels snappier */
  .reveal { transition-duration: 0.6s !important; }

  /* Disable tcard/value-card lift on mobile — no hover on touch */
  .tcard:hover,
  .price-card:hover,
  .value-card:hover { transform: none !important; }

  /* Limit transitions to interactive elements only — do NOT use * selector, it breaks
     carousel momentum, preloader, sc-inner choreography, and all custom delays */
  .nav-cta, .nav-links a, .btn-fill, .btn-outline, .btn-cta-premium,
  .footer-soc, .fl-col a, .tcard, .price-card, .value-card,
  .mobile-close, .mm-sub a, .mm-group-btn, .nav-has-dropdown > a {
    transition-property: background, opacity, color, border-color, transform;
  }
}

/* touch-action: pan-y on all interactive areas prevents scroll delay */
@media (hover: none) {
  html { overscroll-behavior-y: contain; }
  .portfolio-carousel { touch-action: pan-x; }
  img { touch-action: manipulation; }
}
