:root {
  --bg: #f6f2ef;
  --surface: #ffffff;
  --surface-alt: #f1ebe5;
  --text: #111217;
  --muted: #636771;
  --border: rgba(17, 18, 23, 0.1);
  --shadow: 0 20px 50px rgba(17, 18, 23, 0.08);
  --accent: #f56e1d;
  --accent-dark: #d34d0d;
  --max: 1240px;
  --radius: 26px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(11, 13, 17, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: #fff;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 1.08rem;
}

.brand-text small {
  font-size: 0.92rem;
  opacity: 0.82;
}

.ghost-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.hero {
  padding: 4rem 0 2.2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.46rem 0.9rem;
  border-radius: 999px;
  font-size: 0.92rem;
  margin-bottom: 1rem;
  background: rgba(245, 110, 29, 0.08);
  color: var(--accent-dark);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 1.02;
}

.hero p {
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.05rem;
  margin: 1rem 0 0;
}

.media-section {
  padding: 0 0 4rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

.media-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.media-thumb-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f2f2f2;
}

.media-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f2f2f2;
  padding: 0.35rem;
}

.media-card.is-portrait .media-thumb {
  aspect-ratio: 0.82 / 1;
}

.media-card.is-landscape .media-thumb {
  aspect-ratio: 1.2 / 1;
}

.media-card.is-square .media-thumb {
  aspect-ratio: 1 / 1;
}

.media-card-content {
  padding: 1rem 1rem 1.1rem;
}

.media-card-content h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.media-card-content p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.media-card-meta {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.empty-state {
  padding: 2rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px dashed rgba(17, 18, 23, 0.16);
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 16px 32px rgba(211, 77, 13, 0.24);
}

.btn-secondary {
  color: var(--text);
  background: rgba(17, 18, 23, 0.08);
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.media-lightbox[hidden] {
  display: none;
}

.media-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 13, 17, 0.82);
}

.media-lightbox-dialog {
  position: relative;
  z-index: 2;
  width: min(96vw, 1500px);
  max-height: 94vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 1rem;
}

.media-preview-wrap {
  min-height: 0;
  display: grid;
  place-items: center;
}

.media-preview-image {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  background: #fff;
}

.media-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 18, 23, 0.08);
}

.media-preview-text {
  min-width: 0;
  flex: 1 1 auto;
}

.media-preview-text h3 {
  margin: 0;
  font-size: 1.15rem;
}

.media-preview-text p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.media-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.lightbox-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

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

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

  .media-preview-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .media-preview-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .media-preview-actions .btn {
    flex: 1 1 calc(50% - 0.75rem);
  }
}

@media (max-width: 580px) {
  .container {
    width: min(calc(100% - 1.2rem), var(--max));
  }

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

  .hero {
    padding: 3rem 0 1.8rem;
  }

  .media-preview-image {
    max-height: 66vh;
  }

  .media-preview-actions .btn {
    width: 100%;
    flex: 1 1 100%;
  }
}
