/* ============================================================================
   FRANKLIN YARD — CORE BRAND STYLESHEET
   Foundation: all design tokens + components shared across every system.

   ARCHITECTURE
   This file alone is NOT enough. Always load it alongside one overlay:
     <link rel="stylesheet" href="fy-core.css">
     <link rel="stylesheet" href="fy-utility.css">    -- OR --
     <link rel="stylesheet" href="fy-editorial.css">  -- OR --
     <link rel="stylesheet" href="fy-teaching.css">

   - fy-utility.css   → dashboards, services pages, internal tools, dense UIs
   - fy-editorial.css → marketing site, manifesto pages, hero moments
   - fy-teaching.css  → student-facing curriculum (white field, rounded)

   The overlays define H1 and H2 (which differ across systems) and any system-
   specific overrides. Everything else is here.

   For voice / tone / copy rules, see fy-voice.md.
   Source: Franklin Yard Merged Brand Guide v1, April 2026.

   THE NON-NEGOTIABLE RULES
   - Bone is the page (white in teaching system only).
   - White is a material, NOT a field. Use it for cards, tiles, receipts.
   - Magenta is a signature, not a decoration. CTAs and accents only.
     One magenta moment per page, tops. Never as default heading text.
   - Don't italicize AND color magenta on the same word — pick one.
   - Sentence case everywhere except a hero moment.
   - One Caveat note per page maximum.
   - Stick to ONE header family per page. Don't mix serif and sans at H1/H2.
   ============================================================================ */

/* ---------- Web fonts ---------- */
/* PP Editorial New is licensed (Pangram Pangram); Instrument Serif is the
   documented free fallback. Caveat and DM Mono are free Google Fonts. */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&family=Caveat:wght@400;600&family=DM+Mono:wght@400;500&display=swap');

/* ============================================================================
   :root — design tokens
   ============================================================================ */
:root {
  /* Core color */
  --fy-ink:      #162144;   /* Type, borders, dark sections */
  --fy-magenta:  #EE3292;   /* Signature: CTAs, eyebrow accents */
  --fy-bone:     #F5F5F2;   /* Page field (default everywhere) */
  --fy-cream:    #EEEEEB;   /* Quieter page tint, table hovers */
  --fy-stone:    #E5E5E2;   /* Hero / one accent band variant */
  --fy-white:    #FFFFFF;   /* Material — cards, tiles, receipts */

  /* Accent color (one band per page max) */
  --fy-pink:     #F9C9D4;   /* Emotional band, manifesto moments */
  --fy-mustard:  #E8B84A;   /* Credential chips */
  --fy-sage:     #C8D6C0;   /* Credential chips */
  --fy-lilac:    #D6C8E8;   /* Credential chips */

  /* Type families */
  --fy-font-sans:    'Instrument Sans', system-ui, -apple-system, sans-serif;
  --fy-font-serif:   'PP Editorial New', 'Instrument Serif', Georgia, serif;
  --fy-font-caveat:  'Caveat', cursive;
  --fy-font-mono:    'DM Mono', 'SF Mono', Menlo, monospace;

  /* Type scale */
  --fy-size-h1:       88px;
  --fy-size-h2:       52px;
  --fy-size-h3:       36px;
  --fy-size-h4:       20px;
  --fy-size-p1:       24px;
  --fy-size-p2:       18px;
  --fy-size-p3:       16px;
  --fy-size-p4:       14px;
  --fy-size-eyebrow:  11px;

  /* Layout */
  --fy-section-py:   104px;
  --fy-section-px:    40px;
  --fy-prose-max:    900px;
  --fy-container:   1200px;

  /* Borders + radius (teaching overrides --fy-radius to 4px) */
  --fy-border:      1px solid var(--fy-ink);
  --fy-border-soft: 1px solid rgba(22, 33, 68, 0.12);
  --fy-radius:      0;       /* sharp by default; teaching = 4px */
}

/* ============================================================================
   BASE
   ============================================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--fy-bone);
  color: var(--fy-ink);
  font-family: var(--fy-font-sans);
  font-size: var(--fy-size-p3);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--fy-magenta);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

/* ============================================================================
   TYPOGRAPHY — body and lower headings
   H1 and H2 are defined per-system in the overlays, not here.
   ============================================================================ */
h3, .fy-h3 {
  font-family: var(--fy-font-sans);
  font-weight: 600;
  font-size: var(--fy-size-h3);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 0.5em;
}

h4, .fy-h4 {
  font-family: var(--fy-font-sans);
  font-weight: 600;
  font-size: var(--fy-size-h4);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }
.fy-p1 { font-size: var(--fy-size-p1); line-height: 1.45; }
.fy-p2 { font-size: var(--fy-size-p2); line-height: 1.55; }
.fy-p3 { font-size: var(--fy-size-p3); line-height: 1.60; }
.fy-p4 { font-size: var(--fy-size-p4); line-height: 1.55; }

/* Eyebrow — small section/category label above a heading.
   Use only when it adds info the headline doesn't. Max ~2-3 per page.
   Teaching overlay swaps this to DM Mono. */
.fy-eyebrow {
  display: block;
  font-family: var(--fy-font-sans);
  font-weight: 600;
  font-size: var(--fy-size-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fy-ink);
  margin-bottom: 12px;
}
.fy-eyebrow--magenta { color: var(--fy-magenta); }

