/* ForgeAI Global — shared stylesheet.
   Design tokens mirror forgeai-studio.com so the two properties read as one brand. */

/* Brand ramps are identical in both themes — they are used for fills and
   gradients, where they hold up on either background. Anything that must stay
   legible as TEXT goes through --accent-text / --grad-* instead, which do flip. */
:root {
  --purple: #8B3DFF;
  --violet: #A855F7;
  --blue: #2563EB;
  --cyan: #22D3EE;
  --teal: #2DD4BF;
  --amber: #F59E0B;
  --green: #34D399;
  --on-bright: #0b1020;
  --radius: 14px;
}

:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-subtle: rgba(255, 255, 255, 0.02);
  --surface-solid: rgba(13, 18, 38, 0.9);
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf6;
  --text-strong: #ffffff;
  --muted: #a8b3cf;
  --header-bg: rgba(11, 16, 32, 0.72);
  --badge-bg: rgba(15, 21, 44, 0.95);
  --accent-text: var(--cyan);
  --grad-a: var(--blue);
  --grad-b: var(--cyan);
  --glow-op: 0.18;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fc;
  --surface: rgba(11, 16, 32, 0.028);
  --surface-2: rgba(11, 16, 32, 0.055);
  --surface-subtle: rgba(11, 16, 32, 0.018);
  --surface-solid: #ffffff;
  --border: rgba(11, 16, 32, 0.11);
  --border-soft: rgba(11, 16, 32, 0.07);
  --border-strong: rgba(11, 16, 32, 0.2);
  --text: #18203a;
  --text-strong: #0b1020;
  --muted: #5b688a;
  --header-bg: rgba(245, 247, 252, 0.82);
  --badge-bg: rgba(255, 255, 255, 0.96);
  --accent-text: #0E7490;
  --grad-a: #1D4ED8;
  --grad-b: #0E7490;
  --glow-op: 0.13;
}

@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
a { color: inherit; }

/* anchor targets must clear the sticky header when jumped to */
[id] { scroll-margin-top: 92px; }

::selection { background: rgba(139, 61, 255, 0.35); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px;
}

/* ── ambient background ─────────────────────────────────────── */
.glow {
  position: fixed; border-radius: 50%; filter: blur(120px); opacity: var(--glow-op);
  pointer-events: none; z-index: 0; animation: driftbg 16s ease-in-out infinite alternate;
}
.glow--purple { width: 560px; height: 560px; background: var(--purple); top: -180px; inset-inline-start: -120px; }
.glow--cyan { width: 480px; height: 480px; background: var(--cyan); top: 34vh; inset-inline-end: -160px; animation-delay: -8s; }
@keyframes driftbg {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 60px) scale(1.15); }
}

.wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── header / nav ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 38px; height: auto; }
.brand__word { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-strong); white-space: nowrap; }
.brand__word .ai {
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand__sub {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  display: block; margin-top: -4px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav__links { display: flex; align-items: center; gap: 8px; }
.nav__link {
  text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 600;
  padding: 8px 15px; border-radius: 999px; border: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  white-space: nowrap;
}
.nav__link:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface); }
.nav__link.is-active { color: var(--accent-text); border-color: rgba(34, 211, 238, 0.5); background: rgba(34, 211, 238, 0.08); }
/* ── theme toggle ───────────────────────────────────────────── */
.theme-toggle {
  position: relative; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 15px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.theme-toggle:hover { border-color: var(--accent-text); background: var(--surface-2); transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.theme-toggle__icon { display: block; transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.theme-toggle:hover .theme-toggle__icon { transform: rotate(18deg) scale(1.12); }
/* the sun shows in dark mode (what you'd switch TO) and the moon in light */
.theme-toggle__icon::after { content: '☀️'; }
[data-theme="light"] .theme-toggle__icon::after { content: '🌙'; }

/* ── buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px; font-size: 15px; font-weight: 700;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  font-family: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn--primary {
  background: linear-gradient(90deg, var(--purple), var(--blue));
  color: #fff; box-shadow: 0 8px 26px rgba(139, 61, 255, 0.3);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(139, 61, 255, 0.4); }
.btn--ghost { color: var(--text); border-color: var(--border-strong); background: transparent; }
.btn--ghost:hover { border-color: var(--accent-text); transform: translateY(-2px); }

/* ── poster lockup — mirrors the studio site's "— STUDIO —" rule ─ */
h1.lockup {
  font-size: clamp(44px, 7.4vw, 74px); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.05; color: var(--text-strong);
}
h1.lockup .ai {
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-a));
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradshift 6s linear infinite;
}
@keyframes gradshift {
  from { background-position: 0% 50%; }
  to   { background-position: 220% 50%; }
}
.global-line {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin: 8px 0 6px;
  font-size: clamp(17px, 2.6vw, 26px); font-weight: 600; letter-spacing: 0.55em;
  text-indent: 0.55em;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.global-line::before, .global-line::after {
  content: ''; height: 2px; width: clamp(30px, 6vw, 60px); flex-shrink: 0;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  opacity: .8;
}

/* ── live unique-visitor badge ──────────────────────────────── */
.hero-visitors { margin: 18px 0 26px; }
.vis-badge {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 28px; border-radius: 999px; overflow: hidden;
  background:
    linear-gradient(var(--badge-bg), var(--badge-bg)) padding-box,
    conic-gradient(from var(--angle), var(--purple), var(--blue), var(--cyan), var(--violet), var(--purple)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 0 26px rgba(139, 61, 255, 0.24), 0 0 60px rgba(34, 211, 238, 0.1);
  animation: borderspin 5s linear infinite;
}
@keyframes borderspin { to { --angle: 360deg; } }
.vis-badge::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.16) 50%, transparent 68%);
  transform: translateX(-130%);
  animation: shine 3.8s ease-in-out infinite;
}
@keyframes shine { 0% { transform: translateX(-130%); } 55%, 100% { transform: translateX(130%); } }
.vis-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
  animation: vispulse 1.8s ease-out infinite;
}
@keyframes vispulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.vis-num {
  font-size: clamp(22px, 3.4vw, 27px); font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; min-width: 3ch; text-align: center;
  background: linear-gradient(135deg, var(--violet), var(--grad-a) 55%, var(--grad-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(37, 99, 235, 0.45));
}
.vis-num.landed { animation: numpop .55s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes numpop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.18); filter: drop-shadow(0 0 26px rgba(34, 211, 238, 0.85)); }
  100% { transform: scale(1); }
}
.vis-lbl {
  color: var(--muted); font-size: 12px; font-weight: 800;
  letter-spacing: 0.2em; text-transform: uppercase;
}

