/* ===========================================================
   General Education Renaissance — shared site styles
   Brand system: Parchment / Burnt Umber / Deep Olive / Venetian
   Blue / Gold Leaf / Charcoal, with Burgundy + Terracotta accents.
   Headlines: Cormorant Garamond.  Body: Inter.
   =========================================================== */

:root {
  --parchment: #f6f2ea;
  --parchment-dark: #ece2cb;
  --umber: #6a4e3b;
  --olive: #4c5a4d;
  --olive-deep: #38443a;
  --blue: #385d78;
  --gold: #c8a34a;
  --gold-bright: #ddbd77;
  --gold-dim: #a3813a;
  --charcoal: #232323;
  --burgundy: #6d2932;
  --terracotta: #a66a4a;
  --ink: #232323;
  --ink-soft: #5b5248;
  --line: #ddd1af;
  --card-bg: #fffdf8;
  --shadow: 0 6px 22px rgba(35, 28, 18, 0.10);
  --shadow-lift: 0 12px 30px rgba(35, 28, 18, 0.16);
  --radius: 4px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse 900px 500px at 10% -5%, rgba(56,93,120,0.06), transparent 60%),
    radial-gradient(ellipse 900px 600px at 92% 0%, rgba(200,163,74,0.12), transparent 55%),
    radial-gradient(ellipse 1000px 700px at 50% 110%, rgba(76,90,77,0.07), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  background-attachment: fixed, fixed, fixed, fixed;
  line-height: 1.65;
}

h1, h2, h3, h4, .display {
  font-family: "Cormorant Garamond", "Palatino Linotype", Georgia, serif;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.005em;
}

a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Brand mark (monogram) ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand svg { flex: none; display: block; }
.brand .word {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand .word .name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand .word .tag {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-top: 2px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--parchment);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

nav.main-nav a {
  color: var(--ink-soft);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-bottom: 2px solid transparent;
  font-family: "Inter", Arial, sans-serif;
  font-weight: 500;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--charcoal);
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
}

/* ---------- Hero ---------- */

.hero {
  padding: 78px 0 56px;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse 800px 400px at 15% 0%, rgba(56,93,120,0.07), transparent 60%),
    radial-gradient(ellipse 800px 500px at 88% 15%, rgba(200,163,74,0.14), transparent 55%),
    linear-gradient(180deg, var(--parchment-dark), var(--parchment));
  border-bottom: 1px solid var(--line);
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.74rem;
  color: var(--terracotta);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  margin: 0 0 20px;
  line-height: 1.12;
}

.hero p.lede {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
}

.rule {
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  margin: 28px auto;
  border: none;
  position: relative;
}
.rule::after {
  content: "\2726";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 0.7rem;
  background: var(--parchment);
  padding: 0 10px;
}

/* ---------- Sections / Cards ---------- */

section { padding: 60px 0; }
section.alt {
  background:
    radial-gradient(ellipse 900px 400px at 80% 100%, rgba(76,90,77,0.06), transparent 60%),
    var(--parchment-dark);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head { margin-bottom: 34px; }
.section-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--terracotta);
}
.section-head h2 { font-size: 2.15rem; margin: 8px 0 12px; }
.section-head p { color: var(--ink-soft); max-width: 720px; font-size: 1rem; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  position: relative;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
  border-color: var(--gold-dim);
}

.grid {
  display: grid;
  gap: 22px;
}
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}

.card h3 { margin-top: 0; font-size: 1.2rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  background: var(--olive);
  color: var(--parchment);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 26px;
  border-radius: 3px;
  border: 1px solid var(--charcoal);
  background: var(--charcoal);
  color: var(--parchment) !important;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #363636; transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }

.btn.secondary {
  background: transparent;
  color: var(--charcoal) !important;
  border: 1px solid var(--charcoal);
}
.btn.secondary:hover { background: rgba(35,35,35,0.06); }

.btn.gold {
  background: var(--gold);
  border-color: var(--gold-dim);
  color: var(--charcoal) !important;
}
.btn.gold:hover { background: var(--gold-bright); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Forms ---------- */

label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 4px;
  margin-top: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
input[type="text"], input[type="email"], input[type="url"], textarea, select {
  width: 100%;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffefb;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,163,74,0.18);
}
textarea { resize: vertical; min-height: 90px; }
input[type="file"] { margin-top: 4px; font-size: 0.86rem; }

.form-hint { font-size: 0.76rem; color: var(--ink-soft); margin-top: 4px; }
.form-note {
  background: rgba(200,163,74,0.12);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.83rem;
  margin: 16px 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--olive-deep);
  color: var(--parchment);
  padding: 0;
  margin-top: 40px;
}
footer.site-footer .ribbon {
  text-align: center;
  padding: 14px 0;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-bright);
  border-bottom: 1px solid rgba(200,163,74,0.25);
}
footer.site-footer .info {
  padding: 26px 0;
  font-size: 0.88rem;
}
footer.site-footer a { color: var(--gold-bright); }
footer.site-footer .info .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: #d9d5c8;
}

/* ---------- Definition block (renaissance) ---------- */

