/* ============================================================
   AnswerDesk Design System
   Warm gradient editorial — import this on every page
   ============================================================ */

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

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Color — foundation */
  --ink:        #1A1A1A;
  --white:      #ffffff;
  --cream:      #F5F3EF;

  /* Color — brand accent (warm amber/orange) */
  --brand:      #F59E0B;   /* warm amber */
  --brand-dark: #D97706;
  --brand-deep: #EA580C;   /* deep orange end of gradient */
  --brand-dim:  #FEF3C7;   /* light amber tint */
  --brand-mid:  #FCD34D;   /* mid amber */

  /* Color — secondary accent (soft violet) */
  --violet:     #8B5CF6;
  --violet-dim: #EDE9FE;

  /* Color — grays (warm-shifted) */
  --gray-50:    #FAF9F7;
  --gray-100:   #F5F3EF;
  --gray-200:   #E8E5DE;
  --gray-300:   #D6D3CC;
  --gray-400:   #A8A29E;
  --gray-600:   #57534E;
  --gray-800:   #292524;

  /* Color — warm editorial palette */
  --warm-bg:    #FAF8F5;      /* Off-white warm background */
  --warm-gray:  #F3EFEB;      /* Warm gray for sections */
  --warm-amber: #F59E0B;      /* Warm amber for accents */
  --warm-amber-dim: #FEF3C7;  /* Warm amber for backgrounds */
  --warm-red:   #EF4444;      /* Bold warm red for emergency */
  --warm-orange: #FB923C;     /* Warm orange for gradients */
  --warm-yellow: #FBBF24;     /* Warm yellow for gradients */

  /* Color — status */
  --success:    #16A34A;
  --warning:    #D97706;
  --danger:     #DC2626;

  /* Typography scale */
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-display: clamp(3.5rem, 7vw, 6rem);
  --text-hero:  clamp(2.75rem, 6vw, 4.5rem);
  --text-h1:    clamp(1.875rem, 4vw, 3rem);
  --text-h2:    clamp(1.5rem, 3vw, 2rem);
  --text-h3:    1.375rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-base:  1rem;
  --text-sm:    0.875rem;
  --text-xs:    0.75rem;

  /* Leading */
  --leading-tight:  1.05;
  --leading-snug:   1.3;
  --leading-normal: 1.6;

  /* Tracking */
  --tracking-tight: -0.035em;
  --tracking-snug:  -0.02em;
  --tracking-display: -0.04em;
  --tracking-wide:  0.06em;
  --tracking-wider: 0.1em;
  --tracking-caps:  0.08em;

  /* Spacing — 8px grid */
  --s1:  8px;
  --s2:  16px;
  --s3:  24px;
  --s4:  32px;
  --s5:  40px;
  --s6:  48px;
  --s8:  64px;
  --s10: 80px;
  --s12: 96px;
  --s16: 128px;
  --s20: 160px;
  --s24: 192px;

  /* Borders */
  --radius-sm:  4px;
  --radius:     8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --border:     1px solid var(--gray-200);
  --border-ink: 1px solid var(--ink);
  --border-light: 1px solid rgba(0,0,0,0.06);
  --border-dim: 1px solid rgba(255,255,255,0.1);

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:   120ms;
  --t-normal: 220ms;
  --t-slow:   380ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink);
  background: var(--warm-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ── LAYOUT ──────────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s3);
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--s3);
}

.container-wide {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--s3);
}

.section {
  padding: var(--s16) var(--s3);
}

.section-sm {
  padding: var(--s10) var(--s3);
}

.section-xl {
  padding: var(--s24) var(--s3);
}

/* Section backgrounds */
.bg-cream  { background: var(--cream); color: var(--ink); }
.bg-white  { background: var(--white); color: var(--ink); }
.bg-gray   { background: var(--gray-100); color: var(--ink); }
.bg-ink    { background: var(--ink); color: var(--white); }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }

/* Flex helpers */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-1 { gap: var(--s1); }
.gap-2 { gap: var(--s2); }
.gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); }

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
.text-display {
  font-size: var(--text-display);
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

.text-hero {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-h1 {
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-h2 {
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
}

.text-h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: var(--leading-snug);
}

.text-lg  { font-size: var(--text-lg);   line-height: var(--leading-normal); }
.text-base{ font-size: var(--text-base); line-height: var(--leading-normal); }
.text-sm  { font-size: var(--text-sm);   line-height: var(--leading-normal); }
.text-xs  { font-size: var(--text-xs);   line-height: var(--leading-normal); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold  { font-weight: 700; }

.text-upper {
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}

.text-center { text-align: center; }
.text-left   { text-align: left; }

/* Color utilities */
.text-ink    { color: var(--ink); }
.text-muted  { color: var(--gray-600); }
.text-faint  { color: var(--gray-400); }
.text-white  { color: var(--white); }
.text-brand  { color: var(--brand); }
.text-violet { color: var(--violet); }

/* Label — small uppercased eyebrow */
.label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--brand-dark);
}

.label-light {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--brand-mid);
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  padding: 14px 28px;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: opacity var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover  { opacity: 0.85; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}
.btn-ghost:hover {
  color: var(--brand-dark);
  opacity: 1;
}

.btn-white {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}
.btn-white:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--gray-300);
}
.btn-outline:hover {
  border-color: var(--ink);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}
