/* ============================================================
   MSA TYPOGRAPHY
   Must Stay Again  -  Centralised type stylesheet
   Loaded by the msa-typography plugin.
   ============================================================ */


/* ── 1. Base ──────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base, 17px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md, 1rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--colour-text, #3a3a3a);
  background-color: var(--colour-cream, #faf6f0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}


/* ── 2. Headings ─────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  /* font-family controlled by plugin assignments */
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--colour-dark, #1c1c1c);
  margin-top: 0;
  margin-bottom: 0.5em;
}

h1 { font-size: var(--font-size-5xl); letter-spacing: -0.025em; line-height: 1.05; }
h2 { font-size: var(--font-size-4xl); letter-spacing: -0.02em;  line-height: 1.1;  }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl);  font-weight: 500; }
h6 { font-size: var(--font-size-lg);  font-weight: 500; }


/* ── 3. Display / Hero text ──────────────────────────────── */

.text-display,
.hero__headline,
.display-heading {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--colour-dark, #1c1c1c);
}

.text-display--xl {
  font-size: clamp(3rem, 7vw, var(--font-size-5xl));
}

.text-display--lg {
  font-size: clamp(2.25rem, 5vw, var(--font-size-4xl));
}

.text-display--italic {
  font-style: italic;
  font-weight: 400;
}


/* ── 4. Paragraph & body copy ────────────────────────────── */

