/* ============================================================
   ARTHABASE — GLOBAL STYLESHEET
   Link from every page: <link rel="stylesheet" href="/assets/css/style.css">
   (Use root-absolute paths on 404.html and any future nested routes.)
   Page-specific styles go in a <style> block on that page only.
   Launch signup modal: see block below (index.html only).
   ============================================================ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* clip avoids horizontal scroll without breaking position:fixed on iOS */
  overflow-x: clip;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f8f7f4;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

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

/* ── COLOUR TOKENS ────────────────────────────────────────── */
:root {
  --color-bg:           #f8f7f4;
  --color-bg-card:      #ffffff;
  --color-bg-muted:     #f1f0ec;
  --color-text:         #0f172a;
  --color-text-muted:   #64748b;
  --color-text-faint:   #94a3b8;
  --color-border:       rgba(15, 23, 42, 0.1);
  --color-border-faint: rgba(15, 23, 42, 0.06);
  --color-terracotta:   #c05621;
  --color-terracotta-dim: rgba(192, 86, 33, 0.08);
  --color-terracotta-border: rgba(192, 86, 33, 0.2);
  --color-green:        #2a8a5e;
  --color-red:          #c0504d;
  --color-blue:         #5ba3f5;
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   10px;
  --radius-xl:   12px;
  --radius-pill: 40px;
  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 8px 48px rgba(0, 0, 0, 0.09);
}

/* ── TYPOGRAPHY SCALE ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 700;
}

h1 { font-size: clamp(36px, 5vw, 64px); letter-spacing: -0.025em; }
h2 { font-size: clamp(24px, 3vw, 40px); }
h3 { font-size: clamp(18px, 2.5vw, 28px); }
h4 { font-size: 20px; }
h5 { font-size: 16px; }

p {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.7;
}

small { font-size: 12px; }

.mono {
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-weight: 600;
}

/* ── LAYOUT ───────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  width: 100%;
}

.section {
  padding: 96px 0;
}

.section-sm {
  padding: 64px 0;
}

/* ── NAVIGATION ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border-faint);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--color-text);
}
.nav-logo strong { font-weight: 700; }
.nav-logo span   { font-weight: 300; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-text);
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-terracotta);
  color: #ffffff;
  padding: 11px 24px;
}

.btn-secondary {
  background: var(--color-bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 10px 24px;
}
.btn-secondary:hover {
  border-color: var(--color-terracotta);
  color: var(--color-terracotta);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding: 10px 0;
}
.btn-ghost:hover {
  color: var(--color-text);
  opacity: 1;
}

.btn-sm { font-size: 13px; padding: 8px 18px; }
.btn-lg { font-size: 16px; padding: 14px 36px; }

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.card-sm { padding: 18px 20px; border-radius: var(--radius-lg); }
.card-lg { padding: 40px; border-radius: var(--radius-xl); }

/* Accent border for highlighted cards */
.card-accent {
  border-color: var(--color-terracotta-border);
  background: var(--color-terracotta-dim);
}

/* ── GLASS COMPONENTS ─────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius-md);
}

.glass-accent {
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(192, 86, 33, 0.34);
  border-radius: var(--radius-md);
}

/* ── KPI BOXES ────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.kpi-box {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 14px 12px;
}

.kpi-value {
  font-family: 'Roboto Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
  display: block;
  margin-bottom: 5px;
}

.kpi-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
}

/* ── BADGES & PILLS ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-terracotta {
  background: var(--color-terracotta-dim);
  border: 1px solid var(--color-terracotta-border);
  color: var(--color-terracotta);
}

.badge-green {
  background: rgba(42, 138, 94, 0.08);
  border: 1px solid rgba(42, 138, 94, 0.2);
  color: var(--color-green);
}

.badge-red {
  background: rgba(192, 80, 77, 0.08);
  border: 1px solid rgba(192, 80, 77, 0.2);
  color: var(--color-red);
}

.pill {
  display: inline-block;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  transition: border-color 0.15s, color 0.15s;
}
.pill:hover {
  border-color: var(--color-terracotta);
  color: var(--color-terracotta);
}

/* ── EYEBROW LABELS ───────────────────────────────────────── */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-terracotta);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 16px;
}

