/* =====================================================
   Skill Horizon Technologies — theme-able design system
   Three themes share the same structure; only tokens change.
   ===================================================== */

:root {
  --radius: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----- Theme: Obsidian + Burnt Amber (default) ----- */
:root,
[data-theme="vercel"] {
  --bg: #0f0f10;
  --bg-soft: #17171a;
  --bg-elev: #1f1f23;
  --border: #26262b;
  --border-strong: #33333a;
  --text: #f5f4f1;
  --text-dim: #b0adA5;
  --text-mute: #74726b;

  --accent: #fb923c;
  --accent-soft: rgba(251, 146, 60, 0.12);
  --accent-ink: #0f0f10;

  --font-display: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
}

/* ----- Theme: Apple — near-white, blue accent ----- */
[data-theme="apple"] {
  --bg: #fbfbfd;
  --bg-soft: #ffffff;
  --bg-elev: #ffffff;
  --border: #e8e8ed;
  --border-strong: #d2d2d7;
  --text: #1d1d1f;
  --text-dim: #515154;
  --text-mute: #86868b;

  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --accent-ink: #ffffff;

  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 12px 40px rgba(0,0,0,0.08);
}

/* ----- Theme: Sunset — warm cream + crimson, soft + premium ----- */
[data-theme="sunset"] {
  --bg: #f7f1e7;
  --bg-soft: #fdfaf3;
  --bg-elev: #ffffff;
  --border: #e7ddc9;
  --border-strong: #d4c5a5;
  --text: #2d1f10;
  --text-dim: #6b5740;
  --text-mute: #9a8868;

  --accent: #c8364a;
  --accent-soft: rgba(200, 54, 74, 0.08);
  --accent-ink: #ffffff;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --shadow-sm: 0 1px 2px rgba(45,31,16,0.06);
  --shadow-md: 0 12px 40px rgba(45,31,16,0.10);
}

/* ----- Theme: Editorial — charcoal, warm gold accent, serif display ----- */
[data-theme="editorial"] {
  --bg: #171613;
  --bg-soft: #1e1c18;
  --bg-elev: #24211c;
  --border: #2e2a24;
  --border-strong: #3a3630;
  --text: #f5f1e8;
  --text-dim: #b8b1a3;
  --text-mute: #7d786d;

  --accent: #d4a574;
  --accent-soft: rgba(212, 165, 116, 0.12);
  --accent-ink: #171613;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.5);
}

/* ====================================================
   Base
   ==================================================== */
* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

.app-shell { position: relative; min-height: 100%; display: flex; flex-direction: column; }
main { flex: 1; }

/* ====================================================
   Layout
   ==================================================== */
.container { width: min(1200px, 92vw); margin: 0 auto; }
.section { padding: 96px 0; position: relative; }
.section-sm { padding: 56px 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.h-display {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 16px 0 20px;
  font-weight: 600;
}
[data-theme="editorial"] .h-display { font-weight: 500; letter-spacing: -0.02em; }

.h-display .gradient { color: var(--accent); }
[data-theme="editorial"] .h-display .gradient {
  font-style: italic; font-weight: 500; color: var(--accent);
}

.h-section {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
  font-weight: 600;
}
[data-theme="editorial"] .h-section { font-weight: 500; }

.lede {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 640px;
  line-height: 1.55;
  font-family: var(--font-body);
}

/* ====================================================
   Buttons — flat, one accent, no glow
   ==================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  font-family: var(--font-body);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { border-color: var(--text); background: var(--bg-soft); }

/* ====================================================
   Cards — flat, disciplined
   ==================================================== */
.card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-strong); }

/* ====================================================
   Navbar
   ==================================================== */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center; color: var(--accent-ink);
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
}

.nav-links { display: flex; gap: 4px; }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* ====================================================
   Hero
   ==================================================== */
.hero { padding: 100px 0 80px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 80px; align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
  background: var(--bg-soft);
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}

.hero-cta { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; }
.hero-trust {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; gap: 32px; flex-wrap: wrap;
  color: var(--text-mute); font-size: 12px;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em;
}

/* Hero visual — simple concentric rings, no multi-color blobs */
.hero-visual {
  position: relative; aspect-ratio: 1/1; width: 100%; max-width: 460px; margin: 0 auto;
  display: grid; place-items: center;
}
.hero-rings {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--accent-soft), transparent 60%);
}
.hero-rings::before, .hero-rings::after {
  content: ""; position: absolute; inset: 15%;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}
.hero-rings::after { inset: 30%; border-color: var(--accent); opacity: 0.4; }
[data-theme="apple"] .hero-rings::after { opacity: 0.3; }

.hero-chip {
  position: absolute; z-index: 2;
  padding: 8px 14px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.hero-chip.c1 { top: 6%; left: 0%; }
.hero-chip.c2 { top: 16%; right: -4%; }
.hero-chip.c3 { bottom: 20%; left: -4%; }
.hero-chip.c4 { bottom: 4%; right: 8%; }

/* ====================================================
   Ticker
   ==================================================== */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  overflow: hidden;
}
.ticker-track {
  display: flex; gap: 48px;
  padding: 12px 0;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
}
.ticker-item { display: inline-flex; gap: 10px; align-items: center; }
.ticker-item .sym { color: var(--text); }
.ticker-item .up { color: var(--accent); }
.ticker-item .down { color: var(--text-mute); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ====================================================
   Stats
   ==================================================== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 820px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 32px 28px; background: var(--bg); }
.stat .value { font-family: var(--font-display); font-size: clamp(36px, 4vw, 52px); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
[data-theme="editorial"] .stat .value { font-weight: 500; }
.stat .value .suffix { color: var(--accent); }
.stat .label { color: var(--text-mute); font-size: 12px; margin-top: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-mono); }

