/*
 * Academy theme (intent 11 §20.3): token values and fonts only.
 * Values from the brand guide draft v0.1 (D19 pending). This is the only
 * file allowed to hold colour literals (§20.8).
 */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond-600.ae062b6d5a.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/source-sans-3-400.0f73f35e08.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/source-sans-3-600.14527d193b.woff2') format('woff2');
}

:root {
  /* Tenant brand tokens (10 §19.11 contract) */
  --brand-primary: #7a1f2b;
  --on-brand-primary: #ffffff;
  --brand-accent: #c8952e;
  --brand-secondary: #0f5c63;

  /* Public-site palette */
  --accent-text: #8a6414;
  --surface: #fbf7f0;
  --surface-raised: #ffffff;
  --surface-inverse: #1f1a17;
  --text: #1f1a17;
  --text-muted: #5c534d;
  --text-inverse: #fbf7f0;
  --divider: #e8dfd2;
  --overlay: rgb(31 26 23 / 0.62);
  --focus-ring: #0f5c63;
  --notice-surface: #0f5c63;
  --on-notice-surface: #ffffff;

  /* Typefaces */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/*
 * Structure layer styles (intent 11 §20.3). Semantic tokens only: every
 * colour and typeface comes from content/theme.css.
 */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.3;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--brand-primary);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--brand-primary);
  color: var(--on-brand-primary);
}

.skip-link:focus {
  top: 1rem;
}

.preview-notice {
  background: var(--notice-surface);
  color: var(--on-notice-surface);
  font-size: 0.9375rem;
  padding-block: 0.5rem;
  text-align: center;
}

/* Buttons: at least 44 px tall, well above the 24 px target minimum. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 0.25rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}

.button-primary {
  background: var(--brand-primary);
  color: var(--on-brand-primary);
}

.button-secondary {
  background: var(--brand-secondary);
  color: var(--on-brand-primary);
}

.button-login {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  margin-left: auto;
}

.button-ghost {
  border-color: var(--text-inverse);
  color: var(--text-inverse);
}

.label-short {
  display: none;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
}

.header-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
}

.primary-nav ul {
  display: flex;
  gap: 1.5rem;
}

.primary-nav a,
.mobile-menu a {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.primary-nav a:hover,
.mobile-menu a:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

.mobile-menu {
  display: none;
}

.mobile-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--text-muted);
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 0.5rem 1.25rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
}

.mobile-menu li + li {
  border-top: 1px solid var(--divider);
}

.mobile-menu a {
  display: block;
  padding-block: 0.75rem;
}

@media (max-width: 59.99rem) {
  .primary-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
    margin-left: auto;
  }

  .button-login {
    margin-left: auto;
  }

  .button-login + .mobile-menu {
    margin-left: 0;
  }

  .header-bar {
    gap: 0.75rem;
  }
}

@media (max-width: 29.99rem) {
  .button-login .label-full {
    display: none;
  }

  .button-login .label-short {
    display: inline;
  }

  .wordmark {
    font-size: 1.5rem;
  }
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(38rem, 80vh);
  overflow: hidden;
  background: var(--surface-inverse);
  color: var(--text-inverse);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: 4rem;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.eyebrow {
  display: inline-block;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--brand-accent);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tagline {
  max-width: 40ch;
  font-size: 1.25rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero :focus-visible,
.section-contact :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--brand-accent);
}

/* Sections */
.section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.section h2 {
  font-size: clamp(2.125rem, 4vw, 2.75rem);
  color: var(--brand-primary);
}

.section h2::after {
  content: '';
  display: block;
  width: 3.5rem;
  height: 2px;
  margin-top: 0.75rem;
  margin-bottom: 1.75rem;
  background: var(--brand-accent);
}

.section-alt {
  background: var(--surface-raised);
}

.prose {
  max-width: 65ch;
}

.about-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.about-figure {
  margin: 0;
}

.framed-image {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--brand-accent);
}

@media (min-width: 60rem) {
  .about-grid {
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.25rem;
}

.card-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-top: 3px solid var(--brand-accent);
  border-radius: 0.25rem;
}

.section:not(.section-alt) .card {
  background: var(--surface-raised);
}

.card > :last-child {
  margin-bottom: 0;
}

.card-tag {
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-meta {
  color: var(--text-muted);
}

.meta-label {
  font-weight: 600;
}

/* Events */
.event-list {
  display: grid;
  gap: 1rem;
}

.event {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-left: 4px solid var(--brand-secondary);
}

.event > :last-child {
  margin-bottom: 0;
}

.event-when {
  font-weight: 600;
}

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 1rem;
}

.gallery-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.25rem;
}

@media (min-width: 40rem) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 60rem) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
}

.testimonial {
  height: 100%;
  margin: 0;
  padding: 1.75rem;
  background: var(--surface);
  border-radius: 0.25rem;
}

.testimonial blockquote {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.35;
}

.testimonial blockquote p::before {
  content: '\201C';
  color: var(--brand-primary);
}

.testimonial blockquote p::after {
  content: '\201D';
  color: var(--brand-primary);
}

.testimonial figcaption {
  color: var(--text-muted);
  font-weight: 600;
}

/* Contact and footer */
.section-contact,
.site-footer {
  background: var(--surface-inverse);
  color: var(--text-inverse);
}

.section-contact h2 {
  color: var(--text-inverse);
}

.section-contact a:not(.button),
.site-footer a {
  color: var(--text-inverse);
}

.section-contact .button-primary {
  border-color: var(--brand-accent);
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
}

.contact-list {
  display: grid;
  gap: 0.5rem;
  font-size: 1.125rem;
}

.contact-list .meta-label {
  display: inline-block;
  min-width: 4rem;
}

.social-list,
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.social-list a,
.site-footer a {
  display: inline-block;
  padding-block: 0.4rem;
}

.site-footer {
  border-top: 1px solid var(--text-muted);
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
}

.footer-bar p {
  margin: 0;
}

/* Footer pages */
.legal {
  padding-block: clamp(3rem, 8vw, 5rem);
}

.legal h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  color: var(--brand-primary);
}
