/* ============================================================
   AccServiceManager — demo gallery
   Brand teal (#0d9488). Light + dark themes via [data-theme].
   Self-contained: no external fonts/JS frameworks.
   ============================================================ */

:root {
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;

  /* light theme tokens */
  --ink:      #0f172a;
  --ink-2:    #334155;
  --muted:    #64748b;
  --line:     #e2e8f0;
  --bg:       #ffffff;
  --bg-soft:  #f8fafc;
  --bg-soft2: #f1f5f9;
  --card:     #ffffff;
  --topbar-bg: rgba(255,255,255,.78);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow-lg: 0 24px 60px rgba(13,148,136,.18), 0 8px 24px rgba(15,23,42,.10);
  --radius:   16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
  --ink:      #e9eef5;
  --ink-2:    #c4d0de;
  --muted:    #8da0b6;
  --line:     #20304a;
  --bg:       #0a0f1c;
  --bg-soft:  #0e1626;
  --bg-soft2: #131e33;
  --card:     #111b2e;
  --topbar-bg: rgba(10,15,28,.72);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 60px rgba(20,184,166,.22), 0 10px 30px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .95rem; line-height: 1;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-primary { background: var(--teal-600); color: #fff; box-shadow: 0 6px 16px rgba(13,148,136,.30); }
.btn-primary:hover { background: var(--teal-700); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(13,148,136,.40); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal-500); color: var(--teal-500); background: var(--bg-soft); }

/* ── Top bar ───────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 56px);
  background: var(--topbar-bg); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { display: block; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-word { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.brand-word.small { font-size: .95rem; }
.brand-accent { color: var(--teal-500); }
.topnav { display: flex; align-items: center; gap: 10px; }
.topnav > a:first-child { color: var(--ink-2); font-weight: 600; font-size: .92rem; padding: 8px 10px; }
.topnav > a:first-child:hover { color: var(--teal-500); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.theme-toggle:hover { color: var(--teal-500); border-color: var(--teal-500); transform: rotate(12deg); }
.theme-toggle .ic-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: block; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.hero-glow {
  position: absolute; inset: -40% 0 auto 0; height: 720px; pointer-events: none;
  background:
    radial-gradient(55% 60% at 18% 0%, rgba(20,184,166,.22), transparent 60%),
    radial-gradient(45% 55% at 88% 12%, rgba(13,148,136,.18), transparent 60%);
}
.hero-inner {
  position: relative; max-width: 1180px; margin: 0 auto;
  padding: clamp(44px, 7vw, 88px) clamp(16px, 5vw, 56px);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
}
.hero-copy { max-width: 560px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 16px; padding: 6px 14px;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal-500); background: rgba(20,184,166,.12); border-radius: 999px;
}
.eyebrow::first-letter { font-size: .7em; }
.hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.4rem); line-height: 1.06; color: var(--ink); }
.grad {
  background: linear-gradient(110deg, var(--teal-600), var(--teal-500) 55%, var(--teal-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin: 20px 0 0; font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.6; color: var(--ink-2); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin: 14px 0 0; font-size: .85rem; color: var(--muted); }

/* Browser mockup in the hero */
.hero-media { perspective: 1400px; }
.browser {
  border-radius: 14px; overflow: hidden; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: rotateY(-7deg) rotateX(3deg); transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.hero-media:hover .browser { transform: rotateY(0deg) rotateX(0deg); }
.browser-bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 12px;
  background: var(--bg-soft2); border-bottom: 1px solid var(--line);
}
.bdot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.bdot.r { background: #fca5a5; } .bdot.y { background: #fde68a; } .bdot.g { background: #86efac; }
.browser-url {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 8px;
  font-size: .74rem; color: var(--muted); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}
.browser-screen { position: relative; aspect-ratio: 16 / 9; background: #000; cursor: pointer; }
.browser-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(150deg, var(--teal-600), var(--teal-700)); }
.hero-playbtn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); color: var(--teal-700); box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .2s ease;
}
.browser-screen:hover .hero-playbtn { transform: translate(-50%, -50%) scale(1.08); }

/* ── Section head + filters ────────────────────────────────── */
.gallery-wrap { max-width: 1180px; margin: 0 auto; padding: clamp(44px, 6vw, 80px) clamp(16px, 5vw, 56px); }
.section-head { text-align: center; margin-bottom: clamp(24px, 4vw, 36px); }
.section-head h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); color: var(--ink); }
.section-head p { margin: 12px 0 0; color: var(--muted); font-size: 1.05rem; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: clamp(28px, 4vw, 44px); }
.chip {
  font-weight: 600; font-size: .86rem; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line);
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.chip:hover { border-color: var(--teal-500); color: var(--teal-500); }
.chip.active { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }

/* ── Gallery grid ──────────────────────────────────────────── */
.gallery {
  display: grid; gap: clamp(18px, 2.4vw, 28px);
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(20,184,166,.5); }
.card:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 2px; }
.card.hidden { display: none; }

