/* page.css: layout for the one-page SMM portfolio. Tokens live in tokens.css. */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--accent-lime); color: var(--text-primary);
  padding: 0.6rem 1rem; border-radius: var(--radius-pill); font-weight: 500;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg-primary);
  box-shadow: 0 1px 0 var(--border);
  padding: 1rem 3rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  transition: transform 300ms ease;
}
.nav--hidden { transform: translateY(-100%); }
.nav-logo { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a { font-size: 14px; color: var(--text-muted); position: relative; transition: color 200ms ease; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--accent-lime); transition: width 200ms ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.btn-sm { padding: 10px 22px; font-size: 14px; }

/* ---------- Sections ---------- */
.section { padding: var(--space-xl) 3rem; background: var(--bg-primary); }
.section--surface { background: var(--bg-surface); }
.lede { font-size: 17px; color: var(--text-muted); line-height: 1.75; max-width: 720px; margin-bottom: 1.25rem; }
.role { font-size: 15px; color: var(--text-muted); max-width: 720px; line-height: 1.7; }
.role strong, .lede strong { color: var(--text-primary); font-weight: 500; }
.sub-headline { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.2; margin: 3rem 0 1.25rem; }
.kada-intro .sub-headline { margin-top: 0; }
.muted { color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--space-xl) + 40px) 3rem var(--space-xl);
  background: var(--bg-primary);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 28px 28px; opacity: 0.6; pointer-events: none;
}
.hero .container { position: relative; }
.hero .section-label { font-size: 13px; letter-spacing: 0.1em; margin-bottom: 1.5rem; }
.hero-sub { font-size: 18px; color: var(--text-muted); line-height: 1.8; max-width: 560px; margin-top: 1.5rem; }
.hero-ctas { display: flex; gap: 1rem; margin-top: 2.25rem; flex-wrap: wrap; }

.stat-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 3.5rem; }
.stat-card { padding: 1.5rem; }
.stat-card .metric-number { font-size: clamp(32px, 3.4vw, 44px); white-space: nowrap; }
.stat-card .metric-label { font-size: 14px; line-height: 1.4; }

/* ---------- Case A ---------- */
.two-col { max-width: 760px; }
.problem-strategy { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 2rem 0; }
.info-card {
  background: var(--bg-primary); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); padding: 1.75rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  font-size: 15px; color: var(--text-muted); line-height: 1.7;
}
.card-kicker { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue-text); margin-bottom: 0.9rem; }
.check-list { list-style: none; display: grid; gap: 0.7rem; font-size: 15px; color: var(--text-muted); line-height: 1.65; }
.check-list li { position: relative; padding-left: 1.4rem; }
.check-list li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-lime); }
.check-list strong { color: var(--text-primary); font-weight: 500; }

.table-card { padding: 1.75rem; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 15px; }
.data-table th, .data-table td { text-align: left; padding: 0.85rem 0.75rem 0.85rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table thead th { font-family: var(--font-mono); font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.data-table tbody th { font-weight: 500; }
.data-table td { color: var(--text-muted); }
.data-table .d-delta { font-size: 15px; white-space: nowrap; }
.data-table .d-delta--up { color: var(--lime-text); }
.data-table .d-delta--down { color: var(--blue-text); }
.methodology { font-family: var(--font-body); font-size: 12.5px; line-height: 1.7; color: var(--text-muted); margin-top: 1.25rem; }
.methodology strong { font-weight: 500; color: var(--text-primary); }

.mini-stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.mini-stats .metric-number { font-size: 40px; }
.chips-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin: 2.5rem 0 0.75rem; }
.chip-row { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Case B ---------- */
.kada-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2.5rem; }
.exp-entry:last-child { margin-bottom: 0; }
.exp-entry::before { border-color: var(--bg-primary); }
.subcase { margin-top: 5rem; }
.subcase .lede { margin-bottom: 2rem; }

.card-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: stretch; }
.post-card .shot { margin: 0; background: #14171f; }
.post-card .shot a { display: block; }
.shot-img { width: 100%; height: auto; display: block; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.kv { display: grid; gap: 0.7rem; margin-top: 0.25rem; }
.kv dt { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue-text); }
.kv dd { font-size: 14.5px; line-height: 1.55; }
.link-arrow {
  margin-top: auto; align-self: flex-start; padding-top: 0.5rem;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--blue-text);
  border-bottom: 1px solid transparent; transition: color 200ms ease;
}
.link-arrow:hover { color: var(--text-primary); }
.post-card .work-card-body .link-arrow { margin-top: auto; }
.post-card .work-card-title { font-size: 19px; }

