/* ============================================================
   DIAPHONOUS DESIGN SYSTEM v2 — HuntOps
   Core token layer. Import this first, then theme.css overrides.
   ============================================================ */

/* ---- DESIGN TOKENS ---- */
:root {
  /* Color palette */
  --ivory: #FDFAF5;
  --cream: #F5E6D3;
  --terracotta: #C4A882;
  --sage: #9BAAA0;
  --warm-gray: #E8E4DF;
  --charcoal: #3A3A3A;
  --light-charcoal: #6B6B6B;

  /* Surface colors */
  --bg: var(--ivory);
  --bg-alt: var(--cream);
  --surface: #FFFFFF;
  --surface-muted: #F9F3EC;
  --surface-hover: #F0E4D6;
  --ivory-deep: #EBD9C4;
  --ivory-mid: #F0E4D0;

  /* Text colors */
  --fg: var(--charcoal);
  --fg-muted: var(--light-charcoal);
  --fg-subtle: #9A9188;

  /* Accent */
  --accent: var(--terracotta);
  --accent-dark: #A8896A;
  --accent-light: rgba(196,168,130,0.08);
  --accent-border: rgba(196,168,130,0.3);
  --accent-bg: rgba(196,168,130,0.06);

  /* Sage secondary */
  --sage-dark: #3D5149;
  --sage-light: rgba(61,81,73,0.08);
  --sage-border: rgba(61,81,73,0.25);

  /* Functional */
  --white: #FFFFFF;
  --black: var(--charcoal);
  --error: #C0624A;

  /* Shadows — warm terracotta tint */
  --shadow-sm: 0 2px 8px rgba(58,58,58,0.08);
  --shadow-md: 0 8px 24px rgba(58,58,58,0.10);
  --shadow-lg: 0 16px 48px rgba(58,58,58,0.12);
  --shadow-float: 0 8px 32px rgba(196,168,130,0.18), 0 2px 8px rgba(196,168,130,0.10);

  /* Radius */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 9999px;

  /* Typography */
  --font-display: 'Sora', 'DM Sans', sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', monospace;

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --max-w: 1200px;
  --nav-h: 64px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
}

/* ============================================================
   MOTION PRIMITIVES
   Motion-safe via prefers-reduced-motion
   ============================================================ */

/* Entrance: fade + translateY(20px → 0), 400ms ease-out */
@keyframes ds-entrance {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ds-entrance {
  animation: ds-entrance 400ms var(--ease-out) both;
}

/* Staggered entrance children */
.ds-stagger > * {
  opacity: 0;
  transform: translateY(20px);
}

.ds-stagger.animated > * {
  animation: ds-entrance 400ms var(--ease-out) both;
}

.ds-stagger.animated > *:nth-child(1) { animation-delay: 0ms; }
.ds-stagger.animated > *:nth-child(2) { animation-delay: 80ms; }
.ds-stagger.animated > *:nth-child(3) { animation-delay: 160ms; }
.ds-stagger.animated > *:nth-child(4) { animation-delay: 240ms; }
.ds-stagger.animated > *:nth-child(5) { animation-delay: 320ms; }
.ds-stagger.animated > *:nth-child(6) { animation-delay: 400ms; }

/* Hover lift: translateY(-4px) + shadow-md → shadow-lg, 200ms ease */
.ds-hover-lift {
  transition: transform var(--duration-base) ease,
              box-shadow var(--duration-base) ease;
}

.ds-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Blob drift — slow, organic movement */
@keyframes ds-blob-drift-1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25%       { transform: translate(18px, -12px) rotate(3deg) scale(1.01); }
  50%       { transform: translate(-8px, 14px) rotate(-2deg) scale(0.99); }
  75%       { transform: translate(12px, -8px) rotate(2deg) scale(1.02); }
}

@keyframes ds-blob-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-14px, 18px) scale(1.02); }
  66%       { transform: translate(10px, -10px) scale(0.98); }
}

@keyframes ds-blob-drift-3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%       { transform: translate(6px, -10px) rotate(4deg) scale(1.03); }
}

