:root {
  --bg: #0c0d0c;
  --panel: #151713;
  --panel-2: #20231d;
  --text: #f3efe5;
  --muted: #b5aa98;
  --line: rgba(243, 239, 229, 0.14);
  --gold: #c59a58;
  --gold-2: #8d6733;
  --green: #59624d;
  --danger: #ffb4a8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 0 clamp(18px, 4vw, 56px);
  background: rgba(12, 13, 12, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  color: var(--gold);
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav a:hover {
  color: var(--text);
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  padding: clamp(54px, 8vw, 110px) clamp(18px, 4vw, 56px);
  overflow: hidden;
  background:
    linear-gradient(0deg, rgba(12, 13, 12, 0.3), rgba(12, 13, 12, 0.3)),
    url("images/hero-exterior.svg") center/cover,
    linear-gradient(110deg, rgba(12, 13, 12, 0.98), rgba(12, 13, 12, 0.72)),
    radial-gradient(circle at 76% 28%, rgba(197, 154, 88, 0.28), transparent 28%),
    linear-gradient(135deg, #11130f, #27251d 45%, #0c0d0c);
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.3rem, 8vw, 8rem);
  font-weight: 500;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  font-weight: 500;
}

.lead,
.tool-copy p,
.intro p,
.quote-band p {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
}

.lead {
  margin-top: 24px;
}

.actions,
.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

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

.button.secondary {
  color: var(--text);
}

.button:hover {
  filter: brightness(1.08);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  filter: grayscale(0.2);
}

.intro,
.tool-shell,
.quote-band {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.8fr);
  gap: 42px;
  border-bottom: 1px solid var(--line);
}

.tool-shell {
  display: grid;
  gap: 34px;
}

.generator {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(320px, 1.14fr);
  gap: 26px;
}

.upload-panel,
.style-grid,
.result-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  padding: 22px;
}

.upload-panel label,
.style-grid legend {
  display: block;
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 900;
  text-transform: uppercase;
}

input[type="file"] {
  width: 100%;
  color: var(--muted);
}

.preview-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 18px;
  min-height: 300px;
  overflow: hidden;
  background: #090a09;
  border: 1px solid var(--line);
}

.preview-frame img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-frame.has-image img {
  display: block;
}

.preview-frame.has-image span {
  display: none;
}

.preview-frame span {
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

.style-grid {
  display: grid;
  gap: 14px;
  margin: 0;
}

.style-card {
  display: grid;
  grid-template-columns: 22px 150px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(12, 13, 12, 0.5);
  cursor: pointer;
}

.style-card:has(input:checked) {
  border-color: var(--gold);
  background: rgba(197, 154, 88, 0.1);
}

.style-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.style-card img {
  width: 150px;
  height: 104px;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: saturate(0.85) contrast(1.05);
}

.style-card span {
  color: var(--muted);
}

.cost-note,
.status {
  color: var(--muted);
}

.loading-panel {
  display: none;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(197, 154, 88, 0.42);
  background: rgba(197, 154, 88, 0.09);
}

.loading-panel.active {
  display: grid;
}

.loading-panel strong {
  display: block;
  margin-bottom: 4px;
}

.loading-panel p {
  margin: 0;
  color: var(--muted);
}

.loader-orbit {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(243, 239, 229, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status.error {
  color: var(--danger);
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.result-card {
  display: grid;
  gap: 14px;
}

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

.comparison figure {
  margin: 0;
}

.comparison figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison img {
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: contain;
  background: #080908;
  border: 1px solid var(--line);
}

.quote-band {
  margin-bottom: 70px;
  padding: clamp(34px, 6vw, 70px);
  background: linear-gradient(130deg, rgba(89, 98, 77, 0.88), rgba(24, 27, 23, 0.96));
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .site-header,
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    padding-block: 16px;
  }

  .intro,
  .generator {
    grid-template-columns: 1fr;
  }

  .style-card {
    grid-template-columns: 22px 112px 1fr;
  }

  .style-card img {
    width: 112px;
    height: 86px;
  }

}

@media (max-width: 560px) {
  .nav {
    gap: 10px;
  }

  .actions,
  .submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .style-card {
    grid-template-columns: 22px 1fr;
  }

  .style-card img {
    grid-column: 1 / -1;
    width: 100%;
    height: 150px;
  }

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

  .button {
    width: 100%;
  }
}
