/* ===========================================================
   tgbagupta.in — design system
   =========================================================== */

/* ---------- [TOKENS] theme tokens — "Kotlin Sunrise, Editorial Cut" ----------
   Light is the base palette on :root. Dark is applied either by the
   system preference (prefers-color-scheme) or by an explicit
   data-theme="dark"/"light" attribute set via localStorage, which
   always wins over the media query. Both palettes are tuned on their
   own — no inversion filters, no pure #000/#fff.

   Every text-bearing color below has been contrast-checked against the
   surface it's actually used on (WCAG relative-luminance formula) and,
   where the "swatch" version of a brand color failed, a separate
   darker/brighter *-text-safe variant was derived instead of diluting
   the brand color itself. --accent-2 carries coral (text-safe shade);
   the brighter coral used for large fills/tags lives in --coral-swatch. */
:root {
  --bg: #fbf6ee;
  --bg-elevated: #f3ebdd;
  --bg-card: #fffdf9;
  --border: #eae1d0;
  --border-hover: #d9cbb0;
  --text: #1b1710;
  --text-dim: #5b5347;
  --text-faint: #6b6254;
  --accent: #2b4dff;
  --accent-2: #c43823;
  --coral-swatch: #ff5e4d;
  --violet: #6b3fe0;
  --magenta: #b5179e;
  --gradient-kotlin: linear-gradient(135deg, #7f52ff 0%, #c711e1 100%);
  --accent-soft: rgba(43, 77, 255, 0.08);
  --coral-soft: rgba(255, 94, 77, 0.1);
  --violet-soft: rgba(127, 82, 255, 0.1);
  --code-kw: #6b3fe0;
  --code-fn: #2b4dff;
  --code-str: #c43823;
  --code-com: #5b5347;
  --shadow: 0 24px 60px -28px rgba(40, 26, 10, 0.22);
  --header-bg: rgba(251, 246, 238, 0.86);
  --status-live-bg: rgba(46, 122, 76, 0.09);
  --status-live-color: #2e7a4c;
  --status-live-border: rgba(46, 122, 76, 0.28);
  --status-dev-bg: rgba(161, 91, 4, 0.09);
  --status-dev-color: #a15b04;
  --status-dev-border: rgba(161, 91, 4, 0.28);
  --grain-opacity: 0.05;
  /* cobalt is dark enough here for white text; coral/gradient swatches are
     lighter and need dark ink text — verified by luminance, not assumed */
  --on-accent: #fffdf9;
  --on-coral: #1b1710;
  --on-gradient: #fffdf9;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 9px;
  --max-w: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141118;
    --bg-elevated: #1c1820;
    --bg-card: #211c26;
    --border: #332c3b;
    --border-hover: #473d53;
    --text: #f3ede3;
    --text-dim: #b8afa0;
    --text-faint: #8c8172;
    --accent: #6c8cff;
    --accent-2: #ff8a72;
    --coral-swatch: #ff8a72;
    --violet: #9b7bff;
    --magenta: #e14fef;
    --gradient-kotlin: linear-gradient(135deg, #9b7bff 0%, #e14fef 100%);
    --accent-soft: rgba(108, 140, 255, 0.16);
    --coral-soft: rgba(255, 138, 114, 0.14);
    --violet-soft: rgba(155, 123, 255, 0.16);
    --code-kw: #9b7bff;
    --code-fn: #6c8cff;
    --code-str: #ff8a72;
    --code-com: #8c8172;
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
    --header-bg: rgba(20, 17, 24, 0.84);
    --status-live-bg: rgba(110, 231, 216, 0.12);
    --status-live-color: #6ee7d8;
    --status-live-border: rgba(110, 231, 216, 0.3);
    --status-dev-bg: rgba(255, 184, 108, 0.12);
    --status-dev-color: #ffb86c;
    --status-dev-border: rgba(255, 184, 108, 0.3);
    --grain-opacity: 0.06;
    /* dark mode's bright cobalt/coral/gradient swatches are light relative
       to the near-black page — they need dark ink text, not white */
    --on-accent: #141118;
    --on-coral: #141118;
    --on-gradient: #141118;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #141118;
  --bg-elevated: #1c1820;
  --bg-card: #211c26;
  --border: #332c3b;
  --border-hover: #473d53;
  --text: #f3ede3;
  --text-dim: #b8afa0;
  --text-faint: #8c8172;
  --accent: #6c8cff;
  --accent-2: #ff8a72;
  --coral-swatch: #ff8a72;
  --violet: #9b7bff;
  --magenta: #e14fef;
  --gradient-kotlin: linear-gradient(135deg, #9b7bff 0%, #e14fef 100%);
  --accent-soft: rgba(108, 140, 255, 0.16);
  --coral-soft: rgba(255, 138, 114, 0.14);
  --violet-soft: rgba(155, 123, 255, 0.16);
  --code-kw: #9b7bff;
  --code-fn: #6c8cff;
  --code-str: #ff8a72;
  --code-com: #8c8172;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  --header-bg: rgba(20, 17, 24, 0.84);
  --status-live-bg: rgba(110, 231, 216, 0.12);
  --status-live-color: #6ee7d8;
  --status-live-border: rgba(110, 231, 216, 0.3);
  --status-dev-bg: rgba(255, 184, 108, 0.12);
  --status-dev-color: #ffb86c;
  --status-dev-border: rgba(255, 184, 108, 0.3);
  --grain-opacity: 0.06;
  --on-accent: #141118;
  --on-coral: #141118;
  --on-gradient: #141118;
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body,
.site-header,
.card,
.project-card,
.contact-method,
.sidebar-card,
.hero-panel,
.cta-band,
.tag,
.status-badge,
.contact-form input,
.contact-form select,
.contact-form textarea,
.faq-item {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-weight: 600;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); font-weight: 560; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.3rem; font-weight: 600; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}

.lede {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 640px;
}

.section-head { max-width: 700px; margin-bottom: 48px; }
.section-head p { color: var(--text-dim); margin-top: 12px; }

/* ---------- [ATOM] buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-coral { background: var(--coral-swatch); color: var(--on-coral); }
.btn-coral:hover { filter: brightness(1.06); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* ---------- [ORGANISM] header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  transition: background-color 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-badge { height: 34px; width: 34px; border-radius: 8px; display: block; flex-shrink: 0; }
.logo-text {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  background: var(--gradient-kotlin);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Full lockup (icon + TGBAGUPTA + tagline) — real exported PNGs, each with
   its own baked background. Screen/multiply blend neutralizes that flat
   background against the surrounding surface instead of showing a box. */
.footer-logo-full { height: 64px; width: auto; display: block; margin-bottom: 14px; }
.footer-logo-full.for-dark { display: none; mix-blend-mode: screen; }
.footer-logo-full.for-light { display: block; mix-blend-mode: multiply; }
:root[data-theme="dark"] .footer-logo-full.for-dark { display: block; }
:root[data-theme="dark"] .footer-logo-full.for-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-logo-full.for-dark { display: block; }
  :root:not([data-theme="light"]) .footer-logo-full.for-light { display: none; }
}

/* Icon strip has the same near-black baked background as the badge/lockup —
   screen blend against a fixed dark card neutralizes it regardless of the
   page's own light/dark theme. */
.icon-strip-band {
  background: #0f0d16;
  border-radius: var(--radius);
  padding: 32px 20px;
  overflow: hidden;
}
.icon-strip-band img { display: block; width: 100%; height: auto; mix-blend-mode: screen; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.94rem;
}
.nav-links a { color: var(--text-dim); transition: color 0.15s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 20px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- [ATOM] theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.25s ease;
}
.theme-toggle:hover { border-color: var(--border-hover); color: var(--text); }
.theme-toggle svg { display: block; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-cta .btn-ghost { display: none; }
  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }
}

/* ---------- [ATOM] signature gradient blob ----------
   The Kotlin Sunrise motif: a soft violet→magenta mesh blob, echoing
   JetBrains' own Kotlin brand gradient. Reused across hero, section
   dividers, and footer as the site's one recurring "wow" element —
   pure CSS, no images or libraries. */
.gradient-blob {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient-kotlin);
  filter: blur(90px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
:root[data-theme="dark"] .gradient-blob { opacity: 0.5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gradient-blob { opacity: 0.5; }
}

/* ---------- [ATOM] grain overlay ----------
   Applied to specific decorative surfaces only (hero, cta bands, blob
   fields) — never as a page-wide veil over running text, so body copy
   contrast is never touched by it. */
.grain { position: relative; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

/* ---------- [ORGANISM] hero ---------- */
.hero { padding: 110px 0 72px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; position: relative; z-index: 2; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: 20px; }
.hero h1 .accent {
  background: var(--gradient-kotlin);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-blob {
  top: -140px;
  right: -120px;
  width: 580px;
  height: 580px;
}
@media (max-width: 900px) {
  .hero-blob { width: 380px; height: 380px; top: -80px; right: -140px; }
}

.hero-panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  font-family: var(--mono);
  font-size: 0.85rem;
  box-shadow: var(--shadow);
}
.hero-panel .dots { display: flex; gap: 6px; margin-bottom: 18px; }
.hero-panel .dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-hover); }
.hero-panel pre { white-space: pre-wrap; color: var(--text-dim); line-height: 1.7; }
.hero-panel .kw { color: var(--code-kw); }
.hero-panel .fn { color: var(--code-fn); }
.hero-panel .str { color: var(--code-str); }
.hero-panel .com { color: var(--code-com); }

/* ---------- [ORGANISM] stats bar ---------- */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-num {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--accent-2);
}
.stat-label { color: var(--text-dim); font-size: 0.85rem; margin-top: 6px; }

