/* =====================================================================
   GRAPHIC STUDIO — custom styles (Tailwind handles most utilities)
   Theme derived from the GRAPHIC STUDIO logo:
     blue #1877E0 · magenta #E5127A · orange #FF8A00 · green #2EA84A
     purple #7C3AED · navy #1B2A47
   Light / Dark: every semantic colour is an RGB triplet variable that the
   Tailwind config consumes ( rgb(var(--c-x) / <alpha-value>) ), so
   toggling html[data-theme="dark"] re-colours the entire site.
   ===================================================================== */
:root {
  color-scheme: light;
  /* semantic (RGB triplets) */
  --c-page: 255 255 255;
  --c-surface: 255 255 255;
  --c-tint: 247 249 252;
  --c-soft: 238 245 253;
  --c-line: 227 233 242;
  --c-ink: 27 42 71;
  --c-muted: 91 107 130;
  --c-navy: 27 42 71;

  /* brand (fixed in both themes) */
  --blue: #1877E0;
  --blue-dark: #0F5FBF;
  --pink: #E5127A;
  --orange: #FF8A00;
  --green: #2EA84A;
  --purple: #7C3AED;
  --wa: #25D366;
  --brand-gradient: linear-gradient(90deg, #1877E0 0%, #7C3AED 30%, #E5127A 55%, #FF8A00 80%, #2EA84A 100%);

  /* derived */
  --page: rgb(var(--c-page));
  --surface: rgb(var(--c-surface));
  --soft: rgb(var(--c-soft));
  --line: rgb(var(--c-line));
  --ink: rgb(var(--c-ink));
  --muted: rgb(var(--c-muted));
  --navy: rgb(var(--c-navy));
  --btn-dark-bg: #1B2A47;
  --btn-dark-fg: #fff;
  --shadow-color: 27 42 71;

  --header-h: 64px;
  --bottom-nav-h: 64px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --c-page: 11 18 32;
  --c-surface: 17 26 46;
  --c-tint: 14 22 40;
  --c-soft: 20 32 56;
  --c-line: 38 50 76;
  --c-ink: 230 237 247;
  --c-muted: 154 168 190;
  --c-navy: 8 13 24;
  --btn-dark-bg: #E6EDF7;
  --btn-dark-fg: #0B1220;
  --shadow-color: 0 0 0;
}

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--page);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}
.font-display { font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif; }
img, video { max-width: 100%; }

