:root {
  /* Brand theme: change these first when updating the site's look. */
  --color-text: #17171d;
  --color-muted: #62606d;
  --color-page: #fffdf8;
  --color-surface: #ffffff;
  --color-border: #ddd8ce;
  --color-accent: #f1b84b;
  --color-accent-alt: #118c86;
  --color-accent-pop: #b83272;
  --color-accent-soft: #3c8f4e;
  --color-dark: #111116;
  --color-danger: #7c2135;
  --color-error: #9b1e32;
  --color-light: #fffdf8;
  --color-white: #ffffff;

  /* Image theme: swap this path or edit it in the admin panel. */
  --hero-image: url("assets/nola-pups-hero.png");

  /* Derived UI tokens. Usually leave these alone. */
  --header-bg: rgba(255, 253, 248, 0.88);
  --header-border: rgba(221, 216, 206, 0.8);
  --hero-overlay: linear-gradient(90deg, rgba(12, 12, 17, 0.88), rgba(12, 12, 17, 0.56) 43%, rgba(12, 12, 17, 0.18));
  --hero-overlay-mobile: linear-gradient(180deg, rgba(12, 12, 17, 0.52), rgba(12, 12, 17, 0.9));
  --copy-on-hero: rgba(255, 253, 248, 0.88);
  --button-secondary-bg: rgba(255, 255, 255, 0.12);
  --line-on-dark: rgba(255, 255, 255, 0.18);
  --muted-on-dark: rgba(255, 255, 255, 0.7);
  --footer-muted: rgba(255, 255, 255, 0.66);
  --section-alt: #f4efe4;
  --shadow-soft: 0 12px 36px rgba(17, 17, 22, 0.06);
  --shadow-dialog: 0 24px 70px rgba(17, 17, 22, 0.16);
  --dialog-backdrop: rgba(17, 17, 22, 0.62);

  /* Layout tokens. */
  --page-pad: clamp(18px, 5vw, 64px);
  --header-pad: clamp(18px, 4vw, 48px);
  --section-pad-y: clamp(56px, 8vw, 96px);
  --radius-none: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-text);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  min-height: 72px;
  padding: 12px var(--header-pad);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

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

.brand-mark {
  align-items: center;
  background: var(--color-text);
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  display: grid;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--color-muted);
  font-size: 0.78rem;
}

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

.site-nav a,
.text-button {
  background: transparent;
  border: 0;
  color: var(--color-text);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
}

.nav-toggle {
  background: transparent;
  border: 0;
  display: none;
  padding: 8px;
  position: relative;
}

.nav-toggle span {
  background: var(--color-text);
  display: block;
  height: 2px;
  margin: 5px 0;
  transition: opacity 180ms ease, transform 220ms ease;
  width: 24px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  align-items: end;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  display: grid;
  min-height: min(760px, 96vh);
  overflow: hidden;
  padding: 120px var(--page-pad) 48px;
  position: relative;
}

