/*
Theme Name: APPE Institute
Theme URI: https://pe.ac/
Author: APPE
Description: A focused institutional theme for the Academy of Public Policy and Economics.
Version: 1.0.8
Requires at least: 6.0
Tested up to: 7.0
Text Domain: appe-institute
*/

:root {
  --appe-ink: #20251f;
  --appe-muted: #62665d;
  --appe-line: #d4d0c5;
  --appe-paper: #efeee8;
  --appe-white: #fbfaf6;
  --appe-panel: #f7f5ee;
  --appe-stone: #d9d3c4;
  --appe-green: #18362b;
  --appe-green-2: #10251d;
  --appe-gold: #8a693c;
  --appe-gold-2: #c6b279;
  --appe-burgundy: #5a2f32;
  --appe-max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--appe-ink);
  background:
    linear-gradient(90deg, rgba(32, 37, 31, 0.035) 1px, transparent 1px) 0 0 / 88px 88px,
    var(--appe-paper);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0;
}

body.admin-bar .appe-site-header {
  top: 32px;
}

a {
  color: #75562f;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--appe-burgundy);
}

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

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

.appe-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 246, 0.97);
  border-bottom: 1px solid rgba(32, 37, 31, 0.16);
  backdrop-filter: blur(8px);
}

.appe-header-inner,
.appe-container {
  width: min(var(--appe-max), calc(100% - 48px));
  margin: 0 auto;
}

.appe-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 84px;
}

.appe-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--appe-ink);
  text-decoration: none;
}

.appe-brand-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.appe-custom-logo {
  display: block;
  width: auto;
  height: 54px;
  max-width: min(300px, 42vw);
  object-fit: contain;
}

.appe-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--appe-paper);
  background: var(--appe-green-2);
  border: 1px solid var(--appe-gold);
  box-shadow: inset 0 0 0 3px rgba(198, 178, 121, 0.16);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 700;
  letter-spacing: 0;
}

.appe-brand-text {
  display: grid;
  gap: 1px;
}

.appe-brand-name {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 700;
  line-height: 1.15;
}

.appe-brand-sub {
  color: var(--appe-muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.appe-nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.appe-nav a {
  color: var(--appe-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.appe-nav a:hover,
.appe-nav a:focus {
  color: var(--appe-burgundy);
}

.appe-hero {
  position: relative;
  min-height: 640px;
  isolation: isolate;
  display: grid;
  align-items: end;
  color: var(--appe-white);
  background:
    linear-gradient(90deg, rgba(16, 37, 29, 0.96), rgba(24, 54, 43, 0.82) 45%, rgba(90, 47, 50, 0.16)),
    url("assets/policy-research-hero.jpg") center / cover no-repeat;
}

.appe-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 130px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(246, 248, 246, 0), var(--appe-paper));
}

.appe-hero-inner {
  width: min(var(--appe-max), calc(100% - 48px));
  margin: 0 auto;
  padding: 132px 0 96px;
}

.appe-kicker {
  color: var(--appe-gold-2);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.appe-hero h1 {
  max-width: 820px;
  margin: 20px 0 22px;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(40px, 5.2vw, 66px);
  line-height: 1.08;
  letter-spacing: 0;
}

.appe-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.appe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.appe-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(198, 178, 121, 0.62);
  color: var(--appe-white);
  background: rgba(16, 37, 29, 0.38);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
}

.appe-button.primary {
  border-color: var(--appe-gold-2);
  color: var(--appe-white);
  background: rgba(90, 47, 50, 0.58);
}

.appe-main {
  min-height: 55vh;
}

.appe-section {
  padding: 68px 0;
}

.appe-section.compact {
  padding-top: 58px;
}

.appe-home-intro {
  background: var(--appe-panel);
}

.appe-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(340px, 0.97fr);
  gap: 48px;
  align-items: center;
}

.appe-media-frame,
.appe-band-visual,
.appe-page-visual {
  margin: 0;
}

.appe-media-frame {
  position: relative;
  border: 1px solid var(--appe-line);
  background: var(--appe-stone);
}

.appe-media-frame::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(251, 250, 246, 0.72);
  pointer-events: none;
}

.appe-media-frame img {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
}