/* ---------- [MOLECULE] cards / grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-2);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.94rem; flex-grow: 1; }
.card .card-link {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- [ATOM modifier] pillar color-coding ----------
   The palette carries information: coral = mobile, cobalt = the general
   full-stack/web work, violet-magenta = the AI/ML specialty. Applied as a
   small eyebrow tag + a tinted icon chip on each service card. */
.pillar-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.pillar-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pillar-tag.pillar-mobile { color: var(--accent-2); }
.pillar-tag.pillar-mobile::before { background: var(--accent-2); }
.pillar-tag.pillar-web { color: var(--accent); }
.pillar-tag.pillar-web::before { background: var(--accent); }
.pillar-tag.pillar-ai {
  background: var(--gradient-kotlin);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pillar-tag.pillar-ai::before { background: var(--gradient-kotlin); }

.card-icon.pillar-mobile { background: var(--coral-soft); color: var(--accent-2); }
.card-icon.pillar-web { background: var(--accent-soft); color: var(--accent); }
.card-icon.pillar-ai { background: var(--violet-soft); color: var(--violet); }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-dim);
  margin: 0 6px 6px 0;
}

/* ---------- [MOLECULE] portfolio project-card ---------- */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 20px;
}
.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.project-head h3 { font-size: 1.35rem; }
.status-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-live { background: var(--status-live-bg); color: var(--status-live-color); border: 1px solid var(--status-live-border); }
.status-dev { background: var(--status-dev-bg); color: var(--status-dev-color); border: 1px solid var(--status-dev-border); }
.project-card p.desc { color: var(--text-dim); margin-bottom: 16px; }
.project-metrics { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.project-metrics div { font-family: var(--mono); font-size: 0.85rem; color: var(--accent-2); }
.project-metrics span { display: block; color: var(--text-faint); font-size: 0.72rem; margin-top: 2px; }

/* ---------- [ORGANISM] process list ---------- */
.process-list { counter-reset: step; display: grid; gap: 4px; }
.process-item {
  counter-increment: step;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.process-item:last-child { border-bottom: 1px solid var(--border); }
.process-item::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  color: var(--text-faint);
  font-size: 1.1rem;
  grid-column: 1;
  grid-row: 1 / 3;
}
.process-item h4 { grid-column: 2; grid-row: 1; margin-bottom: 6px; }
.process-item p { grid-column: 2; grid-row: 2; color: var(--text-dim); font-size: 0.94rem; }

/* ---------- [MOLECULE] CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 56px;
  text-align: center;
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--text-dim); max-width: 520px; margin: 0 auto; }
.cta-band .btn-row { justify-content: center; }
@media (max-width: 620px) { .cta-band { padding: 36px 24px; } }

/* ---------- [ORGANISM] contact section ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-methods { display: grid; gap: 16px; margin-top: 28px; }
.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: border-color 0.15s ease;
}
.contact-method:hover { border-color: var(--border-hover); }
.contact-method .icon { color: var(--accent-2); flex-shrink: 0; }
.contact-method .label { font-size: 0.78rem; color: var(--text-faint); font-family: var(--mono); }
.contact-method .value { font-weight: 600; }

form.contact-form { display: grid; gap: 16px; }
.contact-form label { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 6px; display: block; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: 0.8rem; color: var(--text-faint); margin-top: 4px; }

/* ---------- [ORGANISM] footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: auto;
}
.footer-blob {
  bottom: -180px;
  left: -140px;
  width: 420px;
  height: 420px;
  opacity: 0.22;
}
:root[data-theme="dark"] .footer-blob { opacity: 0.28; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-blob { opacity: 0.28; }
}
.site-footer .container { position: relative; z-index: 2; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid a { color: var(--text-dim); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.82rem;
}
.footer-socials { display: flex; gap: 16px; }

/* ---------- [MOLECULE] breadcrumb + [ORGANISM] page hero ---------- */
.page-hero { position: relative; overflow: hidden; padding: 56px 0 40px; border-bottom: 1px solid var(--border); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero-blob { top: -160px; right: -160px; width: 460px; height: 460px; opacity: 0.3; }
:root[data-theme="dark"] .page-hero-blob { opacity: 0.4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .page-hero-blob { opacity: 0.4; }
}
.breadcrumb { font-family: var(--mono); font-size: 0.8rem; color: var(--text-faint); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent-2); }

/* eyebrow pillar coloring, for service-page heroes */
.eyebrow.pillar-mobile { color: var(--accent-2); }
.eyebrow.pillar-mobile::before { background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.eyebrow.pillar-web { color: var(--accent); }
.eyebrow.pillar-web::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.eyebrow.pillar-ai {
  background: var(--gradient-kotlin);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.eyebrow.pillar-ai::before { background: var(--gradient-kotlin); }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 96px;
}
.sidebar-card h4 { margin-bottom: 14px; font-size: 0.95rem; }
.sidebar-card ul { list-style: none; display: grid; gap: 10px; margin-bottom: 20px; }
.sidebar-card li { font-size: 0.9rem; color: var(--text-dim); padding-left: 18px; position: relative; }
.sidebar-card li::before { content: "→"; position: absolute; left: 0; color: var(--accent-2); }

.check-list { list-style: none; display: grid; gap: 14px; margin: 24px 0; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-dim); }
.check-list li::before {
  content: "✓";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.related-services { display: grid; gap: 10px; }
.related-services a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-dim);
}
.related-services a:hover { border-color: var(--border-hover); color: var(--text); }