/* bottom padding so the mobile bottom nav never hides content */
@media (max-width: 767px) {
  body { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
}

/* ---------- Theme-adaptive logo ---------- */
img.logo-dark { display: none !important; }
html[data-theme="dark"] img.logo-light { display: none !important; }
html[data-theme="dark"] img.logo-dark { display: block !important; }

/* ---------- Theme toggle icons / labels ---------- */
.theme-toggle .icon-moon, .theme-toggle .theme-label-dark { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun, html[data-theme="dark"] .theme-toggle .theme-label-light { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .theme-label-dark { display: inline; }

/* ---------- Brand helpers ---------- */
.brand-bar { height: 3px; background: var(--brand-gradient); }
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bg-brand-gradient { background: var(--brand-gradient); }
.tone-blue   { background: rgba(24,119,224,.14); color: var(--blue); }
.tone-pink   { background: rgba(229,18,122,.14); color: var(--pink); }
.tone-orange { background: rgba(255,138,0,.16);  color: var(--orange); }
.tone-green  { background: rgba(46,168,74,.15);  color: var(--green); }
.tone-purple { background: rgba(124,58,237,.14); color: var(--purple); }
html[data-theme="dark"] .tone-blue   { color: #6FB1FF; }
html[data-theme="dark"] .tone-pink   { color: #FF6BB3; }
html[data-theme="dark"] .tone-orange { color: #FFB25C; }
html[data-theme="dark"] .tone-green  { color: #6BD98A; }
html[data-theme="dark"] .tone-purple { color: #B48CFF; }

/* ---------- Hide scrollbars on horizontal rows ---------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- Horizontal scroll rows ---------- */
.hscroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: 4px;
}
.hscroll > * { scroll-snap-align: start; flex: 0 0 auto; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; position: relative; }
.marquee__track {
  display: inline-flex;
  animation: marquee 36s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee .dot { width: 6px; height: 6px; border-radius: 9999px; display: inline-block; }
.marquee__track > div > span:nth-child(5n+1) .dot { background: var(--pink); }
.marquee__track > div > span:nth-child(5n+2) .dot { background: var(--blue); }
.marquee__track > div > span:nth-child(5n+3) .dot { background: var(--orange); }
.marquee__track > div > span:nth-child(5n+4) .dot { background: var(--green); }
.marquee__track > div > span:nth-child(5n+5) .dot { background: var(--purple); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 70ms); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease, background-color .3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgb(var(--shadow-color) / .35);
  border-color: transparent;
}
html[data-theme="dark"] .card:hover { border-color: rgb(var(--c-line)); }
.card img, .img-zoom img { transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.card:hover img, .img-zoom:hover img { transform: scale(1.06); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .875rem; letter-spacing: .02em;
  padding: .8rem 1.5rem; border-radius: 9999px;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, filter .2s ease;
  min-height: 44px;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(90deg, var(--blue) 0%, var(--purple) 100%);
  color: #fff; box-shadow: 0 10px 24px -12px rgba(24,119,224,.9);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-dark { background: var(--btn-dark-bg); color: var(--btn-dark-fg); }
.btn-dark:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-white { background: #fff; color: #1B2A47; }
.btn-white:hover { background: #EEF5FD; }
.btn-outline { border: 1.5px solid var(--line); color: var(--ink); background: var(--surface); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 10px 24px -12px rgba(37,211,102,.8); }
.btn-wa:hover { background: #1ebe5b; transform: translateY(-1px); }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem; border-radius: 9999px; border: 1.5px solid var(--line);
  font-size: .8125rem; font-weight: 600; color: var(--ink); background: var(--surface);
  white-space: nowrap; min-height: 42px;
  transition: all .25s ease;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Header ---------- */
#site-header { transition: box-shadow .3s ease, background-color .3s ease; }
#site-header.is-scrolled { box-shadow: 0 6px 24px -14px rgb(var(--shadow-color) / .35); }
/* 3-column grid: equal side columns keep the centre column (logo on mobile) exactly centred */
.header-row {
  height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: .5rem;
}
.header-left { justify-content: flex-start; }
.header-right { justify-content: flex-end; }
@media (min-width: 768px) { .header-row { height: 80px; } }
@media (min-width: 1024px) { .header-row { grid-template-columns: auto 1fr auto; column-gap: 1.5rem; } }
.site-logo { height: 50px; width: auto; max-width: 100%; display: block; object-fit: contain; }
@media (min-width: 420px) { .site-logo { height: 54px; } }
@media (min-width: 768px) { .site-logo { height: 62px; } }
.nav-link { position: relative; padding: .5rem 0; font-size: .8125rem; font-weight: 600; letter-spacing: .12em; color: var(--ink); }
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--brand-gradient); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--blue); }
html[data-theme="dark"] .nav-link.is-active { color: #6FB1FF; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 9999px; color: var(--ink);
  transition: background-color .2s ease, color .2s ease;
}
.icon-btn:hover { background: var(--soft); color: var(--blue); }

/* ---------- Mobile drawer ---------- */
#mobile-drawer { transform: translateX(-100%); transition: transform .35s cubic-bezier(.22,.61,.36,1); }
#mobile-drawer.is-open { transform: translateX(0); }
#drawer-backdrop { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
#drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer-link:hover { color: var(--blue); }

/* ---------- Hero ---------- */
#hero-swiper { --swiper-theme-color: #fff; }
#hero-swiper .swiper-slide { height: auto; }
.hero-media { position: absolute; inset: 0; background: #0f1a30; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media video { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.hero-media video.is-ready { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,18,38,.72) 0%, rgba(10,18,38,.42) 55%, rgba(10,18,38,.12) 100%); }
@media (max-width: 767px) {
  .hero-overlay { background: linear-gradient(180deg, rgba(10,18,38,.2) 0%, rgba(10,18,38,.78) 100%); }
}
.hero-content > * { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.swiper-slide-active .hero-content > *:nth-child(1) { transition-delay: .15s; }
.swiper-slide-active .hero-content > *:nth-child(2) { transition-delay: .3s; }
.swiper-slide-active .hero-content > *:nth-child(3) { transition-delay: .45s; }
.swiper-slide-active .hero-content > *:nth-child(4) { transition-delay: .6s; }
.swiper-slide-active .hero-content > * { opacity: 1; transform: none; }
#hero-swiper .swiper-pagination-bullet { width: 8px; height: 8px; background: #fff; opacity: .5; transition: all .3s ease; }
#hero-swiper .swiper-pagination-bullet-active { width: 28px; border-radius: 999px; opacity: 1; background: var(--brand-gradient); }
#hero-swiper .swiper-button-next, #hero-swiper .swiper-button-prev {
  width: 46px; height: 46px; border-radius: 9999px; background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.35); color: #fff;
  transition: background-color .2s ease;
}
#hero-swiper .swiper-button-next:hover, #hero-swiper .swiper-button-prev:hover { background: rgba(255,255,255,.3); }
#hero-swiper .swiper-button-next::after, #hero-swiper .swiper-button-prev::after { font-size: 16px; font-weight: 800; }
@media (max-width: 767px) {
  #hero-swiper .swiper-button-next, #hero-swiper .swiper-button-prev { display: none; }
}
.hero-eyebrow-dot { background: var(--brand-gradient); }

/* ---------- Category carousel ----------
   Mobile: snug swipe row (edge-to-edge).  Tablet/desktop: all 9 items share the
   full container width with equal gaps — no dead space on the right.            */
.category-row {
  display: flex; gap: .75rem;
  overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  margin: 0 -1rem; padding: .25rem 1rem .5rem;
}
.category-item { flex: 0 0 auto; width: 84px; scroll-snap-align: start; }
.category-thumb { width: 68px; height: 68px; }
@media (min-width: 640px) {
  .category-row { margin: 0; padding: .25rem 0 .5rem; overflow: visible; justify-content: space-between; gap: .5rem; }
  .category-item { flex: 1 1 0; width: auto; min-width: 0; }
  .category-thumb { width: 76px; height: 76px; }
}
@media (min-width: 1024px) { .category-thumb { width: 92px; height: 92px; } .category-item { gap: .75rem; } }
@media (min-width: 1280px) { .category-thumb { width: 104px; height: 104px; } }
.category-item > span:last-child { max-width: 100%; }
.category-thumb.is-active { border-color: var(--blue) !important; box-shadow: 0 0 0 4px rgba(24,119,224,.18); }

/* ---------- Needs cards ---------- */
.need-card { aspect-ratio: 4 / 5; position: relative; border-radius: 1.5rem; overflow: hidden; display: block; }
.need-card img { width: 100%; height: 100%; object-fit: cover; }
.need-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,18,38,0) 40%, rgba(10,18,38,.72) 100%);
}

/* ---------- Portfolio ---------- */
.portfolio-item { transition: opacity .35s ease, transform .35s ease; }
.portfolio-item.is-hidden { display: none; }

/* ---------- Lightbox ---------- */
#lightbox { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
#lightbox.is-open { opacity: 1; pointer-events: auto; }
#lightbox img { max-height: 82vh; }

/* ---------- Video cards (landscape 16:9) ---------- */
.video-card {
  aspect-ratio: 16 / 9; position: relative; border-radius: 1.5rem; overflow: hidden;
  background: #0f1a30; border: 1px solid rgba(255,255,255,.08);
}
.video-card video, .video-card .video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-card video { opacity: 0; transition: opacity .4s ease; }
.video-card.is-playing video { opacity: 1; }
.video-card.is-playing .video-poster { opacity: 0; transition: opacity .4s ease; }
.video-card .video-controls { opacity: 0; transition: opacity .25s ease, transform .25s ease; }
.video-card:hover .video-controls, .video-card:focus-within .video-controls, .video-card.is-paused .video-controls { opacity: 1; }
.video-card .video-toggle:active .video-controls { transform: scale(.94); }
.video-spinner {
  width: 40px; height: 40px; border-radius: 9999px; border: 3px solid rgba(27,42,71,.2);
  border-top-color: #1B2A47; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Google map (soften in dark mode) ---------- */
html[data-theme="dark"] #google-map-embed { filter: invert(.9) hue-rotate(180deg) saturate(.75) brightness(.95); }

/* ---------- Floating WhatsApp ---------- */
#floating-whatsapp { bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { #floating-whatsapp { bottom: 28px; } }
.pulse::before {
  content: ''; position: absolute; inset: 0; border-radius: 9999px; background: var(--wa);
  animation: pulse-ring 2.2s cubic-bezier(.22,.61,.36,1) infinite; z-index: -1;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: .6; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- Mobile bottom nav ---------- */
#mobile-bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
.bnav-item { color: var(--muted); transition: color .2s ease; }
.bnav-item.is-active { color: var(--blue); }
html[data-theme="dark"] .bnav-item.is-active { color: #6FB1FF; }
.bnav-item .bnav-dot { width: 4px; height: 4px; border-radius: 9999px; background: var(--blue); opacity: 0; transform: scale(0); transition: all .25s ease; }
.bnav-item.is-active .bnav-dot { opacity: 1; transform: scale(1); }

/* ---------- Search overlay ---------- */
#search-overlay { opacity: 0; pointer-events: none; transition: opacity .25s ease; }
#search-overlay.is-open { opacity: 1; pointer-events: auto; }
#search-overlay .search-panel { transform: translateY(-12px); transition: transform .3s cubic-bezier(.22,.61,.36,1); }
#search-overlay.is-open .search-panel { transform: none; }
#search-input { color: var(--ink); }

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee__track, .pulse::before { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
