@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --gold: #ffd21f;
  --gold-soft: #ffe68a;
  --red: #d61f26;
  --ink: #050505;
  --charcoal: #10100f;
  --smoke: #d8d2c4;
  --muted: #9d9688;
  --line: rgba(255, 210, 31, 0.24);
  --panel: rgba(9, 9, 8, 0.78);
  --panel-solid: #11110f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-body {
  min-height: 100vh;
  margin: 0;
  color: var(--smoke);
  background:
    linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.78)),
    url("../backgrounds/background1.jpg") center / cover fixed,
    #000;
  font-family: Inter, Arial, sans-serif;
  letter-spacing: 0;
}

body.site-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 75%);
}

a {
  color: inherit;
}

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

.brand-font {
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.62));
}

.brand-mark__title {
  display: block;
  color: var(--gold);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1;
}

.brand-mark__sub {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--smoke);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(255, 210, 31, 0.13);
  color: var(--gold);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--gold);
  background: rgba(255, 210, 31, 0.08);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-nav.is-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav.is-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-nav.is-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-accordion {
  display: none;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: clamp(44px, 7vw, 88px) 0;
}

.section--tight {
  padding: clamp(28px, 5vw, 52px) 0;
}

.eyebrow {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-title,
.section-title {
  margin: 0;
  color: var(--gold);
  font-family: Cinzel, Georgia, serif;
  font-weight: 800;
  line-height: 1.05;
}

.page-title {
  max-width: 920px;
  font-size: clamp(2.35rem, 6vw, 5rem);
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 3.6rem);
}

.lead {
  max-width: 760px;
  color: #eee5d4;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.72;
}

.hero {
  position: relative;
  min-height: calc(88vh - 74px);
  display: flex;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.55) 48%, rgba(0, 0, 0, 0.76) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, transparent 42%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 52px;
}

.hero__logo {
  width: clamp(84px, 10vw, 132px);
  margin-bottom: 18px;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.7));
}

.hero__actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  color: #080806;
  background: var(--gold);
}

.button--ghost {
  color: var(--gold);
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.5);
}

.button--red {
  color: #fff;
  background: var(--red);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 24px;
  background: rgba(9, 9, 8, 0.9);
}

.stat strong {
  display: block;
  color: var(--gold);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.panel,
.feature,
.media-card,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feature {
  padding: 24px;
}

.feature h3 {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: Cinzel, Georgia, serif;
  font-size: 1.2rem;
}

.feature p {
  margin: 0;
  color: var(--smoke);
  line-height: 1.65;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
}

.image-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
  box-shadow: var(--shadow);
}

.image-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 210, 31, 0.2);
  border-radius: 8px;
  background: #050505;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 240ms ease;
}

.gallery-item:hover img {
  transform: scale(1.035);
}

.gallery-item--ride img {
  aspect-ratio: 16 / 10;
}

.delete-form {
  position: absolute;
  top: 10px;
  right: 10px;
}

.admin-delete,
.admin-section {
  display: none;
}

.show-admin {
  display: block;
}

.content-panel {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 7, 6, 0.82);
  line-height: 1.78;
}

.content-panel h3,
.content-panel strong {
  color: var(--gold);
}

.timeline {
  display: grid;
  gap: 20px;
}

.timeline-section {
  padding: clamp(20px, 4vw, 32px);
  border-left: 4px solid var(--gold);
  background: rgba(13, 13, 11, 0.82);
}

.timeline-section h3 {
  margin: 0 0 12px;
  color: var(--gold);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
}

.memorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.memorial-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
}

.memorial-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: saturate(0.88);
}

.memorial-card__body {
  padding: 14px;
}

.memorial-card__body strong {
  color: var(--gold);
}

.form-panel {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 38px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  color: var(--gold-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 210, 31, 0.25);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  font: inherit;
}

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.78);
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  width: min(430px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
}

.floating-admin {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.88);
}

.site-footer__inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.site-footer strong {
  color: var(--gold);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

.site-footer__links a {
  color: var(--smoke);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--gold);
}

@media (max-width: 900px) {
  .site-header__inner {
    min-height: 68px;
  }

  .site-nav__links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-accordion {
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    border-bottom: 1px solid transparent;
    background: rgba(0, 0, 0, 0.96);
    transition: grid-template-rows 220ms ease, border-color 220ms ease;
  }

  .mobile-accordion.is-open {
    grid-template-rows: 1fr;
    border-color: var(--line);
  }

  .mobile-accordion__inner {
    min-height: 0;
    width: min(100%, 560px);
    margin: 0 auto;
    padding: 10px 16px 18px;
  }

  .mobile-accordion__group {
    border-bottom: 1px solid rgba(255, 210, 31, 0.16);
  }

  .mobile-accordion__trigger {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    padding: 0;
    color: var(--gold);
    background: transparent;
    font: inherit;
    font-size: 1rem;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
  }

  .mobile-accordion__chevron {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: transform 180ms ease;
  }

  .mobile-accordion__group.is-open .mobile-accordion__chevron {
    transform: rotate(45deg);
  }

  .mobile-accordion__panel {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 200ms ease;
  }

  .mobile-accordion__group.is-open .mobile-accordion__panel {
    grid-template-rows: 1fr;
  }

  .mobile-accordion__panel > a {
    min-height: 48px;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 0 14px;
    border: 1px solid rgba(255, 210, 31, 0.16);
    border-radius: 6px;
    color: var(--smoke);
    background: rgba(255, 255, 255, 0.035);
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-accordion__panel > a.is-active {
    color: #000;
    background: var(--gold);
  }

  .hero {
    min-height: 82vh;
  }

  .split,
  .feature-grid,
  .stat-strip,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .site-footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .site-header__inner {
    width: min(100% - 20px, 1180px);
  }

  .brand-mark {
    gap: 10px;
  }

  .brand-mark img {
    width: 48px;
    height: 48px;
  }

  .brand-mark__title {
    font-size: 1rem;
  }

  .brand-mark__sub {
    font-size: 0.66rem;
  }

  .hero__content {
    padding-bottom: 48px;
  }

  .page-title {
    font-size: clamp(2rem, 15vw, 3.4rem);
  }

  .button {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
