/* ─── Emily IA Design Tokens & Shared Layout Stylesheet ─────────────────── */
:root {
  --accent: #e8650a;
  --accent-hover: #c75508;
  --accent-glow: rgba(232, 101, 10, 0.15);
  --accent-secondary: #38bdf8;
  --accent-secondary-glow: rgba(56, 189, 248, 0.1);
  --green: #22c55e;
  --insta-pink: #e1306c;
  --bg-dark: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.45);
  --card-border: rgba(255, 255, 255, 0.07);
  --specular-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
  --shadow-ambient: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-float: 0 12px 36px -4px rgba(0, 0, 0, 0.35);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --text-main: #f8fafc;
  --text-sub: #cbd5e1;
  --text-muted: #94a3b8;
  --text-hint: #64748b;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
  --page-gutter: 20px;
  --island-inset-y: 14px;
}

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

body {
  background-color: var(--bg-dark);
  background: radial-gradient(circle at 50% -120px, rgba(232, 101, 10, .08), transparent 650px),
              var(--bg-dark);
  font-family: var(--font-sans);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
}

/* ─── Fixed Emily Dynamic Island ────────────────────────────────────── */
.island-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  pointer-events: none;
  background: transparent;
}

.island-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: var(--island-inset-y) var(--page-gutter);
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
}

.island-brand {
  text-decoration: none;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  outline: none;
  color: var(--text-main);
}

.island-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-float), var(--specular-highlight);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.4s var(--ease-spring);
  max-width: calc(100vw - 32px);
  overflow: hidden;
}

.island-badge:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(1px);
}

.island-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: islandPulse 2.4s infinite;
  flex: 0 0 auto;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.island-dot.pulsing-fast {
  animation: islandPulseFast 0.8s infinite;
}

@keyframes islandPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.9); }
}

@keyframes islandPulseFast {
  0%, 100% { opacity: 1; transform: scale(1.1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

.island-who {
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--text-main) !important;
  white-space: nowrap;
  line-height: 1;
}

.island-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
  flex: 0 0 auto;
  line-height: 1;
}

.island-react {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  max-width: 320px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  position: relative;
}

.island-react .island-text {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}

.island-react .island-text.marquee-anim {
  animation: islandMarquee 6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

@keyframes islandMarquee {
  0%, 25% {
    transform: translateX(0);
  }
  75%, 100% {
    transform: translateX(var(--overflow-distance, -40px));
  }
}

.island-react .caret {
  display: inline-block;
  width: 1.5px;
  height: 0.95em;
  background: var(--accent-secondary);
  margin-left: 3px;
  vertical-align: -1px;
  animation: islandBlink 1s steps(2) infinite;
  flex: 0 0 auto;
}

@keyframes islandBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─── Static Top Nav Actions (Scrolls with page) ────────────────────── */
.top-nav-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 14px 0 20px;
  position: relative;
  z-index: 10;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-secondary);
}

.btn-glass {
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--specular-highlight);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ─── Background Orbs & Ambient Glow ────────────────────────────────── */
.bg-orbs {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.2;
}

.orb-1 {
  width: 480px;
  height: 480px;
  background: var(--accent);
  top: -100px;
  left: -120px;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: var(--accent-secondary);
  top: 300px;
  right: -100px;
}

/* ─── Shared Layout Container & Cards ───────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 44px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-float), var(--specular-highlight);
  margin-bottom: 60px;
}

.highlight-box {
  background: var(--accent-secondary-glow);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 22px;
  margin: 24px 0;
}

.highlight-box p {
  color: #e0f2fe;
  margin-bottom: 0;
}

.code-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #7dd3fc;
}

.contact-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 36px;
}

.contact-box h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

/* ─── Shared Typography for Content Pages ───────────────────────────── */
h1 {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text-main, #ffffff);
}

article.card h1,
.content-container h1,
.legal-container h1,
h1.gradient-title,
.shell-title-gradient {
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.last-updated {
  color: var(--text-hint);
  font-size: 0.9rem;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

h2 {
  color: var(--accent-secondary);
  font-size: 1.25rem;
  margin-top: 36px;
  margin-bottom: 12px;
  font-weight: 700;
}

h3 {
  color: #e2e8f0;
  font-size: 1.05rem;
  margin-top: 20px;
  margin-bottom: 8px;
  font-weight: 600;
}

p, li {
  color: var(--text-sub);
  font-size: 0.98rem;
  margin-bottom: 12px;
}

strong {
  color: #f8fafc;
}

ul {
  padding-left: 22px;
  margin-bottom: 16px;
}

li {
  margin-bottom: 8px;
}

/* ─── Unified Footer Component ──────────────────────────────────────── */
footer {
  text-align: center;
  padding: 40px 20px 60px;
  border-top: 1px solid var(--card-border);
  color: var(--text-hint);
  font-size: 0.85rem;
}

.footer-channels {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.footer-channel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-sub);
  text-decoration: none;
  box-shadow: var(--specular-highlight), var(--shadow-ambient);
  transition: all 0.2s var(--ease-spring);
}

.footer-channel-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-channel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-main);
  transform: translateY(-2px);
  box-shadow: var(--specular-highlight), 0 6px 20px rgba(0, 0, 0, 0.25);
}

.footer-links {
  font-size: 0.85rem;
  color: var(--text-hint);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-secondary);
}

@media (max-width: 600px) {
  :root {
    --page-gutter: 14px;
    --island-inset-y: 14px;
  }
  .card {
    padding: 24px;
  }
  h1 {
    font-size: 1.8rem;
  }
  .island-react {
    max-width: 200px;
  }
}
