/* Roleystone Diver Training. Palette taken from the vector logo (assets/logos/print_transparent.svg). */
:root {
  --navy: #142754;
  --blue: #5797cf;
  --teal: #4bc1db;
  --sky: #79d2f5;
  --pale: #a5dbf3;
  --foam: #94d6dc;

  --ink: #142754;
  --ink-soft: #3d4b6b;
  --paper: #ffffff;
  --mist: #f1f7fb;
  --line: #d6e6f0;
  --accent: #1f6fa8;          /* darker than --blue so links pass contrast on white */

  --radius: 14px;
  --maxw: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--navy); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 10; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { width: 48px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .95rem; }
.brand-tag { font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--blue); font-weight: 600; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 4px; }
.site-nav a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.site-nav a:hover { background: var(--mist); color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--navy); background: var(--mist); box-shadow: inset 0 -2px 0 var(--teal); }
@media (max-width: 719px) {
  .brand-tag { display: none; }
  .site-nav { width: 100%; overflow-x: auto; }
  .site-nav ul { flex-wrap: nowrap; }
  .site-header { position: static; }
}

main { padding-top: 28px; padding-bottom: 56px; }
main > section, main > header { margin-bottom: 56px; }

.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; color: var(--blue); margin-bottom: .6em; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46em; }
.small { font-size: .88rem; color: var(--ink-soft); }
.section-title { margin-bottom: 20px; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.2em; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 999px; background: var(--navy); color: #fff; text-decoration: none; font-weight: 600; border: 2px solid var(--navy); }
.btn:hover { background: #0c1a3b; color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); border-radius: var(--radius); overflow: hidden; background: var(--navy); color: #fff; margin-top: -8px; }
.hero > * { grid-area: 1 / 1; }   /* photo and text share one cell, so the box grows with the text on a phone */
.hero figure { margin: 0; }
.hero figure img, .hero .ph { width: 100%; height: 100%; min-height: 420px; object-fit: cover; opacity: .9; }
@media (min-width: 720px) { .hero figure img, .hero .ph { aspect-ratio: 16 / 7; } }
.hero-text { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px;
  /* shade only behind the text (left and bottom), so the photo itself stays visible */
  background: linear-gradient(90deg, rgba(20,39,84,.78) 0%, rgba(20,39,84,.45) 45%, rgba(20,39,84,0) 75%), linear-gradient(0deg, rgba(20,39,84,.55) 0%, transparent 45%); }
.hero-text > * { max-width: 700px; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--sky); }
.hero p { color: #e6f3fa; }
.hero .btn { background: #fff; color: var(--navy); border-color: #fff; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.hero .btn-ghost:hover { background: #fff; color: var(--navy); }
@media (min-width: 720px) { .hero-text { padding: 44px; } }

/* ---------- bands, splits ---------- */
.band { background: var(--mist); border-radius: var(--radius); padding: 28px 20px; }
@media (min-width: 720px) { .band { padding: 36px 36px; } }
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 820px) {
  .split { grid-template-columns: 1.2fr 1fr; }
  .split-reverse { grid-template-columns: 1fr 1.2fr; }
}
figure { margin: 0; }
figure img, .ph { border-radius: var(--radius); }
figure img { max-width: 100%; margin: 0 auto; }   /* a small original shows at its own size, never stretched */
.ph { width: 100%; }
figcaption { font-size: .82rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- placeholders (until real photos arrive) ---------- */
.ph { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 6px; padding: 20px;
  background: repeating-linear-gradient(135deg, #e3f1f9 0 14px, #eef7fc 14px 28px); color: var(--navy); border: 2px dashed var(--pale); }
.ph strong { font-family: var(--serif); font-size: 1.05rem; }
.ph span { font-size: .85rem; color: var(--ink-soft); max-width: 36em; }
.ph code { font-size: .8rem; background: #fff; padding: 2px 6px; border-radius: 4px; }
.hero .ph { opacity: 1; background: repeating-linear-gradient(135deg, #1d3566 0 14px, #223c70 14px 28px); color: #cfe6f5; border: 0; border-radius: 0; justify-content: flex-start; padding-top: 32px; }
.hero .ph { align-items: flex-end; padding: 14px 16px; }
.hero .ph strong, .hero .ph span { display: none; }   /* the headline sits here; the filename alone says what's wanted */
/* whole photo, never cropped by CSS: a tall one gets narrower rather than losing its top and bottom */
.course-photo img { max-height: 560px; width: auto; max-width: 100%; }
.course-photo .ph { max-height: 460px; }
.split figure { width: 100%; max-width: 460px; justify-self: center; }

/* ---------- pillars ---------- */
.pillars { display: grid; gap: 16px; }
@media (min-width: 820px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { display: block; background: #fff; border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-top: 5px solid var(--teal); transition: transform .15s, box-shadow .15s; }
.pillar:nth-child(1) { border-top-color: var(--navy); }
.pillar:nth-child(2) { border-top-color: var(--blue); }
.pillar:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,39,84,.08); color: var(--ink); }
.pillar-kicker { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); font-weight: 700; }
.pillar h3 { margin-top: 6px; }
.pillar p { margin: 0; color: var(--ink-soft); }

/* ---------- course cards ---------- */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,39,84,.08); color: var(--ink); }
.card-static:hover { transform: none; box-shadow: none; }
.cat-block { margin-bottom: 44px; scroll-margin-top: 90px; }
.card-kicker { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); font-weight: 700; }
.card h3 { margin: 6px 0 8px; }
.card p { color: var(--ink-soft); margin-bottom: 14px; flex: 1; }
.price { font-weight: 700; color: var(--navy); }
.price small { font-weight: 500; color: var(--ink-soft); }

/* ---------- catalogue ---------- */
.agency-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.agency-jump a { padding: 6px 14px; border-radius: 999px; background: var(--mist); text-decoration: none; font-weight: 600; color: var(--navy); font-size: .9rem; }
.agency-jump a:hover { background: var(--pale); }
.agency-block { margin-bottom: 44px; scroll-margin-top: 90px; }
.agency-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; border-bottom: 2px solid var(--navy); padding-bottom: 8px; margin-bottom: 8px; }
.agency-head h2 { margin: 0; }
.agency-head span { color: var(--ink-soft); font-size: .9rem; }
.cat-name { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin: 20px 0 4px; }
.course-list { list-style: none; margin: 0; padding: 0; }
.course-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.course-list .c-name { font-weight: 600; }
.course-list .c-name a { color: var(--navy); }
.course-list .c-blurb { grid-column: 1; color: var(--ink-soft); font-size: .92rem; }
.course-list .c-price { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-weight: 700; white-space: nowrap; align-self: center; }
.course-list .c-price small { display: block; font-weight: 500; color: var(--ink-soft); font-size: .8rem; }
.tag { display: inline-block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--foam); color: var(--navy); margin-left: 6px; vertical-align: 2px; }

/* ---------- course detail ---------- */
.course-hero { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .course-hero { grid-template-columns: 1.3fr 1fr; } }
.price-box { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px; }
.price-box .amount { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.price-box p { color: #d8ebf6; margin: .6em 0 0; }
.price-box .btn { background: #fff; color: var(--navy); border-color: #fff; margin-top: 14px; }
.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; }
@media (min-width: 640px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts div { background: #fff; padding: 14px 16px; }
.facts dt { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); font-weight: 700; }
.facts dd { margin: 4px 0 0; font-weight: 600; }
.cols { display: grid; gap: 28px; }
@media (min-width: 820px) { .cols { grid-template-columns: 1fr 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px #dff3f8; }
.why { border-left: 4px solid var(--teal); padding: 4px 0 4px 18px; font-size: 1.08rem; color: var(--ink-soft); }
.source { font-size: .82rem; color: var(--ink-soft); }

/* ---------- pathway ---------- */
.pathway { counter-reset: step; list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.pathway li { counter-increment: step; position: relative; padding: 14px 16px 14px 60px; background: var(--mist); border-radius: 10px; }
.pathway li::before { content: counter(step); position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: grid; place-items: center; }

/* ---------- credentials ---------- */
.creds { display: grid; gap: 16px; }
@media (min-width: 820px) { .creds { grid-template-columns: repeat(2, 1fr); } }
.cred { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.cred h3 { margin-bottom: 2px; }
.cred .no { color: var(--ink-soft); font-size: .9rem; margin-bottom: 10px; }
.cred ul { margin: 0; padding-left: 18px; columns: 2 12em; column-gap: 20px; font-size: .92rem; }
@media (min-width: 820px) { .cred-wide { grid-column: 1 / -1; } }
.cred-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.cred-head .no { margin-bottom: 0; }
.cred-logo { height: 52px; width: auto; flex: none; }

/* ---------- agency marks (instructing claims only) ---------- */
.agency-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 18px; }
.agency-logo { height: 56px; width: auto; }
.agency-strip { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .agency-strip { grid-template-columns: repeat(4, 1fr); } }
.agency-item { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.agency-item .agency-logo { height: 72px; }
.agency-item figcaption { text-align: center; font-weight: 700; color: var(--navy); margin: 0; font-size: .95rem; line-height: 1.35; }
.agency-item figcaption span { font-weight: 500; color: var(--ink-soft); font-size: .82rem; }

/* ---------- contact / cta ---------- */
.contact-cards { display: grid; gap: 16px; }
@media (min-width: 720px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
.contact-card { display: block; padding: 24px; border-radius: var(--radius); background: var(--mist); text-decoration: none; }
.contact-label { display: block; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); font-weight: 700; }
.contact-value { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--navy); word-break: break-word; margin-top: 4px; }
.cta { text-align: center; background: linear-gradient(135deg, var(--navy), #1f3f7a); color: #fff; border-radius: var(--radius); padding: 40px 20px; }
.cta h2 { color: #fff; }
.cta p { color: #d8ebf6; }
.cta .actions { justify-content: center; }
.cta .btn { background: #fff; color: var(--navy); border-color: #fff; }

/* ---------- enquiry form ---------- */
.enquiry { margin-top: 16px; }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .wide { grid-column: 1 / -1; } }
.enquiry label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--navy); font-size: .92rem; }
.enquiry input, .enquiry select, .enquiry textarea {
  font: 400 1rem/1.4 var(--sans); color: var(--ink); background: #fff;
  border: 1px solid #b9cfdd; border-radius: 10px; padding: 10px 12px; width: 100%; }
.enquiry textarea { resize: vertical; min-height: 140px; }
.enquiry input:focus, .enquiry select:focus, .enquiry textarea:focus { outline: 3px solid var(--sky); outline-offset: 1px; border-color: var(--blue); }
.enquiry .req { color: #b4232c; }
.enquiry button { font: inherit; font-weight: 600; cursor: pointer; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }   /* honeypot */

/* ---------- FAQ ---------- */
.faq-group { margin-bottom: 40px; scroll-margin-top: 90px; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; position: relative;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font: 400 1.6rem/1 var(--sans); color: var(--blue); }
.faq[open] summary::after { content: "–"; }
.faq summary:hover { color: var(--accent); }
.faq-a { padding: 0 0 18px; color: var(--ink-soft); max-width: 46em; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-link { margin-top: 18px; font-weight: 600; }
.draft-banner { background: #fff4d6; border: 2px solid #e8b931; color: #5b4300; border-radius: 10px; padding: 12px 16px; margin-bottom: 24px; font-weight: 600; }
.draft-note { background: #fff4d6; border-left: 4px solid #e8b931; color: #5b4300; padding: 8px 12px; border-radius: 6px; margin-top: 10px; font-size: .92rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #cfe0ee; padding: 36px 0 20px; font-size: .92rem; }
.site-footer a { color: #fff; }
.footer-inner { display: grid; gap: 20px; }
@media (min-width: 820px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer-name { font-family: var(--serif); letter-spacing: .12em; text-transform: uppercase; color: #fff; font-weight: 700; margin-bottom: 4px; }
.footer-creds ul { list-style: none; margin: 0; padding: 0; }
.footer-creds li { margin-bottom: 2px; }
.footer-base { border-top: 1px solid rgba(255,255,255,.15); margin-top: 24px; padding-top: 14px; font-size: .8rem; color: #9fb5cc; }