.section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

/* ── STAT HIGHLIGHTS (inline coloured numbers) ────────────── */
.stat-up   { color: var(--color-green);  font-weight: 600; }
.stat-down { color: var(--color-red);    font-weight: 600; }
.stat-main { color: var(--color-terracotta); font-weight: 600; }

/* ── DIVIDERS ─────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--color-border-faint);
  margin: 24px 0;
}

hr.dashed {
  border-top-style: dashed;
  border-color: rgba(15, 23, 42, 0.12);
}

/* ── BACKGROUND PATTERNS ──────────────────────────────────── */

/* Dot grid overlay — add class to any section */
.market-grid {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.055) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Animated concentric rings — for hero sections */
.bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bp-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(192, 86, 33, 0.1);
  animation: ringPulse 8s ease-in-out infinite;
}

/* Top-right ring cluster */
.bp-ring:nth-child(1) { width: 600px; height: 600px; top: -200px; right: -200px; animation-delay: 0s; }
.bp-ring:nth-child(2) { width: 440px; height: 440px; top: -120px; right: -120px; animation-delay: 1.2s; border-color: rgba(192,86,33,0.07); }
.bp-ring:nth-child(3) { width: 280px; height: 280px; top: -40px;  right: -40px;  animation-delay: 2.4s; border-color: rgba(192,86,33,0.05); }

/* Bottom-left ring cluster */
.bp-ring:nth-child(4) { width: 500px; height: 500px; bottom: -200px; left: -200px; animation-delay: 3s;  border-color: rgba(192,86,33,0.07); }
.bp-ring:nth-child(5) { width: 340px; height: 340px; bottom: -120px; left: -120px; animation-delay: 4.2s; border-color: rgba(192,86,33,0.05); }

.bp-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(192, 86, 33, 0.1);
  animation: dotFloat 12s ease-in-out infinite;
}
.bp-dot:nth-child(6)  { width: 4px; height: 4px; top: 20%; left: 15%; animation-delay: 0s; }
.bp-dot:nth-child(7)  { width: 3px; height: 3px; top: 35%; left: 80%; animation-delay: 2s; }
.bp-dot:nth-child(8)  { width: 5px; height: 5px; top: 70%; left: 25%; animation-delay: 4s; }
.bp-dot:nth-child(9)  { width: 3px; height: 3px; top: 55%; left: 65%; animation-delay: 6s; }
.bp-dot:nth-child(10) { width: 4px; height: 4px; top: 80%; left: 85%; animation-delay: 1s; }
.bp-dot:nth-child(11) { width: 3px; height: 3px; top: 15%; left: 50%; animation-delay: 3s; }

.bp-hline {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(192, 86, 33, 0.04);
  animation: lineFade 10s ease-in-out infinite;
}
.bp-hline:nth-child(12) { top: 25%; animation-delay: 0s; }
.bp-hline:nth-child(13) { top: 50%; animation-delay: 3s; }
.bp-hline:nth-child(14) { top: 75%; animation-delay: 6s; }

@keyframes ringPulse {
  0%, 100% { transform: scale(1);     opacity: 1; }
  50%       { transform: scale(1.04); opacity: 0.5; }
}
@keyframes dotFloat {
  0%, 100% { transform: translateY(0px);  opacity: 0.8; }
  33%       { transform: translateY(-8px); opacity: 0.4; }
  66%       { transform: translateY(4px);  opacity: 1; }
}
@keyframes lineFade {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* ── ANIMATIONS ───────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── SIGNAL CARDS ─────────────────────────────────────────── */
.signal-card {
  transition: transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}
.signal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 86, 33, 0.35);
  background-color: rgba(255, 255, 255, 0.86);
}