/* Caveat marginalia — handwritten magenta aside. ONE per page max. */
.fy-caveat {
  display: inline-block;
  font-family: var(--fy-font-caveat);
  color: var(--fy-magenta);
  font-size: 22px;
  font-weight: 600;
  transform: rotate(-3deg);
}

/* DM Mono — for technical labels, file paths, internal-doc moments. */
.fy-mono,
code,
kbd {
  font-family: var(--fy-font-mono);
  font-size: 0.92em;
  background: var(--fy-cream);
  padding: 2px 6px;
  border-radius: 2px;
}

/* ============================================================================
   LAYOUT
   ============================================================================ */
.fy-section {
  padding: var(--fy-section-py) var(--fy-section-px);
}
.fy-section--cream { background: var(--fy-cream); }
.fy-section--stone { background: var(--fy-stone); }
.fy-section--ink   { background: var(--fy-ink); color: var(--fy-bone); }
.fy-section--pink  { background: var(--fy-pink); }   /* one per page max */
.fy-section--ink h1, .fy-section--ink h2,
.fy-section--ink h3, .fy-section--ink h4 { color: var(--fy-bone); }

.fy-container { max-width: var(--fy-container); margin: 0 auto; }
.fy-prose     { max-width: var(--fy-prose-max); }

/* ============================================================================
   BUTTONS
   ============================================================================ */
/* Primary — magenta fill. The spark. */
.fy-btn-primary {
  display: inline-block;
  background: var(--fy-magenta);
  color: var(--fy-white);
  font-family: var(--fy-font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  padding: 14px 24px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.fy-btn-primary:hover { opacity: 0.9; color: var(--fy-white); }

/* Secondary — ink outline, uppercase. */
.fy-btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--fy-ink);
  font-family: var(--fy-font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 24px;
  border: 1px solid var(--fy-ink);
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.fy-btn-secondary:hover {
  background: var(--fy-ink);
  color: var(--fy-bone);
}

/* Tertiary — underlined magenta link, all-caps. */
.fy-btn-tertiary {
  color: var(--fy-magenta);
  font-family: var(--fy-font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ============================================================================
   NAV PILLS — top utility only (FAQ, phone, contact). Never primary actions.
   ============================================================================ */
.fy-pill {
  display: inline-block;
  font-family: var(--fy-font-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fy-ink);
  padding: 8px 16px;
  border: 1px solid var(--fy-ink);
  border-radius: 999px;
  background: transparent;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.fy-pill:hover { background: var(--fy-ink); color: var(--fy-bone); }

/* ============================================================================
   CARDS
   On light surfaces: white material + ink border.
   On ink sections: bone material, no border.
   Teaching overlay applies the 4px radius.
   ============================================================================ */
.fy-card {
  background: var(--fy-white);
  border: var(--fy-border);
  border-radius: var(--fy-radius);
  padding: 32px;
}
.fy-section--ink .fy-card {
  background: var(--fy-bone);
  border: none;
  color: var(--fy-ink);
}

/* ============================================================================
   TABLES — workhorse for services, calendars, reference content.
   ============================================================================ */
.fy-table {
  width: 100%;
  border-collapse: collapse;
  border: var(--fy-border);
  border-radius: var(--fy-radius);
  background: var(--fy-white);
  font-family: var(--fy-font-sans);
  overflow: hidden;
}
.fy-table th {
  background: var(--fy-ink);
  color: var(--fy-bone);
  font-weight: 600;
  font-size: var(--fy-size-p4);
  text-align: left;
  padding: 14px 18px;
  letter-spacing: 0.02em;
}
.fy-table td {
  padding: 14px 18px;
  font-size: var(--fy-size-p3);
  border-top: var(--fy-border-soft);
  vertical-align: middle;
}
.fy-table tbody tr:hover td { background: var(--fy-cream); }

/* ============================================================================
   STATUS CHIPS — for "Registration Open / Coming / Closed" style labels.
   ============================================================================ */
.fy-chip {
  display: inline-block;
  font-family: var(--fy-font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--fy-ink);
  color: var(--fy-ink);
  background: var(--fy-white);
}
.fy-chip--magenta {
  background: var(--fy-magenta);
  color: var(--fy-white);
  border-color: var(--fy-magenta);
}
.fy-chip--muted {
  color: rgba(22, 33, 68, 0.5);
  border-color: rgba(22, 33, 68, 0.25);
}

/* ============================================================================
   STAMPS — circular badges. Magenta or ink, never filled. ±8–18° rotation.
   ============================================================================ */
.fy-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border: 1px solid var(--fy-ink);
  border-radius: 999px;
  font-family: var(--fy-font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: var(--fy-ink);
  transform: rotate(-8deg);
  padding: 12px;
  line-height: 1.3;
  background: transparent;
}
.fy-stamp--magenta {
  color: var(--fy-magenta);
  border-color: var(--fy-magenta);
}

/* ============================================================================
   RESPONSIVE — scale display type down on smaller screens.
   ============================================================================ */
@media (max-width: 768px) {
  :root {
    --fy-size-h1: 56px;
    --fy-size-h2: 36px;
    --fy-size-h3: 28px;
    --fy-section-py: 64px;
    --fy-section-px: 24px;
  }
  .fy-table { font-size: var(--fy-size-p4); }
  .fy-table th, .fy-table td { padding: 10px 12px; }
}
