/* Pascale Gemayel — site stylesheet. Flattened from the brand system tokens. */

/* ---------- fonts ---------- */
/* ============================================================
   Fonts — two families, both freely licensed (Google Fonts).
     • DM Serif Display → the display serif. Expresses the thinking.
     • Manrope          → the sans. Expresses the system.
   No licensed/commercial faces are required anywhere in the brand.
   DM Serif Display ships a single weight (400); font-synthesis is
   disabled so a stray font-weight never fakes a bold.
   ============================================================ */
/* Google Fonts loaded via <link> in each page head */

:root { font-synthesis-weight: none; }

/* ---------- colors ---------- */
/* ============================================================
   COLORS — the five brand colours. Nothing else.

     Deep Petrol      #083B4D   primary dark / authority
     Warm Ivory       #F6F2EA   dominant background
     Blue Grey        #758996   secondary neutral, structure
     Warm Sand        #D6C2A5   restrained warmth
     Muted Coral-Red  #C65F59   signature accent — punctuation only

   Distribution target: 60-70% ivory / 15-20% petrol /
   5-8% blue grey / 5-8% warm sand / 2-4% coral.
   ============================================================ */
:root {
  /* ---- THE FIVE BRAND COLORS ---------------------------- */
  --deep-petrol: #083B4D;  /* PRIMARY — headlines, nav, dark sections, logo */
  --warm-ivory:  #F6F2EA;  /* PRIMARY BACKGROUND — never stark white */
  --blue-grey:   #758996;  /* SECONDARY NEUTRAL — panels, rules, support */
  --warm-sand:   #D6C2A5;  /* SECONDARY WARM — occasional panels, restrained */
  --coral:       #C65F59;  /* SIGNATURE ACCENT — rare, small, deliberate */

  /* ---- Petrol — the structural dark --------------------- */
  --petrol-950: #063547;
  --petrol-900: #083B4D;  /* Deep Petrol — PRIMARY */
  --petrol-800: #0E5F81;
  --petrol-700: #2C5A6E;
  --petrol-600: #3E525E;  /* body copy on ivory */
  --petrol-500: #64798A;  /* captions */
  --petrol-400: #93A5B0;

  /* ---- Warm neutrals — ivory ---------------------------- */
  --cream-50:  #FCFAF4;  /* lightest paper */
  --cream-100: #F6F2EA;  /* Warm Ivory — DEFAULT PAGE */
  --cream-200: #EFEAE0;  /* sunken panel */

  /* ---- Blue Grey — structure ---------------------------- */
  --bluegrey-100: #E4E9EC;
  --bluegrey-200: #CBD3D9;  /* hairlines, dividers */
  --bluegrey-300: #AFBCC4;
  --bluegrey-500: #758996;  /* Blue Grey */
  --bluegrey-700: #4E6272;

  /* ---- Warm Sand — restrained warmth -------------------- */
  --sandw-100: #F5EEE3;
  --sandw-200: #E4D5BE;
  --sandw-300: #D6C2A5;  /* Warm Sand */
  --sandw-400: #BFA98A;

  /* ---- Coral — the signature accent --------------------- */
  --coral-700: #A34842;  /* coral text on ivory (accessible) */
  --coral-600: #B14F49;  /* hover / pressed */
  --coral-500: #C65F59;  /* Muted Coral-Red — THE accent */
  --coral-400: #DE8B86;  /* coral on Deep Petrol */
  --coral-300: #EBB0AC;
  --coral-200: #F2CFCC;
  --coral-100: #FAEAE9;

  --white: #FFFFFF;

  /* ============================================================
     SEMANTIC ALIASES
     ============================================================ */
  /* Surfaces */
  --surface-page:      var(--cream-100);
  --surface-paper:     var(--cream-50);
  --surface-card:      var(--cream-50);
  --surface-sunken:    var(--cream-200);
  --surface-stone:     var(--bluegrey-100);  /* subtle structural panel */
  --surface-sand:      var(--sandw-100);     /* occasional warm panel */
  --surface-dark:      var(--petrol-900);
  --surface-dark-deep: var(--petrol-950);
  --surface-inverse:   var(--petrol-900);

  /* Text */
  --text-strong: var(--petrol-900);
  --text-body:   var(--petrol-600);
  --text-muted:  var(--petrol-500);
  --text-faint:  var(--petrol-400);
  --text-on-dark:       var(--cream-100);
  --text-on-dark-muted: #9DB6C4;
  --text-accent: var(--coral-700);  /* coral emphasis on light — sparing */
  --text-brand:  var(--petrol-900);

  /* Lines & borders */
  --border-hairline: var(--bluegrey-200);
  --border-soft:     var(--cream-200);
  --border-strong:   var(--petrol-900);
  --border-accent:   var(--coral-500);
  --border-on-dark:  rgba(246, 242, 234, 0.18);
  --rule-strong:     var(--petrol-900);

  /* Accents */
  --accent:        var(--coral-500);
  --accent-press:  var(--coral-600);
  --signature:     var(--coral-500);
  --primary:       var(--petrol-900);
  --primary-hover: var(--petrol-800);
  --primary-press: var(--petrol-950);

  /* Focus */
  --focus-ring: var(--petrol-700);
}