.btn-outline-white:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
}

.btn-warm {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}
.btn-warm:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  opacity: 1;
}

.btn-lg {
  padding: 16px 36px;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 10px;
}

/* ── GRADIENT ORB UTILITIES ──────────────────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.orb-warm {
  background: radial-gradient(circle at 40% 40%,
    rgba(245, 158, 11, 0.7) 0%,
    rgba(234, 88, 12, 0.5) 30%,
    rgba(234, 88, 12, 0.2) 55%,
    transparent 75%
  );
  filter: blur(40px);
}

.orb-warm-violet {
  background: radial-gradient(circle at 35% 35%,
    rgba(252, 211, 77, 0.6) 0%,
    rgba(245, 158, 11, 0.6) 20%,
    rgba(234, 88, 12, 0.4) 40%,
    rgba(139, 92, 246, 0.25) 65%,
    transparent 80%
  );
  filter: blur(50px);
}

.orb-violet {
  background: radial-gradient(circle at 50% 50%,
    rgba(139, 92, 246, 0.4) 0%,
    rgba(139, 92, 246, 0.15) 40%,
    transparent 70%
  );
  filter: blur(40px);
}

.orb-large {
  width: 600px;
  height: 600px;
}

.orb-medium {
  width: 400px;
  height: 400px;
}

.orb-small {
  width: 250px;
  height: 250px;
}

.orb-xl {
  width: 800px;
  height: 800px;
}

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--s4);
}

.card-sm {
  padding: var(--s3);
}

.card-borderless {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: var(--s4);
}

.card-dark {
  background: var(--gray-800);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: var(--s4);
  color: var(--white);
}

/* ── NAV ─────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(245, 243, 239, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--border-light);
}

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

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--s1);
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--ink);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s4);
  list-style: none;
}

.nav-links a {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gray-600);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  transition: color var(--t-fast);
}

.nav-links a:hover { color: var(--ink); }

/* ── BADGE ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: 100px;
}

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

.badge-ink {
  background: var(--ink);
  color: var(--white);
}

.badge-success {
  background: #DCFCE7;
  color: var(--success);
  border: 1px solid #BBF7D0;
}

/* ── DIVIDER ─────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: var(--border);
  margin: var(--s8) 0;
}

.divider-thin {
  border: none;
  border-top: 1px solid var(--gray-200);
}

.divider-dark {
  border: none;
  border-top: var(--border-dim);
  margin: var(--s8) 0;
}

/* ── FORM ELEMENTS ───────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--text-sm);
  color: var(--ink);
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t-fast);
  outline: none;
}

.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

.input::placeholder { color: var(--gray-400); }

.label-field {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  display: block;
}

/* ── SPACING UTILS ───────────────────────────────────────────── */
.mt-1 { margin-top: var(--s1); }
.mt-2 { margin-top: var(--s2); }
.mt-3 { margin-top: var(--s3); }
.mt-4 { margin-top: var(--s4); }
.mt-6 { margin-top: var(--s6); }
.mt-8 { margin-top: var(--s8); }

.mb-1 { margin-bottom: var(--s1); }
.mb-2 { margin-bottom: var(--s2); }
.mb-3 { margin-bottom: var(--s3); }
.mb-4 { margin-bottom: var(--s4); }
.mb-6 { margin-bottom: var(--s6); }
.mb-8 { margin-bottom: var(--s8); }

/* ── WARM GRADIENT ACCENTS ───────────────────────────────────── */
.bg-warm      { background: var(--warm-bg); color: var(--ink); }
.bg-warm-gray { background: var(--warm-gray); color: var(--ink); }
.text-amber   { color: var(--warm-amber); }
.text-warm-red { color: var(--warm-red); }

/* Warm gradient orb decoration */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(245, 158, 11, 0.15), rgba(251, 146, 60, 0.08));
  pointer-events: none;
}

.gradient-orb-sm { width: 160px; height: 160px; }
.gradient-orb-md { width: 240px; height: 240px; }
.gradient-orb-lg { width: 320px; height: 320px; }

/* Warm amber accent for stat values */
.stat-accent {
  color: var(--warm-amber);
}

/* Bold warm red for emergency labels */
.emergency-label {
  color: var(--warm-red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── MOBILE BREAKPOINTS ──────────────────────────────────────── */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: var(--s10) var(--s3); }
  .section-xl { padding: var(--s16) var(--s3); }
  .nav-links { display: none; }
  .container, .container-narrow, .container-wide { padding: 0 var(--s2); }
  .orb-large { width: 350px; height: 350px; }
  .orb-xl { width: 450px; height: 450px; }
}

@media (max-width: 480px) {
  .section { padding: var(--s8) var(--s2); }
  .section-xl { padding: var(--s12) var(--s2); }
  .orb-large { width: 280px; height: 280px; }
  .orb-xl { width: 350px; height: 350px; }
}