/* CTA pulse — subtle terracotta box-shadow pulse */
@keyframes ds-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196,168,130,0.45); }
  50%       { box-shadow: 0 0 0 8px rgba(196,168,130,0); }
}

.ds-cta-pulse {
  animation: ds-cta-pulse 3s ease-in-out infinite;
}

/* Scroll-reveal (IntersectionObserver driven) */
.ds-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.ds-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ds-entrance,
  .ds-stagger > *,
  .ds-hover-lift,
  .ds-reveal,
  .ds-cta-pulse {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   LAYERED CARD COMPONENT
   Floating card with shadow-md, hover lift
   ============================================================ */

.card-layered {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  border: 1px solid rgba(196,168,130,0.12);
  transition: transform var(--duration-base) ease,
              box-shadow var(--duration-base) ease,
              border-color var(--duration-base) ease;
}

.card-layered:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-border);
}

.card-layered--lg {
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.card-layered--sm {
  border-radius: var(--radius-sm);
  padding: var(--space-4);
}

/* ============================================================
   BLOB BACKGROUND
   Soft blurred blob shape, positioned absolute
   ============================================================ */

.blob-bg {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.6;
}

.blob-bg--accent {
  background: radial-gradient(circle, rgba(196,168,130,0.18) 0%, transparent 70%);
}

.blob-bg--sage {
  background: radial-gradient(circle, rgba(155,170,160,0.14) 0%, transparent 70%);
}

.blob-bg--cream {
  background: radial-gradient(circle, rgba(245,230,211,0.3) 0%, transparent 70%);
}

.blob-bg--1 { width: 500px; height: 500px; animation: ds-blob-drift-1 18s ease-in-out infinite; }
.blob-bg--2 { width: 400px; height: 400px; animation: ds-blob-drift-2 22s ease-in-out infinite; }
.blob-bg--3 { width: 300px; height: 300px; animation: ds-blob-drift-3 15s ease-in-out infinite reverse; }
.blob-bg--4 { width: 600px; height: 600px; animation: ds-blob-drift-1 25s ease-in-out infinite reverse; }

/* ============================================================
   PILL BADGE
   Colored badge for status, source, category
   ============================================================ */

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  border: 1px solid transparent;
}

.pill-badge--terracotta {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: var(--accent-border);
}

.pill-badge--sage {
  background: var(--sage-light);
  color: var(--sage-dark);
  border-color: var(--sage-border);
}

.pill-badge--muted {
  background: var(--surface-muted);
  color: var(--fg-muted);
  border-color: var(--ivory-mid);
}

.pill-badge--dark {
  background: var(--charcoal);
  color: var(--white);
  border-color: transparent;
}

.pill-badge--ivory {
  background: var(--ivory);
  color: var(--charcoal);
  border-color: var(--ivory-mid);
}

/* Source badges (from job board) */
.pill-badge--linkedin  { background: rgba(10,102,194,0.08); color: #0A66C2; border-color: rgba(10,102,194,0.2); }
.pill-badge--indeed    { background: rgba(8,101,208,0.08); color: #0865CE; border-color: rgba(8,101,208,0.2); }
.pill-badge--github    { background: rgba(36,41,46,0.08); color: #24292F; border-color: rgba(36,41,46,0.2); }
.pill-badge--dice      { background: rgba(229,57,80,0.08); color: #E53950; border-color: rgba(229,57,80,0.2); }

/* ============================================================
   SECTION GRADIENT
   Ivory → cream vertical gradient for alternating sections
   ============================================================ */

.section-gradient {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
}

.section-gradient--invert {
  background: linear-gradient(180deg, var(--cream) 0%, var(--ivory) 100%);
}

.section-gradient--sage {
  background: linear-gradient(180deg, var(--ivory) 0%, rgba(155,170,160,0.08) 100%);
}

/* Section container utility */
.section-wrap {
  padding: var(--space-24) 40px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-wrap--narrow {
  max-width: 860px;
}

.section-wrap--wide {
  max-width: 1400px;
}

/* ============================================================
   BUTTON COMPONENTS
   ============================================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--terracotta);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background var(--duration-fast), transform var(--duration-fast), box-shadow var(--duration-fast);
  min-height: 48px;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-float);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ivory-deep);
  cursor: pointer;
  transition: all var(--duration-fast);
  min-height: 48px;
  text-decoration: none;
}

.btn-secondary:hover {
  color: var(--fg);
  border-color: var(--accent);
  background: var(--accent-bg);
}

/* ============================================================
   FORM COMPONENTS
   ============================================================ */

.ds-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--ivory-deep);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  outline: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.ds-input::placeholder { color: var(--fg-subtle); }

.ds-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.ds-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: block;
  margin-bottom: var(--space-2);
}

/* ============================================================
   DISPLAY TYPOGRAPHY
   ============================================================ */

.ds-display {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--charcoal);
}

.ds-display--xl { font-size: clamp(40px, 6vw, 72px); }
.ds-display--lg { font-size: clamp(28px, 4vw, 48px); }
.ds-display--md { font-size: clamp(22px, 3vw, 34px); }

.ds-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-6);
}

