/* ============================================================
   IMG Residency  —  Dark Bento Grid Design
   ============================================================ */

:root {
  --bg:        #080e0d;
  --surface:   #101918;
  --surface2:  #162220;
  --border:    #1e3330;
  --teal:      #00c4b4;
  --teal-dim:  #008f83;
  --teal-glow: rgba(0,196,180,.12);
  --white:     #e8f5f3;
  --muted:     #6a9e99;
  --danger:    #ff6b6b;
  --warn:      #ffc04a;
  --ok:        #4cdb9a;
  --radius:    12px;
  --radius-lg: 20px;
  --max:       1140px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--white);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.65; }

/* ── GLASSMORPHISM NAV ── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,14,13,.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 58px;
}
.logo { font-size: 1.15rem; font-weight: 800; color: var(--white);
  text-decoration: none; letter-spacing: -.3px; }
.logo span { color: var(--teal); }

nav ul { list-style: none; display: flex; align-items: center; gap: .1rem; }
nav a { display: block; padding: .3rem .85rem; font-size: .85rem;
  color: var(--muted); text-decoration: none; border-radius: 6px;
  transition: color .2s, background .2s; }
nav a:hover, nav a.active { color: var(--white); background: var(--surface2); }

.nav-login {
  background: var(--teal) !important; color: #020a09 !important;
  font-weight: 700; border-radius: 6px;
  padding: .3rem 1rem !important; margin-left: .75rem; font-size: .85rem;
}
.nav-login:hover { background: #00d4c3 !important; }

.hamburger { display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px; }

/* ── HERO ── */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 80px 2rem 60px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--teal-glow); border: 1px solid var(--teal-dim);
  color: var(--teal); border-radius: 20px;
  padding: .25rem .9rem; font-size: .78rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero-tag::before { content: "●"; font-size: .5rem; }
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.5rem); font-weight: 900;
  line-height: 1.0; letter-spacing: -2px; max-width: 760px;
  margin-bottom: 1.5rem;
}
.hero h1 em { font-style: normal; color: var(--teal); }
.hero-sub {
  font-size: 1.1rem; color: var(--muted); max-width: 520px;
  margin-bottom: 2.5rem; line-height: 1.75;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-block; border-radius: 8px; font-weight: 700;
  font-size: .92rem; text-decoration: none; cursor: pointer;
  transition: all .2s; padding: .7rem 1.75rem;
}
.btn-teal { background: var(--teal); color: #020a09; }
.btn-teal:hover { background: #00d4c3; transform: translateY(-1px); }
.btn-outline { border: 1px solid var(--border); color: var(--muted); }
.btn-outline:hover { border-color: var(--teal-dim); color: var(--white); }
.hero-note { font-size: .8rem; color: var(--muted); }

/* ── BENTO GRID ── */
.bento { max-width: var(--max); margin: 0 auto; padding: 0 2rem 80px; }
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 160px;
  gap: 12px;
}

/* Card base */
.bc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  overflow: hidden;
  position: relative;
  transition: border-color .25s, transform .2s;
}
.bc:hover { border-color: var(--teal-dim); transform: translateY(-2px); }

/* Span helpers */
.c2  { grid-column: span 2;  }
.c3  { grid-column: span 3;  }
.c4  { grid-column: span 4;  }
.c5  { grid-column: span 5;  }
.c6  { grid-column: span 6;  }
.c7  { grid-column: span 7;  }
.c8  { grid-column: span 8;  }
.c12 { grid-column: span 12; }
.r2  { grid-row: span 2; }
.r3  { grid-row: span 3; }

/* Card variants */
.bc-teal { background: var(--teal); color: #020a09; border-color: var(--teal); }
.bc-teal:hover { border-color: var(--teal); }
.bc-dark { background: var(--surface2); }
.bc-glow { box-shadow: 0 0 40px var(--teal-glow); }

/* Big stat card */
.bc-stat .stat-val {
  font-size: 4.5rem; font-weight: 900; line-height: 1;
  letter-spacing: -2px; color: var(--teal);
}
.bc-stat .stat-label { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

/* Channel card */
.channel-list { list-style: none; margin-top: .75rem; }
.channel-list li {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem 0; border-bottom: 1px solid var(--border);
  font-size: .88rem; color: var(--muted);
}
.channel-list li:last-child { border-bottom: none; }
.channel-list .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); flex-shrink: 0;
}

/* Color-code card */
.risk-bars { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.risk-bar {
  display: flex; align-items: center; gap: .75rem;
  font-size: .83rem;
}
.risk-bar .swatch {
  width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
}
.risk-bar span { color: var(--muted); }

/* Card label */
.bc-label {
  font-size: .7rem; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--teal); margin-bottom: .6rem;
}
.bc h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.bc p  { font-size: .88rem; color: var(--muted); line-height: 1.6; }

/* Decorative big bg text */
.bc-bg-text {
  position: absolute; bottom: -10px; right: -8px;
  font-size: 7rem; font-weight: 900; opacity: .04;
  line-height: 1; pointer-events: none; user-select: none;
  color: var(--teal);
}

/* ── TESTS SCROLL STRIP ── */
.strip-section { padding: 0 0 80px; }
.strip-header { max-width: var(--max); margin: 0 auto 1.5rem; padding: 0 2rem; }
.strip-header h2 { font-size: 1.4rem; font-weight: 700; }
.strip-header p  { color: var(--muted); font-size: .9rem; margin-top: .25rem; }

