/* Structure Wellness Limited — site styles */
/* Branding follows Sleep by Structure (sleep-structure.co.uk): deep navy #0C1F26, lowercase "structure" wordmark */
:root {
  --ink: #0C1F26;
  --ink-soft: #4b5d63;
  --bg: #f4f6f6;
  --paper: #ffffff;
  --line: #d8e0e1;
  --line-strong: #a9b8bb;
  --teal: #1c4a55;          /* buttons, links */
  --teal-deep: #0C1F26;     /* brand navy: header, headings */
  --teal-tint: #e3eef0;
  --clay: #4f9a95;          /* soft teal accent */
  --clay-tint: #e6f2f1;
  --radius: 10px;
  --max: 1060px;
  --serif: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal-deep); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--teal-deep); font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; margin: 2.2rem 0 .7rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .4rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin-bottom: .3rem; }
small, .muted { color: var(--ink-soft); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--teal-deep); color: #fff; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand:hover { color: #fff; }
.brand-name { font-size: 1.45rem; font-weight: 300; line-height: 1; letter-spacing: -.02em; }
.brand-name b { font-weight: 700; }
.brand-name small { display: block; font-size: .7rem; color: #9fbcc0; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.pillars { letter-spacing: .06em; color: var(--clay); font-weight: 500; }
h1, h2, h3 { letter-spacing: -.015em; font-weight: 700; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { color: #e3eeec; text-decoration: none; padding: 6px 11px; border-radius: 6px; font-size: .93rem; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }

.board-banner { background: #a35a2a; color: #fff; font-size: .88rem; padding: 6px 0; }

/* Main */
main { padding: 34px 0 60px; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 46rem; }
.hero { padding: 26px 0 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--clay); margin-bottom: .5rem; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 1.2rem 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
a.card { display: block; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--teal); transform: translateY(-2px); color: var(--ink); }
a.card .more { color: var(--teal); font-weight: 600; font-size: .92rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0; }
.facts div { background: var(--paper); padding: 14px 16px; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.note { background: var(--clay-tint); border-left: 4px solid var(--clay); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2rem 0; }
.note p:last-child { margin: 0; }
.tip { background: var(--teal-tint); border-left: 4px solid var(--teal); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2rem 0; }
.tip p:last-child { margin: 0; }

table { width: 100%; border-collapse: collapse; background: var(--paper); margin: .6rem 0 1.4rem; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
th { background: #f1ece3; font-weight: 600; }
.table-scroll { overflow-x: auto; }

ol.steps { counter-reset: s; list-style: none; padding: 0; }
ol.steps > li { counter-increment: s; position: relative; padding: 0 0 14px 46px; }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .9rem; }

.btn { display: inline-block; background: var(--teal); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--teal-deep); color: #fff; }
.btn.secondary { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn.secondary:hover { background: var(--teal-tint); color: var(--teal-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1rem 0 1.6rem; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border: 1.5px solid var(--line-strong); border-radius: 3px; background: var(--paper); }

/* Documents list */
.doc-group h3 { margin-top: 1.8rem; }
.doc-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.doc-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 13px 16px; border-top: 1px solid var(--line); margin: 0; }
.doc-list li:first-child { border-top: 0; }
.doc-list .doc-meta { font-size: .85rem; color: var(--ink-soft); }
.doc-list .doc-note { flex-basis: 100%; font-size: .9rem; color: var(--ink-soft); margin: 0; }
.empty { padding: 16px; color: var(--ink-soft); font-style: italic; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 36px; font-size: .88rem; color: var(--ink-soft); }
.site-footer p { margin: 0 0 .3rem; }

/* ---------- Printable forms ---------- */
.form-page { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 38px; max-width: 820px; margin: 0 auto; }
.form-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--teal-deep); padding-bottom: 12px; margin-bottom: 18px; }
.form-head h1 { font-size: 1.6rem; margin: 0; }
.form-head .org { font-size: .85rem; color: var(--ink-soft); text-align: right; line-height: 1.4; }
.form-page h2 { font-size: 1.1rem; margin: 1.5rem 0 .6rem; padding: 5px 10px; background: var(--teal-tint); border-radius: 4px; }
.form-page p, .form-page li { font-size: .95rem; }

.field { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 14px; }
.field label { white-space: nowrap; font-size: .92rem; font-weight: 500; }
.field .line { flex: 1; border-bottom: 1px solid var(--ink); min-height: 1.5em; }
.field-row { display: flex; gap: 22px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 220px; }
.box { border: 1px solid var(--ink); border-radius: 3px; min-height: 90px; margin: 4px 0 14px; }
.box.tall { min-height: 170px; }
.box.xtall { min-height: 260px; }
.tick { display: inline-flex; align-items: center; gap: 7px; margin: 0 20px 8px 0; font-size: .95rem; }
.tick::before { content: ""; width: 15px; height: 15px; border: 1.3px solid var(--ink); border-radius: 2px; flex: none; }
.ticks { margin: 4px 0 12px; }
.form-table td { height: 34px; }
.form-table.rows-tall td { height: 44px; }
.office { border: 1.5px dashed var(--line-strong); border-radius: 6px; padding: 12px 16px 2px; margin-top: 22px; }
.office h2 { background: none; padding: 0; margin: 0 0 10px; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.form-foot { margin-top: 18px; font-size: .78rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 8px; }
.fill { display: inline-block; min-width: 140px; border-bottom: 1px solid var(--ink); }
.fill.short { min-width: 70px; }
.fill.long { min-width: 260px; }

.landscape-wrap { max-width: none; }

/* Print */
@page { size: A4; margin: 14mm 13mm; }
@page landscape { size: A4 landscape; margin: 12mm; }

@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .no-print, .board-banner, .actions { display: none !important; }
  main { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .form-page { border: 0; padding: 0; max-width: none; border-radius: 0; }
  .card, .doc-list, table { background: #fff; }
  a { color: inherit; text-decoration: none; }
  h2, h3 { break-after: avoid; }
  tr, .field, .box, .office { break-inside: avoid; }
  .page-break { break-before: page; }
  .is-landscape { page: landscape; }
  .form-page h2 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .note, .tip { border-left-width: 3px; }
}

@media (max-width: 640px) {
  .form-page { padding: 22px 16px; }
  .form-head { flex-direction: column; }
  .form-head .org { text-align: left; }
  .field { flex-wrap: wrap; }
  .field label { white-space: normal; }
  .field .line { flex-basis: 100%; }
}

/* Programme cards: each takes its own site's brand colour via --c */
.prog { --c: var(--teal-deep); display: flex; flex-direction: column; gap: 8px; background: var(--c); color: #fff; text-decoration: none; border-radius: var(--radius); padding: 22px; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; min-width: 0; }
.prog::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.07); }
.prog:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px -12px var(--c); }
.prog:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
.prog-name { font-size: 1.6rem; font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.prog-name b { font-weight: 700; }
.prog-tag { font-size: 1.02rem; font-weight: 500; line-height: 1.35; }
.prog-desc { font-size: .9rem; color: rgba(255,255,255,.78); line-height: 1.5; }
.prog-link { margin-top: auto; padding-top: 8px; font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.92); }
.prog-kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: rgba(255,255,255,.75); }
.prog-feature { margin: 1rem 0 16px; padding: 28px; }
.prog-feature .prog-name { font-size: 2.1rem; font-weight: 700; }
.prog-feature .prog-tag { font-size: 1.2rem; max-width: 34rem; }
.prog-feature .prog-desc { max-width: 44rem; }
.prog-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 1.2rem; }
.pillars a { font-weight: 600; text-decoration: none; }
.pillars a:hover { text-decoration: underline; }
@media print { .prog { background: #fff !important; color: var(--ink); border: 1px solid var(--line); } .prog * { color: var(--ink) !important; } }
.prog-grid .prog-name { font-size: clamp(1.15rem, 1.6vw, 1.3rem); overflow-wrap: anywhere; }
