:root {
  --red: #b51d31;
  --red-dark: #7d1020;
  --green: #167447;
  --green-dark: #0d5031;
  --white: #ffffff;
  --cream: #f7f7f1;
  --ink: #26332d;
  --muted: #66746d;
  --shadow: 0 18px 45px rgba(28, 51, 39, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

.topbar {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 82px;
  display: flex;
  align-items: center;
  padding: 0 4vw;
  color: var(--white);
  background: rgba(125, 16, 32, .96);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
  transition: transform .45s ease, background .3s ease;
}
.topbar.nav-hidden { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.brand-mark {
  width: 58px; height: 58px; display: block; flex: 0 0 58px;
  object-fit: contain; border-radius: 50%; background: var(--white);
  padding: 2px;
}
.brand strong { display: block; font-family: Georgia, serif; letter-spacing: .06em; }
.brand span { font-size: 11px; opacity: .85; }
.nav-links { display: flex; gap: 8px; margin-left: auto; }
.nav-links a {
  color: var(--white); text-decoration: none; padding: 10px 14px;
  border-radius: 999px; font-weight: 700; font-size: .95rem;
  transition: background .25s, transform .25s;
}
.nav-links a:hover, .nav-links a.active { background: var(--green); transform: translateY(-2px); }
.menu-button { display: none; margin-left: auto; border: 0; border-radius: 10px; padding: 8px 12px; color: white; background: var(--green); font-size: 20px; }
.nav-toggle {
  position: fixed; z-index: 101; right: 18px; bottom: 18px;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  color: white; background: var(--green); box-shadow: var(--shadow);
  font-size: 20px; cursor: pointer;
}

.hero {
  min-height: 78vh;
  margin-top: 82px;
  display: grid;
  align-items: center;
  grid-template-columns: 1.15fr .85fr;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(115deg, var(--red-dark), var(--red) 58%, var(--green));
}
.hero-content { padding: 8vw 6vw; position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-weight: 800; font-size: .78rem; color: #c8edcf; }
.hero h1 { max-width: 760px; margin: 12px 0; font-family: Georgia, serif; font-size: clamp(3rem, 7vw, 6.8rem); line-height: .92; }
.hero p { max-width: 650px; font-size: 1.18rem; }
.hero-art { min-height: 78vh; position: relative; }
.hero-art:before {
  content: ""; position: absolute; inset: 10% -10% -10% 0;
  border-radius: 50% 0 0 50%; background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.25);
  transform: rotate(-8deg);
}
.hero-art img { position: absolute; inset: 12% 8%; width: 84%; height: 76%; object-fit: cover; border-radius: 180px 180px 24px 24px; border: 6px solid rgba(255,255,255,.9); box-shadow: var(--shadow); }

main { padding-top: 82px; }
main:not(.home) { min-height: 100vh; }
.page-header {
  padding: 74px 7vw 58px;
  text-align: center;
  color: white;
  background: linear-gradient(120deg, var(--red-dark), var(--red) 70%, var(--green));
}
.page-header h1 { margin: 8px 0 0; font-family: Georgia, serif; font-size: clamp(2.5rem, 5vw, 4.7rem); line-height: 1; }
.page-header p { max-width: 650px; margin: 18px auto 0; opacity: .88; }

.section { width: min(1180px, 88vw); margin: 0 auto; padding: 80px 0; }
.definition-card {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px;
  padding: 44px; border-radius: 28px; background: white; box-shadow: var(--shadow);
}
.definition-card h2, .content-title { color: var(--red); font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.05; }
.definition-card p { font-size: 1.08rem; }
.definition-mark { text-align: center; font-family: Georgia, serif; font-size: 7rem; color: var(--green); }

.reveal { opacity: 0; transform: translateY(55px) scale(.985); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.person-card { min-height: 250px; padding: 28px; border-radius: 22px; background: white; box-shadow: var(--shadow); border-top: 5px solid var(--green); }
.person-card:nth-child(even) { border-top-color: var(--red); }
.person-card h2 { margin: 0 0 4px; font-family: Georgia, serif; color: var(--green-dark); }
.role { color: var(--red); font-weight: 800; font-size: .86rem; text-transform: uppercase; letter-spacing: .08em; }
.description-box { margin-top: 18px; color: var(--muted); white-space: pre-wrap; }
.add-button, .save-button, .gallery-button {
  margin-top: 16px; border: 0; border-radius: 999px; padding: 10px 16px;
  color: white; background: var(--green); font-weight: 800; cursor: pointer;
}
.add-button:disabled { cursor: not-allowed; opacity: .55; }
.inline-form { display: none; margin-top: 18px; }
.inline-form.open { display: block; }
textarea, input {
  width: 100%; border: 1px solid #ccd6d0; border-radius: 12px;
  padding: 12px; font: inherit; resize: vertical;
}
.stages-grid { display: grid; gap: 28px; }
.stage-card { display: grid; grid-template-columns: 1fr 1.25fr; overflow: hidden; background: white; border-radius: 24px; box-shadow: var(--shadow); }
.stage-image { min-height: 310px; background: linear-gradient(135deg, var(--red), var(--green)); }
.stage-image img { width: 100%; height: 100%; object-fit: cover; }
.stage-content { padding: 30px; }
.stage-content h2 { margin: 0 0 8px; color: var(--green-dark); font-family: Georgia, serif; }
.stage-number { color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; }
.stage-description { margin-top: 16px; color: var(--muted); white-space: pre-wrap; }
.stage-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.gallery-grid { columns: 3 280px; column-gap: 18px; }
.gallery-item { break-inside: avoid; margin: 0 0 18px; overflow: hidden; border-radius: 18px; background: white; box-shadow: var(--shadow); cursor: zoom-in; }
.gallery-item img { display: block; width: 100%; transition: transform .5s ease, filter .4s ease; }
.gallery-item:hover img { transform: scale(1.035); filter: saturate(1.08); }
.gallery-item p { margin: 0; padding: 12px; font-size: .82rem; color: var(--muted); }

.modal {
  position: fixed; z-index: 200; inset: 0; display: none;
  place-items: center; padding: 20px; background: rgba(15, 25, 20, .82);
}
.modal.open { display: grid; }
.modal-panel { width: min(1000px, 94vw); max-height: 88vh; overflow: auto; padding: 24px; border-radius: 22px; background: var(--cream); }
.lightbox-panel { width: min(1100px, 92vw); padding: 18px; }
.lightbox-panel img { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; border-radius: 14px; object-fit: contain; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head button { border: 0; width: 38px; height: 38px; border-radius: 50%; color: white; background: var(--red); font-size: 20px; cursor: pointer; }
.image-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.picker-image { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: pointer; border: 4px solid transparent; }
.picker-image:hover { border-color: var(--green); }

footer { padding: 35px; text-align: center; color: white; background: var(--green-dark); }

@media (max-width: 850px) {
  .menu-button { display: block; }
  .nav-links { position: absolute; top: 82px; left: 0; width: 100%; display: none; flex-direction: column; padding: 12px 4vw 20px; background: var(--red-dark); }
  .nav-links.open { display: flex; animation: drop .25s ease; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 360px; }
  .definition-card, .stage-card { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .image-picker { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .brand span { display: none; }
  .team-grid { grid-template-columns: 1fr; }
  .section { width: 92vw; }
  .definition-card { padding: 28px 22px; }
  .gallery-grid { columns: 1; }
  .image-picker { grid-template-columns: repeat(2, 1fr); }
}
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } }
