:root {
  color-scheme: light;
  --bg: #f8f4ee;
  --ink: #1d1b19;
  --muted: #5b5248;
  --accent: #d1502a;
  --accent-dark: #8b2f1a;
  --sand: #efe6da;
  --card: #ffffff;
  --line: rgba(29, 27, 25, 0.12);
  --shadow: 0 28px 70px rgba(22, 16, 12, 0.15);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Garamond", "Palatino Linotype", "Book Antiqua", serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

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

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
  opacity: 0.6;
}

.orb--one {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle at 30% 30%, #f2a07f, transparent 70%);
  top: -120px;
  left: -80px;
}

.orb--two {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 30% 30%, #b6b1c9, transparent 70%);
  bottom: -160px;
  right: -120px;
}

.orb--three {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 30% 30%, #f2d18a, transparent 70%);
  top: 42%;
  right: 12%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 8vw;
  background: rgba(248, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand__name {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1rem;
}

.brand__tag {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 20px;
  font-family: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.site-nav__link {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.site-nav__link:hover {
  color: var(--ink);
}

.cta {
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  font-family: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(209, 80, 42, 0.35);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(209, 80, 42, 0.4);
}

.cta--dark {
  background: var(--ink);
  box-shadow: none;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  padding: 80px 8vw 40px;
  position: relative;
  z-index: 1;
}

.hero__copy h1 {
  font-size: clamp(2.4rem, 2vw + 2.4rem, 4rem);
  line-height: 1.05;
  margin: 0 0 20px;
}

.hero__eyebrow {
  font-family: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent-dark);
  margin: 0 0 16px;
}

.hero__lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 540px;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.meta__label {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-family: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
}

.meta__value {
  margin: 8px 0 0;
  font-size: 1rem;
}

.hero__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upload-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.upload-card.is-dragging {
  outline: 2px dashed var(--accent);
  outline-offset: 6px;
}

.upload-card__title {
  font-size: 1.4rem;
  margin: 0 0 10px;
}

.upload-card__desc {
  color: var(--muted);
  margin: 0 0 16px;
}

.ghost {
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  cursor: pointer;
}

.upload-card__hint {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.upload-preview {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--sand);
  min-height: 220px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

#preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.upload-preview.is-visible #preview-image {
  opacity: 1;
}

.upload-preview__mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  background: linear-gradient(145deg, rgba(248, 244, 238, 0.4), rgba(248, 244, 238, 0.8));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.upload-preview.is-visible .upload-preview__mask {
  opacity: 1;
}

.model-status {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--sand);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.how {
  padding: 40px 8vw 20px;
  position: relative;
  z-index: 1;
}

.how h2,
.result h2 {
  font-size: 2.2rem;
  margin-bottom: 18px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.step {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 18px 40px rgba(22, 16, 12, 0.08);
}

.step__num {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-family: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
}

.result {
  padding: 40px 8vw 80px;
  position: relative;
  z-index: 1;
}

.result__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.result-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  box-shadow: var(--shadow);
}

.result-card__image {
  background: var(--sand);
  display: grid;
  place-items: center;
  min-height: 280px;
}

#result-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.result-card.is-visible #result-portrait {
  opacity: 1;
}

.result-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-card__label {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-family: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
}

.result-card__score {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

.result-card__section h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.site-footer {
  padding: 30px 8vw 50px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

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

  .site-nav {
    flex-wrap: wrap;
  }

  .result-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 20px 6vw;
  }

  .hero {
    padding: 60px 6vw 30px;
  }

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

  .how,
  .result,
  .site-footer {
    padding-left: 6vw;
    padding-right: 6vw;
  }
}
