/* PAMHO course site. Mirrors the PAMHO Institute site (courses-frontend/):
   obsidian / earth / bone palette, Cormorant Garamond + Inter, purple #8442FA,
   label-tracking, btn-cinematic, hairline borders, grain overlay.
   Rules are copied from courses-frontend/src/index.css; headline sizes are
   capped lower so the first screen shows the call to action. */

:root {
  --bg-obsidian: #030303;
  --bg-earth: #110E0C;
  --text-bone: #F5F2E9;
  --text-muted: rgba(245, 242, 233, 0.6);
  --text-soft: rgba(245, 242, 233, 0.7);
  --text-faint: rgba(245, 242, 233, 0.4);
  --text-dark: #030303;
  --line: rgba(245, 242, 233, 0.1);
  --line-faint: rgba(245, 242, 233, 0.05);
  --purple: #8442FA;
  --purple-light: #B48AFF;
  --danger: #ff8f8f;
  --ok: #8fe3b0;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { max-width: 100vw; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg-obsidian);
  color: var(--text-bone);
  font: 300 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--purple-light); color: var(--text-bone); }
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
:focus-visible { outline: 1px solid var(--purple-light); outline-offset: 3px; }

.grain-overlay {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ── Typography (Institute classes) ─────────────────── */
.title-hero {
  font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em;
  font-size: 2.25rem;
}
@media (min-width: 640px) { .title-hero { font-size: 2.75rem; } }
@media (min-width: 900px) { .title-hero { font-size: 3.5rem; } }
@media (min-width: 1300px) { .title-hero { font-size: 4rem; } }

.title-section { font-family: var(--serif); font-weight: 300; line-height: 1.2; font-size: 1.875rem; }
@media (min-width: 768px) { .title-section { font-size: 2.5rem; } }
@media (min-width: 1200px) { .title-section { font-size: 2.75rem; } }

.text-body-large { font-family: var(--serif); font-weight: 300; line-height: 1.55; font-size: 1.2rem; }
@media (min-width: 768px) { .text-body-large { font-size: 1.4rem; } }

.label-tracking {
  display: inline-block;
  font: 600 0.65rem var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted);
}
@media (min-width: 768px) { .label-tracking { font-size: 0.72rem; letter-spacing: 0.25em; } }

.serif { font-family: var(--serif); }
.italic-muted { font-style: italic; color: var(--text-soft); }
.purple { color: var(--purple); }
.muted { color: var(--text-muted); }
.small { font-size: 14px; color: var(--text-faint); }
.body { font-weight: 300; color: var(--text-muted); line-height: 1.7; }

/* ── Buttons (btn-cinematic) ───────────────────────── */
.btn-cinematic {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 0.95rem 1.75rem; max-width: 100%;
  background: transparent; color: var(--text-bone);
  font: 500 0.72rem var(--sans); letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; text-align: center;
  border: 1px solid rgba(245, 242, 233, 0.2); border-radius: 100px;
  position: relative; overflow: hidden; isolation: isolate; cursor: pointer;
  transition: color 0.6s var(--ease), border-color 0.6s var(--ease);
}
.btn-cinematic::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--text-bone);
  transform: scaleX(0); transform-origin: right; transition: transform 0.6s var(--ease);
}
.btn-cinematic:hover { color: var(--text-dark); border-color: transparent; }
.btn-cinematic:hover::before { transform: scaleX(1); transform-origin: left; }
.btn-cinematic.is-purple { border-color: var(--purple); color: var(--purple); }
.btn-cinematic.is-purple:hover { color: var(--text-dark); border-color: transparent; }
.btn-cinematic.is-filled { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn-cinematic.is-filled:hover { color: var(--text-dark); }
.btn-cinematic .arrow { font-family: var(--serif); font-size: 1.25rem; line-height: 0; letter-spacing: 0; }
.btn-cinematic[disabled] { opacity: .55; cursor: progress; }
@media (min-width: 768px) { .btn-cinematic { padding: 1.05rem 2.1rem; letter-spacing: 0.2em; } }

/* ── Layout ────────────────────────────────────────── */
.canvas { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .canvas { padding: 0 1.5rem; } }
@media (min-width: 768px) { .canvas { padding: 0 4rem; } }
.section { padding: clamp(4.5rem, 9vw, 7rem) 0; border-top: 1px solid var(--line-faint); scroll-margin-top: 70px; }
.section--earth { background: var(--bg-earth); }

/* ── Navbar ────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 14px 0;
  background: linear-gradient(to bottom, rgba(3,3,3,.8), rgba(3,3,3,.3) 60%, transparent);
  transition: all .3s ease-in-out;
}
.nav.scrolled { padding: 8px 0; background: rgba(3,3,3,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(245,242,233,.08); box-shadow: 0 10px 15px -3px rgba(0,0,0,.3); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav__logo img { height: 46px; width: auto; opacity: .95; transition: height .3s ease-in-out, opacity .2s; }
.nav__logo:hover img { opacity: 1; }
.nav.scrolled .nav__logo img { height: 38px; }
.nav__links { display: flex; align-items: center; gap: 2.25rem; }
.nav__links a { text-decoration: none; color: var(--text-soft); transition: color .2s; white-space: nowrap; }
.nav__links a:hover { color: var(--text-bone); }
.nav__links a.is-purple { color: var(--purple); }
.nav__links a.is-purple:hover { color: var(--text-bone); }
@media (max-width: 860px) { .nav__links a:not(.is-purple) { display: none; } }

/* ── Hero (centred, like the Institute page) ───────── */
.hero { padding: clamp(7.5rem, 13vw, 9.5rem) 0 clamp(3.5rem, 6vw, 5rem); text-align: center; border-bottom: 1px solid var(--line-faint); }
.hero .canvas { max-width: 1000px; display: flex; flex-direction: column; align-items: center; }
.hero__kicker { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--purple); margin-bottom: 1.25rem; }
.hero .title-hero { margin-bottom: 1.25rem; }
.hero .text-body-large { color: var(--text-muted); max-width: 44rem; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2.25rem; }

