/* ============================================================
   RICH OFF PARTS — "Struck Gold" Design System (Clean/Rounded)
   Modern rounded gold app UI. Inter typography. Soft glows.
   No build step.
   ============================================================ */

/* ── Fonts ───────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Share+Tech+Mono&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Core palette — true black / charcoal greys */
  --void:            #0a0a0c;   /* app background */
  --void-2:          #111114;   /* lifted panel base */
  --surface:         #15151a;   /* card surface */
  --surface-2:       #1c1c22;   /* nested surface / hover */
  --chrome:          #F2F2F5;   /* primary text (soft white) */
  --glass:           rgba(21, 21, 26, 0.9);
  --glass-solid:     #15151a;

  /* Accents — GOLD hero; chrome/silver secondary. */
  --gold:            #F5C13B;   /* PRIMARY — struck gold */
  --gold-deep:       #C8860A;   /* deep gold */
  --gold-bright:     #FFE08A;   /* highlight gold */
  --cyan:            #D8DCE4;   /* legacy alias → chrome silver */
  --silver:          #D8DCE4;
  --silver-deep:     #9aa0ab;
  --orange:          #FFF2CC;

  /* Borders */
  --border:          #26262e;   /* default hairline */
  --border-2:        #33333d;   /* lighter hairline */
  --border-gold:     #F5C13B;
  --border-cyan:     #D8DCE4;

  /* Status */
  --green:           #4ADE80;
  --yellow:          #FACC15;
  --red:             #FB7185;
  --text-dim:        rgba(242,242,245,0.78);
  --text-faint:      rgba(242,242,245,0.55);

  /* Gradients — metallic gold */
  --sunset:          linear-gradient(135deg, #FFE08A 0%, #F5C13B 45%, #C8860A 100%);
  --gold-metal:      linear-gradient(180deg, #FFE49A 0%, #F5C13B 45%, #E0A92A 75%, #C8860A 100%);
  --silver-metal:    linear-gradient(180deg, #c2c6cf 0%, #ffffff 50%, #aab0ba 100%);
  --glow-sun:        radial-gradient(circle, #FFD873 0%, #C8860A 60%, transparent 100%);
  --accent-bar:      linear-gradient(to right, #C8860A, #F5C13B, #FFE08A);

  /* Glows */
  --glow-gold-sm:    0 0 16px rgba(245,193,59,0.35);
  --glow-gold-lg:    0 8px 30px rgba(245,193,59,0.4);
  --glow-cyan-sm:    0 0 12px rgba(255,255,255,0.25);
  --glow-cyan-lg:    0 0 28px rgba(255,255,255,0.3);

  /* Radii — rounded everywhere */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-pill: 9999px;

  /* Shadows (soft, modern) */
  --shadow:    0 10px 30px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);

  /* Type */
  --font-head: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;

  /* Layout */
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--void);
  color: var(--chrome);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Global safeguards: nothing may exceed the viewport width */
.wrap, main, section, .terminal, .dash-grid, .card { max-width: 100%; min-width: 0; }
.dash-grid { width: 100%; }

/* ============================================================
   ATMOSPHERE — soft, clean (no grid, no scanlines)
   ============================================================ */
.fx-grid { display: none; }   /* retro grid removed for clean look */

/* Subtle gold ambient glow at the top */
.fx-sun {
  position: fixed;
  top: -280px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 90vw);
  height: min(680px, 90vw);
  max-width: 90vw;
  border-radius: var(--r-pill);
  background: var(--glow-sun);
  filter: blur(110px);
  opacity: 0.12;
  z-index: 0;
  pointer-events: none;
}

.fx-scanlines { display: none; }

/* Content sits above atmosphere */
.layer { position: relative; z-index: 10; }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.head { font-family: var(--font-head); letter-spacing: -0.01em; }
.mono { font-family: var(--font-mono); }

.gradient-text {
  background: var(--gold-metal);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Chrome/silver metallic text fill */
.chrome-text {
  background: var(--silver-metal);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.glow-white { color: #fff; }
.glow-cyan  { color: var(--silver); }
.glow-gold  { color: var(--gold); }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 12px;
  color: var(--gold);
}

/* prompt-style line */
.prompt::before { content: ''; }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
@media (min-width: 640px) { .section { padding: 96px 0; } }

.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(1, 1fr); }
.cols-3 { grid-template-columns: repeat(1, 1fr); }
.cols-4 { grid-template-columns: repeat(1, 1fr); }
@media (min-width: 768px) {
  .cols-2 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(3, 1fr); }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(28px, 4.5vw, 52px);
  text-transform: none;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.section-head p {
  margin-top: 16px;
  color: rgba(224,224,224,0.7);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   BUTTONS (rounded pills, soft glow)
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 26px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn > span { display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm { height: 40px; padding: 0 18px; font-size: 13.5px; }
.btn-lg { height: 58px; padding: 0 34px; font-size: 16.5px; }

/* Primary — metallic gold fill */
.btn-primary {
  border-color: transparent;
  background: var(--gold-metal);
  color: #3a2600;
  font-weight: 800;
  box-shadow: var(--glow-gold-sm);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.btn-primary:hover { box-shadow: var(--glow-gold-lg); transform: translateY(-2px); }

/* Chrome/silver soft button */
.btn-cyan {
  border-color: var(--border-2);
  color: var(--chrome);
  background: var(--surface-2);
}
.btn-cyan:hover { border-color: var(--silver); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }

/* Gold outline */
.btn-outline {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245,193,59,0.06);
}
.btn-outline:hover { background: rgba(245,193,59,0.14); box-shadow: var(--glow-gold-sm); }

/* Dark button — black/charcoal with gold text (contrast to gold primary) */
.btn-dark {
  border-color: var(--border-2);
  background: #161616;
  color: var(--gold);
  font-weight: 700;
}
.btn-dark:hover { border-color: var(--gold); background: #1d1d22; box-shadow: var(--glow-gold-sm); }

/* Ghost */
.btn-ghost {
  color: var(--chrome);
  background: transparent;
}
.btn-ghost:hover { color: var(--gold); background: rgba(245,193,59,0.10); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-block { width: 100%; }

/* ============================================================
   CARDS / PANELS (rounded, soft)
   ============================================================ */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(245,193,59,0.4);
  box-shadow: var(--shadow-lg);
}
.card h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  color: var(--chrome);
  margin-bottom: 10px;
}
.card p { color: var(--text-dim); font-size: 15px; }

/* Rounded icon container (gold tint) */
.icon-diamond {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245,193,59,0.4);
  background: rgba(245,193,59,0.10);
  border-radius: var(--r-sm);
  margin-bottom: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.icon-diamond > * { font-size: 24px; }
.card:hover .icon-diamond { box-shadow: var(--glow-gold-sm); }

/* ── Panel (was terminal) — clean rounded card with header ── */
.terminal {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--void-2);
  border-bottom: 1px solid var(--border);
  padding: 15px 20px;
}
/* Mac-window dots removed — they looked like window buttons but did nothing */
.terminal-dots { display: none !important; }
.dot { width: 10px; height: 10px; border-radius: 9999px; }
.dot-gold { background: var(--gold); }
.dot-cyan { background: var(--silver-deep); }
.dot-orange { background: var(--border-2); }
.terminal-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--chrome);
}
.terminal-body { padding: 22px; }

/* ============================================================
   INPUTS
   ============================================================ */
.field-label {
  display: block;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.input, .textarea, .select {
  width: 100%;
  max-width: 100%;
  background: var(--void-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--chrome);
  font-family: var(--font-body);
  font-size: 16px;   /* >=16px prevents iOS Safari auto-zoom on focus */
  padding: 13px 15px;
  outline: none;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,193,59,0.18);
}
.textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.select { -webkit-appearance: none; appearance: none; cursor: pointer; }

/* ============================================================
   BADGES / CHIPS (rounded)
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  background: rgba(245,193,59,0.12);
  border: 1px solid rgba(245,193,59,0.4);
  color: var(--gold);
  border-radius: var(--r-pill);
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}
.badge > span { display: inline-flex; align-items: center; gap: 6px; }
.badge-cyan { background: rgba(216,220,228,0.10); border-color: rgba(216,220,228,0.4); color: var(--silver); }

.chip {
  background: rgba(245,193,59,0.1);
  color: var(--gold);
  border: 1px solid rgba(245,193,59,0.28);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  border-radius: var(--r-pill);
  padding: 3px 11px;
  border: 1px solid;
}
.pill-green { color: var(--green); border-color: rgba(86,227,159,0.5); background: rgba(86,227,159,0.08); }
.pill-yellow { color: var(--yellow); border-color: rgba(255,210,63,0.5); background: rgba(255,210,63,0.08); }
.pill-red { color: var(--red); border-color: rgba(255,92,122,0.5); background: rgba(255,92,122,0.08); }

/* ============================================================
   APP SHELL — persistent sidebar (desktop) + drawer (mobile)
   ============================================================ */

/* Top bar: mobile only (sidebar replaces it on desktop) */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10,10,12,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: #fff;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand span { color: var(--gold); }
.brand-logo { height: 52px; width: auto; max-width: 60vw; display: block; object-fit: contain; }

.nav-links { display: none !important; }
.nav-cta { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }

/* On small phones, keep BOTH buttons but shrink them so they fit beside the logo */
@media (max-width: 520px) {
  .nav-cta .btn-ghost { display: none; }
  .nav-inner { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .brand { min-width: 0; overflow: hidden; }
  .brand-logo { height: 40px; max-width: 32vw; }
  .nav-cta { gap: 7px; }
  .nav-cta .btn-sm { height: 36px; padding: 0 13px; font-size: 12.5px; }
}
@media (max-width: 360px) {
  .nav-cta .btn-sm { padding: 0 10px; font-size: 12px; }
  .brand-logo { max-width: 26vw; }
}

.burger { display: none !important; }
.mobile-menu { display: none !important; }

/* ── Hamburger (mobile only) ─────────────────────────────── */
.rop-burger {
  display: grid; gap: 5px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border-2);
  padding: 9px 10px; margin: 0; border-radius: var(--r-sm);
  transition: border-color .15s ease, background .15s ease;
}
.rop-burger:hover { border-color: var(--gold); background: rgba(245,193,59,0.08); }
.rop-burger span { width: 20px; height: 2px; background: var(--gold); display: block; border-radius: 2px; }

/* ── Sidebar ─────────────────────────────────────────────── */
.rop-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.rop-backdrop.open { opacity: 1; pointer-events: auto; }
.rop-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 61;
  width: 264px; max-width: 84vw;
  background: var(--void-2);
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 40px rgba(0,0,0,0.6);
  transform: translateX(-104%);
  transition: transform .22s ease;
  display: flex; flex-direction: column;
  padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.rop-drawer.open { transform: translateX(0); }
.rop-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 16px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.rop-drawer-head img { height: 52px; max-width: 80%; object-fit: contain; }
.rop-drawer-close { background: none; border: none; color: var(--text-dim); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.rop-nav-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); padding: 4px 10px 8px; }
.rop-nav { display: flex; flex-direction: column; gap: 4px; }
.rop-drawer a {
  display: flex; align-items: center; gap: 13px;
  font-family: var(--font-body); letter-spacing: 0;
  font-size: 15.5px; font-weight: 600; color: var(--text-dim);
  padding: 13px 14px; border-radius: var(--r-sm);
  transition: background .15s ease, color .15s ease;
}
.rop-drawer a:hover { color: var(--chrome); background: var(--surface-2); }
.rop-drawer a.active { color: var(--gold); background: rgba(245,193,59,0.12); }
.rop-drawer a .ico { width: 20px; text-align: center; font-size: 16px; opacity: 0.95; }
.rop-drawer-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; padding: 0 4px; }
.rop-socials { display: flex; align-items: center; justify-content: space-around; gap: 12px; margin-top: 20px; padding: 0 4px; }
.rop-social {
  width: 54px; height: 54px; border-radius: 9999px;
  display: grid; place-items: center;
  color: var(--chrome); background: var(--surface-2); border: 1px solid var(--border-2);
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}
.rop-social svg { width: 26px; height: 26px; }
.rop-social:hover { color: var(--gold); border-color: var(--gold); background: rgba(245,193,59,0.10); transform: translateY(-2px); }
.rop-drawer-foot { margin-top: 18px; padding: 14px 10px 4px; border-top: 1px solid var(--border); font-family: var(--font-body); font-size: 12px; color: var(--text-faint); }

