/* =====================================================================
   PENSA 2027 — Typography & spacing
   ---------------------------------------------------------------------
   The one place for font sizes, line heights, text alignment and the
   vertical rhythm of every page. To change how the site reads, edit the
   tokens in section 1 — not individual pages.

   This file loads last. Older stylesheets (main.css, pensa2027.css,
   src/styles.css) still set sizes with higher specificity or !important,
   so the rules below use !important deliberately: this file has the
   final word on type and spacing. Layout, colour and components live
   in the other stylesheets.

   Contents
     1. Tokens (the six text styles)
     2. Banner
     3. Heading
     4. Sub-heading and Label
     5. Body and Small
     6. Section spacing
     7. Sub-navigation spacing
     8. Phone adjustments
   ===================================================================== */


/* 1. Tokens ----------------------------------------------------------
   The site has exactly six text styles. Every piece of text uses one:

     Banner       --fs-banner  bold                    page title on the banner image
     Heading      --fs-h2      bold                    section headings
     Sub-heading  --fs-h3      semibold (quotes: regular)  sub-sections, card titles, FAQ questions, quotes
     Label        --fs-label   bold, uppercase, spaced small line above a heading, date tags
     Body         --fs-body    medium                  paragraphs and lists
     Small        --fs-small   medium (names: bold)    captions, tables, credits, names and roles on cards

   Colour and bold are not separate styles: white Body on navy is still Body.
   Sizes scale smoothly from a phone (~390px) to desktop (~1440px); comments show phone → desktop. */
:root {
  --fs-banner: clamp(1.75rem, 1rem + 2.2vw, 2.75rem);      /* 28 → 44px; 16px on phones, see section 8 */
  --fs-h2:     clamp(1.875rem, 1.25rem + 2.3vw, 3rem);     /* 30 → 48px */
  --fs-h3:     clamp(1.25rem, 1.1rem + 0.55vw, 1.5rem);    /* 20 → 24px */
  --fs-label:  0.75rem;                                    /* 12px */
  --fs-body:   1.125rem;                                   /* 18px: KoHo's small lowercase needs the extra size */
  --fs-small:  0.9375rem;                                  /* 15px */
  --fw-text:   500;                                        /* Body and Small use KoHo medium; regular is too thin to read */

  --lh-heading: 1.15;
  --lh-sub:     1.3;
  --lh-body:    1.6;
  --lh-small:   1.5;

  --space-section: clamp(2.75rem, 2rem + 2.6vw, 4.25rem);  /* 44 → 68px  top and bottom of each section */
  --space-head:    clamp(1.5rem, 1rem + 1.4vw, 2rem);      /* 24 → 32px  between blocks, below a section heading */
  --space-eyebrow: 1rem;                                   /* 16px       label → heading */

  --measure:       40rem;     /* longest comfortable line of running text, about 75 characters at 18px */
  --text-body:     #27344f;   /* one colour for all running text (12:1 on white) */
  --text-muted:    #4a5873;   /* Small text: captions, credits, roles (7:1 on white) */
  --text-figure:   #1c5fc1;   /* prices and figures in tables (5.9:1 on white) */
  --label-on-dark: #bcd4ff;   /* Labels on navy bands (9:1 on navy) */
}


/* 2. Banner ------------------------------------------------------------ */
#hero2 h1,
.hero2-content h1 {
  font-size: var(--fs-banner) !important;
  line-height: var(--lh-heading) !important;
}


/* 3. Heading ----------------------------------------------------------- */
main .ed-head h2,
main .ed-cta h2,
main .ed-statement h2,
main #venue h2 {
  font-size: var(--fs-h2) !important;
  line-height: var(--lh-heading) !important;
  font-weight: 700 !important;
  margin-top: var(--space-eyebrow) !important;
}

/* Heading blocks are wide enough for a heading to sit on one or two lines */
main .ed-head { max-width: 44rem !important; }
main .ed-head h2 { max-width: 22ch !important; }

/* Headings the brief asked to keep on one line on desktop */
@media (min-width: 992px) {
  #important-dates .ed-head h2,
  #welcome-message .ed-head h2 { white-space: nowrap; }
}


/* 4. Sub-heading and Label --------------------------------------------- */
main h3,
main h4,
main .accordion-button,
main .ed-msg blockquote,
main .ed-venue .addr .v {
  font-size: var(--fs-h3) !important;
  line-height: var(--lh-sub) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-weight: 600 !important;
}
main .ed-msg blockquote { font-weight: 400 !important; }   /* quotes read as quotes, not titles */
main .accordion-button b { font-size: inherit !important; }   /* FAQ question text follows its button */
main h4 { margin: 2rem 0 0.75rem !important; }

