/* Palette and type per the SAUDC 2027 brand identity sheet. */
:root {
  --navy: #2a3063;
  --navy-deep: #171b3e;
  --cream: #fffbf2;
  --burgundy: #4d0000;
  --brown: #3e1412;
  --blue: #9eb4ce;
  --ink: #23233f;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Trebuchet MS", Arial, sans-serif;
  --script: "Segoe Script", "Brush Script MT", cursive;
  --header-h: 104px;
}

* { box-sizing: border-box; }
/* overflow-x lives on <html>, and uses `clip` rather than `hidden`: `hidden` on
   <body> forces its overflow-y to `auto`, turning <body> into a scroll container
   and breaking anchor scrolling, position:sticky and scroll-position reads. */
html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); }
a { color: inherit; }
img { max-width: 100%; }

/* Fixed header would otherwise cover the top of every in-page anchor target. */
:target, [id] { scroll-margin-top: var(--header-h); }

.skip-link { position: fixed; z-index: 1000; top: 0; left: 1rem; transform: translateY(-120%); background: var(--cream); color: var(--navy); padding: .8rem 1rem; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* Visible keyboard focus everywhere; mouse users are unaffected. */
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.hero :focus-visible, .format-details :focus-visible, .experience :focus-visible,
.site-nav.open :focus-visible, footer :focus-visible { outline-color: var(--cream); }

.site-header { position: fixed; inset: 0 0 auto; z-index: 20; min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 1rem 5vw; color: white; transition: .35s ease; }
.site-header.scrolled { min-height: 78px; background: rgba(255,250,240,.94); color: var(--navy); box-shadow: 0 1px 0 rgba(42,48,99,.15); backdrop-filter: blur(14px); }
.brand { display: grid; grid-template-columns: 52px auto; grid-template-rows: auto auto; column-gap: .7rem; text-decoration: none; align-items: center; line-height: 1; }
.brand-crest { grid-row: 1 / 3; display: block; }
.brand-crest img { display: block; width: 52px; height: 52px; }
.footer-brand { grid-template-columns: 60px auto; }
.footer-brand .brand-crest img { width: 60px; height: 60px; }
.brand-name { font: 1.5rem/1 var(--serif); letter-spacing: .28em; }
.brand-year { margin-top: .32rem; font: .58rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; opacity: .82; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.5rem); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.site-nav a { text-decoration: none; }
.site-nav a:not(.nav-cta) { padding-block: .5rem; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-color: currentColor; }
.nav-cta { padding: .85rem 1.1rem; border: 1px solid currentColor; }
.menu-toggle { display: none; border: 0; background: none; padding: .5rem; color: currentColor; cursor: pointer; }
.menu-toggle span:not(.sr-only) { display: block; width: 24px; height: 1px; margin: 5px; background: currentColor; transition: transform .3s ease, opacity .2s ease; }

.hero { position: relative; min-height: 100svh; display: flex; align-items: center; color: white; isolation: isolate; }
.hero-image, .hero-shade { position: absolute; inset: 0; }
.hero-image { z-index: -3; display: block; overflow: hidden; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: 58% center; transform: scale(1.015); animation: settle 1.8s ease forwards; }
.hero-shade { z-index: -2; background: linear-gradient(90deg, rgba(20,20,35,.77) 0%, rgba(25,23,32,.38) 48%, rgba(22,22,35,.08) 78%), linear-gradient(0deg, rgba(24,24,38,.5), transparent 45%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(77,0,0,.18), transparent 55%); mix-blend-mode: multiply; }
@keyframes settle { from { transform: scale(1.08); filter: saturate(.7); } to { transform: scale(1.015); filter: saturate(.9); } }
.hero-content { width: min(760px, 86vw); margin-left: 8vw; padding-top: 8rem; }
.eyebrow { margin: 0 0 1.4rem; color: var(--burgundy); font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 34px; height: 1px; margin: 0 .7rem .22rem 0; background: currentColor; }
.eyebrow.light { color: white; }
.hero h1 { margin: 0; font: clamp(3.8rem, 7.3vw, 7.4rem)/.88 var(--serif); letter-spacing: -.045em; font-weight: 400; }
h1 em, h2 em { font-family: var(--script); font-weight: 400; }
.hero h1 em { display: inline-block; margin-left: 10%; color: var(--cream); font-size: .82em; transform: rotate(-2deg); }
.hero-copy { max-width: 570px; margin: 2.2rem 0; font: 1.08rem/1.65 var(--serif); }
.hero-actions { display: flex; align-items: center; gap: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 2rem; min-width: 220px; padding: 1rem 1.2rem; border: 1px solid currentColor; text-decoration: none; font-size: .69rem; letter-spacing: .12em; text-transform: uppercase; transition: .25s ease; }
.button-light { color: var(--navy-deep); background: var(--cream); border-color: var(--cream); }
.button-light:hover { color: white; background: transparent; }
.text-link { display: inline-block; padding-bottom: .3rem; color: var(--navy); border-bottom: 1px solid currentColor; text-decoration: none; font-size: .7rem; letter-spacing: .11em; text-transform: uppercase; }
.text-link.light { color: white; }
.text-link span, .button span { display: inline-block; transition: transform .25s; }
.text-link:hover span, .button:hover span { transform: translate(3px,-2px); }
.hero-stamp { position: absolute; right: 5vw; bottom: 10%; width: 124px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; display: grid; place-content: center; text-align: center; transform: rotate(7deg); }
.hero-stamp strong { display: block; font: 2.5rem/1 var(--serif); }
.hero-stamp span { display: block; max-width: 90px; font-size: .49rem; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase; }
.scroll-cue { position: absolute; left: 5vw; bottom: 2rem; margin: 0; writing-mode: vertical-rl; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; }
.scroll-cue span { margin-top: .6rem; }

.marquee { overflow: hidden; background: var(--navy); color: var(--cream); border-block: 1px solid rgba(255,255,255,.16); }
.marquee-track { display: flex; width: max-content; animation: ticker 22s linear infinite; }
.marquee-group { display: flex; align-items: center; justify-content: space-around; min-width: 100vw; padding: 1.1rem 0; }
.marquee span { font: 1rem var(--serif); letter-spacing: .16em; text-transform: uppercase; }
.marquee i { color: var(--blue); font-style: normal; }
/* Give people a way to stop the motion (WCAG 2.2.2). */
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

.section { position: relative; padding: clamp(5rem, 10vw, 10rem) 8vw; }
.section-number { position: absolute; top: 3rem; right: 4vw; color: var(--blue); font: 4.8rem/1 var(--serif); opacity: .4; }
.intro { display: grid; grid-template-columns: 1.2fr .8fr; gap: 8vw; }
.intro h2, .stellenbosch h2, .experience h2, .vision h2 { margin: 0; font: clamp(3rem, 5vw, 5.4rem)/.98 var(--serif); font-weight: 400; letter-spacing: -.04em; }
.intro h2 em, .vision h2 em { color: var(--burgundy); }
.intro-copy { padding-top: 4.5rem; }
.lead { font: 1.4rem/1.5 var(--serif); }
.intro-copy > p:not(.lead) { color: #5c5860; font-size: .91rem; line-height: 1.8; }
.intro-copy .text-link { margin-top: 1.6rem; }
.rule-art { grid-column: 1/-1; display: flex; align-items: center; gap: 1rem; margin-top: 3rem; color: var(--burgundy); }
.rule-art span { height: 1px; flex: 1; background: var(--blue); }

.format { display: grid; grid-template-columns: 1fr 1.15fr; min-height: 670px; }
.format-panel { padding: clamp(4rem, 7vw, 7rem); display: flex; flex-direction: column; justify-content: center; }
.format-quote { position: relative; overflow: hidden; background: var(--blue); color: var(--navy-deep); }
.format-quote::after { content: "“"; position: absolute; right: -2rem; bottom: -9rem; color: rgba(255,255,255,.25); font: 28rem/1 var(--serif); }
.format-quote blockquote { margin: 0; }
.format-quote blockquote p { position: relative; z-index: 1; margin: 0; font: clamp(2.2rem, 3.6vw, 4rem)/1.2 var(--serif); }
.signature { position: relative; z-index: 1; margin-top: 2rem; color: var(--burgundy); font: 1.7rem var(--script); }
.format-details { background: var(--navy); color: white; }
.format-details h2 { margin: 0 0 3.5rem; font: clamp(2.7rem, 4.5vw, 5.3rem)/.98 var(--serif); font-weight: 400; letter-spacing: -.02em; }
.format-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid rgba(255,255,255,.3); }
.format-grid div { padding: 1.5rem 1rem 0 0; }
.format-grid strong { display: block; color: var(--blue); font: 2rem var(--serif); }
.format-grid span { display: block; max-width: 100px; margin-top: .45rem; color: rgba(255,255,255,.66); font-size: .66rem; line-height: 1.5; text-transform: uppercase; letter-spacing: .08em; }

.stellenbosch { display: grid; grid-template-columns: 1fr .8fr; gap: 6vw; }
.place-copy > p:last-child { max-width: 590px; color: #5c5860; line-height: 1.8; }
.place-card { align-self: center; background: var(--navy); padding: 1rem; transform: rotate(2deg); box-shadow: 18px 18px 0 var(--blue); }
.arch { position: relative; min-height: 400px; overflow: hidden; background: var(--cream); border-radius: 48% 48% 0 0; display: grid; place-items: end center; }
.arch-sun { position: absolute; width: 170px; height: 170px; top: 12%; left: 12%; background: var(--burgundy); border-radius: 50%; opacity: .94; }
.arch-mountain { position: absolute; inset: 39% -10% 0; background: var(--blue); clip-path: polygon(0 44%, 15% 10%, 25% 38%, 41% 0, 54% 42%, 68% 16%, 100% 55%, 100% 100%, 0 100%); }
.arch-building { position: relative; width: 48%; height: 45%; display: grid; place-items: center; color: var(--navy); background: var(--cream); border: 2px solid var(--navy); border-bottom: 0; font: 3rem var(--serif); }
.arch-building::before { content: ""; position: absolute; inset: -65px 15% auto; height: 65px; background: var(--cream); border: 2px solid var(--navy); border-bottom: 0; clip-path: polygon(50% 0,100% 100%,0 100%); }
.place-note { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem .6rem .2rem; color: white; }
.place-note span { font-size: .5rem; letter-spacing: .1em; text-transform: uppercase; }
.place-note strong { font: 1.1rem var(--script); }
.place-features { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,1fr); margin-top: 5rem; border-top: 1px solid var(--blue); }
.place-features article { padding: 2rem 3rem 0 0; }
.place-features article + article { padding-left: 3rem; border-left: 1px solid var(--blue); }
.place-features span { color: var(--burgundy); font: .75rem var(--serif); }
.place-features h3 { font: 1.5rem var(--serif); }
.place-features p { color: #64606a; font-size: .82rem; line-height: 1.7; }

.experience { background: var(--burgundy); color: var(--cream); display: grid; grid-template-columns: 1fr 1fr; gap: 3rem 8vw; }
.light-number { color: white; opacity: .18; }
.experience h2 em { color: var(--blue); }
.experience-intro { align-self: end; max-width: 430px; color: rgba(255,255,255,.72); font: 1.2rem/1.65 var(--serif); }
.timeline { grid-column: 1/-1; margin: 3rem 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.28); }
.timeline li { display: grid; grid-template-columns: 170px 1fr; padding: 2rem 0; border-bottom: 1px solid rgba(255,255,255,.22); }
.timeline > li > span { color: var(--blue); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; }
.timeline strong { font: 1.75rem var(--serif); }
.timeline p { margin: .55rem 0 0; color: rgba(255,255,255,.62); font-size: .83rem; }
.proposal-note { grid-column: 1/-1; margin: 0; color: rgba(255,255,255,.45); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; }

.vision { min-height: 740px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--cream); }
.vision::before, .vision::after { content: ""; position: absolute; left: 4vw; right: 4vw; height: 1px; background: var(--blue); }
.vision::before { top: 2rem; }.vision::after { bottom: 2rem; }
.oak-mark { display: flex; gap: 6px; align-items: center; margin-bottom: 1.5rem; }
.oak-mark span { width: 18px; height: 42px; background: var(--blue); border-radius: 100% 0; transform: rotate(-25deg); }
.oak-mark span:nth-child(2) { height: 58px; background: var(--burgundy); transform: rotate(0); }
.oak-mark span:nth-child(3) { transform: rotate(25deg) scaleX(-1); }
.vision > p:not(.eyebrow):not(.vision-kicker) { max-width: 620px; margin: 2rem auto; color: #5c5860; font: 1.15rem/1.65 var(--serif); }
.button-dark { color: white; background: var(--navy); border-color: var(--navy); }
.button-dark:hover { color: var(--navy); background: transparent; }
.vision-kicker { margin-top: 4rem; color: var(--burgundy); font-size: .62rem; letter-spacing: .25em; text-transform: uppercase; }
.error-page { min-height: 100svh; }
.error-page h2 { margin: 0; font: clamp(3rem, 5vw, 5.4rem)/.98 var(--serif); font-weight: 400; letter-spacing: -.04em; }
.error-page h2 em { color: var(--burgundy); }

footer { display: grid; grid-template-columns: 1fr auto; gap: 1.7rem 2rem; align-items: end; padding: 4rem 5vw 2rem; background: var(--navy-deep); color: white; }
.footer-brand { width: max-content; }
footer > p { justify-self: end; margin: 0; color: rgba(255,255,255,.55); font: .9rem var(--serif); }
.footer-links { display: flex; gap: 2rem; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; }
.footer-links a { text-decoration: none; }
.copyright { font-size: .55rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .1em; }

/* Scoped to .js so content stays visible if scripting or IntersectionObserver is unavailable. */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 820px) {
  :root { --header-h: 82px; }
  .site-header { min-height: var(--header-h); padding-inline: 1.2rem; }
  .menu-toggle { display: block; position: relative; z-index: 2; }
  .site-nav { position: fixed; inset: 0; display: none; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.6rem; padding: 6rem 1.8rem 2rem; background: var(--navy-deep); color: white; font-size: .9rem; }
  .site-nav.open { display: flex; }
  /* Scoped to this media query so widening the window always restores scrolling,
     even if the breakpoint listener never fires. */
  html.nav-open, html.nav-open body { overflow: hidden; }
  /* Keep the toggle and wordmark legible above the dark overlay, whatever the header state. */
  .site-header.nav-open, .site-header.nav-open.scrolled { color: white; background: transparent; box-shadow: none; }
  .site-header.nav-open .brand { position: relative; z-index: 2; }
  .site-header.nav-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-header.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .hero-content { margin-inline: 8vw; padding-top: 6rem; }
  .hero h1 { font-size: clamp(3.3rem, 15vw, 5.2rem); }
  .hero h1 em { margin-left: 0; }
  .hero-stamp { right: 1.5rem; bottom: 2rem; width: 95px; }
  .scroll-cue { display: none; }
  .section { padding-inline: 1.4rem; }
  .intro, .stellenbosch, .experience, .format { grid-template-columns: 1fr; }
  .intro-copy { padding-top: 0; }
  .format-panel { min-height: 540px; padding-inline: 1.8rem; }
  .place-card { margin: 1.5rem 1rem 2rem 0; }
  .place-features { grid-template-columns: 1fr; margin-top: 2rem; }
  .place-features article, .place-features article + article { padding: 1.5rem 0; border-left: 0; border-bottom: 1px solid var(--blue); }
  .experience-intro { align-self: start; }
  .timeline { grid-column: 1; }
  .timeline li { grid-template-columns: 100px 1fr; gap: 1rem; }
  .proposal-note { grid-column: 1; }
  footer { grid-template-columns: 1fr; text-align: left; }
  footer > p { justify-self: start; }
}

@media (max-width: 520px) {
  .hero-image { background-position: 63% center; }
  .hero-content { width: auto; margin-inline: 1.4rem; }
  .hero h1 { font-size: clamp(3rem, 12.6vw, 4.2rem); }
  .hero-copy { font-size: .95rem; max-width: 86%; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 1.2rem; }
  .hero-stamp { display: none; }
  .format-grid { grid-template-columns: 1fr; }
  .format-grid div { display: grid; grid-template-columns: 70px 1fr; align-items: center; border-bottom: 1px solid rgba(255,255,255,.15); padding-bottom: 1rem; }
  .format-grid span { margin-top: 0; max-width: none; }
  .arch { min-height: 330px; }
  .timeline li { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

@media print {
  .site-header, .marquee, .scroll-cue, .hero-stamp, .skip-link, .footer-links { display: none; }
  body { background: white; color: black; }
  .js .reveal { opacity: 1; transform: none; }
  .hero { min-height: auto; color: black; }
  .hero-image, .hero-shade { display: none; }
  .hero-content { margin: 0; padding-top: 0; }
  .eyebrow.light, .text-link.light, .hero h1 em { color: black; }
  .format, .experience, .vision, footer { background: white; color: black; }
  section { break-inside: avoid; }
}