.definition-panel {
  background:
    radial-gradient(ellipse 700px 400px at 15% 10%, rgba(200,163,74,0.10), transparent 60%),
    radial-gradient(ellipse 700px 400px at 90% 90%, rgba(56,93,120,0.14), transparent 60%),
    linear-gradient(160deg, #435043, var(--olive-deep));
  background-color: var(--olive-deep);
  color: var(--parchment);
  border-radius: 4px;
  padding: 54px 44px;
  text-align: center;
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--gold-dim);
  outline: 1px solid rgba(200,163,74,0.35);
  outline-offset: 10px;
  position: relative;
}
.definition-panel h2.term {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  margin: 0 0 8px;
  color: #fff;
  font-style: italic;
}
.definition-panel .ipa {
  color: var(--gold-bright);
  font-style: italic;
  margin-bottom: 22px;
  font-size: 0.95rem;
  font-family: "Cormorant Garamond", Georgia, serif;
}
.definition-panel .def {
  max-width: 680px;
  margin: 0 auto 16px;
  font-size: 1.2rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
}
.definition-panel .aside {
  max-width: 640px;
  margin: 0 auto;
  color: #d9ddd5;
  font-size: 0.92rem;
}

.pillars {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  text-align: left;
}
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }
.pillars .pillar {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(200,163,74,0.25);
  border-radius: 4px;
  padding: 14px 16px;
}
.pillars .pillar strong { color: var(--gold-bright); display: block; margin-bottom: 4px; font-size: 0.88rem; font-family: "Cormorant Garamond", Georgia, serif; }
.pillars .pillar span { font-size: 0.82rem; color: #d9ddd5; }

/* ---------- Discussion / channels ---------- */

.channel-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 26px;
}
@media (max-width: 800px) { .channel-layout { grid-template-columns: 1fr; } }

.channel-list { display: flex; flex-direction: column; gap: 6px; }
.channel-btn {
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: "Inter", Arial, sans-serif;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.channel-btn strong { display: block; font-size: 0.92rem; color: var(--ink); font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; }
.channel-btn span { font-size: 0.74rem; color: var(--ink-soft); }
.channel-btn.active {
  border-color: var(--gold);
  background: rgba(200,163,74,0.10);
  box-shadow: 0 2px 8px rgba(200,163,74,0.16);
}
.channel-btn:hover { border-color: var(--gold); }

.channel-title { font-size: 1.6rem; margin-bottom: 2px; }
.channel-desc { color: var(--ink-soft); margin-bottom: 20px; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.05rem; }

.post {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.post .meta {
  font-size: 0.76rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.post .meta .name { font-weight: 700; color: var(--ink); }
.post .body { font-size: 0.96rem; white-space: pre-wrap; }
.post .attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  background: var(--parchment-dark);
  border-radius: 4px;
  font-size: 0.8rem;
}

.empty-state {
  color: var(--ink-soft);
  font-style: italic;
  padding: 20px 0;
  font-family: "Cormorant Garamond", Georgia, serif;
}

/* ---------- Resource list ---------- */

.resource-item {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.resource-item:last-child { border-bottom: none; }
.resource-item h4 { margin: 0 0 3px; font-size: 1.05rem; font-family: "Cormorant Garamond", Georgia, serif; }
.resource-item .meta { font-size: 0.78rem; color: var(--ink-soft); }

/* ---------- Gallery (contest) ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.gallery .entry {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery .entry img { width: 100%; height: 160px; object-fit: cover; display: block; background: var(--parchment-dark); }
.gallery .entry .info { padding: 12px 14px; }
.gallery .entry .info h4 { margin: 0 0 2px; font-size: 0.98rem; font-family: "Cormorant Garamond", Georgia, serif; }
.gallery .entry .info p { margin: 0; font-size: 0.76rem; color: var(--ink-soft); }

.status-banner {
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}
.status-banner.show { display: block; }
.status-banner.ok { background: rgba(76,90,77,0.14); border: 1px solid var(--olive); color: var(--olive); }
.status-banner.err { background: rgba(109,41,50,0.10); border: 1px solid var(--burgundy); color: var(--burgundy); }

/* ---------- Video embed (resources page) ---------- */

.video-embed {
  max-width: 860px;
  margin: 0 auto 34px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--line);
}

/* ---------- Side nav (resources page) ---------- */

.side-nav {
  position: fixed;
  top: 170px;
  left: 24px;
  width: 160px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 20;
}
.side-nav .side-link {
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--line);
  line-height: 1.3;
}
.side-nav .side-link:hover {
  color: var(--ink);
  text-decoration: none;
  border-left-color: var(--gold-dim);
}
.side-nav .side-link.active {
  color: var(--charcoal);
  border-left-color: var(--gold);
}
/* On resources page, sections that share the sidebar reserve room for it
   directly in their own padding, so the sidebar reliably fits on laptop
   screens instead of only very wide monitors. */
.has-sidebar .wrap {
  max-width: calc(var(--max-width) + 190px);
  padding-left: 190px;
}

@media (max-width: 1000px) {
  .side-nav { display: none; }
  .has-sidebar .wrap {
    max-width: var(--max-width);
    padding-left: 28px;
  }
}

.mode-flag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--terracotta);
  border: 1px solid var(--terracotta);
  border-radius: 999px;
  padding: 2px 10px;
  display: inline-block;
  margin-bottom: 14px;
}
