/* ================= Theme tokens (edit values only) ================ */
:root{
  --brand:#E11D48;
  --accent:#F59E0B;

  /* Light theme */
  --page-bg:#ffffff;
  --surface:#ffffff;          /* cards, panels base */
  --surface-muted: #f8fafc;   /* subtle backgrounds */
  --text-strong:#0f172a;      /* headings */
  --text:#1f2937;             /* body text */
  --text-muted:#475569;       /* secondary text */
  --border:#e2e8f0;           /* lines, card borders */
  --link:#0ea5e9;
  --link-hover:#0284c7;
}
/* Dark overrides */
.dark{
  --page-bg:#0b1220;
  --surface:#0f172a;
  --surface-muted:#0b1220;
  --text-strong:#e6edf7;
  --text:#cbd5e1;
  --text-muted:#9aa7c7;
  --border:#253156;
  --link:#38bdf8;
  --link-hover:#7dd3fc;
}

/* Global usage */
body{ background: var(--page-bg); color: var(--text); }
a{ color: var(--link); }
a:hover{ color: var(--link-hover); }

/* Map common utility classes used in index.html to theme tokens */
.text-slate-900{ color: var(--text-strong) !important; }
.text-slate-800{ color: var(--text-strong) !important; }
.text-slate-700{ color: var(--text) !important; }
.text-slate-600{ color: var(--text-muted) !important; }
.text-slate-500{ color: var(--text-muted) !important; }
.text-slate-400{ color: var(--text-muted) !important; }
.dark .text-slate-100{ color: var(--text-strong) !important; }
.dark .text-slate-300{ color: var(--text) !important; }

.border-slate-200{ border-color: var(--border) !important; }
.dark .border-slate-800{ border-color: var(--border) !important; }

/* Footer/links already have classes, keep them but let theme drive colours */
.footer-link{ color: var(--text-muted); }
.footer-link:hover{ color: var(--brand); }

