/* ==========================================================================
   Mila Prints Design — colors_and_type.css
   Core type + color tokens (base + semantic). Load this on every page.
   ========================================================================== */

/* ---------- FONTS ---------- */

/* Bodoni Moda — load TRUE italic from Google Fonts (variable, opsz + ital axes).
   The local BodoniModa.ttf only ships the upright master, which forced browsers
   to synthesise italic by skewing — producing uneven side-bearings and word
   spacing in italic copy (the studio's voice). Google's release ships the
   designer-drawn italic, restoring proper kerning and rhythm. */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;0,6..96,600;0,6..96,700;1,6..96,400;1,6..96,500;1,6..96,600;1,6..96,700&display=swap');

/* Belt + braces: forbid the browser from synthesising italic/bold from missing
   masters. With Google Fonts above this never fires for Bodoni, but it also
   prevents Futura Heavy / Futura Book from being faked at weights they don't
   ship. Everything that's italic on the page now uses the real italic glyphs. */
:root { font-synthesis: none; }

@font-face {
  font-family: "Futura PT Heavy";
  src: url("fonts/FuturaPTHeavy.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futura Book BT";
  src: url("fonts/FuturaBookBT.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "White Angelica";
  src: url("fonts/WhiteAngelica.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- BASE TOKENS ---------- */

:root {
  /* Neutral ground */
  --mpd-ivory:        #F6F2EC;   /* primary surface */
  --mpd-cream:        #EFE9DE;   /* secondary surface */
  --mpd-bone:         #E8E1D2;   /* tertiary / cards */
  --mpd-offwhite:     #FBF8F2;   /* near-white, rare */
  --mpd-paper:        #FFFFFF;   /* photo edges only — never full surface */
  --mpd-ivory-rise:   #FBF8F2;   /* pale band — adjacent-section banding, use sparingly */
  --mpd-ivory-fall:   #EDE6D9;   /* warm band — adjacent-section banding, use sparingly */

  /* Text ink */
  --mpd-ink:          #1A1A1A;   /* primary text */
  --mpd-ink-soft:     #3A3A3A;   /* secondary text */
  --mpd-ink-mute:     #7A7370;   /* captions, footers */
  --mpd-ink-deep:     #0E1B19;   /* dark-editorial surface */

  /* Brand — primary & signature */
  --mpd-forest:       #156351;   /* anchor */
  --mpd-forest-deep:  #22453E;
  --mpd-plum:         #604C5D;
  --mpd-berry:        #7E394E;

  /* Brand — expressive accents */
  --mpd-rose:         #C5919E;
  --mpd-rose-soft:    #E8CED4;
  --mpd-burnt:        #D65337;
  --mpd-amber:        #D79436;
  --mpd-teal:         #007184;

  /* Brand — extended */
  --mpd-sage:         #A8BFAA;
  --mpd-steel:        #79A8BC;
  --mpd-purple:       #82669E;

  /* Font families */
  --font-display:     "Futura PT Heavy", "Futura PT", "Futura", "Helvetica Neue", Arial, sans-serif;
  --font-editorial:   "Bodoni Moda", "Bodoni 72", "Didot", Georgia, serif;
  --font-body:        "Futura Book BT", "Futura PT Book", "Helvetica Neue", Arial, sans-serif;
  --font-micro:       "Helvetica Neue", "Arial", sans-serif;
  --font-signature:   "White Angelica", "Bodoni Moda", cursive;

  /* Type scale — v2, calibrated to real PPT (1920×1080).
     PPT pt sizes given in comments; web rem assumes 16px root. */
  --type-display-xl:  6.5rem;   /* 105pt PPT — cover wordmark */
  --type-display-l:   4.75rem;  /* 76pt PPT — section openers (AGENDA, SERVICES) */
  --type-display-m:   2.625rem; /* 42pt PPT — slide titles (WHO WE ARE) */
  --type-display-s:   1.875rem; /* 30pt PPT — card titles (LUXURY HERITAGE) */
  --type-display-xs:  0.94rem;  /* 11.25pt — small caps subhead inside cards */
  --type-pull:        1.7rem;   /* 27pt — Bodoni deck on slide title */
  --type-deck:        1.4rem;   /* 22.5pt — Bodoni subtitle, agenda items */
  --type-body:        1.21rem;  /* 19.5pt — main reading body */
  --type-body-s:      1.13rem;  /* 18pt — denser body */
  --type-stat:        5.6rem;   /* 90pt — big stat numerals */
  --type-caption:     0.94rem;  /* 15pt — tertiary captions */
  --type-micro:       0.75rem;  /* 12pt — header/footer micro-labels */
  --type-monument:    clamp(8rem, 12vw, 14rem);  /* one per page — page-name moment */
  --type-whisper:     0.92rem;   /* under-delivers visually; lets next image land harder */

  /* Tracking */
  --track-display:    0.06em;
  --track-display-xl: 0.10em;
  --track-bodoni:     0;
  --track-micro:      0.18em;

  /* Leading */
  --leading-display:  0.95;
  --leading-body:     1.6;
  --leading-deck:     1.4;

  /* Spacing — 8px rhythm */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
  --space-7: 128px;

  /* Rhythm — 3 named section intervals */
  --rhythm-tight:       80px;
  --rhythm-default:    120px;
  --rhythm-monumental: 160px;
  --rhythm-overhang:   240px;

  /* Borders / rules */
  --rule-hairline:    0.5px solid var(--mpd-ink);
  --rule-thin:        1px solid var(--mpd-ink);
  --rule-accent:      0.5px solid var(--mpd-forest);
  --radius-none:      0;   /* MPD default */

  /* Grid */
  --grid-max:    1440px;
  --grid-gutter: 80px;
  --grid-margin: 80px;  /* overridden responsively below */

  /* ---------- SEMANTIC SURFACE TOKENS ---------- */
  --surface-light-bg:   var(--mpd-ivory);
  --surface-light-text: var(--mpd-ink);
  --surface-light-rule: var(--mpd-ink-mute);

  --surface-color-bg:   var(--mpd-forest);
  --surface-color-text: var(--mpd-ivory);
  --surface-color-rule: var(--mpd-rose);

  --surface-dark-bg:    var(--mpd-ink-deep);
  --surface-dark-text:  var(--mpd-ivory);
  --surface-dark-rule:  var(--mpd-rose);

  /* ---------- SEMANTIC TYPE ROLES ---------- */
  --fg-primary:   var(--mpd-ink);
  --fg-secondary: var(--mpd-ink-soft);
  --fg-muted:     var(--mpd-ink-mute);
  --fg-onColor:   var(--mpd-ivory);
  --fg-onDark:    var(--mpd-ivory);
  --accent-onDark:var(--mpd-rose);

  /* Motion */
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-strong:   cubic-bezier(0.7, 0, 0.2, 1);
  --dur-micro: 0.3s;
  --dur-base:  0.55s;
  --dur-image: 0.6s;
}

/* ==========================================================================
   RESPONSIVE GRID MARGIN
   Scales --grid-margin so every container using var(--grid-margin) gets
   appropriate horizontal breathing room at each breakpoint.
   .section-inner has its own explicit padding overrides in shared.css and
   those take precedence; this token covers all other containers.
   ========================================================================== */
@media (max-width: 1024px) { :root { --grid-margin: 56px; } }
@media (max-width: 768px)  { :root { --grid-margin: 28px; } }
@media (max-width: 480px)  { :root { --grid-margin: 18px; } }

/* ==========================================================================
   SURFACE UTILITIES
   ========================================================================== */

.mpd-surface-light { background: var(--surface-light-bg); color: var(--surface-light-text); }
.mpd-surface-color { background: var(--surface-color-bg); color: var(--surface-color-text); }
.mpd-surface-dark  { background: var(--surface-dark-bg);  color: var(--surface-dark-text);  }

/* Brand surfaces (pick one per document) */
.mpd-surface-forest { background: var(--mpd-forest);      color: var(--mpd-ivory); }
.mpd-surface-plum   { background: var(--mpd-plum);        color: var(--mpd-ivory); }
.mpd-surface-berry  { background: var(--mpd-berry);       color: var(--mpd-ivory); }
.mpd-surface-teal   { background: var(--mpd-teal);        color: var(--mpd-ivory); }

/* ==========================================================================
   TYPOGRAPHY UTILITIES — class-based (utility layer)
   ========================================================================== */

.mpd-display-xl {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--type-display-xl);
  letter-spacing: var(--track-display-xl);
  line-height: var(--leading-display);
  text-transform: uppercase;
}
.mpd-display-l {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--type-display-l);
  letter-spacing: var(--track-display);
  line-height: var(--leading-display);
  text-transform: uppercase;
}
.mpd-display-m {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--type-display-m);
  letter-spacing: var(--track-display);
  line-height: var(--leading-display);
  text-transform: uppercase;
}
.mpd-display-s {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--type-display-s);
  letter-spacing: var(--track-display);
  line-height: 1.1;
  text-transform: uppercase;
}
.mpd-display-xs {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--type-display-xs);
  letter-spacing: var(--track-display);
  line-height: 1.2;
  text-transform: uppercase;
}
.mpd-stat {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--type-stat);
  letter-spacing: var(--track-display);
  line-height: 1;
}
.mpd-pull {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: var(--type-pull);
  line-height: var(--leading-deck);
}
.mpd-deck {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: var(--type-deck);
  line-height: var(--leading-deck);
}
.mpd-body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--type-body);
  line-height: var(--leading-body);
}
.mpd-caption {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--type-caption);
  line-height: 1.5;
  color: var(--fg-secondary);
}
.mpd-micro {
  font-family: var(--font-micro);
  font-weight: 300;
  font-size: var(--type-micro);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
}
.mpd-signature {
  font-family: var(--font-signature);
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 1;
}

