/* ============================================================
   MINIMALIST-UI DARK PROTOCOL — Breezy ArtDrop Studios
   Premium Utilitarian Minimalism adapted for dim/dark theme
   ============================================================ */

/* --- Fonts ------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,300;1,6..72,400&family=Switzer:wght@300;400;500;600&display=swap');

/* --- Dark Design Tokens ------------------------------------ */
:root {
  /* Canvas */
  --mu-bg:           #0d0d0b;       /* near-black, warm-tinted */
  --mu-surface:      #161614;       /* card surfaces */
  --mu-surface-2:    #1d1d1a;       /* elevated cards */

  /* Borders */
  --mu-border:       rgba(255,255,255,0.07);
  --mu-border-hover: rgba(255,255,255,0.13);

  /* Typography */
  --mu-text-1:       #f0ede8;       /* warm off-white — primary */
  --mu-text-2:       #8a8681;       /* warm muted — secondary */
  --mu-text-3:       #4f4d4a;       /* very muted — tertiary */

  /* Accents — muted pastels, dark-adapted */
  --mu-pale-red:     #2a1516;
  --mu-pale-red-fg:  #d97070;
  --mu-pale-blue:    #0e1e2a;
  --mu-pale-blue-fg: #6aafe0;
  --mu-pale-green:   #111d12;
  --mu-pale-green-fg:#6aad6e;
  --mu-pale-gold:    #221f0e;
  --mu-pale-gold-fg: #d4a83a;

  /* Fonts */
  --mu-font-serif:   'Newsreader', 'Playfair Display', Georgia, serif;
  --mu-font-sans:    'Switzer', 'Helvetica Neue', system-ui, sans-serif;
  --mu-font-mono:    'JetBrains Mono', 'SF Mono', monospace;

  /* Motion */
  --mu-ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --mu-duration:     600ms;
}

/* --- Global Reset Overrides -------------------------------- */
html[data-theme="dim"],
html[data-theme="dark"] {
  background: var(--mu-bg);
}

/* Body typography */
body {
  font-family: var(--mu-font-sans);
  color: var(--mu-text-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Editorial Hero Typography ----------------------------- */
/* Large display headings use the serif editorial style */
.hero h1,
.hero-title,
[class*="hero"] h1,
section:first-of-type h1 {
  font-family: var(--mu-font-serif);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--mu-text-1);
}

/* Section headings — mix of serif editorial + sans weight */
h2,
.section-title,
[class*="section"] h2 {
  font-family: var(--mu-font-serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--mu-text-1);
}

h3,
h4 {
  font-family: var(--mu-font-sans);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--mu-text-1);
}

/* Body copy */
p {
  font-family: var(--mu-font-sans);
  font-weight: 300;
  line-height: 1.65;
  color: var(--mu-text-2);
  font-size: 0.9375rem;
}

/* --- Structural Borders & Cards ---------------------------- */

/* All cards get the editorial 1px warm border */
.card,
.feature-card,
.bento-cell,
[class*="card"],
[class*="tile"],
[class*="panel"] {
  border: 1px solid var(--mu-border);
  border-radius: 10px;
  background: var(--mu-surface);
  padding: 28px 32px;
  transition:
    border-color 200ms var(--mu-ease),
    box-shadow 200ms var(--mu-ease);
}