/* ====================================================
   Grid utilities
   ==================================================== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Service card */
.service-head {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600;
  background: var(--accent-soft); border: 1px solid var(--border-strong); color: var(--accent);
  margin-bottom: 18px; font-size: 16px;
}
.service-title { font-family: var(--font-display); font-size: 20px; margin: 0 0 8px; font-weight: 600; }
[data-theme="editorial"] .service-title { font-weight: 500; }
.service-tag { color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.service-bullets { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.service-bullets li { color: var(--text-dim); font-size: 14px; padding-left: 18px; position: relative; }
.service-bullets li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 1px;
  background: var(--accent);
}

/* Project card */
.project { padding: 0; overflow: hidden; }
.project-media {
  aspect-ratio: 16/10;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: relative;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
}
.project-media::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, var(--accent-soft), transparent 60%);
}
.project-body { padding: 22px 26px 26px; }
.project-tags { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.tag {
  padding: 3px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--bg);
}
.project-impact { margin-top: 14px; color: var(--accent); font-family: var(--font-mono); font-size: 12px; }

/* News */
.news-item { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-source {
  min-width: 110px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
}
.news-title { font-family: var(--font-display); font-weight: 600; margin: 0 0 6px; font-size: 16px; }
[data-theme="editorial"] .news-title { font-weight: 500; }
.news-sum { color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.news-time { color: var(--text-mute); font-size: 11px; font-family: var(--font-mono); margin-top: 4px; }

/* Map */
.map {
  position: relative; aspect-ratio: 2/1; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hub {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.hub::before {
  content: ""; position: absolute; inset: -6px;
  border-radius: 50%; border: 1px solid var(--accent);
  opacity: 0.4;
  animation: ping 3s infinite;
}
.hub.alt { opacity: 0.7; }
.hub::after {
  content: attr(data-label);
  position: absolute; left: 18px; top: -6px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text);
  white-space: nowrap;
  padding: 3px 8px; background: var(--bg-soft);
  border: 1px solid var(--border-strong); border-radius: 6px;
  opacity: 0; transition: opacity .2s ease;
}
.hub:hover::after { opacity: 1; }
@keyframes ping { 0% { transform: scale(1); opacity: .4; } 100% { transform: scale(2.2); opacity: 0; } }

/* Awards + testimonial rows */
.award-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--border); gap: 20px; }
.award-row:last-child { border-bottom: none; }
.award-row .year { font-family: var(--font-mono); color: var(--accent); font-size: 14px; }
.testimonial-quote { font-family: var(--font-display); font-size: 20px; line-height: 1.45; }
[data-theme="editorial"] .testimonial-quote { font-style: italic; font-weight: 500; }
.testimonial-meta { margin-top: 14px; color: var(--text-mute); font-size: 12px; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }

/* Newsletter */
.newsletter {
  padding: 56px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.newsletter-form { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.input, .textarea, .select {
  flex: 1; min-width: 240px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  font-family: inherit; font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { min-height: 140px; resize: vertical; }
.form-note { margin-top: 12px; color: var(--text-dim); font-size: 13px; }
.form-note.ok { color: var(--accent); }
.form-note.err { color: #ff6b6b; }

/* Footer */
.footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  background: var(--bg);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { margin: 0 0 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mute); font-family: var(--font-mono); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--text-dim); font-size: 14px; }
.footer ul a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--text-mute); font-family: var(--font-mono); font-size: 11px;
}

/* AI chat widget */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600; font-size: 13px;
  box-shadow: var(--shadow-md);
  transition: transform .15s ease;
  border: 1px solid var(--accent);
}
.chat-fab:hover { transform: scale(1.05); }
.chat-panel {
  position: fixed; right: 20px; bottom: 80px; z-index: 40;
  width: min(380px, calc(100vw - 40px));
  height: 480px; max-height: 70vh;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  overflow: hidden;
}
/* Critical — make sure [hidden] hides the panel even though display:flex is set above. */
.chat-panel[hidden] { display: none !important; }

/* Mobile — full bleed bottom sheet so it doesn't crowd hero content. */
@media (max-width: 560px) {
  .chat-panel {
    right: 10px; left: 10px; bottom: 80px;
    width: auto;
    height: 60vh;
    max-height: 520px;
  }
}

.chat-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 16px; line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.chat-close:hover { color: var(--text); border-color: var(--border-strong); }
.chat-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.chat-head .title { font-weight: 600; font-size: 14px; }
.chat-head .sub { color: var(--text-mute); font-size: 11px; font-family: var(--font-mono); }
.chat-body { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.msg.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input input {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 10px 14px; border-radius: 8px; font-size: 13px;
}
.chat-input input:focus { outline: none; border-color: var(--accent); }
.chat-input button { padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 500; font-size: 13px; }

/* Utility */
.space-y > * + * { margin-top: 16px; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.link-cta { color: var(--accent); font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; }
.link-cta:hover { text-decoration: underline; text-underline-offset: 4px; }
.divider { height: 1px; background: var(--border); margin: 40px 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }

::selection { background: var(--accent-soft); color: var(--text); }

/* ====================================================
   Theme switcher
   ==================================================== */
.theme-switcher {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.theme-btn {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; color: var(--text-mute);
  transition: background 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
}
.theme-btn:hover { color: var(--text); }
.theme-btn.active {
  background: var(--bg-elev); color: var(--text);
  border-color: var(--border-strong);
}
.theme-btn .dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.theme-btn .dot.vercel { background: #fb923c; }
.theme-btn .dot.apple { background: #0071e3; }
.theme-btn .dot.editorial { background: #d4a574; }
.theme-btn .dot.sunset { background: #c8364a; }
