/* =====================================================================
   5A Management Ltd — site stylesheet
   One file, no build step. Sections:
   1 Fonts · 2 Tokens · 3 Base · 4 Layout · 5 Header/nav · 6 Buttons
   7 Page heading · 8 Sections · 9 Components · 10 Footer · 11 Review markers
   ===================================================================== */

/* 1. Fonts — self-hosted, SIL Open Font License (see assets/fonts/OFL-*.txt) */
@font-face {
  font-family: "Karla";
  src: url("/site-assets/karla-latin-var.3b1eb09a53.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Old Standard TT";
  src: url("/site-assets/old-standard-tt-latin-400.52d24e5960.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Old Standard TT";
  src: url("/site-assets/old-standard-tt-latin-700.c2f2e80290.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Old Standard TT";
  src: url("/site-assets/old-standard-tt-latin-400-italic.189ea17928.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* 2. Tokens */
:root {
  /* colour */
  --ink: #15171a;          /* primary text, dark surfaces */
  --ink-2: #3a3e44;        /* secondary text */
  --ink-3: #5f646b;        /* muted text (AA on paper) */
  --paper: #ffffff;
  --stone: #f5f3ef;        /* warm alternate surface */
  --rule: #dedad3;         /* hairlines */
  --gold: #ffd700;         /* brand mark — decorative only, never text on light */
  --gold-text: #7a6100;    /* gold for text/lines on light surfaces (AA) */
  --focus: #1a5fd0;

  /* type */
  --font-sans: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Old Standard TT", Georgia, "Times New Roman", serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  --step-3: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);

  /* space */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: 4rem;
  --s-6: clamp(4rem, 3rem + 5vw, 7.5rem);

  /* layout */
  --container: 72rem;
  --measure: 38rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --header-h: 4.5rem;
}

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; }
p { margin: 0 0 var(--s-2); }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
ul { margin: 0; padding: 0; }
address { font-style: normal; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.skip-link {
  position: absolute; left: var(--s-2); top: -4rem;
  background: var(--ink); color: var(--paper);
  padding: var(--s-1) var(--s-2); z-index: 100; text-decoration: none;
}
.skip-link:focus { top: var(--s-1); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* 4. Layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: var(--measure); }
main { display: block; }

/* 5. Header / navigation (no JavaScript: desktop list + <details> on mobile) */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--rule);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(8px); }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: var(--s-3); }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand img { width: 2.5rem; height: auto; }
.brand-name { font-weight: 700; letter-spacing: 0.02em; font-size: 1.125rem; }
.brand-name span { font-weight: 400; color: var(--ink-3); }

.nav-list { list-style: none; display: flex; gap: 0.25rem; }
.nav-list a {
  display: block; padding: 0.5rem 0.85rem; text-decoration: none;
  font-weight: 500; color: var(--ink-2); border-radius: 2px;
}
.nav-list a:hover { color: var(--ink); background: var(--stone); }
.nav-list a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold-text); }
.nav-list .nav-cta a { color: var(--ink); border: 1px solid var(--ink); margin-left: 0.5rem; }
.nav-list .nav-cta a:hover { background: var(--ink); color: var(--paper); }

.nav-mobile { display: none; }
@media (max-width: 52rem) {
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
  .nav-mobile summary {
    list-style: none; cursor: pointer; font-weight: 700;
    padding: 0.5rem 0.9rem; border: 1px solid var(--ink); border-radius: 2px;
  }
  .nav-mobile summary::-webkit-details-marker { display: none; }
  .nav-mobile summary::after { content: " +"; }
  .nav-mobile[open] summary::after { content: " \2212"; }
  .nav-mobile nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(21, 23, 26, 0.08);
  }
  .nav-mobile .nav-list { flex-direction: column; padding: var(--s-1) var(--gutter) var(--s-2); gap: 0; }
  .nav-mobile .nav-list a { padding: 0.85rem 0; border-bottom: 1px solid var(--rule); border-radius: 0; font-size: var(--step-1); }
  .nav-mobile .nav-list a:hover { background: none; }
  .nav-mobile .nav-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold-text); padding-left: 0.75rem; }
  .nav-mobile .nav-list .nav-cta a { border: 0; border-bottom: 1px solid var(--rule); margin: 0; }
}

/* 6. Buttons */
.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem; border: 1px solid var(--ink); border-radius: 2px;
  font-weight: 700; letter-spacing: 0.02em; text-decoration: none;
  background: var(--ink); color: var(--paper);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.button:hover { background: var(--paper); color: var(--ink); }
.button--ghost { background: transparent; color: var(--ink); }
.button--ghost:hover { background: var(--ink); color: var(--paper); }
.on-dark .button { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.on-dark .button:hover { background: transparent; color: var(--gold); }
.on-dark .button--ghost { background: transparent; border-color: rgba(255,255,255,0.6); color: var(--paper); }
.on-dark .button--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.button-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.arrow::after { content: "\2192"; }
.ext::after { content: "\2197"; }

/* 7. Page heading / hero */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: var(--step--1); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: var(--s-3);
}
.eyebrow::before { content: ""; width: 2rem; height: 2px; background: var(--gold-text); }
.on-dark .eyebrow { color: rgba(255,255,255,0.72); }
.on-dark .eyebrow::before { background: var(--gold); }

.hero { padding-block: var(--s-6) var(--s-5); border-bottom: 1px solid var(--rule); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-5); align-items: center; }
.hero h1 { font-family: var(--font-serif); font-size: var(--step-4); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; }
.hero h1 em { font-style: italic; }
.lede { font-size: var(--step-1); line-height: 1.6; color: var(--ink-2); margin-top: var(--s-3); max-width: 36rem; }
.hero-mark { justify-self: end; width: min(100%, 17rem); }
@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .hero-mark { display: none; }
}

