/* ============================================================
   MAISON INDEX — Material 3 × Hi-fashion design tokens
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter+Tight:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ── M3 tonal palette, recoloured ─────────────────────────── */
  --bone-99: #FBF8F4;
  --bone-98: #F7F3EE;
  --bone-96: #F4F1EC;     /* surface */
  --bone-94: #EDE8E1;     /* surface-container-low */
  --bone-92: #E7E1D8;     /* surface-container */
  --bone-88: #DDD5C8;     /* surface-container-high */
  --bone-80: #C9BFAE;     /* outline-variant */

  --ink-10:  #161513;     /* on-surface */
  --ink-20:  #2A2724;
  --ink-30:  #3D3935;
  --ink-50:  #6B645B;     /* on-surface-variant */
  --ink-70:  #9A9285;

  /* ── Couture palette — five accents, all at the same luxe ──
     muted level (chroma 0.08–0.10, lightness 0.40–0.44) ───── */
  --oxblood-30: oklch(0.32 0.09 25);
  --oxblood-40: oklch(0.42 0.09 25);
  --oxblood-50: oklch(0.50 0.08 25);
  --oxblood-90: oklch(0.92 0.02 25);
  --oxblood-95: oklch(0.95 0.012 25);

  --forest-30: oklch(0.30 0.07 155);
  --forest-40: oklch(0.40 0.07 155);
  --forest-90: oklch(0.92 0.018 155);

  --navy-30:   oklch(0.30 0.08 255);
  --navy-40:   oklch(0.40 0.08 255);
  --navy-90:   oklch(0.92 0.020 255);

  --mustard-40: oklch(0.66 0.10 80);
  --mustard-50: oklch(0.74 0.10 80);
  --mustard-90: oklch(0.94 0.030 80);

  --terra-40:  oklch(0.55 0.10 45);
  --terra-50:  oklch(0.62 0.10 45);
  --terra-90:  oklch(0.93 0.025 45);

  --plum-40:   oklch(0.42 0.08 320);
  --plum-90:   oklch(0.92 0.020 320);

  /* Status — desaturated, never garish */
  --moss:    oklch(0.42 0.05 145);
  --moss-90: oklch(0.92 0.018 145);
  --rust:    oklch(0.50 0.10 45);
  --rust-90: oklch(0.93 0.02 45);

  /* M3 semantic aliases */
  --md-surface: var(--bone-96);
  --md-surface-container-low: var(--bone-94);
  --md-surface-container: var(--bone-92);
  --md-surface-container-high: var(--bone-88);
  --md-on-surface: var(--ink-10);
  --md-on-surface-variant: var(--ink-50);
  --md-outline: var(--bone-80);
  --md-outline-variant: #D8D2C7;
  --md-primary: var(--oxblood-40);
  --md-on-primary: var(--bone-98);
  --md-primary-container: var(--oxblood-90);
  --md-on-primary-container: var(--oxblood-30);

  /* ── Shape system (M3) ─────────────────────────────────────── */
  --shape-xs: 4px;
  --shape-sm: 8px;
  --shape-md: 12px;
  --shape-lg: 16px;
  --shape-xl: 28px;
  --shape-full: 9999px;
  /* Editorial override: product imagery is sharp */
  --shape-plate: 0px;

  /* ── Type ──────────────────────────────────────────────────── */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-sans:    'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* ── Motion ────────────────────────────────────────────────── */
  --motion-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --motion-standard:   cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  background: var(--md-surface);
  color: var(--md-on-surface);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

/* ── Editorial type scale ──────────────────────────────────── */
.t-display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 88px;
  line-height: 0.95;
  letter-spacing: -0.015em;
}
.t-display-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 88px;
  line-height: 0.95;
  letter-spacing: -0.015em;
}
.t-headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.t-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
}
.t-subtitle {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
}
.t-body  { font-family: var(--font-sans); font-size: 14px; }
.t-small { font-family: var(--font-sans); font-size: 12px; color: var(--md-on-surface-variant); }
.t-eyebrow {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--md-on-surface-variant);
}
.t-mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; }

/* ── M3 components ─────────────────────────────────────────── */
.m3-btn-filled, .m3-btn-tonal, .m3-btn-outlined, .m3-btn-text {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--shape-full);
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 200ms var(--motion-standard);
}
.m3-btn-filled  { background: var(--md-primary); color: var(--md-on-primary); }
.m3-btn-filled:hover { background: var(--oxblood-30); }
.m3-btn-tonal   { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.m3-btn-outlined{ background: transparent; color: var(--md-on-surface); border: 1px solid var(--md-outline); }
.m3-btn-text    { background: transparent; color: var(--md-on-surface); padding: 12px 16px; }

.m3-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border-radius: var(--shape-sm);
  background: transparent;
  border: 1px solid var(--md-outline);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--md-on-surface);
  cursor: pointer;
}
.m3-chip.is-selected {
  background: var(--md-on-surface);
  color: var(--bone-98);
  border-color: var(--md-on-surface);
}

.m3-fab {
  width: 56px; height: 56px;
  border-radius: var(--shape-lg);
  background: var(--md-primary);
  color: var(--md-on-primary);
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(22,21,19,0.12), 0 1px 2px rgba(22,21,19,0.06);
  cursor: pointer;
}

/* Field — outlined, M3 */
.m3-field {
  position: relative;
  border: 1px solid var(--md-outline);
  border-radius: var(--shape-sm);
  background: transparent;
  padding: 14px 16px 8px;
  display: flex; flex-direction: column;
}
.m3-field > label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--md-on-surface-variant);
  margin-bottom: 4px;
}
.m3-field > .value {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--md-on-surface);
}

/* Editorial product plate */
.plate {
  background: var(--md-surface-container-low);
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
}
.plate::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent 0 18px,
      rgba(22,21,19,0.025) 18px 36px
    );
}
.plate-caption {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 10px;
  border-top: 1px solid var(--md-outline-variant);
  margin-top: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--md-on-surface-variant);
}

/* Status pill — small caps, no color blocks */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--md-on-surface-variant);
}
.status-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-50);
}
.status-pill.is-running::before { background: var(--md-primary); animation: pulse 1.6s ease-in-out infinite; }
.status-pill.is-idle::before    { background: var(--md-outline); }
.status-pill.is-error::before   { background: var(--rust); }
.status-pill.is-ok::before      { background: var(--moss); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Hairline divider */
.rule { height: 1px; background: var(--md-outline-variant); border: none; }
.rule-strong { height: 1px; background: var(--md-on-surface); border: none; }