/* ── DESKTOP: sidebar becomes permanent; top bar hidden ──── */
@media (min-width: 1024px) {
  body.has-shell { padding-left: 264px; }
  .rop-drawer { transform: translateX(0) !important; box-shadow: none; }
  .rop-backdrop { display: none !important; }
  .rop-burger, .rop-drawer-close { display: none !important; }
  .nav { display: none !important; }   /* sidebar carries logo + CTA */
}

.mobile-menu {
  border-bottom: 1px solid var(--border);
  background: rgba(9,0,20,0.95);
  padding: 16px 24px;
  display: grid;
  gap: 14px;
}
.mobile-menu a { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--chrome); }
.mobile-menu a:hover { color: var(--cyan); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(8,8,10,0.6);
  padding: 48px 0 32px;
  margin-top: 40px;
}
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer h4 { font-family: var(--font-head); color: var(--chrome); font-weight: 700; font-size: 14px; letter-spacing: 0; text-transform: none; margin-bottom: 16px; }
.footer a { display: block; color: var(--text-dim); font-size: 14px; padding: 5px 0; }
.footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* ============================================================
   TABLES (rounded wrap, clean)
   ============================================================ */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-sm); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl thead th {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: left;
  padding: 14px 18px;
  background: var(--void-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl tbody td { padding: 13px 18px; border-bottom: 1px solid var(--border); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background 0.15s ease; }
.tbl tbody tr:hover { background: rgba(245,193,59,0.05); }
.tbl .num { color: var(--text-faint); width: 44px; }
.tbl .part { color: #fff; font-weight: 600; }

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }
.center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.wrap-flex { flex-wrap: wrap; }
.muted { color: rgba(236,236,240,0.6); }
.full { width: 100%; }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0d0d10; }
::-webkit-scrollbar-thumb { background: rgba(245,193,59,0.4); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* Animations */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.pulse { animation: pulse-glow 2s ease-in-out infinite; }

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.cursor::after { content: '_'; color: var(--gold); animation: blink 1s steps(1) infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(245,193,59,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