/* Card icon uses soft brand tint */
:root{ --brand-soft: #E11D481A; }
.card-icon{ background: var(--brand-soft); }

/* Theme variables */
:root {
  --brand:#E11D48;
  --accent:#F59E0B;

  /* Light theme defaults */
  --page-bg:#ffffff;
  --text:#0f172a;
  --text-muted:#475569;
  --surface:#ffffff;
  --surface-alt:#f1f5f9;
  --border:#e2e8f0;
}

.dark {
  --page-bg:#0b1220;
  --text:#f1f5f9;
  --text-muted:#94a3b8;
  --surface:#1e293b;
  --surface-alt:#0f172a;
  --border:#334155;
}

/* Common utility hooks */
body {
  background: var(--page-bg);
  color: var(--text);
}

.input {
  /* Using Tailwind via CDN; these are fallback styles */
  display:block; width:100%; border-radius:0.5rem; padding:0.5rem 0.75rem; margin-top:0.25rem;
  background: var(--surface);
  color: var(--text);
  border:1px solid var(--border);
}

.error-msg { margin-top:0.25rem; display:none; font-size:0.75rem; color:#e11d48; }
.footer-link { color: var(--text-muted); }
.footer-link:hover { color: var(--brand); }
.logo-pill { color: var(--text-muted); font-weight: 600; }

/* Cards */
.card {
  border-radius: 1rem; padding:1.5rem; box-shadow: 0 1px 2px rgba(0,0,0,.06);
  backdrop-filter: blur(4px); transition: transform .2s ease;
  background: var(--surface);
  border: 1px solid var(--border);
}
.card-img { width:100%; height:10rem; object-fit:cover; border-radius:0.5rem; margin-bottom:1rem; aspect-ratio: 1/1;}
.card-head { display:flex; align-items:center; gap:0.75rem; }
.card-icon { display:grid; place-items:center; width:2.5rem; height:2.5rem; border-radius:0.5rem; background:#E11D481A; }
.card-title { font-weight: 600; color: var(--text); }
.card-copy { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.75rem; }

/* Pricing */
.plan {
  position:relative; border-radius:1rem; padding:1.5rem; box-shadow: 0 1px 2px rgba(0,0,0,.06);
  background: var(--surface);
  border: 1px solid var(--border);
}
.plan-featured { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.badge { position:absolute; top:0.75rem; right:0.75rem; font-size:.75rem; padding:.25rem .5rem; border-radius:.375rem; background: var(--brand); color: #fff; }
.plan-title { font-weight: 600; color: var(--text); }
.plan-price { font-size: 1.875rem; font-weight: 700; color: var(--text); margin-top: 0.25rem; }
.plan-desc { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.5rem; }
.plan-list { color: var(--text-muted); font-size: 0.875rem; margin-top: 1rem; }
.btn-outline {
  margin-top:1rem; display:inline-flex; width:100%; align-items:center; justify-content:center; border-radius:0.5rem; padding:0.625rem 1rem; font-size:0.875rem; font-weight:600;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { background: var(--surface-alt); }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
}

/* ===== Scroll-driven "stage" hero ===== */
:root{
  --bg-1:#0ea5e9; /* sky */
  --bg-2:#a78bfa; /* violet */
  --bg-3:#f43f5e; /* rose */
  --scrub:0;
}
.dark{
  --bg-1:#0ea5e9;
  --bg-2:#7c3aed;
  --bg-3:#ef4444;
}
html, body { height: 100%; }
.stage-wrap{ height: 240vh; }
.stage{ position: sticky; top: 0; height: 100vh; overflow: clip;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  transition: background 0.2s linear;
}
.layers{ position: relative; width: 100%; height: 100%; isolation: isolate; }
.layer{ position: absolute; inset: 0; pointer-events: none; }
.dots{
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 18px 18px;
  transform: translateY(calc(var(--scrub) * -60px));
  mix-blend-mode: overlay;
}
.glow{
  filter: blur(40px); opacity: .7;
  background:
    radial-gradient(60vmax 60vmax at 20% 30%, rgba(255,255,255,.12), transparent),
    radial-gradient(40vmax 40vmax at 80% 70%, rgba(255,255,255,.10), transparent);
  transform: translateY(calc(var(--scrub) * 90px));
}
.content{ position: relative; z-index: 10; height: 100%; display: grid; place-items: center; }
.hero-card{
  width: min(1100px, 92vw);
  border-radius: 24px;
  padding: clamp(20px, 4vw, 48px);
  background: rgba(0,0,0,.35);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* Modern CSS Scroll-Linked Animation */
@keyframes heroBgShift {
  0%   { background: linear-gradient(180deg, var(--bg-1), var(--bg-2)); }
  50%  { background: linear-gradient(180deg, var(--bg-2), var(--bg-3)); }
  100% { background: linear-gradient(180deg, var(--bg-3), #111); }
}
@supports (animation-timeline: scroll()) {
  .stage{ animation: heroBgShift 1 linear both; animation-timeline: scroll(root block); animation-range: 0% 100%; }
  :root{ --scrub: 0; } /* JS not needed when supported */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .stage-wrap{ height: auto; }
  .stage{ position: relative; height: auto; transition: none; }
  .layer{ display: none; }
}

/* === Slide-in from left reveal used in Features === */
.reveal-left{ opacity: 0; transform: translateX(-20px); will-change: transform, opacity; }
.reveal-left.in-view{ opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }

/* ====== Gallery styles (auto-scrolling rail) ====== */
.gallery-rail{
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.75rem;
  mask-image: linear-gradient(90deg, transparent 0, black 6%, black 94%, transparent 100%);
}
.gallery-track{
  display: inline-flex;
  align-items: stretch;
  gap: 0.75rem;
  will-change: transform;
  animation: galleryScroll 22s linear infinite;
}
.gallery-rail.paused .gallery-track{ animation-play-state: paused; }
.gallery-rail:hover .gallery-track{ animation-play-state: paused; }

@keyframes galleryScroll{
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.gallery-item{
  display:block; position:relative; border-radius:0.75rem; overflow:hidden; border:1px solid var(--border);
  background: var(--surface);
  flex: 0 0 clamp(180px, 25vw, 280px);
}
.gallery-item img{ display:block; width:100%; height: clamp(140px, 18vw, 200px); object-fit:cover; }



/* ====== Gallery styles (match screenshot look) ====== */
#gallery .gallery-container{ position:relative; }
#gallery .mySlides{ display:none; position:relative; }
#gallery .mySlides img {
  width: 50vw;
  height: 50vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background-color: #000;
}
#gallery .numbertext{
  position:absolute; top:8px; left:12px;
  color:#f2f2f2; font-size:12px; background: rgba(0,0,0,.55);
  padding:4px 8px; border-radius:4px; letter-spacing:.02em;
}

/* Prev/Next arrows */
#gallery .prev, #gallery .next{
  position:absolute; top:50%; transform: translateY(-50%);
  color:#fff; font-weight:700; font-size:22px; line-height:1;
  padding:12px 14px; cursor:pointer; border:none;
  background: transparent; border-radius:6px;
}
#gallery .prev{ left: 10px; }
#gallery .next{ right: 10px; }
#gallery .prev:hover, #gallery .next:hover{ background: rgba(0,0,0,.8); }

/* Caption bar */
#gallery .caption-container{
  margin-top:0;
  background:#222;
  color:#fff;
  text-align:center;
  padding:10px 16px;
  font-size: 14px;
}

/* Thumbnail strip */
#gallery .thumb-row{
  display:flex; gap:0; margin-top: 10px;
  background: transparent;
}
#gallery .thumb{
  flex: 1 1 16.66%;
  border:none; padding:0; background: transparent;
}
#gallery .thumb img{
  width:100%; height: 96px; object-fit: cover; display:block;
  opacity: .6; transition: opacity .2s ease;
}
#gallery .thumb img.active, #gallery .thumb img:hover{ opacity: 1; }

/* Fade for slide transition */
#gallery .fade{ animation: galleryFade .35s ease; }
@keyframes galleryFade{ from{ opacity:.7 } to{ opacity:1 } }


/* Lightbox */
.lightbox{
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
}
.lightbox.hidden{ display:none; }
.lightbox-backdrop{
  position:absolute; inset:0; background: rgba(0,0,0,.6);
}
.lightbox-figure{
  position:relative; max-width:min(92vw,1000px); max-height: 82vh; z-index:1;
  background: var(--surface); border-radius:1rem; padding:0.5rem; border:1px solid var(--border);
  display:grid; place-items:center;
}
.lightbox-figure img{
  display:block; max-width:100%; max-height: 78vh; width:auto; height:auto; border-radius:0.75rem;
}
.lightbox-btn{
  position:absolute; z-index:2; border:none; border-radius:999px; width:40px; height:40px; cursor:pointer;
  background: rgba(0,0,0,.65); color:#fff; display:grid; place-items:center;
}
.lightbox-btn.prev{ left: 1rem; }
.lightbox-btn.next{ right: 1rem; }
.lightbox-btn.close{ top: 1rem; right: 1rem; background: rgba(0,0,0,.75); }

/* ===== Background video only mode (keep existing option intact) ===== */
#bg-video{
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #000;
  transform: translateZ(0);
  will-change: transform;
}
body { background: transparent !important; }
.stage{ background: transparent !important; }
@supports (animation-timeline: scroll()) {
  .stage{ animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-track{ animation: none; }
}


@media (max-width: 640px) {
  #gallery .mySlides img {
    height: auto;
    max-height: 80vh;
  }
}