[class*="card"]:hover,
[class*="tile"]:hover,
[class*="panel"]:hover {
  border-color: var(--mu-border-hover);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

/* Section dividers */
hr,
.divider,
[class*="divider"] {
  border: none;
  border-top: 1px solid var(--mu-border);
  margin: 4rem 0;
}

/* --- Primary CTA Button ------------------------------------ */
.btn-primary,
button[class*="primary"],
a[class*="primary"],
.cta-btn {
  background: var(--mu-text-1);
  color: var(--mu-bg);
  font-family: var(--mu-font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 5px;
  padding: 12px 24px;
  cursor: pointer;
  transition:
    background 160ms var(--mu-ease),
    transform 120ms var(--mu-ease);
}

.btn-primary:hover,
button[class*="primary"]:hover {
  background: #c8c4be;
}

.btn-primary:active,
button[class*="primary"]:active {
  transform: scale(0.98);
}

/* Secondary / ghost button */
.btn-secondary,
button[class*="secondary"],
a[class*="secondary"] {
  background: transparent;
  color: var(--mu-text-1);
  font-family: var(--mu-font-sans);
  font-weight: 400;
  font-size: 0.875rem;
  border: 1px solid var(--mu-border);
  border-radius: 5px;
  padding: 12px 24px;
  cursor: pointer;
  transition:
    border-color 160ms var(--mu-ease),
    transform 120ms var(--mu-ease);
}

.btn-secondary:hover {
  border-color: var(--mu-border-hover);
}

.btn-secondary:active {
  transform: scale(0.98);
}

/* --- Tags & Status Badges ---------------------------------- */
.tag,
.badge,
[class*="tag"],
[class*="badge"],
[class*="chip"] {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  font-family: var(--mu-font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  background: var(--mu-surface-2);
  color: var(--mu-text-2);
  border: 1px solid var(--mu-border);
}

/* --- Bento Feature Grid ------------------------------------ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.bento-grid .bento-lg   { grid-column: span 8; }
.bento-grid .bento-sm   { grid-column: span 4; }
.bento-grid .bento-half { grid-column: span 6; }
.bento-grid .bento-full { grid-column: span 12; }

@media (max-width: 768px) {
  .bento-grid .bento-lg,
  .bento-grid .bento-sm,
  .bento-grid .bento-half { grid-column: span 12; }
}

/* --- Section Macro-Spacing --------------------------------- */
section,
.section {
  padding-top: clamp(5rem, 8vw, 9rem);
  padding-bottom: clamp(5rem, 8vw, 9rem);
}

/* Constrain content width */
.container,
.section-inner,
.content-wrap {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

/* --- Ambient Background Blob (fixed, non-scrolling) -------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(200,180,140,0.025) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(100,150,180,0.02) 0%, transparent 70%);
  animation: ambientDrift 28s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
  0%   { opacity: 0.7; transform: scale(1) translateX(0); }
  100% { opacity: 1;   transform: scale(1.04) translateX(16px); }
}

/* --- Scroll-Entry Animation Classes ----------------------- */
/* Applied by IntersectionObserver (see minimalist-anim.js) */
.mu-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--mu-duration) var(--mu-ease),
    transform var(--mu-duration) var(--mu-ease);
}

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

/* Staggered children */
.mu-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--mu-duration) var(--mu-ease),
    transform var(--mu-duration) var(--mu-ease);
}

.mu-stagger.mu-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.mu-stagger.mu-visible > *:nth-child(1)  { transition-delay: 0ms; }
.mu-stagger.mu-visible > *:nth-child(2)  { transition-delay: 80ms; }
.mu-stagger.mu-visible > *:nth-child(3)  { transition-delay: 160ms; }
.mu-stagger.mu-visible > *:nth-child(4)  { transition-delay: 240ms; }
.mu-stagger.mu-visible > *:nth-child(5)  { transition-delay: 320ms; }
.mu-stagger.mu-visible > *:nth-child(6)  { transition-delay: 400ms; }
.mu-stagger.mu-visible > *:nth-child(7)  { transition-delay: 480ms; }
.mu-stagger.mu-visible > *:nth-child(8)  { transition-delay: 560ms; }

/* Horizontal reveal variant */
.mu-reveal-x {
  opacity: 0;
  transform: translateX(-12px);
  transition:
    opacity var(--mu-duration) var(--mu-ease),
    transform var(--mu-duration) var(--mu-ease);
}

.mu-reveal-x.mu-visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- Monospace / Code Elements ----------------------------- */
code, kbd, pre {
  font-family: var(--mu-font-mono);
  font-size: 0.8125rem;
}

kbd {
  display: inline-block;
  border: 1px solid var(--mu-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--mu-surface-2);
  color: var(--mu-text-2);
  padding: 2px 7px;
  font-size: 0.75rem;
}

/* --- Navigation -------------------------------------------- */
nav,
header,
.navbar,
.nav-bar {
  border-bottom: 1px solid var(--mu-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(13,13,11,0.80);
}

/* Nav links */
nav a,
.nav-link {
  font-family: var(--mu-font-sans);
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--mu-text-2);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 150ms ease;
}

nav a:hover,
.nav-link:hover {
  color: var(--mu-text-1);
}

/* --- Footer ------------------------------------------------ */
footer,
.footer {
  border-top: 1px solid var(--mu-border);
  padding-top: 4rem;
  padding-bottom: 3rem;
}

footer p,
.footer p {
  font-size: 0.8125rem;
  color: var(--mu-text-3);
}

/* --- Form Inputs ------------------------------------------- */
input,
textarea,
select {
  font-family: var(--mu-font-sans);
  background: var(--mu-surface);
  border: 1px solid var(--mu-border);
  border-radius: 6px;
  color: var(--mu-text-1);
  padding: 10px 14px;
  font-size: 0.875rem;
  transition: border-color 150ms ease;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--mu-border-hover);
  box-shadow: 0 0 0 3px rgba(240,237,232,0.05);
}

input::placeholder,
textarea::placeholder {
  color: var(--mu-text-3);
}

/* --- OS Window Mock (for app previews) --------------------- */
.os-window {
  border: 1px solid var(--mu-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--mu-surface);
}

.os-window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--mu-surface-2);
  border-bottom: 1px solid var(--mu-border);
}

.os-window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mu-border);
}

.os-window-body {
  padding: 24px;
}
