/* ============ Design tokens ============ */
:root{
  --brand: #0ea5e9;          /* primary accent */
  --ink: #0f172a;            /* headline color */
  --muted: #475569;          /* body color */
  --ring: rgba(14,165,233,.18);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(2,6,23,.08);
}

body{ color: var(--ink); }

/* ============ Navbar & Footer (shared) ============ */
.navbar{ backdrop-filter: saturate(1.2) blur(6px); }
.navbar .nav-link{ font-weight: 500; }
.navbar .nav-link.active{ color: var(--brand) !important; }

footer{
  background: linear-gradient(180deg,#0b1020 0%, #0a0f1b 100%);
  color: #cbd5e1;
}
footer a{ color:#e2e8f0; text-decoration: none; }
footer a:hover{ color: #fff; text-decoration: underline; }

/* ============ Home (shared components used on home) ============ */
.hero{
  position: relative;
  isolation: isolate;
  overflow: clip;
  background:
    radial-gradient(60% 50% at 10% 0%, rgba(14,165,233,.12), transparent 60%),
    radial-gradient(60% 60% at 90% 10%, rgba(59,130,246,.10), transparent 60%),
    linear-gradient(180deg,#f8fafc 0%, #eef2f7 100%);
  border-bottom: 1px solid rgba(2,6,23,.06);
}
.hero .display-4{ letter-spacing: -.5px; }
.hero-badge{
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: .4rem .65rem;
  border-radius: 999px;
  font-size: .9rem;
  display: inline-flex;
  gap: .5rem;
  align-items: center;
}
.btn-brand{
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: #0284c7;
  --bs-btn-hover-border-color: #0284c7;
  --bs-btn-shadow: 0 10px 24px rgba(14,165,233,.35);
  box-shadow: var(--bs-btn-shadow);
}

.hero-card{
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(2,6,23,.06);
}

/* Highlight cards */
.hi-card{
  background: #fff; border-radius: 14px;
  border: 1px solid rgba(2,6,23,.08);
  box-shadow: 0 6px 20px rgba(15,23,42,.07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hi-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(15,23,42,.12);
}

/* Stat strip */
.stat{ padding: 1rem 0; }
.stat .num{
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.5px;
}
.stat .lbl{ color: var(--muted); }

/* Gallery peek (home) */
.peek img{
  border-radius: 12px;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 1px solid rgba(2,6,23,.08);
}

/* Quick tiles (home) */
.feature-tile{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: 180px;
  padding: 1.25rem 1.25rem 1.1rem;
  border-radius: 16px;
  text-decoration: none;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(2,6,23,.08);
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden; isolation: isolate;
}
.feature-tile:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(2,6,23,.12);
  border-color: rgba(14,165,233,.35);
}
.feature-tile h3{
  margin: .15rem 0 0;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 700;
}
.feature-tile p{ margin: 0; color: #475569; font-size: .98rem; }
.tile-cta{ margin-top: auto; font-weight: 600; color: var(--brand); }
.tile-cta i{ vertical-align: -1px; }
.tile-badge{
  width: 42px; height: 42px; display: grid; place-items: center;
  font-size: 1.1rem; border-radius: 12px; color: #0b1220;
  background: #fff; border: 1px solid rgba(2,6,23,.08);
  box-shadow: 0 8px 20px rgba(2,6,23,.08);
}
.tile-blue{
  background:
    radial-gradient(70% 80% at 110% -10%, rgba(14,165,233,.25), transparent 60%),
    linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
}
.tile-teal{
  background:
    radial-gradient(70% 80% at -10% -10%, rgba(13,148,136,.22), transparent 60%),
    linear-gradient(180deg,#ffffff 0%, #f7fffb 100%);
}
.tile-purple{
  background:
    radial-gradient(70% 80% at 110% 110%, rgba(124,58,237,.20), transparent 60%),
    linear-gradient(180deg,#ffffff 0%, #faf8ff 100%);
}
.tile-amber{
  background:
    radial-gradient(70% 80% at -10% 110%, rgba(245,158,11,.24), transparent 60%),
    linear-gradient(180deg,#ffffff 0%, #fffaf3 100%);
}
@media (max-width: 380px){
  .feature-tile{ min-height: 160px; padding: 1rem; }
  .tile-badge{ width: 38px; height: 38px; }
}

/* ============ About page helpers (shared) ============ */
.about-hero{ /* optional alias if you want a slightly different look */
  composes: hero;
}

/* Legacy content shell used on About */
.three_quarter.first{
  max-width: 1100px;
  margin-inline: auto;
  padding: clamp(16px, 2.5vw, 32px);
  color: var(--ink);
}
.mm-card{
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.2vw, 28px);
  border: 1px solid rgba(2,6,23,.06);
}
.three_quarter.first h1,
.three_quarter.first h2,
.three_quarter.first h3{
  line-height: 1.2; margin: 0; scroll-margin-top: 96px;
}
.three_quarter.first h1{font-size: clamp(28px, 3.2vw, 40px);}
.three_quarter.first h2{font-size: clamp(22px, 2.6vw, 30px);}
.three_quarter.first h3{font-size: clamp(18px, 2.2vw, 22px); color: var(--muted);}

.mm-list{
  display: grid; gap: .75rem; padding-left: 1.2rem;
}
.mm-list li{ margin-left: .4rem; }
.mm-list li + li{
  padding-top: .25rem; border-top: 1px dashed rgba(2,6,23,.08);
}

/* Responsive embeds */
.embed{
  position: relative; width: 100%;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden; background: #000; box-shadow: var(--shadow);
}
.embed iframe{ position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed.ratio-16x9{ padding-top: 56.25%; }
.embed.ratio-2x1{ padding-top: 50%; }
.embed.ratio-4x3{ padding-top: 75%; }

/* Gallery conversion */
.mm-gallery{
  display: grid; gap: 1rem;
  grid-template-columns: repeat( auto-fill, minmax(240px, 1fr) );
}
.mm-gallery figure{
  margin: 0; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid rgba(2,6,23,.06); cursor: zoom-in;
}
.mm-gallery img{ width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.mm-gallery figcaption{ padding: .6rem .8rem; font-size: .9rem; color: var(--muted); }

/* TOC */
.mm-toc{ position: sticky; top: 1rem; align-self: start; }
.mm-toc .list-group-item{ border: 0; border-radius: .5rem; }
.mm-toc .list-group-item:hover{ background: var(--ring); }

/* Utilities */
.three_quarter.first table[border="0"]{ width: 100%; }
.three_quarter.first img{ height: auto; max-width: 100%; }
.three_quarter.first p{ margin: .5rem 0 0; }
.right.font-small.grey{ color: var(--muted); font-size: .9rem; text-align: right; }

/* Back-to-top */
#backToTop{ position: fixed; right: 16px; bottom: 16px; z-index: 1030; display:none; }

/* Tiny motion (optional) */
@keyframes float {
  from { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  to { transform: translateY(0); }
}
.float{ animation: float 6s ease-in-out infinite; }