/* ---------- [ORGANISM] FAQ (built from [MOLECULE] faq-item) ---------- */
.faq-list { display: grid; gap: 12px; max-width: 780px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--accent-2);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer { padding: 0 22px 20px; color: var(--text-dim); font-size: 0.94rem; }

/* ---------- [UTILITY] scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- [ORGANISM] requirements wizard ---------- */
.wizard-progress { height: 4px; background: var(--border); border-radius: 999px; overflow: hidden; margin-bottom: 36px; }
.wizard-progress-bar { height: 100%; width: 20%; background: var(--gradient-kotlin); transition: width 0.3s ease; }
.wizard-step-counter { font-family: var(--mono); font-size: 0.8rem; color: var(--text-faint); margin-bottom: 10px; }
.wizard-step { display: none; }
.wizard-step.is-active { display: block; animation: wizard-fade 0.35s ease; }
@keyframes wizard-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wizard-step h3 { margin-bottom: 8px; }
.wizard-step .step-hint { color: var(--text-dim); margin-bottom: 24px; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 8px; }
.option-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-card label {
  display: block;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  font-size: 0.92rem;
  background: var(--bg-card);
}
.option-card label:hover { border-color: var(--border-hover); }
.option-card input:checked + label {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.option-card input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; }
.wizard-review dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin-top: 16px; }
.wizard-review dt { color: var(--text-faint); font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }
.wizard-review dd { color: var(--text); font-size: 0.95rem; }
.wizard-error { color: var(--code-str); font-size: 0.85rem; margin-top: 8px; display: none; }
.wizard-error.is-visible { display: block; }

/* ---------- [UTILITY] cursor-follow glow + magnetic buttons ----------
   The site's one restrained micro-interaction beyond scroll-reveal — no
   animation library, ~20 lines of vanilla JS (see js/main.js). Both
   degrade to a plain static hover on touch devices and under
   prefers-reduced-motion, never just "slower." */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--violet-soft), transparent 72%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
}
.cursor-glow.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce), (hover: none) {
  .cursor-glow { display: none; }
}

.magnetic { transition: transform 0.2s ease; }
@media (prefers-reduced-motion: reduce), (hover: none) {
  .magnetic { transition: none !important; transform: none !important; }
}

/* utility */
.mt-lg { margin-top: 48px; }
.text-center { text-align: center; }