.insight-box {
  margin-top: 1.5rem; padding: 1.75rem; border-radius: var(--radius-md);
  background: var(--lime-tint); border: 1.5px solid var(--lime-border);
}
.insight-box .check-list { color: var(--text-primary); }
.combined { margin-top: 1.5rem; }
.combined-row { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.combined-row li {
  background: var(--bg-primary); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.2rem;
}
.combined-num { font-family: var(--font-mono); font-size: 24px; font-weight: 500; }
.combined-label { font-size: 13px; color: var(--text-muted); }

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2rem; }
.section--surface .info-card, .section--surface .step-card { background: var(--bg-primary); }

/* ---------- CTA + footer ---------- */
.cta { padding: var(--space-xl) 3rem; text-align: center; }
.cta-inner { max-width: 680px; }
.cta-headline { font-family: var(--font-display); font-size: clamp(40px, 6vw, 68px); font-weight: 700; line-height: 1.1; margin: 1.25rem 0; color: #fff; }
.cta-body { font-size: 17px; color: rgba(255, 255, 255, 0.7); line-height: 1.8; margin-bottom: 2.25rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-cta-primary, .btn-cta-secondary { overflow-wrap: anywhere; justify-content: center; text-align: center; }

.site-footer { padding: 2.5rem 3rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.footer-brand { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.footer-tagline { font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.footer-contact { font-family: var(--font-mono); font-size: 12px; color: rgba(255, 255, 255, 0.6); line-height: 1.9; text-align: right; }
.footer-contact a:hover { color: var(--accent-lime); }

/* reveal stagger (tokens.css owns the base reveal) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal[data-delay="1"] { transition-delay: 100ms; }
  .js .reveal[data-delay="2"] { transition-delay: 200ms; }
  .js .reveal[data-delay="3"] { transition-delay: 300ms; }
  .js .reveal[data-delay="4"] { transition-delay: 400ms; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 1.1rem; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
}
@media (max-width: 768px) {
  .nav { padding: 0.85rem 1.5rem; }
  .hero { padding: 7rem 1.5rem var(--space-lg); }
  .section, .cta { padding: var(--space-lg) 1.5rem; }
  .site-footer { padding: 2rem 1.5rem; }
  .problem-strategy, .kada-intro, .card-pair, .mini-stats { grid-template-columns: 1fr; }
  .kada-intro { gap: 2rem; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .combined-row { grid-template-columns: repeat(2, 1fr); }
  .subcase { margin-top: 3.5rem; }
  .footer-contact { text-align: left; }
}
@media (max-width: 480px) {
  .stat-grid, .process-grid { grid-template-columns: 1fr; }
  .stat-card .metric-number { font-size: 40px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn-primary, .hero-ctas .btn-secondary { width: 100%; justify-content: center; }
  .cta-buttons { flex-direction: column; }
  .btn-cta-primary, .btn-cta-secondary { width: 100%; padding: 16px 20px; font-size: 14px; }
  .table-card { padding: 1.25rem; }
  .data-table { font-size: 14px; }
  .nav-logo { font-size: 20px; }
  .btn-sm { padding: 9px 16px; }
}

.shot-cap { background: #14171f; color: rgba(255, 255, 255, 0.75); font-family: var(--font-mono); font-size: 11px; padding: 0.4rem 0.75rem; text-align: right; }

/* Table sub-value under the change figure */
.data-table .d-sub { display: block; margin-top: 0.2rem; font-family: var(--font-body); font-size: 12.5px; font-weight: 400; color: var(--text-muted); }

/* Anchors clear the sticky nav (tokens.css sets scroll-padding on html; replaced by per-section margin) */
html { scroll-padding-top: 0; }
section[id] { scroll-margin-top: 72px; }

/* Tighter gap between case studies */
#case-big { padding-bottom: var(--space-lg); }

/* B1 pair: identical frame so the two cards line up (source images differ by 15px) */
.shot-img--b1 { aspect-ratio: 1118 / 732; object-fit: contain; background: #1c1c1d; }

/* Community row: cards size to their own content */
.community-row { align-items: start; }

/* Tighter gap between KadaKareer and Community */
#case-kada { padding-bottom: var(--space-lg); }

/* ---------- v2 additions ---------- */
.metric-number--range { font-size: 32px; white-space: nowrap; }
.mini-stats .metric-number--range { font-size: 32px; }
.law-firm { margin-top: 2rem; }
.timeline-caption { margin-top: 1.5rem; }
.kada-intro .exp-entry { margin-bottom: 1.75rem; }
.kada-intro .exp-entry:last-child { margin-bottom: 0; }
.dashboard-label--second { margin-top: 2rem; }
.section--compact { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.cred-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.cred-card { padding: 1.25rem 1.5rem; }
.cred-title { font-weight: 500; color: var(--text-primary); line-height: 1.4; margin-bottom: 0.35rem; }
.cred-meta { font-size: 13.5px; line-height: 1.5; }
.tool-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 3rem; }
.tool-group .chips-label { margin-top: 1.5rem; }
.cta-buttons { align-items: center; }
@media (max-width: 768px) {
  .cred-grid, .tool-groups { grid-template-columns: 1fr; }
}