/* ---------- typography ---------- */
/* ============================================================
   TYPOGRAPHY — DM Serif Display + Manrope. Two families only.
   The serif expresses the thinking. The sans expresses the system.
   Four levels: display headline / supporting statement /
   section label / body. Emphasis is weight, not color or boxes.
   Uppercase is for labels only. Italics are rare.
   ============================================================ */
:root {
  /* ---- Families ---------------------------------------- */
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-serif:   "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-sans:    "Manrope", "Helvetica Neue", Arial, sans-serif;

  /* ---- Weights ----------------------------------------- */
  /* DM Serif Display is 400 only — display type never sets weight. */
  --fw-light: 300;     /* @kind font */
  --fw-regular: 400;   /* @kind font */
  --fw-medium: 500;    /* @kind font */
  --fw-semibold: 600;  /* @kind font */
  --fw-bold: 700;      /* @kind font */
  --fw-black: 800;     /* @kind font */

  /* ---- Type scale -------------------------------------- */
  --text-display-xl: 76px;  /* hero headline */
  --text-display-lg: 56px;
  --text-display-md: 42px;
  --text-h1: 34px;
  --text-h2: 27px;
  --text-h3: 22px;
  --text-lead: 21px;   /* intro paragraph */
  --text-body-lg: 18px;
  /* NOTE: do NOT name this --text-body. That name is the body-copy COLOUR
     token in tokens/colors.css (var(--petrol-600)). Defining it here too made
     typography.css win the :root cascade, so every `color: var(--text-body)`
     across the system resolved to an invalid 16px and fell back to black.
     Renamed to --text-size-body to end the collision. */
  --text-size-body: 16px;
  --text-sm: 14px;
  --text-xs: 12.5px;
  --text-eyebrow: 12.5px; /* uppercase label */

  /* ---- Line heights ------------------------------------ */
  --lh-tight: 1.06;    /* @kind font */
  --lh-display: 1.12;  /* @kind font */
  --lh-snug: 1.3;      /* @kind font */
  --lh-body: 1.64;     /* @kind font */
  --lh-relaxed: 1.8;   /* @kind font */

  /* ---- Letter spacing ---------------------------------- */
  --ls-display: -0.005em; /* @kind font */
  --ls-tight: -0.012em;   /* @kind font */
  --ls-normal: 0em;       /* @kind font */
  --ls-eyebrow: 0.12em;   /* @kind font */ /* uppercase labels */
  --ls-eyebrow-wide: 0.18em; /* @kind font */ /* widest lockups only */
  --ls-caps: 0.07em;      /* @kind font */

  /* ---- Semantic roles ---------------------------------- */
  --role-hero-family: var(--font-display);
  --role-hero-weight: var(--fw-regular);
  --role-eyebrow-family: var(--font-sans);
  --role-eyebrow-weight: var(--fw-semibold);
  --role-quote-family: var(--font-display);
  --role-body-family: var(--font-sans);
}

/* ---------- spacing ---------- */
/* ============================================================
   SPACING — 4px base rhythm + semantic layout tokens.
   ============================================================ */
:root {
  --space-0: 0;
  --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;
  --space-32: 128px;

  /* Semantic */
  --gap-inline: var(--space-3);
  --gap-stack: var(--space-4);
  --pad-card: var(--space-8);
  --pad-section: var(--space-24);
  --pad-page-x: var(--space-12);
  --content-max: 1180px;
  --measure: 64ch;        /* readable text column */
  --measure-narrow: 46ch;

  /* ---- Radii — soft, premium, never bubbly ------------- */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --radius-card: var(--radius-md);

  /* Hairline weights */
  --hair: 1px;
  --rule: 2px;
}

/* ---------- elevation ---------- */
/* ============================================================
   ELEVATION — restrained, ink-tinted. Structure over float.
   Prefer a Soft Stone hairline to a shadow wherever possible.
   ============================================================ */
:root {
  --shadow-xs: 0 1px 2px rgba(8, 59, 77, 0.05);
  --shadow-sm: 0 2px 8px rgba(8, 59, 77, 0.06);
  --shadow-md: 0 8px 24px rgba(8, 59, 77, 0.08);
  --shadow-lg: 0 20px 48px rgba(8, 59, 77, 0.10);
  --shadow-xl: 0 32px 72px rgba(8, 59, 77, 0.13);

  /* On dark ink surfaces */
  --shadow-dark:  0 24px 60px rgba(6, 53, 71, 0.45);
  --shadow-royal: var(--shadow-dark);

  /* Inset for paper / inputs */
  --shadow-inset: inset 0 1px 2px rgba(8, 59, 77, 0.05);

  /* Card recipe tokens — hairline first, shadow second */
  --card-border: var(--hair) solid var(--border-hairline);
  --card-shadow: none;
  --card-shadow-hover: var(--shadow-sm);
}

/* ---------- motion ---------- */
/* ============================================================
   MOTION — calm, reflective. No bounce. Slow, intentional fades.
   ============================================================ */