/* ==========================================================================
   SEMANTIC HTML (element-level defaults — opt in by wrapping in .mpd-scope)
   ========================================================================== */

.mpd-scope {
  font-family: var(--font-body);
  font-size: var(--type-body);
  line-height: var(--leading-body);
  color: var(--fg-primary);
  background: var(--mpd-ivory);
}

.mpd-scope h1 { font: 800 var(--type-display-xl)/var(--leading-display) var(--font-display); letter-spacing: var(--track-display-xl); text-transform: uppercase; margin: 0; }
.mpd-scope h2 { font: 800 var(--type-display-l)/var(--leading-display)  var(--font-display); letter-spacing: var(--track-display);    text-transform: uppercase; margin: 0; }
.mpd-scope h3 { font: 800 var(--type-display-m)/var(--leading-display)  var(--font-display); letter-spacing: var(--track-display);    text-transform: uppercase; margin: 0; }
.mpd-scope h4 { font: 800 var(--type-display-s)/1.1                      var(--font-display); letter-spacing: var(--track-display);    text-transform: uppercase; margin: 0; }
.mpd-scope blockquote { font: italic 400 var(--type-pull)/var(--leading-deck) var(--font-editorial); margin: 0; }
.mpd-scope p { margin: 0 0 var(--space-2); }
.mpd-scope small, .mpd-scope figcaption { font: 400 var(--type-caption)/1.5 var(--font-body); color: var(--fg-secondary); }
.mpd-scope hr { border: 0; border-top: 0.5px solid currentColor; opacity: 0.4; margin: var(--space-3) 0; }

