/* ============================================================
   STATIQ — Design tokens & base styles
   Color reference: Nouman Raza portfolio (warm cream + orange)
   Type & layout rhythm: Superads + Asad Synt
   ============================================================ */

:root {
  /* Palette */
  --bg-base:        #F7F4ED;
  --bg-section:     #FBF8F2;
  --surface:        #FFFFFF;
  --surface-warm:   #FCF9F3;
  --border:         #E8E4DA;
  --hairline:       #EFEBE0;

  --text-primary:   #111111;
  --text-body:      #2C2A26;
  --text-secondary: #6B6864;
  --text-muted:     #A39E96;

  --accent:         #EA6A1F;
  --accent-hover:   #C9521A;
  --accent-soft:    #FFE5D0;
  --accent-glow:    #FFF1E2;
  --accent-tint:    rgba(234,106,31,0.08);

  --green:          #2F7D4F;
  --red:            #C04A3A;
  --amber:          #D9A038;

  --nav-bg:         rgba(252,249,243,0.86);

  /* Type */
  --font-display:   'Geist', system-ui, -apple-system, sans-serif;
  --font-body:      'Geist', system-ui, -apple-system, sans-serif;
  --font-italic:    'Instrument Serif', Georgia, serif;
  --font-mono:      'Geist Mono', ui-monospace, monospace;

  /* Spacing */
  --space-section:  140px;
  --space-section-sm: 88px;
  --container:      1280px;
  --container-narrow: 1040px;

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-card:    0 1px 2px rgba(17,17,17,0.04), 0 6px 24px rgba(17,17,17,0.04);
  --shadow-card-lg: 0 4px 12px rgba(17,17,17,0.06), 0 18px 48px rgba(234,106,31,0.10);
  --shadow-pill:    0 1px 2px rgba(17,17,17,0.06), 0 4px 14px rgba(17,17,17,0.05);
}

/* ============================================================
   DARK MODE
   Activated by adding `class="dark"` to <html>.
   ============================================================ */
html.dark {
  --bg-base:        #0F0E0D;
  --bg-section:     #15120F;
  --surface:        #1B1814;
  --surface-warm:   #1A1714;
  --border:         #2C2823;
  --hairline:       #25221E;

  --text-primary:   #F4F0E8;
  --text-body:      #D8D2C6;
  --text-secondary: #9F9A91;
  --text-muted:     #6B6760;

  --accent-soft:    #3D2410;
  --accent-glow:    #2A1808;
  --accent-tint:    rgba(234,106,31,0.14);

  --nav-bg:         rgba(20,18,16,0.78);

  --shadow-card:    0 1px 2px rgba(0,0,0,0.45), 0 6px 24px rgba(0,0,0,0.35);
  --shadow-card-lg: 0 4px 12px rgba(0,0,0,0.55), 0 18px 48px rgba(234,106,31,0.18);
  --shadow-pill:    0 1px 2px rgba(0,0,0,0.5), 0 4px 14px rgba(0,0,0,0.4);
}

/* Smooth theme transition */
html { transition: background-color 0.3s ease; }
body, .card, nav, section { transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease; }

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-body);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============================================================
   Container + section
   ============================================================ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 32px; }
section { position: relative; }
.section-pad { padding: var(--space-section) 0; }
.section-pad-sm { padding: var(--space-section-sm) 0; }

/* ============================================================
   Typography utilities
   ============================================================ */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  box-shadow: var(--shadow-pill);
}
.eyebrow-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pill-dot, var(--accent));
}

.eyebrow-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
h1 { font-weight: 700; font-size: clamp(48px, 7vw, 96px); }
h2 { font-weight: 700; font-size: clamp(36px, 5vw, 64px); }
h3 { font-weight: 600; font-size: clamp(20px, 2vw, 28px); line-height: 1.2; }
h4 { font-weight: 600; font-size: 18px; line-height: 1.3; }

.italic-accent {
  font-family: var(--font-italic);
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: -0.01em;
}

p { margin: 0; }
.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 620px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 15px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 6px 18px rgba(234,106,31,0.30);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface); transform: translateY(-1px); box-shadow: var(--shadow-pill); }

.btn-arrow {
  display: inline-block;
  width: 12px;
  height: 12px;
  position: relative;
}
.btn-arrow::before {
  content: "↗";
  font-size: 14px;
  line-height: 1;
}

/* ============================================================
   Marquee
   ============================================================ */
.marquee {
  display: flex;
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  animation: marquee-scroll var(--marquee-duration, 40s) linear infinite;
  will-change: transform;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* ============================================================
   Soft glow backgrounds (peach radial blobs)
   ============================================================ */
.glow-tr, .glow-bl, .glow-center {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(closest-side, rgba(234,106,31,0.18), transparent 70%);
  filter: blur(8px);
}
.glow-tr { top: -120px; right: -120px; width: 520px; height: 520px; }
.glow-bl { bottom: -160px; left: -120px; width: 600px; height: 600px;
  background: radial-gradient(closest-side, rgba(80,120,200,0.10), transparent 70%); }
.glow-center { top: 40%; left: 50%; transform: translate(-50%, -50%); width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(234,106,31,0.10), transparent 70%); }

/* Above-glow content */
section > .container,
section > .container-narrow { position: relative; z-index: 1; }

/* ============================================================
   Reveal on scroll (simple)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  :root { --space-section: 96px; --space-section-sm: 64px; }
  .container, .container-narrow { padding: 0 20px; }
}
@media (max-width: 600px) {
  :root { --space-section: 72px; --space-section-sm: 48px; }
}

/* ============================================================
   CUSTOM CURSOR — orange follow-dot, native arrow stays visible
   ============================================================ */
.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 11px; height: 11px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition:
    width 0.22s ease, height 0.22s ease,
    background 0.22s ease, opacity 0.2s ease;
  will-change: transform;
  box-shadow: 0 0 14px rgba(234, 106, 31, 0.35), 0 0 4px rgba(234, 106, 31, 0.25);
  mix-blend-mode: normal;
}
.custom-cursor.is-ready { opacity: 0.85; }
.custom-cursor__dot { display: none; }
.custom-cursor.is-hover {
  width: 18px; height: 18px;
  box-shadow: 0 0 18px rgba(234, 106, 31, 0.45), 0 0 6px rgba(234, 106, 31, 0.3);
}
.custom-cursor.is-click {
  width: 7px; height: 7px;
  opacity: 1;
}
.custom-cursor.is-out { opacity: 0; }

@media (hover: none), (pointer: coarse) {
  .custom-cursor { display: none !important; }
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.theme-toggle:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}
html.dark .theme-toggle:hover { background: rgba(255,255,255,0.06); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-flex; }
html.dark .theme-toggle .icon-sun { display: inline-flex; }
html.dark .theme-toggle .icon-moon { display: none; }
