/* POTAF website styles. Plain CSS, no build step. */

:root {
  --gold: #cda864;
  --gold-dark: #8a6a2c;   /* gold dark enough for text on white (AA) */
  --ink: #1f1a14;
  --ink-soft: #4a4339;
  --dark: #1a120b;
  --dark-2: #2a1e13;
  --paper: #ffffff;
  --paper-alt: #f7f3ec;
  --line: #e6dfd2;
  --radius: 6px;
  --max: 1140px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-dark); text-underline-offset: 2px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.2rem; margin: 1.25rem 0 .5rem; }

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

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--dark); color: #fff; padding: .5rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

main:focus { outline: none; }

/* Buttons and links */
.btn {
  display: inline-block;
  padding: .7rem 1.4rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--dark);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .02em;
}
.btn:hover { background: #e0c084; border-color: #e0c084; color: var(--dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.8); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }

.text-link { font-weight: 700; margin-right: 1.5rem; }
.text-link::after { content: " \2192"; }

.eyebrow {
  margin: 0 0 .35rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

/* Header */
.site-header { background: var(--paper); border-bottom: 4px solid var(--gold); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 12px; padding-bottom: 12px;
}
.brand-logo { width: 340px; max-width: 62vw; }
.btn-apply { white-space: nowrap; background: var(--dark); border-color: var(--dark); color: #fff; }
.btn-apply:hover { background: var(--dark-2); border-color: var(--dark-2); color: var(--gold); }

/* Navigation */
.site-nav { background: var(--dark); color: #fff; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; }

.menu, .sub-menu, .social { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; flex-wrap: wrap; }
.menu-item { position: relative; }
.menu-item > a, .sub-toggle {
  display: block;
  padding: .8rem .9rem;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.sub-toggle::after {
  content: "";
  display: inline-block;
  width: .45em; height: .45em;
  margin-left: .45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-.2em) rotate(45deg);
}
.menu-item > a:hover, .sub-toggle:hover, .menu-item.is-active > a, .menu-item.is-active > .sub-toggle { color: var(--gold); }

.sub-menu {
  display: none;
  position: absolute; left: 0; top: 100%; z-index: 20;
  min-width: 250px;
  background: var(--dark-2);
  border-top: 3px solid var(--gold);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.sub-menu a { display: block; padding: .65rem 1rem; color: #fff; text-decoration: none; font-size: .95rem; }
.sub-menu a:hover, .sub-menu a[aria-current="page"] { background: rgba(205,168,100,.15); color: var(--gold); }

/* Without JavaScript, hover and keyboard focus open the menus. */
.has-sub:hover > .sub-menu,
.has-sub:focus-within > .sub-menu,
.sub-toggle[aria-expanded="true"] + .sub-menu { display: block; }
.js .has-sub:focus-within > .sub-menu { display: none; }
.js .has-sub:hover > .sub-menu,
.js .sub-toggle[aria-expanded="true"] + .sub-menu { display: block; }

.social { display: flex; gap: .25rem; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; color: #fff; border-radius: 50%; }
.social a:hover { color: var(--gold); background: rgba(255,255,255,.08); }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-inner { flex-wrap: wrap; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .75rem 0; background: none; border: 0; color: #fff;
    font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: currentColor; position: relative;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }

  .menu { flex-basis: 100%; order: 3; flex-direction: column; padding-bottom: .75rem; }
  .js .menu { display: none; }
  .js .nav-open .menu { display: flex; }
  .menu-item > a, .sub-toggle { width: 100%; text-align: left; padding: .7rem 0; border-top: 1px solid rgba(255,255,255,.1); }
  .sub-menu { position: static; box-shadow: none; border-top: 0; background: transparent; min-width: 0; padding-left: 1rem; }
  .sub-menu a { padding: .5rem 0; }
  .js .has-sub:hover > .sub-menu { display: none; }
  .js .sub-toggle[aria-expanded="true"] + .sub-menu { display: block; }
  .brand-logo { width: 240px; }
  .btn-apply { padding: .5rem .9rem; font-size: .9rem; }
}

/* Home hero */
.hero { position: relative; background: var(--dark); color: #fff; overflow: hidden; }
.slides { position: relative; aspect-ratio: 2 / 1; max-height: 620px; width: 100%; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-text {
  position: absolute; inset: auto 0 0 0;
  padding: 4rem 0 2rem;
  background: linear-gradient(to top, rgba(17,10,4,.92), rgba(17,10,4,.55) 60%, rgba(17,10,4,0));
}
.hero-text h1 { color: #fff; max-width: 20ch; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hero-text .lead { color: #f1e6d0; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0 0; }

@media (max-width: 700px) {
  .slides { aspect-ratio: 4 / 3; }
  .hero-text { position: static; padding: 1.5rem 0 2rem; background: var(--dark); }
}
@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
}

/* Sections */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--paper-alt); }
.section-title { margin-top: 0; text-align: center; }
.section-title::after { content: ""; display: block; width: 60px; height: 3px; margin: .6rem auto 0; background: var(--gold); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split > *, .two-col > *, .news-item > * { min-width: 0; }
.split h2 { margin-top: 0; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

.feature-photo { margin: 0; }
.feature-photo img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.feature-photo figcaption {
  margin-top: .75rem;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  text-align: center;
}

.cards { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: 1.25rem 1.25rem 1rem; }
.card h3 { margin-top: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card:hover { box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.card:hover h3 a { color: var(--gold-dark); }
.card p { margin: 0; color: var(--ink-soft); }

/* News list */
.news-list { list-style: none; margin: 2rem 0; padding: 0; display: grid; gap: 1.5rem; }
.news-item { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.news-item h2, .news-item h3 { margin: .2rem 0 .5rem; }
.news-item h2 a, .news-item h3 a { color: var(--ink); text-decoration: none; }
.news-item h2 a:hover, .news-item h3 a:hover { color: var(--gold-dark); }
.news-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.meta { margin: 0; font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 640px) { .news-item { grid-template-columns: 1fr; gap: .75rem; } }

/* Inner pages */
.page-hero { background: var(--dark); color: #fff; padding: 2.75rem 0 2.25rem; border-bottom: 4px solid var(--gold); }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero .eyebrow { color: var(--gold); }
.page-hero .lead { margin: .6rem 0 0; color: #e9dcc3; max-width: 65ch; }

.prose { max-width: 820px; padding-top: 2.5rem; padding-bottom: 3.5rem; }
.page-uni-list main > .container, .page-gallery main > .container, .page-news main > .container,
.page-contact main > .container, .page-post main > .container { padding-top: 2.5rem; padding-bottom: 3.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--gold-dark); }
ol.roman { list-style: lower-roman; font-style: italic; }
ol.alpha { list-style: lower-alpha; }
ol.numbered li { padding-left: .3rem; }

.lead-text { font-size: 1.15rem; max-width: 70ch; }
.next-links { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.note { padding: 1rem 1.25rem; background: var(--paper-alt); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; }
.callout { padding: 1rem 1.25rem; background: var(--dark); color: #fff; border-radius: var(--radius); }

.float-portrait { float: right; width: 240px; margin: .3rem 0 1rem 2rem; }
.float-portrait img { border-radius: var(--radius); }
.float-portrait figcaption { font-size: .9rem; color: var(--ink-soft); text-align: center; margin-top: .4rem; }
@media (max-width: 600px) { .float-portrait { float: none; margin: 0 auto 1.5rem; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; }
.two-col h2 { margin-top: 0; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

.panel { background: var(--paper-alt); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.panel h2, .panel h3 { margin-top: 0; font-size: 1.15rem; }
.panel h2 + * { margin-top: 0; }
address { font-style: normal; }

.roles { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.roles dt { font-weight: 700; }
.roles dd { margin: 0; }
ul.plain { list-style: none; padding: 0; }

.team { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.5rem; }
.prose .team li { margin: 0; text-align: center; }
.team img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; margin: 0 auto .75rem; border: 3px solid var(--gold); }
.team strong, .team span { display: block; }
.team span { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark); font-weight: 700; }

.tags { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { margin: 0; padding: .35rem .9rem; background: var(--dark); color: var(--gold); border-radius: 999px; font-weight: 700; }

.steps { list-style: none; padding: 0 !important; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.25rem 3.5rem; margin: 0; border-left: 2px solid var(--line); margin-left: 1.2rem; }
.steps > li:last-child { border-left-color: transparent; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: -1.3rem; top: 0;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--dark); font-weight: 700;
}
.steps h2 { margin: .3rem 0 .4rem; font-size: 1.25rem; }

.uni-list { columns: 3 260px; column-gap: 2.5rem; padding-left: 1.2rem; margin: 0; }
.uni-list li { break-inside: avoid; margin-bottom: .45rem; }
.uni-list li::marker { color: var(--gold-dark); }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }

/* Forms */
.btn-large { padding: .9rem 2rem; font-size: 1.1rem; }
.btn:disabled { opacity: .6; cursor: progress; }
.prose-flush { padding-top: 0; padding-bottom: 0; }

.success { border-left: 4px solid #2e7d4f; }
.success h2 { margin-top: 0; }
.ref { font-family: ui-monospace, Consolas, monospace; font-size: 1.15em; }

.error-summary {
  margin: 1.5rem 0; padding: 1rem 1.25rem;
  border: 3px solid #b3261e; border-radius: var(--radius); background: #fff7f6;
}
.error-summary:focus { outline: 3px solid var(--gold); }
.error-summary h2 { margin: 0 0 .4rem; font-size: 1.25rem; color: #b3261e; }
.error-summary ul { margin: .5rem 0 0; }
.error-summary a { color: #b3261e; }

.apply-form { margin-top: 2rem; }
.form-section { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem 1.5rem; margin: 0 0 1.5rem; }
.form-section > legend { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; padding: 0 .5rem; margin-left: -.5rem; }
.section-intro { margin: 0 0 1rem; color: var(--ink-soft); }

.field-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem 1.25rem; }
.field { grid-column: span 12; margin: 0; min-width: 0; border: 0; padding: 0; }
.field-half { grid-column: span 6; }
.field-third { grid-column: span 4; }
.field-quarter { grid-column: span 3; }
.field-subject { grid-column: span 8; }
.field-grade { grid-column: span 4; }
@media (max-width: 700px) {
  .field-half, .field-third, .field-quarter { grid-column: span 12; }
}

.field label, .field legend, .stack > label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field legend { padding: 0; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field-hint { margin: 0 0 .35rem; font-size: .92rem; color: var(--ink-soft); }
.field-error { margin: 0 0 .35rem; font-weight: 600; color: #b3261e; }
.has-error input, .has-error select, .has-error textarea { border-color: #b3261e; border-width: 2px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"],
input[type="password"], input[type="search"], input[type="url"], select, textarea {
  width: 100%;
  padding: .6rem .7rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #a99e8c;
  border-radius: var(--radius);
}
textarea { resize: vertical; }
input[type="file"] { font: inherit; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--ink); }

.choices { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-top: .2rem; }
.choice { display: inline-flex; align-items: center; gap: .5rem; font-weight: 400 !important; cursor: pointer; }
.choice input { width: 1.2rem; height: 1.2rem; accent-color: var(--gold-dark); flex: none; }
.choice-block { display: flex; align-items: flex-start; margin-bottom: .75rem; }
.choice-block input { margin-top: .3rem; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.stack { display: grid; gap: .35rem; }
.stack > button, .stack > .btn { justify-self: start; margin-top: .75rem; }
.stack > label:not(:first-of-type) { margin-top: .6rem; }

/* Galleries */
.gallery { list-style: none; margin: 0; padding: 0; columns: 4 220px; column-gap: 12px; }
.gallery li { break-inside: avoid; margin-bottom: 12px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; transition: transform .3s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: .9rem; color: var(--ink-soft); padding: .4rem .1rem 0; }
.gallery-captioned { columns: 3 260px; column-gap: 20px; }
.gallery-captioned li { margin-bottom: 20px; }

.video { position: relative; display: block; aspect-ratio: 16 / 9; margin: 1.5rem 0; background: #000; border-radius: var(--radius); overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: opacity .2s ease; }
.video:hover img { opacity: .9; }
.video-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  background: var(--gold); color: var(--dark); font-weight: 700; white-space: nowrap;
}
.video-play::before { content: ""; border-left: 14px solid currentColor; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }

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

/* Lightbox (created by site.js) */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10,6,2,.92); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: 3.5rem 1rem; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: .6rem; }
.lightbox img { max-width: min(92vw, 1400px); max-height: calc(100vh - 9rem); width: auto; height: auto; border-radius: 4px; }
.lightbox figcaption { color: #eee; text-align: center; max-width: 60ch; }
.lightbox button {
  position: absolute; display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: var(--gold); color: var(--dark); }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; top: 1.6rem; left: 1rem; color: #ccc; font-size: .9rem; }

/* Footer */
.site-footer { background: var(--dark); color: #d9cfbf; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding-top: 3rem; padding-bottom: 2rem; }
.footer-title { margin: 0 0 .9rem; font-size: 1.05rem; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; font-family: var(--font); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .6rem; line-height: 1.4; }
.site-footer .btn { color: var(--dark); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0; font-size: .9rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a { text-decoration: none; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

@media print {
  .site-nav, .btn-apply, .hero-actions, .site-footer .btn { display: none; }
  .page-hero, .site-footer { background: none; color: #000; }
  .page-hero h1 { color: #000; }
}
