:root {
  --bg: #f3efe7;
  --panel: rgba(255, 252, 247, 0.9);
  --panel-strong: #fffdf8;
  --text: #1f1b16;
  --muted: #65584b;
  --line: rgba(88, 67, 45, 0.16);
  --accent: #b35c2e;
  --accent-dark: #8f4219;
  --shadow: 0 20px 45px rgba(56, 38, 18, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 197, 129, 0.36), transparent 32%),
    linear-gradient(180deg, #f8f3ea 0%, #efe5d6 48%, #efeadd 100%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95em;
}

.hero {
  padding: 32px 20px 12px;
}

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

.hero__content {
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero__top {
  display: flex;
  justify-content: flex-start;
}

.hero__main {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 0.95;
}

.hero__text {
  max-width: 640px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  min-width: 220px;
}

.hero__meta {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-weight: 600;
}

.gallery-menu {
  position: relative;
}

.gallery-menu[open] .gallery-menu__toggle {
  background: rgba(179, 92, 46, 0.12);
}

.gallery-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.gallery-menu__toggle::-webkit-details-marker {
  display: none;
}

.gallery-menu__icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-menu__icon span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.gallery-menu__panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 5;
  display: grid;
  gap: 10px;
  width: min(320px, calc(100vw - 40px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.gallery-menu__empty {
  margin: 0;
  color: var(--muted);
}

.gallery-menu__link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.gallery-menu__link small {
  color: var(--muted);
}

.gallery-menu__link.is-active {
  border-color: rgba(179, 92, 46, 0.3);
  background: rgba(179, 92, 46, 0.09);
}

.page {
  padding: 18px 0 36px;
}

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

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.card__media {
  display: block;
  background: #e4d5c2;
}

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

.card:hover .card__media img {
  transform: scale(1.03);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.card__body h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
  text-transform: capitalize;
}

.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease;
}

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

.button--primary,
.button--secondary {
  background: var(--accent);
  color: #fff;
}

.button--primary:hover,
.button--secondary:hover {
  background: var(--accent-dark);
}

.button--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.button--ghost:hover {
  background: rgba(179, 92, 46, 0.08);
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.72);
}

.empty-state h2 {
  margin: 0 0 12px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__main {
    flex-direction: column;
  }

  .hero__actions {
    align-items: flex-start;
    min-width: auto;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 18px 12px 8px;
  }

  .hero__content,
  .page {
    width: min(100% - 16px, 1180px);
  }

  .hero__content {
    padding: 20px;
    border-radius: 24px;
  }

  .gallery-menu__panel {
    width: min(100vw - 32px, 360px);
  }

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

  .card__media img {
    aspect-ratio: auto;
    max-height: none;
    object-fit: contain;
    background: #f5ede2;
  }

  .card__actions {
    flex-direction: row;
  }

  .button {
    width: 100%;
  }
}