main .ed-eyebrow,
main .ed-date .d,
main .ed-venue .addr .k,
main .ed-topic .n,
main .ed-gallery .sub,
main .fx-ribbon span {
  font-size: var(--fs-label) !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}


/* 5. Body and Small ---------------------------------------------------- */
main p,
main li,
main .accordion-body {
  font-size: var(--fs-body) !important;
  line-height: var(--lh-body) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-weight: var(--fw-text) !important;
  max-width: var(--measure);
  color: var(--text-body) !important;
}
main :is(p, li, .accordion-body) :is(strong, b) { font-weight: 700 !important; }
main .ayu-text p,
main .ed-cta p { margin-inline: auto; }
main .welcome-copy p { max-width: none; }   /* the welcome column sets its own width, see styles.css */

main .ed-figcap,
main figcaption,
main td,
main th,
main .oc-person h3,
main .oc-person p,
main .ed-msg .who .nm,
main .ed-msg .who .ro,
main .hotel-sub,
main .hotel-credit,
main .fee-sub,
main .congress-calendar span,
main .congress-calendar a {
  font-size: var(--fs-small) !important;
  line-height: var(--lh-small) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-weight: var(--fw-text) !important;
}
main .oc-person h3,
main .ed-msg .who .nm,
main th { font-weight: 700 !important; }   /* names and table headers: Small, bold */

/* Photo titles in the home gallery: Body, bold */
main .ed-gallery .cap {
  font-size: var(--fs-body) !important;
  line-height: var(--lh-body) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-weight: 700 !important;
}

main .ed-figcap,
main figcaption,
main .oc-person p,
main .ed-msg .who .ro,
main .hotel-credit { color: var(--text-muted) !important; }
main td.fee-col { color: var(--text-figure) !important; }

/* Text on the navy call-to-action band */
main .ed-cta p { color: #ffffff !important; }
main .ed-cta .ed-eyebrow { color: var(--label-on-dark) !important; }

/* The home hero artwork carries its own words; keep the heading for screen readers only */
.ed-hero--art .ed-hero-heading {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Left-aligned text everywhere. Justified text stretched the gaps
   between words unevenly, most visibly in narrow columns and on phones. */
main .ed-statement p,
main .welcome-copy p,
main #venue p,
main .tba-statement p {
  text-align: left !important;
  hyphens: manual !important;
  -webkit-hyphens: manual !important;
}


/* 6. Section spacing --------------------------------------------------
   Same space above and below every section, and a fixed gap between a
   section heading and what follows it. */
main .ed-section,
main #faq {
  padding-top: var(--space-section) !important;
  padding-bottom: var(--space-section) !important;
}

main .ed-head {
  margin-bottom: var(--space-head) !important;
}

/* Spacing helpers used in page markup instead of inline margins */
main .space-block { margin-top: var(--space-head) !important; }   /* before a grid, gallery or second heading */
main .space-tight { margin-top: 1rem !important; }                /* before a lead line, link or caption */

/* A sub-heading straight after a section heading adds no extra gap */
main .ed-head + h3,
main .ed-head + h4 {
  margin-top: 0 !important;
}

/* Vertical rhythm: two steps only.
   16px between paragraphs and inside a block; --space-head (32px, 24px on phones) between blocks. */
main p { margin-top: 0; margin-bottom: 1rem; }
main h3, main h4 { margin-bottom: 0.75rem !important; }

main .ed-signoff,
main .ed-venue .addr,
main .ed-cta .ed-hero-actions { margin-top: var(--space-head) !important; }
main .ed-venue .addr { padding-top: 1rem !important; }
main .ed-cta p { margin-top: 1rem !important; }

/* Every fee table keeps its gap below, even when it is the last one in a group */
main .fee-block { margin: 0 0 var(--space-head) !important; }

/* Two-column sections: the wide column gap stays between columns, not between rows */
main .ed-wrap.ed-split { row-gap: 0 !important; }

/* Previous / next links always sit the same distance below the content */
main .subpager { margin-top: 3rem !important; }


/* 7. Sub-navigation spacing (Scientific Programme, Registration) ------ */
.subnav ul {
  margin: 0 0 12px !important;
  scrollbar-width: none;            /* no scroll track under the tabs */
}
.subnav ul::-webkit-scrollbar { display: none; }

.subnav + .ed-head {
  margin-top: 20px;
}


/* 8. Phone adjustments ------------------------------------------------ */
@media (max-width: 680px) {
  /* The phone banner is a thin image strip: 16px fits two lines */
  #hero2 h1,
  .hero2-content h1 {
    font-size: 1rem !important;
  }
  #hero2 .hero2-content { width: 62% !important; }
}
