:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #5c6268;
  --line: #dfe5e8;
  --paper: #f7faf9;
  --white: #ffffff;
  --coral: #ff5a4f;
  --cyan: #04a8bf;
  --lime: #b8e94b;
  --charcoal: #20262b;
  --shadow: 0 24px 70px rgba(20, 30, 34, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(247, 250, 249, 0.84);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--charcoal);
  font-size: 13px;
}

.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 66px);
  padding: clamp(36px, 6vw, 76px) clamp(18px, 5vw, 72px) 38px;
  background:
    linear-gradient(120deg, rgba(255, 90, 79, 0.13), transparent 34%),
    linear-gradient(310deg, rgba(184, 233, 75, 0.18), transparent 36%),
    var(--paper);
}

.hero-copy {
  min-width: 0;
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: 0;
  max-width: 100%;
}

h1 span {
  display: block;
}

.lead {
  max-width: 570px;
  margin: 24px 0 0;
  color: #3d4449;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}

.upload-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 620px;
  margin: 34px 0 0;
}

#photoInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-target,
.secondary-button {
  min-height: 66px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
}

.upload-target {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: var(--white);
  background: var(--charcoal);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.upload-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.upload-target small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
}

.upload-target > span:last-child {
  min-width: 0;
}

.secondary-button {
  padding: 0 20px;
  color: var(--ink);
  background: var(--lime);
  cursor: pointer;
}

.secondary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.analysis-panel {
  display: grid;
  gap: 10px;
  max-width: 620px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.analysis-panel strong {
  color: #283137;
  font-size: 14px;
  line-height: 1.45;
}

.analysis-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analysis-signals span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(4, 168, 191, 0.1);
  color: #02798a;
  font-size: 12px;
  font-weight: 900;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.trust-row span,
.platforms span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  padding: 8px 11px;
  color: #394148;
  font-size: 13px;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  min-width: 0;
  min-height: 580px;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: min(68vh, 680px);
  min-height: 480px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.result-card {
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.live-card {
  position: absolute;
  right: clamp(12px, 4vw, 44px);
  bottom: 24px;
  width: min(410px, calc(100% - 24px));
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.live-card h2 {
  margin: 16px 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.live-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.result-preview,
.flow-section,
.privacy-section {
  padding: clamp(54px, 7vw, 88px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 760px;
}

.section-heading h2,
.flow-copy h2,
.privacy-section h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.persona-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.persona-card h3 {
  margin: 28px 0 12px;
  font-size: 27px;
}

.persona-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.badge.rare {
  background: rgba(4, 168, 191, 0.14);
  color: #02798a;
}

.badge.normal {
  background: rgba(184, 233, 75, 0.32);
  color: #536b0b;
}

.badge.epic {
  background: rgba(255, 90, 79, 0.14);
  color: #b92b23;
}

.flow-section {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(360px, 1fr);
  gap: 30px;
  align-items: start;
  background: var(--charcoal);
  color: var(--white);
}

.flow-section .eyebrow {
  color: var(--lime);
}

.flow-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-list li {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  min-height: 70px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 20px;
  font-weight: 850;
}

.flow-list span {
  color: var(--lime);
  font-size: 14px;
}

.privacy-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 32px;
  align-items: start;
}

.privacy-section p:not(.eyebrow) {
  margin: 0;
  color: #40484d;
  font-size: 18px;
  line-height: 1.75;
  font-weight: 700;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero,
  .flow-section,
  .privacy-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 500px;
  }

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

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-copy,
  .upload-panel,
  .analysis-panel,
  .trust-row,
  .hero-visual {
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
  }

  h1 {
    max-width: calc(100vw - 48px);
    font-size: 32px;
    line-height: 1.14;
    word-break: keep-all;
  }

  .lead {
    max-width: calc(100vw - 48px);
    font-size: 16px;
    word-break: break-all;
  }

  .upload-target {
    align-items: flex-start;
    width: 100%;
  }

  .upload-target strong,
  .upload-target small {
    white-space: normal;
    word-break: break-all;
  }

  .upload-panel {
    grid-template-columns: 1fr;
  }

  .secondary-button {
    width: 100%;
  }

  .trust-row {
    display: grid;
    grid-template-columns: max-content max-content;
  }

  .hero-visual {
    min-height: 430px;
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
  }

  .hero-visual img {
    height: 430px;
    min-height: 430px;
  }

  .live-card {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    padding: 18px;
  }

  .live-card h2 {
    font-size: 28px;
  }

  .card-topline {
    display: grid;
    gap: 4px;
  }

  .card-topline span:last-child {
    justify-self: start;
  }

  .live-card p {
    word-break: break-all;
  }

  .platforms span {
    word-break: keep-all;
  }

  .trust-row span {
    max-width: 100%;
    white-space: normal;
  }

  .footer {
    flex-direction: column;
  }
}