.page-head { padding-block: var(--s-5) var(--s-4); border-bottom: 1px solid var(--rule); background: var(--stone); }
.page-head h1 { font-family: var(--font-serif); font-weight: 400; font-size: var(--step-3); letter-spacing: -0.01em; }
.page-head .lede { margin-top: var(--s-2); }

/* 8. Sections */
.section { padding-block: var(--s-6); }
.section + .section { border-top: 1px solid var(--rule); }
.section--stone { background: var(--stone); }
.section--dark { background: var(--ink); color: var(--paper); border-top: 0 !important; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-4); margin-bottom: var(--s-5); align-items: end; }
.section-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: var(--step-3); }
.section-head p { color: var(--ink-2); max-width: var(--measure); }
.on-dark .section-head p, .on-dark p { color: rgba(255,255,255,0.82); }
@media (max-width: 52rem) { .section-head { grid-template-columns: 1fr; gap: var(--s-2); margin-bottom: var(--s-4); } }

.prose { max-width: var(--measure); }
.prose h2 { font-family: var(--font-serif); font-weight: 400; font-size: var(--step-2); margin: var(--s-5) 0 var(--s-2); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); margin: var(--s-4) 0 var(--s-1); }
.prose ul { padding-left: 1.25rem; margin: 0 0 var(--s-2); }
.prose li { margin-bottom: 0.35rem; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; gap: var(--s-4); } }

/* 9. Components */
/* Numbered columns: service areas / capabilities — ruled, not boxed */
.columns { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); counter-reset: col; }
.columns > li { border-top: 2px solid var(--ink); padding-top: var(--s-3); counter-increment: col; }
.columns > li::before {
  content: counter(col, decimal-leading-zero);
  display: block; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.12em; color: var(--gold-text); margin-bottom: var(--s-2);
}
.columns h3 { font-size: var(--step-1); margin-bottom: var(--s-1); }
.columns p { color: var(--ink-2); }
.columns--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.on-dark .columns > li { border-top-color: var(--gold); }
.on-dark .columns > li::before { color: var(--gold); }
@media (max-width: 52rem) { .columns, .columns--2 { grid-template-columns: 1fr; gap: var(--s-3); } }

/* 5AE band */
.platform-band .band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s-5); align-items: center; }
.platform-band h2 { font-family: var(--font-serif); font-weight: 400; font-size: var(--step-3); }
.platform-band .wordmark { font-family: var(--font-sans); font-weight: 800; letter-spacing: 0.04em; color: var(--gold); }
@media (max-width: 52rem) { .platform-band .band-grid { grid-template-columns: 1fr; gap: var(--s-3); } }

/* Definition list for company facts / contact */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem var(--s-3); margin: 0; }
.facts dt { font-weight: 700; color: var(--ink-3); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; padding-top: 0.2rem; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
/* Stacked (label above value): always inside a sidebar panel, and on narrow screens. */
.panel .facts { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
.panel .facts dd { margin-bottom: var(--s-2); }
.panel .facts dd:last-child { margin-bottom: 0; }
@media (max-width: 30rem) { .facts { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; } .facts dd { margin-bottom: var(--s-2); } }

.panel { border: 1px solid var(--rule); background: var(--paper); padding: var(--s-4); }
.panel h2, .panel h3 { font-size: var(--step-1); margin-bottom: var(--s-2); font-family: var(--font-sans); font-weight: 700; }
.section--stone .panel { background: var(--paper); }

.hours { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours th, .hours td { text-align: left; padding: 0.45rem 0; border-bottom: 1px solid var(--rule); font-weight: 400; }
.hours th { font-weight: 700; width: 45%; }

.notice { border-left: 3px solid var(--gold-text); background: var(--stone); padding: var(--s-2) var(--s-3); margin-bottom: var(--s-4); }

/* 404 */
.error-code { font-family: var(--font-serif); font-size: clamp(4rem, 2rem + 8vw, 8rem); line-height: 1; color: var(--rule); }

/* 10. Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.82); padding-block: var(--s-5) var(--s-4); font-size: var(--step--1); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.footer-brand { display: flex; gap: 0.75rem; align-items: center; color: var(--paper); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.footer-brand img { width: 2.25rem; }
.footer-tagline { margin-top: var(--s-2); max-width: 22rem; }
.site-footer h2 { color: var(--paper); font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: var(--s-2); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: rgba(255,255,255,0.82); text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.16); margin-top: var(--s-5); padding-top: var(--s-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); color: rgba(255,255,255,0.64); }
@media (max-width: 52rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* 11. Content-review markers — must not exist in a production build */
.review {
  background: #fff3b0; color: #3d3000; outline: 1px dashed #a08000;
  padding: 0 0.25em; font-family: var(--font-sans); font-style: normal; font-weight: 700; font-size: 0.85em;
}
.on-dark .review { background: #fff3b0; color: #3d3000; }

/* 12. 5AE front page — the Sign in action (single primary action) */
.hero--signin { padding-block: var(--s-5) var(--s-5); }
.button--large { padding: 0.95rem 2.4rem; font-size: var(--step-1); }
.signin-row { margin-top: var(--s-3); }
.signin-note { margin-top: var(--s-2); color: var(--ink-2); max-width: 30rem; }
.signin-note--minor { margin-top: 0.25rem; font-size: var(--step--1); color: var(--ink-3); }
@media (max-width: 52rem) {
  .hero--signin { padding-block: var(--s-4) var(--s-4); }
  .hero--signin h1 { font-size: clamp(2rem, 1.4rem + 3vw, 2.6rem); }
  .button--large { width: 100%; justify-content: center; }
}