/* Landscape (16:9) poster */
.card-poster {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  display: flex; align-items: flex-end; justify-content: flex-start; color: #fff; overflow: hidden;
}
.card-poster img,
.card-poster video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-poster video { opacity: 0; transition: opacity .35s ease; }
.card.previewing .card-poster video { opacity: 1; }
.card-poster .scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,0) 40%, rgba(15,23,42,.55) 100%); }
.poster-num {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-weight: 800; font-size: .8rem; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.30); backdrop-filter: blur(4px);
}
.poster-title { position: relative; z-index: 2; padding: 16px; font-weight: 700; font-size: 1.05rem; line-height: 1.25; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.play-badge {
  position: absolute; top: 50%; left: 50%; z-index: 2; transform: translate(-50%, -50%) scale(.9);
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); color: var(--teal-700); box-shadow: 0 8px 24px rgba(0,0,0,.30);
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
.card:hover .play-badge { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.soon-badge {
  position: absolute; bottom: 14px; right: 14px; z-index: 3;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; color: #fff;
  background: rgba(15,23,42,.55); border: 1px solid rgba(255,255,255,.25);
}
.card-body { padding: 14px 16px 16px; }
.card-body h3 { font-size: 1rem; color: var(--ink); }
.card-body p { margin: 6px 0 0; font-size: .88rem; line-height: 1.45; color: var(--muted); }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.card-cat { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.card-dur { font-size: .76rem; font-weight: 600; color: var(--teal-500); background: rgba(20,184,166,.12); padding: 3px 9px; border-radius: 999px; }

/* Placeholder gradients */
.ph0 { background: linear-gradient(150deg, #0d9488, #0f766e); }
.ph1 { background: linear-gradient(150deg, #14b8a6, #0d9488); }
.ph2 { background: linear-gradient(150deg, #0e7490, #0d9488); }
.ph3 { background: linear-gradient(150deg, #0f766e, #155e63); }
.ph4 { background: linear-gradient(150deg, #2dd4bf, #0d9488); }
.ph5 { background: linear-gradient(150deg, #0891b2, #0f766e); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Closing CTA ───────────────────────────────────────────── */
.cta-band {
  text-align: center; color: #fff; padding: clamp(56px, 8vw, 96px) clamp(16px, 5vw, 56px);
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600) 55%, var(--teal-500));
}
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.cta-band p { max-width: 560px; margin: 14px auto 28px; font-size: 1.08rem; line-height: 1.55; color: rgba(255,255,255,.92); }
.cta-band .btn-primary { background: #fff; color: var(--teal-700); box-shadow: 0 10px 28px rgba(0,0,0,.20); }
.cta-band .btn-primary:hover { background: #f0fdfa; }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  max-width: 1180px; margin: 0 auto; padding: 28px clamp(16px, 5vw, 56px);
  color: var(--muted); font-size: .9rem;
}

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; gap: clamp(8px, 2vw, 28px);
  padding: clamp(12px, 4vw, 40px); background: rgba(5,9,17,.88); backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; animation: lb-in .2s ease; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-stage { display: flex; flex-direction: column; gap: clamp(14px, 2.5vw, 24px); align-items: center; max-width: 960px; width: 100%; }
.lb-frame {
  position: relative; width: min(92vw, 900px); aspect-ratio: 16 / 9; max-height: 72vh;
  background: #000; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.lb-frame video { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; background: #000; }
.lb-soon {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #fff; text-align: center; padding: 22px; background: linear-gradient(150deg, var(--teal-600), var(--teal-700));
}
.lb-soon .soon-icon { font-size: 2.4rem; opacity: .9; }
.lb-soon b { font-size: 1.05rem; }
.lb-soon span { font-size: .85rem; color: rgba(255,255,255,.8); }
.lb-meta { max-width: 760px; color: #fff; text-align: center; }
.lb-num { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5eead4; }
.lb-meta h3 { margin: 8px 0 0; font-size: 1.4rem; }
.lb-meta p { margin: 8px 0 0; line-height: 1.55; color: rgba(255,255,255,.82); }
.lb-close {
  position: absolute; top: 18px; right: 22px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 1.6rem; line-height: 1; color: #fff; background: rgba(255,255,255,.12);
  transition: background .2s ease;
}
.lb-close:hover { background: rgba(255,255,255,.24); }
.lb-nav {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 1.7rem; line-height: 1; color: #fff; background: rgba(255,255,255,.10); transition: background .2s ease;
}
.lb-nav:hover { background: rgba(255,255,255,.22); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { max-width: none; }
  .browser { transform: none; }
}
@media (max-width: 720px) {
  .topnav > a:first-child { display: none; }
  .lb-nav { position: fixed; top: 50%; transform: translateY(-50%); }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .browser { transform: none; }
}