.hero-overlay {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.hero-overlay {
  background: var(--hero-overlay);
}

.hero-content {
  color: var(--color-light);
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.kicker,
.section-label {
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.95;
  margin: 0;
  max-width: 820px;
}

.hero p:not(.kicker) {
  color: var(--copy-on-hero);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.55;
  max-width: 660px;
}

.hero-actions,
.file-actions,
.admin-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  align-items: center;
  border: 1px solid var(--color-text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  text-decoration: none;
}

.button.primary {
  background: var(--color-accent);
  color: var(--color-text);
}

.button.secondary {
  background: var(--button-secondary-bg);
  color: inherit;
}

.button.small {
  min-height: 38px;
  padding: 8px 12px;
}

.button.danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: var(--color-white);
}

.button.full {
  width: 100%;
}

.intro-band {
  background: var(--color-dark);
  color: var(--color-white);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.metric {
  border-right: 1px solid var(--line-on-dark);
  padding: 26px var(--page-pad);
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  color: var(--color-accent);
  font-size: clamp(1.4rem, 4vw, 2.35rem);
}

.metric span {
  color: var(--muted-on-dark);
}

.section {
  padding: var(--section-pad-y) var(--page-pad);
}

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

.split {
  display: grid;
  gap: clamp(28px, 6vw, 72px);
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.section h2 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1;
  margin: 0;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.prose {
  color: var(--color-muted);
  font-size: 1.12rem;
  line-height: 1.75;
}

.card-grid,
.resource-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.resource-card,
.event-card,
.join-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  padding: 22px;
}

.info-card {
  border-top: 5px solid var(--color-accent-alt);
}

.info-card:nth-child(2) {
  border-top-color: var(--color-accent-pop);
}

.info-card:nth-child(3) {
  border-top-color: var(--color-accent-soft);
}

.info-card h3,
.resource-card h3,
.event-card h3 {
  margin: 0 0 8px;
}

.info-card p,
.resource-card p,
.event-card p,
.join-panel p {
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0;
}

.event-list {
  display: grid;
  gap: 14px;
}

.event-card {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: 160px minmax(0, 1fr);
}

.event-date {
  background: var(--color-text);
  color: var(--color-white);
  font-weight: 850;
  padding: 14px;
}

.event-date small {
  color: var(--color-accent);
  display: block;
  font-size: 0.82rem;
  margin-top: 4px;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.link-list a,
.resource-card a {
  color: var(--color-accent-alt);
  font-weight: 850;
}

.join-form {
  border-top: 1px solid var(--color-border);
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding-top: 22px;
}

.join-form textarea {
  min-height: 132px;
}

.form-status {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0;
}

.resource-card {
  min-height: 170px;
}

.resource-detail {
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  line-height: 1.6;
  margin-top: 14px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  transition: max-height 260ms ease, opacity 180ms ease, padding-top 220ms ease;
}

.resource-detail.open {
  max-height: 280px;
  opacity: 1;
  padding-top: 14px;
}

.site-footer {
  align-items: center;
  background: var(--color-dark);
  color: var(--color-white);
  display: flex;
  justify-content: space-between;
  padding: 28px var(--page-pad);
}

.site-footer p {
  color: var(--footer-muted);
  margin: 6px 0 0;
}

.admin-dialog {
  border: 0;
  box-shadow: var(--shadow-dialog);
  max-height: min(880px, 92vh);
  max-width: 980px;
  padding: 0;
  width: min(94vw, 980px);
}

.admin-dialog::backdrop {
  background: var(--dialog-backdrop);
}

.dialog-shell {
  margin: 0;
}

.icon-button {
  background: var(--color-text);
  border: 0;
  color: var(--color-white);
  cursor: pointer;
  font-size: 1.5rem;
  height: 40px;
  width: 40px;
}

.close-dialog {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
}

.admin-login,
.admin-panel {
  padding: clamp(24px, 4vw, 42px);
}

.admin-login {
  max-width: 460px;
}

.admin-heading {
  align-items: start;
  display: flex;
  gap: 56px;
  justify-content: space-between;
  padding-right: 54px;
}

.tabs {
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 8px;
  margin: 26px 0;
  overflow-x: auto;
}

.tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 850;
  padding: 12px 8px;
}

.tab.active {
  border-bottom-color: var(--color-accent-pop);
}

.editor-tab {
  display: none;
}

.editor-tab.active {
  display: block;
}

label {
  color: var(--color-muted);
  display: grid;
  font-size: 0.88rem;
  font-weight: 750;
  gap: 7px;
}

input,
textarea {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input[type="color"] {
  min-height: 46px;
  padding: 4px;
}

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

.theme-editor {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0 22px;
}

.image-uploader {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(140px, 240px) minmax(0, 1fr);
  margin: 14px 0 22px;
}

.image-preview {
  aspect-ratio: 16 / 9;
  background-color: var(--color-border);
  background-position: center;
  background-size: cover;
  border: 1px solid var(--color-border);
  width: 100%;
}

.wide {
  grid-column: 1 / -1;
}

.repeat-editor {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.repeat-item {
  border: 1px solid var(--color-border);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.repeat-item .row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-note,
.save-status,
.form-error {
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-error {
  color: var(--color-error);
  min-height: 1.2em;
}

.file-label input {
  display: none;
}

.admin-actions {
  border-top: 1px solid var(--color-border);
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 18px;
}

@media (max-width: 780px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    align-items: stretch;
    background: var(--color-page);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    left: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 16px 18px;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 72px;
    transform: translateY(-8px);
    transition: max-height 260ms ease, opacity 180ms ease, transform 220ms ease;
    visibility: hidden;
  }

  .site-nav.open {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .hero {
    min-height: 91vh;
  }

  .hero-overlay {
    background: var(--hero-overlay-mobile);
  }

  .intro-band,
  .split,
  .card-grid,
  .resource-grid,
  .event-card,
  .form-grid,
  .theme-editor,
  .image-uploader,
  .repeat-item .row {
    grid-template-columns: 1fr;
  }

  .metric {
    border-bottom: 1px solid var(--line-on-dark);
    border-right: 0;
  }

  .section-heading,
  .site-footer,
  .admin-heading {
    align-items: start;
    flex-direction: column;
  }

  .site-footer {
    gap: 20px;
  }
}