.scroll-track {
  display: flex; gap: 12px;
  overflow-x: auto; padding: 4px 2rem 16px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.scroll-track::-webkit-scrollbar { height: 4px; }
.scroll-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.test-card {
  flex: 0 0 200px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  transition: border-color .2s, transform .2s;
}
.test-card:hover { border-color: var(--teal); transform: translateY(-3px); }
.test-card .abbr {
  font-size: 1.4rem; font-weight: 900; color: var(--teal);
  line-height: 1; margin-bottom: .4rem; letter-spacing: -1px;
}
.test-card .name { font-size: .85rem; font-weight: 600; color: var(--white); margin-bottom: .3rem; }
.test-card .desc { font-size: .78rem; color: var(--muted); }

/* ── HOW IT WORKS ── */
.hiw { max-width: var(--max); margin: 0 auto; padding: 0 2rem 80px; }
.hiw-label { font-size: .75rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--teal); margin-bottom: .75rem; }
.hiw h2 { font-size: 2rem; font-weight: 800; margin-bottom: 3rem; letter-spacing: -.5px; }
.hiw-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; }
.hiw-step { background: var(--surface); padding: 2rem 1.75rem; position: relative; }
.hiw-num { font-size: 5rem; font-weight: 900; color: var(--surface2);
  line-height: 1; position: absolute; top: 1rem; right: 1.5rem;
  user-select: none; letter-spacing: -3px; }
.hiw-step .icon { font-size: 2rem; margin-bottom: 1rem; }
.hiw-step h3 { font-size: .95rem; font-weight: 700; margin-bottom: .5rem; color: var(--white); }
.hiw-step p  { font-size: .85rem; color: var(--muted); }

/* ── USE CASES ── */
.use-cases { background: var(--surface); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 64px 2rem; }
.use-cases .container { max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 340px 1fr; gap: 4rem; align-items: start; }
.use-cases h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.5px; }
.use-cases .sub { color: var(--muted); margin-top: .5rem; font-size: .9rem; }
.pill-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  padding: .3rem .85rem; border-radius: 20px; font-size: .8rem;
  background: var(--surface2); color: var(--muted);
  border: 1px solid var(--border); transition: all .2s;
}
.pill:hover { border-color: var(--teal-dim); color: var(--white); }

/* ── PAGE HERO (inner) ── */
.page-hero {
  border-bottom: 1px solid var(--border);
  padding: 56px 2rem 48px;
}
.page-hero .inner { max-width: var(--max); margin: 0 auto; }
.page-hero .tag {
  font-size: .72rem; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--teal); margin-bottom: .6rem;
}
.page-hero h1 { font-size: clamp(1.6rem,4vw,2.8rem); font-weight: 900;
  letter-spacing: -.5px; max-width: 680px; }
.page-hero p  { color: var(--muted); max-width: 560px;
  margin-top: .6rem; font-size: .95rem; }

/* ── ARTICLE ── */
.article { max-width: var(--max); margin: 0 auto; padding: 60px 2rem;
  display: grid; grid-template-columns: 1fr 300px; gap: 4rem; align-items: start; }
.article-body h2 {
  font-size: 1.15rem; font-weight: 700; color: var(--teal);
  margin: 2rem 0 .5rem; letter-spacing: .2px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body p { color: var(--muted); margin-bottom: 1rem; font-size: .92rem; }
.article-body ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.article-body li { color: var(--muted); font-size: .92rem; margin-bottom: .3rem; }
.callout {
  background: var(--teal-glow); border: 1px solid var(--teal-dim);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.callout p { margin: 0; color: var(--white); font-size: .9rem; }
.article-sidebar { position: sticky; top: 78px; }
.sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1rem;
}
.sidebar-card h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--teal); margin-bottom: .9rem; }
.sidebar-card ul { list-style: none; }
.sidebar-card li { font-size: .85rem; color: var(--muted); padding: .35rem 0;
  border-bottom: 1px solid var(--border); }
.sidebar-card li:last-child { border-bottom: none; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 48px 2rem 32px;
}
.footer-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 2fr repeat(3,1fr); gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .logo-lg { font-size: 1.3rem; font-weight: 900; color: var(--white); }
.footer-brand .logo-lg span { color: var(--teal); }
.footer-brand p { color: var(--muted); font-size: .85rem; margin-top: .75rem; line-height: 1.65; max-width: 280px; }
.footer-col h5 { font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--teal); margin-bottom: .9rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .45rem; }
.footer-col a { color: var(--muted); font-size: .85rem; text-decoration: none;
  transition: color .2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { max-width: var(--max); margin: 0 auto;
  border-top: 1px solid var(--border); padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: var(--muted); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .bento-grid { grid-template-columns: repeat(6,1fr); grid-auto-rows: 140px; }
  .c7,.c8,.c12 { grid-column: span 6; }
  .c5,.c6      { grid-column: span 6; }
  .c3,.c4      { grid-column: span 3; }
  .c2          { grid-column: span 3; }
  .hiw-steps   { grid-template-columns: 1fr; }
  .use-cases .container { grid-template-columns: 1fr; gap: 1.5rem; }
  .article     { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}
@media (max-width: 640px) {
  .bento-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .c3,.c4,.c5,.c6,.c7,.c8,.c12 { grid-column: span 2; }
  .c2 { grid-column: span 1; }
  .hero h1 { letter-spacing: -1px; }
  .hamburger { display: flex; }
  nav { display: none; position: absolute; top: 58px; left: 0; right: 0;
        background: var(--surface); border-bottom: 1px solid var(--border);
        padding: .5rem 1rem 1rem; }
  nav.open { display: block; }
  nav ul { flex-direction: column; }
  nav a  { padding: .6rem 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