/* ── scroll reveal — the class is applied by JS, so no-JS stays visible ─ */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal--ready { transition: opacity .6s ease, transform .6s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal--in { opacity: 1; transform: none; }

/* ── generic section furniture ──────────────────────────────── */
.section { padding: 54px 0; }
.section__eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px;
}
.section__title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.section__lead { color: var(--muted); font-size: 16px; max-width: 660px; }
.center { text-align: center; }
.center .section__lead { margin-inline: auto; }

/* ── contact ────────────────────────────────────────────────── */
.contact-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  margin-top: 32px; text-align: left;
}
.contact-card {
  display: block; text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 26px 24px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.contact-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.45); background: var(--surface-2); }
.contact-card__icon { font-size: 26px; line-height: 1; display: block; margin-bottom: 12px; }
.contact-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.contact-card p { color: var(--muted); font-size: 14.2px; }
.contact-card__go { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--accent-text); }
.contact-card:hover .contact-card__go { text-decoration: underline; }
.contact-note { margin-top: 20px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }

/* ── footer ─────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 44px 0 40px; position: relative; z-index: 1; }
.footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; margin-bottom: 34px;
}
.footer__brand .brand { margin-bottom: 12px; }
.footer__blurb { color: var(--muted); font-size: 14px; max-width: 320px; }
.footer__col h4, .footer__follow h4 {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text); margin-bottom: 14px;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer__col a, .footer__col span {
  color: var(--muted); font-size: 14px; text-decoration: none; transition: color .15s ease;
}
.footer__col a:hover { color: var(--accent-text); }
.footer__col .soon { opacity: 0.6; }
.footer__follow h4 { margin-top: 22px; }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--muted); text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, color .15s ease, background .15s ease;
}
.social-btn svg { width: 19px; height: 19px; fill: currentColor; }
.social-btn:hover { transform: translateY(-3px); color: var(--text-strong); background: var(--surface-2); }
.social-btn--li:hover { border-color: #0A66C2; color: #0A66C2; }
[data-theme="dark"] .social-btn--li:hover { color: #70B5F9; border-color: #70B5F9; }
.social-btn--ig:hover { border-color: #E1306C; color: #E1306C; }
.social-btn--gh:hover { border-color: var(--text-strong); }
.footer__bar {
  border-top: 1px solid var(--border); padding-top: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.footer__copy { color: var(--muted); font-size: 13px; }
.footer__badges { display: flex; gap: 10px; flex-wrap: wrap; }
.fbadge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted);
}
.fbadge i { font-style: normal; }

@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bar { justify-content: center; text-align: center; }
}
@media (max-width: 560px) {
  .brand__word { font-size: 18px; }
  .brand img { width: 32px; }
  .nav__link { padding: 7px 11px; font-size: 13.5px; }
  .section { padding: 40px 0; }
}

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