/* =========================================
   STEREOMEDIA — HOMEPAGE.CSS
   Palette, layout, components, sections
   ========================================= */

/* ------------------------------
   0) Design Tokens
------------------------------ */
:root {
  /* Muted neutrals */
  --ink: #1f262b;       /* soft slate */
  --muted: #6a7178;     /* cool gray text */
  --bg: #f5f6f7;        /* light mist */

  /* Desaturated brand */
  --brand: #3e6ea8;     /* muted steel blue */
  --brand-weak: #e8eef7;/* very light brand tint */

  /* Surfaces / lines / shadow */
  --card: #ffffff;
  --line: #e6eaee;
  --shadow: 0 6px 22px rgba(23,32,38,.06);

  /* Sticky nav anchor offset */
  --nav-offset: 80px;   /* mobile default */
}
@media (min-width: 992px) {
  :root { --nav-offset: 90px; }        /* desktop */
}

/* ------------------------------
   1) Base / Typography
------------------------------ */
html { scroll-behavior: smooth; }
body {
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.lead { color: var(--muted); }
.section-title { font-weight: 700; letter-spacing: -0.01em; }
section[id] { scroll-margin-top: var(--nav-offset); }

/* ------------------------------
   2) Navbar / Logo
------------------------------ */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav-link { color: var(--ink); }
.nav-link:hover { color: var(--brand); }

.navbar-brand {
  display: flex;
  align-items: center;
  padding-top: .25rem;
  padding-bottom: .25rem;
  min-height: 48px;
}

/* If you use <img class="logo-img"> inside .navbar-brand */
.logo-img {
  height: clamp(22px, 4vw, 40px);
  width: auto;
  max-width: 100%;
  display: block;
}

/* If you use a standalone .logo (animated GIF etc.) */
.logo {
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: 0; /* left-justified */
}
@media (max-width: 768px) {
  .logo { width: 70%; max-width: 250px; min-width: 150px; }
}
@media (min-width: 769px) {
  .logo { width: 300px; }
}

/* Optional: constrain any brand img in navbar context */
.navbar-brand img { max-height: 100px; width: auto; }

/* ------------------------------
   3) Hero
------------------------------ */
.hero {
  background:
    radial-gradient(1200px 600px at 8% 10%, #eaeff6 0, transparent 60%),
    radial-gradient(900px 480px at 92% 0%, #f2f4f8 0, transparent 60%),
    #fff;
}
.hero h1 { font-weight: 700; letter-spacing: -.02em; }

/* ------------------------------
   4) Buttons
------------------------------ */
.btn-brand {
  background: var(--brand);
  color: #fff;
  border: 1px solid rgba(0,0,0,.04);
  transition: background-color .2s ease, transform .15s ease;
}
.btn-brand:hover { background: #345b8b; color: #fff; }
.btn-brand:active { transform: translateY(1px); }

.btn-outline-dark {
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline-dark:hover {
  background: #f2f5f8;
  color: var(--ink);
  border-color: #d7dde4;
}

.btn-brand-outline {
  color: var(--brand);
  border: 2px solid var(--brand);
  background: transparent;
  transition: background-color .2s ease, color .2s ease, transform .15s ease;
}
.btn-brand-outline:hover { background: var(--brand); color: #fff; }
.btn-brand-outline:active { transform: translateY(1px); }

/* “See All / Browse All” pill */
.btn-projects {
  position: relative;
  background: linear-gradient(135deg, var(--brand) 0%, #2c3e50 100%);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.btn-projects:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.2);
  color: #fff;
}
.btn-projects::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 60%);
  transform: scale(0);
  transition: transform 0.5s ease;
}
.btn-projects:hover::before { transform: scale(1); }

/* Mobile full-width; wider (bar-like) on md+ */
.browse-all-btn { width: 100%; }
@media (min-width: 768px) {
  .browse-all-btn { width: 50%; } /* tune: 40–60% works nicely */
}

/* ------------------------------
   5) Cards / Services
------------------------------ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

/* legacy icon bubble (kept if used elsewhere) */
.icon-bubble {
  width: 56px; height: 56px; border-radius: 14px;
  display: inline-grid; place-items: center; margin-bottom: .75rem;
  background: var(--brand-weak); color: var(--brand);
  font-size: 1.5rem; border: 1px solid #dfe7f2;
}

/* Service card headings with tasteful color variety */
#services .service-card h5 {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--brand);
  transition: color .3s ease;
}
#services .row.g-4 > [class*="col-"]:nth-child(1)  .service-card h5 { color: #3e6ea8; }
#services .row.g-4 > [class*="col-"]:nth-child(2)  .service-card h5 { color: #d98e3c; }
#services .row.g-4 > [class*="col-"]:nth-child(3)  .service-card h5 { color: #3ca884; }
#services .row.g-4 > [class*="col-"]:nth-child(4)  .service-card h5 { color: #a83e5f; }
#services .row.g-4 > [class*="col-"]:nth-child(5)  .service-card h5 { color: #8b3ca8; }
#services .row.g-4 > [class*="col-"]:nth-child(6)  .service-card h5 { color: #a86c3e; }
#services .row.g-4 > [class*="col-"]:nth-child(7)  .service-card h5 { color: #3ea896; }
#services .row.g-4 > [class*="col-"]:nth-child(8)  .service-card h5 { color: #5c3ea8; }
#services .row.g-4 > [class*="col-"]:nth-child(9)  .service-card h5 { color: #2f7a9a; }
#services .service-card:hover h5 { color: var(--ink); }

/* Category badges (if present) */
.badge.cat { font-weight: 600; }
.cat-infovideo   { background:#e9f0ea; color:#202427; border:1px solid #dfe6e0; }
.cat-drone       { background:#e9f1f1; color:#202427; border:1px solid #dde8e8; }
.cat-animation   { background:#f0eaf1; color:#202427; border:1px solid #e6dfee; }
.cat-documentary { background:#f2ece6; color:#202427; border:1px solid #e7dfd7; }
.cat-musicvideo  { background:#ececf6; color:#202427; border:1px solid #e0e1ef; }
.cat-graphics    { background:#f5ecec; color:#202427; border:1px solid #ebdfdf; }
.cat-website     { background:#ecf2f6; color:#202427; border:1px solid #e0e9ef; }
.cat-other       { background:#eff0f2; color:#202427; border:1px solid #e3e5e8; }

/* ------------------------------
   6) Recent Work Grid
------------------------------ */
.proj-thumb { aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; }

/* Style only dynamically injected images so they don’t kiss the card edges */
#work-grid img.proj-thumb {
  width: 100%;
  height: 300px;
  display: block;
  object-fit: cover;
  border-radius: 16px;
  padding: 8px;
  box-sizing: border-box;
}

/* Subtle entrance */
.fade-in { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.fade-in.show { opacity: 1; transform: none; }

/* ------------------------------
   7) Estimator (Modal)
------------------------------ */
#estimatorModal .modal-content { background:#fff; }
#estimateBreakdown .line {
  display:flex; justify-content:space-between; gap:1rem;
  padding:.25rem 0; border-bottom:1px dashed #e5e9ee;
}
#estimateBreakdown .line:last-child { border-bottom:0; }
#estimateBreakdown .muted { color:#6a7178; }

.estimator-note {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  background: #fff;
  box-shadow: var(--shadow);
}
.beta-badge {
  background: linear-gradient(90deg, var(--brand), #2f7a9a);
  color: #fff;
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .06em;
  padding: .25rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.06);
}

/* ------------------------------
   8) Music Player
------------------------------ */
#sm-player .card { border:1px solid var(--line); border-radius:14px; }
#playlist li { cursor: pointer; }
#playlist li.active { background: var(--brand-weak); border-left: 3px solid var(--brand); }
#sm-player .btn { border-radius: 999px; }

/* ------------------------------
   9) Footer
------------------------------ */
.footer {
  background:#f1f3f5;
  color:#5b636a;
  border-top:1px solid var(--line);
}
.footer a { color:#5b636a; text-decoration:none; }
.footer a:hover { text-decoration:underline; color:#2f3941; }