/* ============================================================
   NAV COMPONENTS
   ============================================================ */

.ds-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253,250,245,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(235,217,196,0.6);
  padding: 0 40px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow var(--duration-base), background var(--duration-base);
}

.ds-nav.scrolled {
  background: rgba(253,250,245,0.96);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--ivory-deep);
}

.ds-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.ds-nav-brand-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-nav-link {
  font-size: 14px;
  color: var(--fg-muted);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: color var(--duration-fast), background var(--duration-fast);
  white-space: nowrap;
  font-weight: 500;
  text-decoration: none;
}

.ds-nav-link:hover { color: var(--fg); background: var(--surface-muted); }
.ds-nav-link.active { color: var(--accent-dark); background: var(--accent-bg); font-weight: 600; }

.ds-nav-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  font-weight: 600;
  margin-left: var(--space-2);
  padding: 9px 20px !important;
  border-radius: var(--radius-pill) !important;
  transition: background var(--duration-fast) !important;
}

.ds-nav-cta:hover { background: var(--accent-dark) !important; box-shadow: var(--shadow-float) !important; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.ds-flex { display: flex; }
.ds-flex-col { flex-direction: column; }
.ds-items-center { align-items: center; }
.ds-justify-between { justify-content: space-between; }
.ds-gap-2 { gap: var(--space-2); }
.ds-gap-4 { gap: var(--space-4); }
.ds-gap-6 { gap: var(--space-6); }
.ds-gap-8 { gap: var(--space-8); }

.ds-mt-4  { margin-top: var(--space-4); }
.ds-mt-6  { margin-top: var(--space-6); }
.ds-mt-8  { margin-top: var(--space-8); }
.ds-mt-12 { margin-top: var(--space-12); }
.ds-mt-16 { margin-top: var(--space-16); }

.ds-mb-4  { margin-bottom: var(--space-4); }
.ds-mb-6  { margin-bottom: var(--space-6); }
.ds-mb-8  { margin-bottom: var(--space-8); }
.ds-mb-12 { margin-bottom: var(--space-12); }

.ds-text-center { text-align: center; }
.ds-text-muted  { color: var(--fg-muted); }
.ds-text-accent { color: var(--accent); }
.ds-text-sage   { color: var(--sage-dark); }
.ds-font-mono   { font-family: var(--font-mono); }

.ds-w-full { width: 100%; }
.ds-max-w-sm { max-width: 400px; }
.ds-max-w-md { max-width: 560px; }
.ds-max-w-lg { max-width: 760px; }

.ds-hidden { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .ds-nav { padding: 0 20px; }
  .section-wrap { padding: var(--space-16) 20px; }
}

@media (max-width: 768px) {
  .ds-nav { padding: 0 16px; }
  .section-wrap { padding: var(--space-12) 16px; }
  .blob-bg--1 { width: 320px; height: 320px; }
  .blob-bg--2 { width: 260px; height: 260px; }
}