.appe-copy-panel {
  padding: 18px 0;
}

.appe-ruled-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 8px 0 0;
  list-style: none;
  border-top: 1px solid var(--appe-line);
}

.appe-ruled-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--appe-line);
  color: #39443f;
}

.appe-section-title {
  max-width: 760px;
  margin: 0 0 30px;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.appe-section-lede {
  max-width: 770px;
  margin: 0 0 38px;
  color: var(--appe-muted);
  font-size: 17px;
}

.appe-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.appe-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.appe-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.appe-card {
  min-height: 235px;
  padding: 26px 24px 28px;
  background: var(--appe-panel);
  border: 1px solid var(--appe-line);
  border-top: 3px solid var(--appe-gold);
  box-shadow: none;
}

.appe-card h3 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 20px;
  line-height: 1.24;
}

.appe-card a {
  color: var(--appe-ink);
  text-decoration: none;
}

.appe-card p {
  margin: 0;
  color: var(--appe-muted);
  font-size: 15px;
}

.appe-card .appe-card-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--appe-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.appe-band {
  color: var(--appe-white);
  background:
    linear-gradient(180deg, rgba(251, 250, 246, 0.04), rgba(251, 250, 246, 0)),
    var(--appe-green-2);
  border-top: 1px solid rgba(198, 178, 121, 0.22);
  border-bottom: 1px solid rgba(198, 178, 121, 0.22);
}

.appe-two-col-visual {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.appe-band-copy {
  display: grid;
  gap: 24px;
}

.appe-band-visual {
  border: 1px solid rgba(198, 178, 121, 0.36);
}

.appe-band-visual img {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  opacity: 0.88;
}

.appe-insight-section {
  background: linear-gradient(180deg, var(--appe-white), #ecece5);
}

.appe-kicker.dark {
  color: var(--appe-gold);
}

.appe-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--appe-gold);
  color: var(--appe-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.appe-band .appe-section-title,
.appe-band .appe-section-lede {
  color: var(--appe-white);
}

.appe-band .appe-section-lede {
  color: rgba(255, 255, 255, 0.78);
}

.appe-two-col {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 54px;
  align-items: start;
}

.appe-list {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.appe-list li {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.appe-list strong {
  display: block;
  color: var(--appe-gold-2);
  margin-bottom: 4px;
}

.appe-page-header {
  padding: 62px 0;
  color: var(--appe-white);
  background: linear-gradient(135deg, var(--appe-green-2), var(--appe-burgundy));
}

.appe-page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.85fr);
  gap: 48px;
  align-items: center;
}

.appe-page-heading {
  display: grid;
  gap: 16px;
}

.appe-page-eyebrow {
  color: var(--appe-gold-2);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.appe-page-header h1 {
  max-width: 860px;
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
}

.appe-page-header p {
  max-width: 640px;
  margin: 0;
  color: rgba(251, 250, 246, 0.78);
  font-size: 18px;
}

.appe-page-visual {
  border: 1px solid rgba(198, 178, 121, 0.34);
  background: rgba(251, 250, 246, 0.08);
  padding: 10px;
}

.appe-page-visual img {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
}

.appe-content {
  padding: 0 0 82px;
  background: var(--appe-paper);
}

.appe-content-frame {
  width: min(1000px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 64px 68px;
  background: var(--appe-white);
  border-left: 1px solid var(--appe-line);
  border-right: 1px solid var(--appe-line);
}

.appe-content-inner {
  width: min(860px, 100%);
  margin: 0 auto;
}

.appe-content h2,
.appe-content h3,
.appe-content h4 {
  color: var(--appe-ink);
  line-height: 1.2;
}

.appe-content h2 {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--appe-line);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(29px, 3vw, 36px);
}

.appe-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.appe-content h3 {
  margin-top: 30px;
  font-size: 24px;
}

.appe-content p,
.appe-content li {
  color: #31403d;
}

.appe-content p {
  margin: 0 0 18px;
}

.appe-content h2 + p {
  font-size: 18px;
}

.appe-content ul {
  padding-left: 1.25em;
}

.appe-content .appe-note {
  padding: 20px 24px;
  border-left: 4px solid var(--appe-gold);
  background: #efede3;
}

.appe-content .appe-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0;
  margin: 28px 0;
  list-style: none;
}

.appe-content .appe-page-grid li,
.appe-content .appe-contact-card {
  padding: 22px;
  border: 1px solid var(--appe-line);
  border-top: 3px solid var(--appe-gold);
  background: var(--appe-panel);
}

.appe-content .appe-page-grid strong,
.appe-content .appe-contact-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--appe-ink);
}