/* ── FORMS ────────────────────────────────────────────────── */
.input {
  background: var(--color-bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text);
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--color-terracotta); }
.input::placeholder { color: var(--color-text-faint); }

.select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--color-bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 11px 44px 11px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.select:focus { border-color: var(--color-terracotta); }

/* ── STICKY MOBILE CTA ────────────────────────────────────── */
.sticky-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 52px;
  z-index: 9999;
  background-color: var(--color-terracotta);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(100%);
}
.sticky-mobile-cta.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 768px) {
  .sticky-mobile-cta { display: flex; }
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border-faint);
  padding: 40px 0;
  color: var(--color-text-faint);
  font-size: 13px;
}

/* ── SKIP LINK (accessibility) ────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-terracotta);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  font-size: 14px;
  font-weight: 600;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .container { padding: 0 40px; }
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .section    { padding: 64px 0; }
  .section-sm { padding: 48px 0; }
  .nav-links  { display: none; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

/* ── SHARED SITE NAV (pill) ───────────────────────────────── */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  pointer-events: none;
}

#site-nav-inner,
#mobile-overlay,
#mobile-menu {
  pointer-events: auto;
}

#mobile-menu {
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
#mobile-menu.open {
  transform: translateX(0);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem 0.75rem;
  pointer-events: none;
}

.nav-desktop-shell {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.nav-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
}

.nav-logo-pill { padding: 0.5rem 0.875rem; min-width: 0; }
.nav-links-pill { padding: 0.375rem 0.375rem 0.375rem 1.25rem; gap: 1.25rem; min-width: 0; }

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.nav-link:hover { color: #0f172a; }
.nav-link-active { color: #0f172a; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #c05621;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}
.nav-cta:hover { background: #e0743b; }

.nav-menu-btn {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: #334155;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-menu-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.85);
}

/* ── SHARED SITE FOOTER ───────────────────────────────────── */
.footer-link {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-link:hover {
  color: #c05621;
  transform: translateX(2px);
}
.footer-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: footerFloat 10s ease-in-out infinite;
}
@keyframes footerFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-12px) scale(1.05); opacity: 0.7; }
}
.newsletter-btn { transition: all 0.2s ease; }
.newsletter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(192, 86, 33, 0.25);
}
.newsletter-btn:active { transform: translateY(0); }
.footer-newsletter-col { min-width: 0; }
.footer-newsletter-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
}
@media (min-width: 1280px) {
  .footer-newsletter-form-row {
    flex-direction: row;
    align-items: stretch;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 9999px;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* Tailwind pages: glass utility */
.glass {
  background-color: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 5px;
}
.glass-accent {
  background-color: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(192, 86, 33, 0.34);
  border-radius: 5px;
}

.signal-card {
  transition: transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}
.signal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 86, 33, 0.35);
  background-color: rgba(255, 255, 255, 0.86);
}
/* ── LAUNCH SIGNUP MODAL (index.html) ─────────────────────── */
#launch-signup-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#launch-signup-modal.launch-modal-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.launch-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.launch-modal-panel {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(100%, 28rem);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 5px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  padding: 1.5rem;
}

button.nav-cta {
  border: none;
  cursor: pointer;
  font: inherit;
}

/* ── PHOSPHOR ICONS ───────────────────────────────────────── */
.ph {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

.ph.w-4, .ph.h-4 { font-size: 1rem; }
.ph.w-5, .ph.h-5 { font-size: 1.25rem; }
.ph.w-6, .ph.h-6 { font-size: 1.5rem; }

.accordion-trigger .ph-plus {
  transition: transform 0.2s ease;
}

.accordion-item.open .accordion-trigger .ph-plus {
  transform: rotate(45deg);
}

#launch-signup-modal:not(.launch-modal-open) {
  display: none !important;
}
#launch-signup-modal.launch-modal-open {
  display: flex !important;
}