/* ==========================================================================
   MICRO-LABEL HEADER / FOOTER (used on every page/slide)
   ========================================================================== */

.mpd-microbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font: 300 var(--type-micro)/1 var(--font-micro);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: currentColor;
}
.mpd-microbar .mpd-rule {
  flex: 1; height: 0; border-top: 0.5px solid currentColor; opacity: 0.5;
}

/* Accent rule — thin horizontal line used under headers */
.mpd-rule-hairline { border: 0; border-top: 0.5px solid currentColor; opacity: 0.5; margin: 0; }

/* ==========================================================================
   REDUCED MOTION — global guard
   Covers: cursor follow, magnetic buttons, scroll reveals, marquee.
   !important beats inline styles set by JS (transform, opacity).
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  /* Kill cursor entirely */
  #mpd-cursor { display: none !important; }

  /* Magnetic button transform set by JS */
  .magnetic-btn { transform: none !important; transition: none !important; }

  /* Scroll-reveal elements: surface immediately at full opacity */
  .reveal,
  .reveal-1, .reveal-2, .reveal-3,
  .reveal-bleed,
  .reveal-delay-1, .reveal-delay-2, .reveal-delay-3,
  .reveal-delay-4, .reveal-delay-5, .reveal-delay-6, .reveal-delay-7 {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
    animation: none !important;
  }

  /* Marquee strip */
  .marquee-track { animation: none !important; }

  /* Blanket: collapse all remaining animation/transition durations */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
