/* Bluefine Study — Microsoft-stack configuration for upskilling and certification-pathway providers */

:root {
  color-scheme: light;
  --paper: #f7f3f6;
  --white: #ffffff;
  --ink: #221527;
  --muted: #5f5468;
  --crest: #6b2d72;
  --crest-deep: #4a1d4f;
  --crest-wash: #f3e8f4;
  --gold: #ad8a2e;
  --gold-deep: #85691f;
  --gold-wash: #faf3e2;
  --line: #e4dbe6;
  --line-strong: #b4a3b8;
  --control: #80748a;
  --alert: #9c2c3a;
  --alert-wash: #fbeaec;
  --flag: #6b4e00;
  --flag-wash: #fff4cc;
  --focus: #3a1740;

  --head: Constantia, Cambria, Georgia, "Times New Roman", serif;
  --body: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.02rem; line-height: 1.62; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.05rem); }
h3 { font-size: 1.28rem; }
h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-deep); font-weight: 700; font-family: var(--body); }
p, ul, ol { margin: 0 0 1em; }
a { color: var(--crest); text-underline-offset: 0.18em; }
a:hover { color: var(--crest-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--ink); color: #fff; padding: 0.6rem 1rem; text-decoration: none; }
.skip-link:focus { top: 1rem; color: #fff; }
.pending { background: var(--flag-wash); color: var(--flag); border: 1px dashed #c9a93a; padding: 0.05em 0.35em; font-weight: 700; font-size: 0.92em; }

/* Header: small-caps academic nav */
.site-header { background: var(--ink); border-bottom: 3px solid var(--gold); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; padding: 0.9rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--head); font-size: 1.3rem; color: #fff; text-decoration: none; }
.brand svg { width: 1.9rem; height: 1.9rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1.3rem; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.08em; }
.site-nav a { color: #e9dcea; text-decoration: none; padding: 0.3rem 0; display: inline-block; border-bottom: 1px solid transparent; }
.site-nav a:hover { color: #fff; border-bottom-color: var(--gold); }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }
.site-nav .nav-cta { color: var(--gold); font-weight: 700; }

.btn { display: inline-block; background: var(--crest); color: #fff; font-family: var(--head); font-weight: 700; font-size: 1.02rem; text-decoration: none; padding: 0.68rem 1.25rem; border: 0; cursor: pointer; transition: background-color 0.15s ease; }
.btn:hover { background: var(--crest-deep); color: #fff; }
.btn-gold { display: inline-block; background: transparent; color: var(--gold-deep); border: 2px solid var(--gold); font-family: var(--head); font-weight: 700; padding: calc(0.68rem - 2px) calc(1.25rem - 2px); text-decoration: none; }
.btn-gold:hover { background: var(--gold-wash); }

/* Hero: winding trail graphic */
.hero { padding: clamp(2.5rem, 6vw, 4.25rem) 0 clamp(2rem, 5vw, 3rem); background: var(--white); border-bottom: 1px solid var(--line); }
.hero .kicker { font-family: var(--body); color: var(--gold-deep); font-weight: 700; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.1em; }
.hero h1 { max-width: 42rem; margin-top: 0.5rem; }
.hero .lead { font-size: 1.13rem; max-width: 38rem; }
.hero .scope { font-size: 0.92rem; color: var(--muted); max-width: 38rem; margin: 1.1rem 0 0; font-style: italic; }
.trail-fig { margin-top: 2.25rem; }
.trail-fig figcaption { font-size: 0.86rem; color: var(--muted); margin-top: 0.5rem; }
.trail-fig .trail { stroke: var(--crest); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; fill: none; }
.trail-fig .way { fill: var(--white); stroke: var(--crest); stroke-width: 2.5; }
.trail-fig .way-fill { fill: var(--gold); }
.trail-fig text { font-family: var(--head); font-size: 13px; fill: var(--ink); }
.trail-fig .num { font-family: var(--head); font-size: 13px; fill: #fff; font-weight: 700; }

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lede { max-width: 40rem; color: var(--muted); font-size: 1.06rem; }

/* Fit: parchment-style register panel */
.register { background: var(--gold-wash); border: 1px solid var(--line-strong); padding: 1.5rem clamp(1.1rem, 3vw, 1.75rem); max-width: 54rem; }
.register ul { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.6rem; }
.register li { padding-left: 1.5rem; position: relative; font-size: 0.98rem; }
.register li::before { content: "§"; position: absolute; left: 0; color: var(--crest); font-weight: 700; }
.register .not-fit { margin: 0; font-style: italic; color: var(--muted); border-top: 1px solid var(--line-strong); padding-top: 1rem; font-size: 0.95rem; }

/* Services: vertical waypoint trail */
.waypoints { list-style: none; padding: 0; margin: 2.25rem 0 0; position: relative; }
.waypoints::before { content: ""; position: absolute; left: 1.75rem; top: 1.75rem; bottom: 1.75rem; width: 2px; background-image: linear-gradient(var(--line-strong) 60%, transparent 0%); background-size: 2px 10px; background-repeat: repeat-y; }
.waypoints > li { position: relative; padding: 0 0 2.5rem 4.75rem; }
.waypoints > li:last-child { padding-bottom: 0; }
.waypoints .badge { position: absolute; left: 0; top: 0; width: 3.5rem; height: 3.5rem; background: var(--crest); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 1.15rem; font-weight: 700; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); }
.wp-head { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; align-items: baseline; justify-content: space-between; }
.wp-head h3 { margin: 0; }
.wp-head .stack { font-family: var(--body); font-size: 0.8rem; color: var(--crest-deep); background: var(--crest-wash); padding: 0.15rem 0.6rem; }
.wp-intro { max-width: 46rem; margin: 0.5rem 0 1rem; }
.wp-cols { display: grid; gap: 1.25rem; }
.wp-cols > div h4 { margin-bottom: 0.4rem; }
.wp-cols ul { margin: 0; padding-left: 1.1rem; }
.wp-cols li { margin-bottom: 0.3rem; }
.wp-cols li::marker { color: var(--crest); }
.wp-cols p { margin: 0; font-size: 0.95rem; }
.wp-cols .licence { font-style: italic; color: var(--muted); }
@media (min-width: 58rem) { .wp-cols { grid-template-columns: 1.3fr 1fr 1fr; } }

/* Resource teaser */
.resource-teaser { display: grid; gap: 1.75rem; background: var(--crest-wash); padding: clamp(1.5rem, 4vw, 2.25rem); align-items: center; }
.resource-teaser h2 { margin-bottom: 0.5rem; }
.resource-teaser .meta { font-family: var(--body); font-size: 0.8rem; color: var(--crest-deep); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
@media (min-width: 56rem) { .resource-teaser { grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr); } }

/* About: mission + numbered bylaws */
.about-copy { max-width: 42rem; }
.bylaws { list-style: none; counter-reset: bylaw; padding: 0; margin: 1.75rem 0 0; max-width: 46rem; border-top: 1px solid var(--line); }
.bylaws li { counter-increment: bylaw; padding: 0.75rem 0 0.75rem 2.25rem; border-bottom: 1px solid var(--line); position: relative; font-size: 0.97rem; }
.bylaws li::before { content: counter(bylaw, upper-roman) "."; position: absolute; left: 0; font-family: var(--head); font-weight: 700; color: var(--gold-deep); }

/* Contact: centred form, notices below */
.contact-form-wrap { max-width: 44rem; }
.enquiry-form { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--crest); padding: 1.5rem clamp(1rem, 3vw, 2rem) 1.75rem; }
.enquiry-form h3 { margin-bottom: 0.2rem; }
.form-required-note { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.25rem; }
.field-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 42rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-family: var(--head); font-weight: 700; font-size: 1rem; margin-bottom: 0.3rem; }
.field .req { color: var(--alert); }
.field .optional { font-family: var(--body); font-weight: 400; color: var(--muted); font-size: 0.88rem; }
.field-hint { font-size: 0.9rem; color: var(--muted); margin: -0.05rem 0 0.4rem; }
.field input, .field select, .field textarea { display: block; width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--control); border-radius: 0; padding: 0.6rem 0.75rem; min-height: 2.9rem; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.field textarea { resize: vertical; min-height: 8.5rem; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--crest); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--crest); }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: 0.95rem; top: 50%; width: 0.45rem; height: 0.45rem; border-right: 2px solid var(--crest); border-bottom: 2px solid var(--crest); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.field [aria-invalid="true"] { border: 2px solid var(--alert); padding: calc(0.6rem - 1px) calc(0.75rem - 1px); background: #fffafa; }
.field-error { color: var(--alert); font-size: 0.9rem; font-weight: 700; margin: 0.35rem 0 0; }
.field-error::before { content: "Error: "; }
.field-count { font-size: 0.8rem; color: var(--muted); text-align: right; margin: 0.25rem 0 0; }
.field-count.is-near { color: var(--alert); font-weight: 700; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error-summary { border: 2px solid var(--alert); background: var(--alert-wash); padding: 0.85rem 1.05rem; margin-bottom: 1.3rem; }
.error-summary h4 { color: var(--alert); text-transform: none; letter-spacing: 0; font-size: 1rem; margin: 0 0 0.3rem; font-family: var(--body); font-weight: 700; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: var(--alert); font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; margin-top: 0.4rem; }
.form-actions .btn:disabled { background: var(--line-strong); color: var(--ink); cursor: not-allowed; }
.form-privacy { font-size: 0.88rem; color: var(--muted); margin: 0; }
.form-status:empty { display: none; }
.form-status { margin-top: 1.1rem; padding: 0.75rem 1rem; border-left: 4px solid var(--line-strong); background: var(--paper); font-size: 0.96rem; }
.form-status:focus { outline: none; }
.form-status:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-status.is-preview { border-left-color: #c9a93a; background: var(--flag-wash); color: var(--flag); }
.form-status.is-success { border-left-color: var(--crest); background: var(--crest-wash); color: var(--crest-deep); }
.form-status.is-error { border-left-color: var(--alert); background: var(--alert-wash); color: var(--alert); }
.form-noscript { border-left: 4px solid var(--line-strong); background: var(--white); padding: 0.75rem 1rem; margin-top: 1rem; }

.notice-row { display: grid; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 50rem) { .notice-row { grid-template-columns: 1fr 1fr; } }
.notice-box { padding: 1rem 1.2rem; border: 1px solid var(--line); background: var(--white); }
.notice-box.is-alert { border-left: 4px solid var(--alert); background: var(--alert-wash); }
.notice-box h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.notice-box.is-alert h3 { color: var(--alert); }
.notice-box p { margin: 0 0 0.4rem; font-size: 0.94rem; }
.notice-box p:last-child { margin-bottom: 0; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Footer */
.site-footer { background: var(--ink); color: #e3d6e4; padding: 2rem 0 1.75rem; font-size: 0.9rem; }
.site-footer a { color: #ddb4de; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; gap: 1rem; }
.footer-top p { margin: 0; max-width: 46rem; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.5rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid #45304a; font-size: 0.86rem; }
.footer-legal p { margin: 0; }
.footer-legal a[aria-current="page"] { color: #fff; }
@media (min-width: 56rem) { .footer-top { grid-template-columns: 1fr auto; } }
@media (max-width: 30rem) { .footer-legal { flex-direction: column; gap: 0.4rem; } }

/* Docs */
.doc { padding: clamp(2rem, 5vw, 3.5rem) 0 3.5rem; }
.doc-head { max-width: 48rem; margin-bottom: 1.75rem; }
.doc-meta { color: var(--muted); font-size: 0.95rem; }
.doc-body { max-width: 42rem; }
.doc-body h2 { font-size: 1.4rem; margin-top: 2rem; }
.doc-body ul { padding-left: 1.2rem; }
.summary { background: var(--crest-wash); padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.summary p:last-child { margin-bottom: 0; }

/* Pathway Builder tool */
.tool { max-width: 56rem; }
.tool-intro { max-width: 46rem; }
.tool-warn { background: var(--flag-wash); border-left: 4px solid #c9a93a; color: var(--flag); padding: 0.65rem 1rem; font-size: 0.93rem; max-width: 50rem; margin-bottom: 1.75rem; }
.builder-form { background: var(--white); border: 1px solid var(--line); padding: 1.5rem clamp(1rem, 3vw, 2rem); max-width: 46rem; }
.builder-form .stage-row { display: grid; gap: 0.75rem; grid-template-columns: 1fr; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.builder-form .stage-row:first-of-type { border-top: 0; }
@media (min-width: 40rem) { .builder-form .stage-row { grid-template-columns: 2fr 1.4fr; align-items: end; } }
.builder-form label { display: block; font-family: var(--head); font-weight: 700; margin-bottom: 0.3rem; font-size: 0.95rem; }
.builder-form input, .builder-form select { width: 100%; font: inherit; padding: 0.55rem 0.7rem; border: 1px solid var(--control); }
.builder-form input:focus-visible, .builder-form select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--crest); }
.builder-form .btn { margin-top: 1.25rem; }
.tool-result { margin-top: 2rem; }
.tool-result:empty { display: none; }
.built-trail { list-style: none; padding: 0; margin: 0; position: relative; }
.built-trail::before { content: ""; position: absolute; left: 1.25rem; top: 1.25rem; bottom: 1.25rem; width: 2px; background-image: linear-gradient(var(--line-strong) 60%, transparent 0%); background-size: 2px 10px; background-repeat: repeat-y; }
.built-trail li { position: relative; padding: 0 0 1.75rem 3.5rem; }
.built-trail li:last-child { padding-bottom: 0; }
.built-trail .badge { position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem; background: var(--crest); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); font-size: 0.95rem; }
.built-trail h3 { font-size: 1.05rem; margin: 0 0 0.2rem; }
.built-trail p { margin: 0; font-size: 0.93rem; color: var(--muted); }
.print-hint { color: var(--muted); font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; color: #000; font-size: 10pt; line-height: 1.4; }
  .skip-link, .site-nav, .print-hint, .no-print, .site-footer { display: none !important; }
  .site-header { border-bottom: 2px solid #000; background: #fff; }
  .brand { color: #000; }
  .site-header .wrap, .wrap { padding: 0; max-width: none; }
  a { color: #000; text-decoration: none; }
  .doc { padding: 5mm 0 0; }
  h1 { font-size: 20pt; }
}
