:root {
  --red: #e30613;
  --deep-red: #c51635;
  --cream: #f5ecdc;
  --ink: #222222;
  --muted: #686563;
  --blue: #5b95a6;
  --teal: #00737f;
  --green: #d2dcb4;
  --line: #dfd9d0;
  --paper: #fffdf9;
  --shadow: 0 18px 60px rgba(43, 32, 28, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 30%, rgba(210, 220, 180, 0.18), transparent 28rem),
    linear-gradient(180deg, #fff 0%, var(--paper) 35%, #f6f2ec 100%);
  font-family: "DM Sans", Arial, sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.shell {
  width: min(1460px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 530px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(115deg, rgba(92, 5, 25, 0.98), rgba(197, 22, 53, 0.94)),
    #c51635;
}

.hero::after {
  position: absolute;
  right: -10%;
  bottom: -44%;
  width: 72%;
  height: 72%;
  content: "";
  border-radius: 50%;
  background: var(--cream);
  transform: rotate(-8deg);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 90px 0 86px;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1 {
  max-width: 920px;
  margin: 28px 0 18px;
  font-size: clamp(48px, 7vw, 94px);
  line-height: 0.93;
  letter-spacing: -0.065em;
}

h1 span {
  color: var(--green);
}

.hero__lede {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.55;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.stat {
  min-width: 144px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.stat strong {
  display: block;
  font-size: 28px;
}

.stat span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}

.hero__orb--one {
  top: -70px;
  right: 12%;
  width: 240px;
  height: 240px;
  background: rgba(212, 117, 48, 0.42);
}

.hero__orb--two {
  right: 30%;
  bottom: -90px;
  width: 190px;
  height: 190px;
  background: rgba(91, 149, 166, 0.34);
}

.toolbar {
  position: sticky;
  z-index: 20;
  top: 14px;
  display: grid;
  grid-template-columns: 190px 170px minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin: -34px 0 28px;
  padding: 18px;
  border: 1px solid rgba(223, 217, 208, 0.8);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.filter-group label,
.search span,
.review label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select,
.search input,
.review input,
.review textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

select,
.search input,
.review input {
  min-height: 44px;
  padding: 0 12px;
}

.review textarea {
  padding: 11px 12px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 115, 127, 0.12);
}

.source-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 11px;
  color: white;
  background: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.legend {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  margin-bottom: 34px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 14px;
}

.legend strong {
  margin-right: 8px;
  color: var(--ink);
}

.legend__model {
  text-align: right;
}

.legend__model a {
  color: var(--deep-red);
}

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

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 45px rgba(43, 32, 28, 0.07);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.card:hover {
  box-shadow: 0 22px 64px rgba(43, 32, 28, 0.12);
  transform: translateY(-3px);
}

.card[data-status="approved"] {
  border-color: rgba(0, 115, 127, 0.55);
}

.card[data-status="changes"] {
  border-color: rgba(227, 6, 19, 0.52);
}

.card__visual {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--cream);
}

.card__visual img {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  object-fit: cover;
  transition: transform 240ms ease;
}

.card:hover .card__visual img {
  transform: scale(1.012);
}

.card__visual--copy {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  background:
    radial-gradient(circle at 80% 18%, rgba(212, 117, 48, 0.48), transparent 9rem),
    linear-gradient(145deg, var(--teal), #004951 68%);
  color: white;
}

.copy-panel {
  display: contents;
}

.copy-badge {
  align-self: flex-start;
  margin-bottom: auto;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.copy-headline {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.copy-support {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.45;
}

.card__body {
  padding: 22px;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f1eee9;
  color: #55514d;
  font-size: 11px;
  font-weight: 700;
}

.chip--priority {
  color: #8f0b24;
  background: #fde8ec;
}

.card__title {
  margin: 16px 0 8px;
  font-size: 24px;
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.card__support {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.52;
}

.card__cta {
  display: inline-flex;
  margin-top: 14px;
  padding: 8px 11px;
  border-radius: 8px;
  color: #8f0b24;
  background: #fde8ec;
  font-size: 12px;
  font-weight: 700;
}

.trace {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trace summary {
  padding: 13px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.trace p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.trace__files {
  margin-bottom: 14px;
  color: var(--teal);
  font-size: 12px;
}

.review {
  margin-top: 18px;
}

.review__status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.review__status button {
  min-height: 40px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review__status button.is-active[data-status="approved"] {
  border-color: var(--teal);
  color: white;
  background: var(--teal);
}

.review__status button.is-active[data-status="changes"] {
  border-color: var(--deep-red);
  color: white;
  background: var(--deep-red);
}

.review__status button.is-active[data-status="pending"] {
  border-color: #8a8178;
  color: white;
  background: #8a8178;
}

.review__footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.save {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  font-weight: 700;
}

.save:disabled {
  cursor: wait;
  opacity: 0.6;
}

.review__message {
  min-height: 18px;
  margin-top: 8px;
  color: var(--teal);
  font-size: 12px;
}

.empty {
  margin: 80px 0;
  text-align: center;
  color: var(--muted);
}

.image-dialog {
  width: min(92vw, 1040px);
  max-width: none;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 20px;
  background: transparent;
}

.image-dialog::backdrop {
  background: rgba(20, 16, 14, 0.86);
  backdrop-filter: blur(8px);
}

.image-dialog img {
  display: block;
  width: 100%;
  max-height: 84vh;
  border-radius: 18px;
  object-fit: contain;
}

.image-dialog__close {
  position: absolute;
  z-index: 2;
  top: -18px;
  right: -18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-size: 28px;
}

#dialogCaption {
  padding: 12px 0 0;
  color: white;
  text-align: center;
}

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

  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 24px, 1460px);
  }

  .hero {
    min-height: 500px;
  }

  .hero__content {
    padding-top: 64px;
  }

  .hero::after {
    right: -40%;
    width: 110%;
  }

  .toolbar {
    position: relative;
    top: auto;
    grid-template-columns: 1fr;
  }

  .legend {
    align-items: flex-start;
    flex-direction: column;
  }

  .legend__model {
    text-align: left;
  }

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

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