/* ── Featured programme box (from Institute page) ─── */
.feature { border: 1px solid var(--line); background: var(--bg-earth); padding: clamp(1.5rem, 4vw, 3.5rem); display: grid; grid-template-columns: 5fr 4fr 3fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 1100px) { .feature { grid-template-columns: 1fr 1fr; } .feature__facts { grid-column: 1 / -1; } }
@media (max-width: 700px) { .feature { grid-template-columns: 1fr; } }
.frame { position: relative; overflow: hidden; aspect-ratio: 4 / 3; }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) contrast(1.1) brightness(0.85); transition: filter 1.5s ease; }
.frame:hover img { filter: none; }
.frame::after { content: ''; position: absolute; inset: 0; margin: 1rem; border: 1px solid var(--line); pointer-events: none; }
.feature h2 { margin-bottom: 1rem; }
.feature .body + .body { margin-top: 1rem; }
.feature__facts { display: flex; flex-direction: column; gap: 1.35rem; border-left: 1px solid var(--line); padding-left: 2.25rem; }
@media (max-width: 1100px) { .feature__facts { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.fact .label-tracking { color: var(--purple); margin-bottom: 4px; display: block; }
.fact span:last-child { font-family: var(--serif); font-size: 1.3rem; color: var(--text-bone); }

/* ── Curriculum rows ───────────────────────────────── */
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .label-tracking { margin-bottom: 1rem; }
.section-head .body { margin-top: 1rem; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 4rem 13rem 1fr 1.3fr; gap: 1.5rem; align-items: baseline; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.row__num { font-family: var(--serif); font-size: 1.4rem; color: var(--purple); opacity: .5; transition: opacity .3s; }
.row:hover .row__num { opacity: 1; }
.row h3 { font-family: var(--serif); font-size: 1.5rem; line-height: 1.25; color: var(--text-bone); transition: color .3s; }
.row:hover h3 { color: var(--purple-light); }
.row p { color: var(--text-muted); font-size: 15px; }
@media (max-width: 900px) { .row { grid-template-columns: 3rem 1fr; gap: .35rem 1rem; } .row .label-tracking, .row h3, .row p { grid-column: 2; } .row__num { grid-row: 1 / span 3; } }

/* ── Two columns with roman lists ──────────────────── */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 7vw, 6rem); }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }
.duo h3 { font-family: var(--serif); font-size: 2rem; margin-bottom: 1.5rem; }
.roman { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.roman li { display: grid; grid-template-columns: 2.5rem 1fr; }
.roman li span:first-child { font-family: var(--serif); color: var(--purple); opacity: .5; }
.roman li span:last-child { color: var(--text-soft); transition: color .2s; }
.roman li:hover span:last-child { color: var(--text-bone); }
.duo .small { margin-top: 1.5rem; }
.scope { margin-top: clamp(3rem, 6vw, 4.5rem); border: 1px solid var(--line); padding: 1.5rem 1.75rem; display: flex; gap: 1.25rem; align-items: baseline; }
.scope .label-tracking { color: var(--purple); flex: none; }
.scope p { color: var(--text-soft); font-size: 15px; }
@media (max-width: 640px) { .scope { flex-direction: column; gap: .5rem; } }

/* ── Registration ──────────────────────────────────── */
.register { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(3rem, 6vw, 6rem); align-items: start; }
@media (max-width: 960px) { .register { grid-template-columns: 1fr; } }
.register .title-section { margin: 1rem 0 1rem; }
.steps { list-style: none; margin: 2.25rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 2.5rem 1fr; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.steps li > span { font-family: var(--serif); color: var(--purple); opacity: .6; font-size: 1.15rem; }
.steps b { display: block; font-weight: 500; color: var(--text-bone); }
.steps small { font-size: 14px; color: var(--text-muted); }
.callout { margin-top: 1.75rem; padding: 1.25rem 1.5rem; border: 1px solid rgba(132,66,250,.35); background: rgba(132,66,250,.07); font-size: 15px; color: var(--text-soft); }
.callout b { color: var(--text-bone); font-weight: 500; }

.form-box { border: 1px solid var(--line); background: var(--bg-earth); padding: clamp(1.5rem, 4vw, 3rem); }
.section--earth .form-box { background: var(--bg-obsidian); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 2rem; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; min-width: 0; padding-bottom: .5rem; border-bottom: 1px solid var(--line); transition: border-color .2s; }
.field:focus-within { border-bottom-color: var(--purple); }
.field--full { grid-column: 1 / -1; }
.field--plain { border-bottom: 0; padding-bottom: 0; }
.field .label-tracking { color: var(--text-faint); margin-bottom: .5rem; }
.input, .select, .textarea {
  width: 100%; background: transparent; border: 0; padding: 0; color: var(--text-bone);
  font: 400 1.3rem/1.3 var(--serif);
}
.textarea { font: 300 1rem/1.5 var(--sans); resize: none; min-height: 64px; }
.input::placeholder, .textarea::placeholder { color: rgba(245,242,233,.2); }
.input:focus, .select:focus, .textarea:focus { outline: none; }
.select { cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 1.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%23F5F2E9' stroke-opacity='.5' d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 2px center; }
.select option { background: var(--bg-obsidian); color: var(--text-bone); font-family: var(--sans); }
.field.has-error { border-bottom-color: var(--danger); }
.field-error { margin-top: .4rem; font-size: 13px; color: var(--danger); }
.field-error:empty { display: none; }
.check { display: flex; gap: .9rem; align-items: flex-start; cursor: pointer; font-size: 15px; color: var(--text-soft); }
.check input { margin-top: 4px; accent-color: var(--purple); flex: none; }
.honeypot { position: absolute !important; left: -10000px !important; }
.form__footer { grid-column: 1 / -1; }
.form__footer .btn-cinematic { width: 100%; }
.alert { grid-column: 1 / -1; padding: 1rem; border: 1px solid rgba(255, 143, 143, .35); background: rgba(127, 29, 29, .2); color: #fca5a5; font-size: 14px; }

.paystep:focus { outline: none; }
.paystep .title-section { font-size: clamp(1.75rem, 3vw, 2.4rem); margin: .75rem 0 1rem; }
.paystep__email { display: inline-block; margin: 1rem 0 1.75rem; padding: .4rem 1rem; border: 1px solid var(--line); font-family: var(--serif); font-size: 1.25rem; color: var(--text-bone); word-break: break-all; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: 14px; cursor: pointer; }
.linkbtn:hover { color: var(--text-bone); }

/* ── FAQ ───────────────────────────────────────────── */
.faq { max-width: 60rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.5rem 0; font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.6rem); color: var(--text-bone); transition: color .3s; }
.faq summary:hover { color: var(--purple); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--sans); font-weight: 200; font-size: 1.6rem; color: var(--purple); transition: transform .3s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.5rem; max-width: 48rem; color: var(--text-muted); }

/* ── Footer (Institute footer, compact) ────────────── */
.footer { background: var(--bg-obsidian); border-top: 1px solid var(--line); padding: clamp(4rem, 8vw, 6rem) 0 2.5rem; position: relative; z-index: 10; }
.footer__grid { display: grid; grid-template-columns: 5fr 2fr 2fr; gap: 3rem; margin-bottom: clamp(3rem, 7vw, 5rem); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
.footer__brand img { height: 56px; width: auto; opacity: .7; margin-bottom: 2rem; transition: opacity .2s; }
.footer__brand img:hover { opacity: 1; }
.footer__brand h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.15; max-width: 24rem; }
.footer__brand .label-tracking { margin-top: 2rem; }
.footer__brand a.label-tracking { color: var(--purple); text-decoration: none; }
.footer__brand a.label-tracking:hover { color: var(--text-bone); }
.footer h4 { margin-bottom: 1.75rem; color: rgba(245,242,233,.3); }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.footer ul a { font-size: 14px; letter-spacing: .03em; color: var(--text-soft); text-decoration: none; transition: color .2s; }
.footer ul a:hover { color: var(--purple); }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.footer__base .label-tracking { font-size: 10px; color: rgba(245,242,233,.3); }

/* ── Reveal (Institute timing) ─────────────────────── */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ── Simple page (thank-you) ───────────────────────── */
.simple { min-height: 100vh; display: grid; align-items: center; padding: 8rem 0 4rem; }
.simple .form-box { max-width: 44rem; }
.simple .body { margin-top: 1rem; }