.appe-contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.appe-contact-card a {
  overflow-wrap: anywhere;
}

.appe-email-spell {
  display: block;
  margin: 4px 0 8px;
  color: var(--appe-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
}

.appe-contact-shell {
  margin-top: 28px;
}

.appe-contact-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--appe-line);
  background: var(--appe-paper);
}

.appe-contact-form label {
  display: grid;
  gap: 7px;
  color: var(--appe-ink);
  font-weight: 700;
}

.appe-contact-form input,
.appe-contact-form select,
.appe-contact-form textarea {
  width: 100%;
  border: 1px solid #cfcabe;
  background: var(--appe-white);
  color: var(--appe-ink);
  font: inherit;
  padding: 12px 13px;
}

.appe-contact-form textarea {
  resize: vertical;
}

.appe-contact-form button {
  justify-self: start;
  min-height: 46px;
  border: 0;
  background: var(--appe-green);
  color: var(--appe-white);
  font: inherit;
  font-weight: 800;
  padding: 0 22px;
  cursor: pointer;
}

.appe-form-status {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--appe-gold);
  background: #efede3;
}

.appe-form-status.success {
  border-left-color: var(--appe-green);
  background: #e7eee8;
}

.appe-hidden-field {
  display: none;
}

.appe-content .appe-callout {
  padding: 26px;
  margin: 32px 0;
  color: var(--appe-white);
  background: var(--appe-green-2);
}

.appe-content .appe-callout a {
  color: var(--appe-gold-2);
}

.appe-footer {
  color: rgba(255, 255, 255, 0.82);
  background: #0f211a;
}

.appe-footer-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 50px;
  padding: 52px 0;
}

.appe-footer h2 {
  margin: 0 0 12px;
  color: var(--appe-white);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 30px;
}

.appe-footer p {
  margin: 0;
}

.appe-footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 22px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.appe-footer a {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
}

.appe-footer a:hover,
.appe-footer a:focus {
  color: var(--appe-gold-2);
}

.appe-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

@media (max-width: 900px) {
  body.admin-bar .appe-site-header {
    top: 46px;
  }

  .appe-header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 18px 0;
  }

  .appe-nav ul {
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .appe-nav a {
    font-size: 14px;
  }

  .appe-hero {
    min-height: 560px;
  }

  .appe-grid,
  .appe-grid.three,
  .appe-grid.two,
  .appe-media-row,
  .appe-page-hero-grid,
  .appe-two-col,
  .appe-footer-inner,
  .appe-content .appe-page-grid,
  .appe-contact-list {
    grid-template-columns: 1fr;
  }

  .appe-media-row,
  .appe-page-hero-grid,
  .appe-two-col {
    gap: 32px;
  }

  .appe-page-header {
    padding: 48px 0;
  }

  .appe-content-frame {
    width: min(100% - 32px, var(--appe-max));
    padding: 44px 34px 56px;
  }

  .appe-footer-nav ul {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .appe-header-inner,
  .appe-container,
  .appe-hero-inner,
  .appe-content-frame {
    width: min(100% - 28px, var(--appe-max));
  }

  .appe-brand-mark {
    width: 38px;
    height: 38px;
  }

  .appe-custom-logo {
    height: 44px;
    max-width: 82vw;
  }

  .appe-brand-name {
    font-size: 15px;
  }

  .appe-hero {
    min-height: 560px;
  }

  .appe-hero-inner {
    padding: 78px 0 72px;
  }

  .appe-section {
    padding: 52px 0;
  }

  .appe-card {
    min-height: auto;
  }

  .appe-content-frame {
    padding: 34px 20px 46px;
  }

  .appe-page-visual {
    padding: 7px;
  }

  .appe-media-frame img,
  .appe-band-visual img,
  .appe-page-visual img {
    aspect-ratio: 1.18;
  }
}