p {
  margin-top: 0;
  margin-bottom: 1.25em;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: var(--font-size-lg);
  font-weight: 300;
  line-height: 1.65;
  color: var(--colour-charcoal, #2e2e2e);
}

.body-large {
  font-size: var(--font-size-lg);
  line-height: 1.7;
}

.body-small {
  font-size: var(--font-size-sm);
  line-height: 1.6;
}


/* ── 5. Links ────────────────────────────────────────────── */

a {
  color: var(--colour-sage-dark, #6e9189);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--transition, 0.25s ease),
              text-decoration-color var(--transition, 0.25s ease);
}

a:hover,
a:focus-visible {
  color: var(--colour-sage, #8aada3);
  text-decoration-color: transparent;
}

a:focus-visible {
  outline: 2px solid var(--colour-sage, #8aada3);
  outline-offset: 3px;
  border-radius: 2px;
}


/* ── 6. Lists ────────────────────────────────────────────── */

ul,
ol {
  margin-top: 0;
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.35em;
  line-height: 1.65;
}

ul li::marker {
  color: var(--colour-sage, #8aada3);
}

.list-unstyled {
  list-style: none;
  padding-left: 0;
}

.list-inline {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1.25em;
}


/* ── 7. Inline elements ──────────────────────────────────── */

strong, b {
  font-weight: 700;
  color: var(--colour-dark, #1c1c1c);
}

em, i {
  font-style: italic;
}

small, .text-small {
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.caption,
figcaption {
  font-size: var(--font-size-xs);
  color: var(--colour-text-light, #6b6b6b);
  line-height: 1.5;
  margin-top: 0.5em;
}

mark {
  background-color: color-mix(in srgb, var(--colour-gold, #c9a96e) 20%, transparent);
  color: inherit;
  padding: 0 0.15em;
  border-radius: 2px;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

code,
kbd,
samp,
pre {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
}

code {
  background: var(--colour-cream-mid, #f2ede5);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm, 4px);
  color: var(--colour-charcoal, #2e2e2e);
}

pre {
  background: var(--colour-cream-mid, #f2ede5);
  padding: 1.25em 1.5em;
  border-radius: var(--radius-md, 8px);
  overflow-x: auto;
  margin-bottom: 1.5em;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  font-size: 1em;
}

blockquote {
  margin: 2em 0;
  padding: 1.25em 1.5em 1.25em 2em;
  border-left: 3px solid var(--colour-gold, #c9a96e);
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--colour-charcoal, #2e2e2e);
  background: color-mix(in srgb, var(--colour-gold, #c9a96e) 5%, transparent);
  border-radius: 0 var(--radius-sm, 4px) var(--radius-sm, 4px) 0;
}

blockquote cite,
blockquote footer {
  display: block;
  margin-top: 0.75em;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: var(--font-size-sm);
  color: var(--colour-text-light, #6b6b6b);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

blockquote cite::before {
  content: ' -  ';
}

hr {
  border: none;
  border-top: 1px solid var(--colour-border, #e4ddd4);
  margin: 2.5em 0;
}


/* ── 8. Section labels & eyebrows ────────────────────────── */

.eyebrow,
.section-label,
.text-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--colour-sage, #8aada3);
  margin-bottom: 0.75em;
}

.eyebrow--gold {
  color: var(--colour-gold, #c9a96e);
}

.eyebrow--dark {
  color: var(--colour-text-light, #6b6b6b);
}


/* ── 9. Utility: font-family ─────────────────────────────── */

.handwrite {
  font-family: var(--font-handwritten);
  font-weight: 400;
  font-style: normal;
}

.property-founder-note__sig {
  font-family: var(--font-handwritten) !important;
  font-size: 2.3rem !important;
  font-weight: 300 !important;
}

.property-founder-note__sig::before {
  content: none !important;
}

.font-display      { font-family: var(--font-display)     !important; }
.font-serif        { font-family: var(--font-serif)       !important; }
.font-sans         { font-family: var(--font-sans)        !important; }
.font-handwritten  { font-family: var(--font-handwritten) !important; }
.font-mono         { font-family: 'SFMono-Regular', Consolas, monospace !important; }


/* ── 10. Utility: font-size ──────────────────────────────── */

.text-xs   { font-size: var(--font-size-xs)  !important; }
.text-sm   { font-size: var(--font-size-sm)  !important; }
.text-md   { font-size: var(--font-size-md)  !important; }
.text-lg   { font-size: var(--font-size-lg)  !important; }
.text-xl   { font-size: var(--font-size-xl)  !important; }
.text-2xl  { font-size: var(--font-size-2xl) !important; }
.text-3xl  { font-size: var(--font-size-3xl) !important; }
.text-4xl  { font-size: var(--font-size-4xl) !important; }
.text-5xl  { font-size: var(--font-size-5xl) !important; }


/* ── 11. Utility: font-weight ────────────────────────────── */

.font-light    { font-weight: 300 !important; }
.font-regular  { font-weight: 400 !important; }
.font-medium   { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold     { font-weight: 700 !important; }


/* ── 12. Utility: colour ─────────────────────────────────── */

.text-dark        { color: var(--colour-dark)        !important; }
.text-charcoal    { color: var(--colour-charcoal)    !important; }
.text-body        { color: var(--colour-text)        !important; }
.text-muted       { color: var(--colour-text-light)  !important; }
.text-white       { color: var(--colour-white)       !important; }
.text-sage        { color: var(--colour-sage)        !important; }
.text-sage-dark   { color: var(--colour-sage-dark)   !important; }
.text-gold        { color: var(--colour-gold)        !important; }


/* ── 13. Utility: alignment ──────────────────────────────── */

.text-left    { text-align: left    !important; }
.text-center  { text-align: center  !important; }
.text-right   { text-align: right   !important; }
.text-justify { text-align: justify !important; }


/* ── 14. Utility: transform ──────────────────────────────── */

.text-upper   { text-transform: uppercase  !important; }
.text-lower   { text-transform: lowercase  !important; }
.text-caps    { text-transform: capitalize !important; }
.text-italic  { font-style: italic  !important; }
.text-normal  { font-style: normal  !important; }
.text-no-wrap { white-space: nowrap !important; }


/* ── 15. Utility: tracking (letter-spacing) ──────────────── */

.tracking-tight  { letter-spacing: -0.02em !important; }
.tracking-normal { letter-spacing:  0      !important; }
.tracking-wide   { letter-spacing:  0.05em !important; }
.tracking-wider  { letter-spacing:  0.1em  !important; }
.tracking-widest { letter-spacing:  0.14em !important; }


/* ── 16. Utility: line-height ────────────────────────────── */

.leading-none   { line-height: 1    !important; }
.leading-tight  { line-height: 1.2  !important; }
.leading-snug   { line-height: 1.4  !important; }
.leading-normal { line-height: 1.6  !important; }
.leading-relaxed{ line-height: 1.75 !important; }
.leading-loose  { line-height: 2    !important; }


/* ── 17. Prose (long-form article content) ───────────────── */

.prose {
  max-width: 68ch;
  color: var(--colour-text, #3a3a3a);
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h1 { margin-top: 2em; }
.prose h2 { margin-top: 1.75em; font-size: var(--font-size-3xl); }
.prose h3 { margin-top: 1.5em;  font-size: var(--font-size-2xl); }
.prose h4 { margin-top: 1.25em; font-size: var(--font-size-xl);  }

.prose ul,
.prose ol {
  padding-left: 1.75em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md, 8px);
  margin: 1.5em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  margin: 1.5em 0;
}

.prose th {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--colour-text-light, #6b6b6b);
  border-bottom: 2px solid var(--colour-border, #e4ddd4);
  padding: 0.6em 0.75em;
  text-align: left;
}

.prose td {
  border-bottom: 1px solid var(--colour-border, #e4ddd4);
  padding: 0.6em 0.75em;
  vertical-align: top;
}


/* ── 18. Responsive adjustments ──────────────────────────── */

@media (max-width: 768px) {
  h1 { font-size: clamp(2rem, 8vw, var(--font-size-5xl)); }
  h2 { font-size: clamp(1.6rem, 6vw, var(--font-size-4xl)); }
  h3 { font-size: clamp(1.35rem, 5vw, var(--font-size-3xl)); }

  blockquote {
    font-size: var(--font-size-lg);
    padding: 1em 1em 1em 1.5em;
  }

  .lead {
    font-size: var(--font-size-md);
  }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(1.75rem, 10vw, var(--font-size-4xl)); }
  h2 { font-size: clamp(1.4rem, 7vw,  var(--font-size-3xl)); }
}


/* ── 19. Print ───────────────────────────────────────────── */

@media print {
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  h1, h2, h3, h4, h5, h6 {
    color: #000;
    page-break-after: avoid;
  }

  p, blockquote, ul, ol, dl, table {
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #555;
  }
}