:root {
  --ease-standard: cubic-bezier(0.32, 0.08, 0.24, 1);  /* @kind other */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);           /* @kind other */
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);            /* @kind other */

  --dur-fast: 140ms;    /* @kind other */
  --dur-base: 240ms;    /* @kind other */
  --dur-slow: 420ms;    /* @kind other */
  --dur-reveal: 600ms;  /* @kind other */ /* scroll reveals: one structural block */

  /* Motion system — reveal, hero entrance, spiral draw */
  --ease-reveal: cubic-bezier(0.22, 0.61, 0.36, 1);  /* @kind other */ /* gentle ease-out */
  --ease-draw: cubic-bezier(0.25, 0.5, 0.5, 1);      /* @kind other */ /* final turn only; starts at 2× linear speed so it joins the chain seamlessly, then settles */
  --reveal-travel: 14px;   /* @kind other */ /* never more than 16px */
  --stagger: 80ms;         /* @kind other */ /* between grouped items */
  --stagger-hero: 70ms;    /* @kind other */
  --dur-hero: 700ms;       /* @kind other */ /* 4 items land inside ~1s */
  --reveal-late: 150ms;    /* @kind other */ /* a child that lands after its block */
  --dur-draw: 1800ms;      /* @kind other */ /* spiral draw */
  --dur-draw-sm: 900ms;    /* @kind other */ /* small section marker */

  /* Interaction recipes */
  --transition-base: all var(--dur-base) var(--ease-standard);
  --transition-color: color var(--dur-fast) var(--ease-standard),
                      background-color var(--dur-fast) var(--ease-standard),
                      border-color var(--dur-fast) var(--ease-standard);
  --hover-lift: translateY(-2px);  /* @kind other */
  --press-scale: scale(0.985);     /* @kind other */
}

/* ============================================================
   MOTION SYSTEM — spiral draw, scroll reveal, hero entrances.
   Every hiding or animating rule is (1) scoped to html.motion, which
   the page script adds, and (2) inside a no-preference media query.
   No script, or reduced motion = the plain, fully visible page.
   ============================================================ */
html { scroll-behavior: smooth; }

@keyframes pg-rise {
  from { opacity: 0; transform: translate3d(0, var(--reveal-travel), 0); }
}
/* Spiral draw: each turn is revealed by a masked stroke along its
   centreline. Turns are chained end-to-start, outermost first; each
   owns a window [--s, --e] of the draw (inline on its mask path),
   sized in proportion to its arc length so the line keeps one speed.
   All turns run linear except the last (the Coral turn, .sp-end),
   which eases out — the line slows as it reaches the centre. */
@keyframes pg-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.sp-draw { display: block; }
.sp-draw .sp-m {
  fill: none; stroke: #fff; stroke-linecap: butt; stroke-linejoin: round;
  stroke-dasharray: 1 2; stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance: eyebrow → h1 → body → buttons, on load */
  .motion .hx {
    animation: pg-rise var(--dur-hero) var(--ease-out) backwards;
    animation-delay: calc(var(--i, 0) * var(--stagger-hero));
  }

  /* Scroll reveal: one block, or a group whose children stagger */
  .motion [data-reveal]:not(.is-in),
  .motion [data-reveal-group]:not(.is-in) > * { opacity: 0; }
  .motion [data-reveal].is-in:not(.rv-done) {
    animation: pg-rise var(--dur-reveal) var(--ease-reveal) backwards;
  }
  .motion [data-reveal-group].is-in:not(.rv-done) > * {
    animation: pg-rise var(--dur-reveal) var(--ease-reveal) backwards;
    animation-delay: calc(var(--d, 0ms) + var(--i, 0) * var(--stagger));
  }
  .motion [data-reveal].is-in:not(.rv-done) [data-reveal-late] {
    animation: pg-rise var(--dur-reveal) var(--ease-reveal) backwards;
    animation-delay: var(--reveal-late);
  }

  /* Spiral draw timing */
  .motion .sp-draw .sp-m {
    animation: pg-draw calc(var(--dur-draw) * (var(--e) - var(--s))) linear both;
    animation-delay: calc(var(--dur-draw) * var(--s));
  }
  .motion .sp-draw .sp-end { animation-timing-function: var(--ease-draw); }
  .motion .spiral-sm.sp-draw .sp-m {
    animation-duration: calc(var(--dur-draw-sm) * (var(--e) - var(--s)));
    animation-delay: calc(var(--dur-draw-sm) * var(--s));
  }
  .motion .sp-draw[data-draw="view"] .sp-m { animation-play-state: paused; }
  .motion .sp-draw[data-draw="view"].is-in .sp-m { animation-play-state: running; }
}

/* Reduced motion: no animation, no smooth scroll, final state.
   (Belt and braces — the rules above never apply here, and the
   script does not add html.motion when this preference is set.) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion .hx,
  .motion .sp-draw .sp-m,
  .motion [data-reveal],
  .motion [data-reveal-group] > *,
  .motion [data-reveal-late] { animation: none !important; opacity: 1 !important; transform: none !important; }
}
