:root {
  --sand: #f3e9d7;
  --sand-deep: #e8d8bd;
  --ivory: #fff9ef;
  --paper: #fffdf8;
  --espresso: #2a201b;
  --espresso-soft: #493c34;
  --sage: #71836a;
  --sage-deep: #53634e;
  --tomato: #d94b36;
  --tomato-dark: #bd3d2a;
  --line: rgba(42, 32, 27, 0.14);
  --shadow: 0 28px 80px rgba(74, 54, 35, 0.15);
  --radius-lg: 52px;
  --radius-md: 28px;
  --radius-sm: 16px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--espresso);
  background:
    radial-gradient(circle at 20% 5%, rgba(255, 255, 255, 0.65), transparent 30%),
    radial-gradient(circle at 82% 36%, rgba(113, 131, 106, 0.08), transparent 25%),
    var(--sand);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 20;
  opacity: 0.16;
  pointer-events: none;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

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

button,
input {
  font: inherit;
}

button,
a,
input,
label {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 99px;
  background: var(--espresso);
  color: var(--ivory);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.hero,
.process-section,
.why-section,
footer {
  width: min(1440px, calc(100% - 80px));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}

.wordmark-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1.5px solid var(--espresso);
  border-radius: 50% 45% 50% 42%;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.main-nav {
  display: flex;
  gap: 38px;
  font-size: 14px;
  font-weight: 600;
}

.main-nav a,
footer a {
  position: relative;
}

.main-nav a::after,
footer a::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  background: var(--tomato);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
footer a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-cta {
  justify-self: end;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease;
}

.header-cta:hover {
  background: var(--espresso);
  color: var(--ivory);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(600px, 1.15fr);
  gap: clamp(52px, 6vw, 100px);
  align-items: center;
  min-height: calc(100vh - 92px);
  padding: 72px 0 92px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--sage-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 28px;
  height: 1px;
  background: currentColor;
}

.eyebrow.light {
  color: #d8e0d1;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
blockquote {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 650px;
  margin-bottom: 28px;
  font-size: clamp(64px, 6.8vw, 112px);
  line-height: 0.94;
}

.hero-lead {
  max-width: 600px;
  margin-bottom: 34px;
  color: var(--espresso-soft);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 38px;
}

.hero-actions p {
  margin: 0;
  color: var(--espresso-soft);
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 5px rgba(113, 131, 106, 0.14);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-height: 58px;
  padding: 15px 22px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--tomato);
  color: #fff;
  box-shadow: 0 14px 30px rgba(217, 75, 54, 0.22);
}

.button-primary:hover {
  background: var(--tomato-dark);
  box-shadow: 0 18px 34px rgba(217, 75, 54, 0.3);
}

.button-primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
  transform: none;
}

.button-light {
  background: var(--ivory);
  color: var(--espresso);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--espresso-soft);
  font-size: 11px;
  font-weight: 700;
}

.trust-row span::before {
  margin-right: 7px;
  color: var(--sage);
  content: "✓";
}

.hero-product {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 76px 76px 66px 44px;
  background: rgba(255, 249, 239, 0.92);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.hero-product::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(42, 32, 27, 0.07);
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.scan-pane {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.76);
}

.scan-grid {
  position: absolute;
  inset: 42px 32px 70px;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(113, 131, 106, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 131, 106, 0.12) 1px, transparent 1px);
  background-size: 26px 26px;
}

.corner {
  position: absolute;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-color: var(--sage);
  border-style: solid;
}

.corner-tl { top: 34px; left: 34px; border-width: 3px 0 0 3px; border-radius: 11px 0 0; }
.corner-tr { top: 34px; right: 34px; border-width: 3px 3px 0 0; border-radius: 0 11px 0 0; }
.corner-bl { bottom: 72px; left: 34px; border-width: 0 0 3px 3px; border-radius: 0 0 0 11px; }
.corner-br { right: 34px; bottom: 72px; border-width: 0 3px 3px 0; border-radius: 0 0 11px; }

.foot-asset-wrap {
  position: absolute;
  inset: 75px 76px 58px 82px;
  display: grid;
  place-items: center;
}

.foot-asset {
  z-index: 2;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: saturate(0.86) contrast(0.98);
}

.foot-asset.is-loaded {
  display: block;
}

.foot-fallback {
  width: 52%;
  height: 78%;
  border: 2px dashed var(--sage);
  border-radius: 46% 48% 38% 40% / 30% 28% 58% 62%;
  background:
    radial-gradient(circle at 18% 5%, #d8b18e 0 6%, transparent 7%),
    radial-gradient(circle at 33% 2%, #d8b18e 0 6%, transparent 7%),
    radial-gradient(circle at 48% 3%, #d8b18e 0 6%, transparent 7%),
    radial-gradient(circle at 63% 7%, #d8b18e 0 6%, transparent 7%),
    radial-gradient(circle at 78% 13%, #d8b18e 0 6%, transparent 7%),
    linear-gradient(150deg, #e1ba98, #c88d68);
  box-shadow: inset 0 0 32px rgba(255, 255, 255, 0.22);
}

.foot-asset.is-loaded + .foot-fallback,
.shoe-asset.is-loaded + .shoe-fallback {
  display: none;
}

.measure {
  position: absolute;
  z-index: 4;
  color: var(--sage-deep);
  font-size: 12px;
  font-weight: 800;
}

.measure::before,
.measure::after {
  position: absolute;
  background: var(--sage);
  border-radius: 50%;
  content: "";
}

.measure-length {
  top: 19%;
  bottom: 17%;
  left: 15%;
  width: 1px;
  border-left: 1px dashed var(--sage);
}

.measure-length span {
  position: absolute;
  top: 49%;
  left: -10px;
  white-space: nowrap;
  transform: translate(-100%, -50%);
}

.measure-length::before,
.measure-length::after { left: -3px; width: 6px; height: 6px; }
.measure-length::before { top: 0; }
.measure-length::after { bottom: 0; }

.measure-width {
  top: 42%;
  right: 16%;
  left: 28%;
  height: 1px;
  border-top: 1px dashed var(--sage);
}

.measure-width span {
  position: absolute;
  right: -4px;
  bottom: 7px;
  white-space: nowrap;
}

.measure-width::before,
.measure-width::after { top: -3px; width: 6px; height: 6px; }
.measure-width::before { left: 0; }
.measure-width::after { right: 0; }

.ruler {
  position: absolute;
  right: 38px;
  bottom: 36px;
  left: 38px;
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--sage);
  color: var(--sage-deep);
  font-size: 10px;
}

.match-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 48px 28px 32px;
}

.score-ring {
  display: grid;
  width: 138px;
  height: 138px;
  margin: 0 auto 20px;
  padding: 8px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--sage) 0 94%, rgba(113, 131, 106, 0.15) 94% 100%);
  transform: rotate(-24deg);
}

.score-ring > div {
  display: grid;
  width: 100%;
  height: 100%;
  place-content: center;
  border-radius: 50%;
  background: var(--ivory);
  text-align: center;
  transform: rotate(24deg);
}

.score-ring strong {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
}

.score-ring span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
}

.shoe-asset-wrap {
  display: grid;
  height: 180px;
  place-items: center;
  overflow: hidden;
}

.shoe-asset {
  display: none;
  width: 120%;
  height: 120%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.shoe-asset.is-loaded {
  display: block;
}

.shoe-fallback {
  color: var(--sand-deep);
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 1;
  transform: rotate(-8deg);
}

.sample-match {
  margin-top: auto;
}

.card-kicker {
  margin-bottom: 4px;
  color: var(--sage-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sample-match h2 {
  margin-bottom: 2px;
  font-family: var(--font-body);
  font-size: 19px;
  letter-spacing: -0.03em;
}

.sample-match > p:not(.card-kicker) {
  margin-bottom: 14px;
  color: var(--espresso-soft);
  font-size: 11px;
}

.sample-match ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
  font-weight: 600;
}

.sample-match li::before {
  margin-right: 8px;
  color: var(--sage);
  content: "✓";
}

.process-section {
  padding: 132px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 64px;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -52px;
}

.section-heading h2,
.finder-intro h2 {
  margin-bottom: 0;
  font-size: clamp(50px, 5vw, 82px);
  line-height: 1;
}

.section-heading > p:last-child {
  margin-bottom: 6px;
  color: var(--espresso-soft);
  font-size: 17px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.process-grid li {
  min-height: 290px;
  padding: 30px 44px 36px 0;
  border-right: 1px solid var(--line);
}

.process-grid li + li {
  padding-left: 44px;
}

.process-grid li:last-child {
  border-right: 0;
}

.step-number {
  display: block;
  margin-bottom: 70px;
  color: var(--tomato);
  font-family: var(--font-display);
  font-size: 24px;
}

.process-grid h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.process-grid p {
  max-width: 330px;
  margin: 0;
  color: var(--espresso-soft);
  font-size: 14px;
}

.finder-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(600px, 1.3fr);
  gap: clamp(48px, 8vw, 130px);
  width: min(1536px, calc(100% - 48px));
  margin-inline: auto;
  padding: clamp(70px, 8vw, 120px);
  border-radius: 72px;
  background: var(--espresso);
  color: var(--ivory);
}

.finder-intro {
  align-self: start;
}

.finder-intro > p:not(.eyebrow) {
  margin: 28px 0 38px;
  color: rgba(255, 249, 239, 0.72);
  font-size: 16px;
}

.privacy-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.privacy-note > span {
  color: #a9ba9f;
  font-size: 28px;
}

.privacy-note p {
  margin: 0;
  color: rgba(255, 249, 239, 0.7);
  font-size: 12px;
}

.privacy-note strong {
  color: var(--ivory);
  font-size: 13px;
}

.finder-app {
  min-height: 760px;
  padding: 38px;
  border-radius: 44px 44px 44px 28px;
  background: var(--ivory);
  color: var(--espresso);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

.progress {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  margin-bottom: 40px;
}

.progress-item {
  display: grid;
  gap: 5px;
  justify-items: center;
  color: rgba(42, 32, 27, 0.4);
}

.progress-item span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(42, 32, 27, 0.2);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.progress-item small {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-item.is-active,
.progress-item.is-complete {
  color: var(--espresso);
}

.progress-item.is-active span {
  border-color: var(--tomato);
  background: var(--tomato);
  color: #fff;
}

.progress-item.is-complete span {
  border-color: var(--sage);
  background: var(--sage);
  color: #fff;
}

.progress-line {
  height: 1px;
  margin: 0 12px 19px;
  background: rgba(42, 32, 27, 0.16);
}

.wizard-step[hidden] {
  display: none;
}

.wizard-step.is-active {
  animation: step-in 300ms ease both;
}

@keyframes step-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-heading {
  margin-bottom: 28px;
}

.wizard-heading > p,
.wizard-heading > div > p {
  margin-bottom: 8px;
  color: var(--tomato);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wizard-heading h3 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.wizard-heading > span,
.wizard-heading > div > span {
  display: block;
  color: rgba(42, 32, 27, 0.65);
  font-size: 12px;
}

.beta-banner {
  margin: -10px 0 18px;
  padding: 11px 14px;
  border-left: 3px solid var(--tomato);
  border-radius: 0 10px 10px 0;
  background: rgba(217, 75, 54, 0.07);
  color: var(--espresso-soft);
  font-size: 10px;
}

.beta-banner strong {
  color: var(--tomato-dark);
}

.reference-config {
  display: grid;
  grid-template-columns: 1fr minmax(230px, 1fr);
  gap: 12px 18px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.72);
}

.reference-config > div:first-child {
  display: grid;
  gap: 2px;
}

.reference-config strong,
.reference-config label > span {
  font-size: 10px;
  font-weight: 800;
}

.reference-config small {
  color: rgba(42, 32, 27, 0.58);
  font-size: 8px;
}

.reference-config label {
  display: grid;
  gap: 5px;
}

.reference-config select,
.reference-config input {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--espresso);
  font-size: 10px;
}

.custom-reference {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.custom-reference[hidden] {
  display: none;
}

.custom-reference label {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

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

.upload-zone {
  position: relative;
  display: flex;
  min-height: 285px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1.5px dashed rgba(113, 131, 106, 0.65);
  border-radius: 30px;
  background:
    linear-gradient(rgba(113, 131, 106, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 131, 106, 0.08) 1px, transparent 1px),
    rgba(113, 131, 106, 0.04);
  background-size: 24px 24px;
  cursor: default;
  text-align: center;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.upload-zone:hover {
  border-color: var(--sage-deep);
  background-color: rgba(113, 131, 106, 0.08);
}

.source-actions {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  width: calc(100% - 24px);
  margin-top: 18px;
}

.source-button {
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ivory);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.source-button:hover {
  background: var(--espresso);
  color: var(--ivory);
  transform: translateY(-1px);
}

.camera-button {
  border-color: var(--tomato);
  background: var(--tomato);
  color: #fff;
}

.visually-hidden-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none;
}

.photo-thumbnails {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: calc(100% - 24px);
  margin-top: 12px;
}

.photo-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.photo-card.is-pass {
  border-color: var(--sage);
}

.photo-card.is-fail {
  border-color: var(--tomato);
}

.photo-card img {
  position: static;
  display: block;
  width: 100%;
  height: 78px;
  object-fit: cover;
}

.photo-quality-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
  padding: 3px 6px;
  border-radius: 99px;
  background: rgba(255, 249, 239, 0.9);
  color: var(--espresso);
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(42, 32, 27, 0.84);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

.photo-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 6px;
}

.photo-checks span {
  padding: 2px 4px;
  border-radius: 99px;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
}

.photo-checks .is-pass {
  background: rgba(113, 131, 106, 0.16);
  color: var(--sage-deep);
}

.photo-checks .is-fail {
  background: rgba(217, 75, 54, 0.12);
  color: var(--tomato-dark);
}

.photo-measure {
  margin: 0;
  padding: 0 6px 7px;
  color: var(--sage-deep);
  font-size: 7px;
  font-weight: 800;
}

.photo-measure.is-fail {
  color: var(--tomato-dark);
}

.view-quality {
  position: relative;
  z-index: 6;
  min-height: 17px;
  margin: 10px 12px 0;
  color: rgba(42, 32, 27, 0.55);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.view-quality.is-pass {
  color: var(--sage-deep);
}

.view-quality.is-fail {
  color: var(--tomato-dark);
}

.quality-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  color: var(--sage-deep);
  font-size: 8px;
  font-weight: 800;
}

.quality-legend > span {
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(113, 131, 106, 0.11);
}

.quality-legend small {
  flex-basis: 100%;
  color: rgba(42, 32, 27, 0.5);
  font-size: 8px;
  font-weight: 600;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 26px;
}

.upload-step {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  padding: 5px 8px;
  border-radius: 99px;
  background: rgba(255, 249, 239, 0.86);
  color: var(--sage-deep);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upload-ready {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: none;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-weight: 800;
}

.upload-zone.is-ready .upload-ready {
  display: grid;
}

.upload-zone strong {
  font-size: 16px;
}

.upload-zone small {
  margin-top: 4px;
  color: rgba(42, 32, 27, 0.55);
  font-size: 11px;
}

.upload-zone img {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-zone img.is-visible {
  display: block;
}

.preview-scan {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  display: none;
  height: 2px;
  background: var(--tomato);
  box-shadow: 0 0 18px var(--tomato);
}

.upload-zone.is-analyzing .preview-scan {
  display: block;
  animation: scan 1.4s ease-in-out infinite;
}

.multi-upload.is-analyzing .upload-zone.is-ready .preview-scan {
  display: block;
  animation: scan 1.4s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { top: 8%; }
  50% { top: 92%; }
}

.file-feedback {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--sage-deep);
  font-size: 11px;
  font-weight: 700;
}

.wizard-actions {
  margin-top: 24px;
}

.split-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.text-button {
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--espresso-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(42, 32, 27, 0.3);
  text-underline-offset: 5px;
}

.measurement-form {
  display: grid;
  gap: 30px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
}

.measurement-confidence {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border-left: 4px solid var(--sage);
  border-radius: 0 14px 14px 0;
  background: rgba(113, 131, 106, 0.1);
}

.measurement-confidence strong {
  font-size: 12px;
}

.measurement-confidence span {
  color: var(--espresso-soft);
  font-size: 9px;
}

.measurement-form > label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 800;
}

.measurement-form output {
  color: var(--tomato);
  font-family: var(--font-display);
  font-size: 23px;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--sage), var(--sand-deep));
  cursor: pointer;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  border: 4px solid var(--ivory);
  border-radius: 50%;
  background: var(--tomato);
  box-shadow: 0 2px 10px rgba(42, 32, 27, 0.25);
  appearance: none;
}

.measurement-form > label > small {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: rgba(42, 32, 27, 0.48);
  font-size: 9px;
}

.measurement-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.measurement-form legend {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
}

.shape-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.shape-options input {
  position: absolute;
  opacity: 0;
}

.shape-options span {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.shape-options input:checked + span {
  border-color: var(--sage);
  background: rgba(113, 131, 106, 0.12);
  color: var(--sage-deep);
}

.shape-options input:focus-visible + span {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
}

.results-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.results-status {
  min-height: 24px;
  color: var(--sage-deep);
  font-size: 12px;
  font-weight: 800;
}

.result-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1.25fr auto;
  gap: 10px;
  align-items: end;
  margin: 2px 0 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}

.result-filters label {
  display: grid;
  gap: 6px;
}

.result-filters label > span {
  color: rgba(42, 32, 27, 0.58);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-filters select {
  width: 100%;
  min-height: 38px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ivory);
  color: var(--espresso);
  font-size: 10px;
  font-weight: 700;
}

.price-filter input[type="range"] {
  height: 4px;
  margin: 16px 0 12px;
}

.price-filter output {
  color: var(--tomato-dark);
}

.filter-reset {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--espresso-soft);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

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

.result-card {
  position: relative;
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  animation: result-in 420ms ease both;
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card:nth-child(2) { animation-delay: 80ms; }
.result-card:nth-child(3) { animation-delay: 160ms; }
.result-card:nth-child(4) { animation-delay: 240ms; }

.result-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.result-tag {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--tomato);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-card h4 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.result-score {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
}

.result-score small {
  display: block;
  margin-top: 4px;
  color: rgba(42, 32, 27, 0.5);
  font-family: var(--font-body);
  font-size: 8px;
  text-align: right;
  text-transform: uppercase;
}

.result-meta {
  margin: 9px 0 12px;
  color: var(--espresso-soft);
  font-size: 10px;
}

.amazon-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--sage-deep);
  font-size: 9px;
  font-weight: 800;
}

.amazon-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  content: "";
}

.result-reasons {
  display: grid;
  gap: 5px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 10px;
  font-weight: 700;
}

.result-reasons li::before {
  margin-right: 6px;
  color: var(--sage);
  content: "✓";
}

.result-card a {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
}

.result-card a:hover {
  color: var(--tomato-dark);
}

.no-results {
  grid-column: 1 / -1;
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--espresso-soft);
  text-align: center;
  font-size: 12px;
}

.catalog-disclaimer {
  margin: 18px 0 0;
  color: rgba(42, 32, 27, 0.55);
  font-size: 9px;
}

.feedback-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 18px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.72);
}

.feedback-panel > div:first-child {
  display: grid;
  gap: 2px;
}

.feedback-panel strong { font-size: 11px; }
.feedback-panel span { color: rgba(42, 32, 27, 0.58); font-size: 8px; }
.feedback-panel p { grid-column: 1 / -1; margin: 0; color: var(--sage-deep); font-size: 9px; font-weight: 700; }
.feedback-actions { display: flex; gap: 6px; }
.feedback-actions button {
  min-width: 54px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--paper);
  color: var(--espresso);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}
.feedback-actions button:hover { background: var(--espresso); color: var(--ivory); }
.feedback-actions button:disabled { cursor: default; opacity: 0.55; }

.data-quality {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 8px;
  padding: 3px 7px;
  border-radius: 99px;
  background: rgba(113, 131, 106, 0.12);
  color: var(--sage-deep);
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.why-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(60px, 8vw, 140px);
  padding: 150px 0;
}

.why-quote blockquote {
  max-width: 760px;
  margin: 0;
  font-size: clamp(48px, 5.6vw, 90px);
  line-height: 1.04;
}

.why-copy {
  align-self: end;
}

.why-copy > p {
  color: var(--espresso-soft);
  font-size: 17px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.metric-row strong {
  display: block;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
}

.metric-row span {
  color: var(--espresso-soft);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.final-cta {
  display: grid;
  min-height: 580px;
  padding: 90px clamp(32px, 7vw, 110px);
  place-content: center;
  justify-items: center;
  border-radius: 72px 72px 0 0;
  background: var(--tomato);
  color: #fff;
  text-align: center;
}

.final-cta .eyebrow {
  margin-bottom: 30px;
}

.final-cta h2 {
  max-width: 1050px;
  margin-bottom: 42px;
  font-size: clamp(48px, 6vw, 92px);
  line-height: 1;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 30px;
  align-items: center;
  min-height: 150px;
  font-size: 11px;
}

footer p {
  margin: 0;
  color: var(--espresso-soft);
  text-align: center;
}

footer > div {
  display: flex;
  gap: 24px;
  justify-self: end;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .site-header,
  .hero,
  .process-section,
  .why-section,
  footer {
    width: min(calc(100% - 48px), 1080px);
  }

  .main-nav {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    max-width: 800px;
  }

  .hero-product {
    min-height: 620px;
  }

  .finder-section {
    grid-template-columns: 1fr;
    padding: 72px;
  }

  .finder-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 70px;
  }

  .finder-intro .eyebrow,
  .finder-intro h2 {
    grid-column: 1 / -1;
  }

  .result-filters {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 760px) {
  .site-header,
  .hero,
  .process-section,
  .why-section,
  footer {
    width: min(calc(100% - 32px), 680px);
  }

  .site-header {
    min-height: 76px;
  }

  .wordmark {
    font-size: 20px;
  }

  .wordmark-mark {
    width: 32px;
    height: 32px;
  }

  .header-cta {
    padding: 9px 12px;
    font-size: 11px;
  }

  .hero {
    gap: 42px;
    padding: 54px 0 72px;
  }

  h1 {
    font-size: clamp(54px, 15vw, 76px);
  }

  .hero-lead {
    font-size: 17px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-product {
    grid-template-columns: 1fr;
    min-height: 820px;
    border-radius: 44px 44px 36px 28px;
  }

  .scan-pane {
    min-height: 520px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .match-pane {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    padding: 28px;
  }

  .score-ring {
    grid-row: 1 / 3;
    width: 108px;
    height: 108px;
    margin: 0;
  }

  .score-ring strong { font-size: 32px; }
  .shoe-asset-wrap { height: 100px; }
  .sample-match { grid-column: 2; }
  .sample-match ul { display: none; }

  .process-section {
    padding: 96px 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading .eyebrow {
    margin-bottom: 24px;
  }

  .section-heading h2 {
    margin-bottom: 24px;
  }

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

  .process-grid li,
  .process-grid li + li {
    min-height: 220px;
    padding: 26px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .step-number {
    margin-bottom: 36px;
  }

  .finder-section {
    width: 100%;
    padding: 64px 16px;
    border-radius: 46px;
  }

  .finder-intro {
    display: block;
    padding-inline: 4px;
  }

  .finder-intro h2 {
    font-size: 56px;
  }

  .finder-app {
    min-height: 650px;
    padding: 24px 18px;
    border-radius: 30px;
  }

  .upload-zone {
    min-height: 230px;
  }

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

  .reference-config,
  .custom-reference {
    grid-template-columns: 1fr;
  }

  .custom-reference label {
    grid-template-columns: auto 1fr auto;
  }

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

  .split-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .split-actions .button {
    width: 100%;
  }

  .measurement-form {
    padding: 22px 16px;
  }

  .results-heading {
    flex-direction: column;
  }

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

  .why-section {
    grid-template-columns: 1fr;
    padding: 100px 0;
  }

  .why-quote blockquote {
    font-size: 52px;
  }

  .metric-row {
    gap: 8px;
  }

  .metric-row strong {
    font-size: 34px;
  }

  .final-cta {
    min-height: 520px;
    border-radius: 48px 48px 0 0;
  }

  footer {
    display: flex;
    min-height: 220px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
  }

  footer p {
    text-align: left;
  }

  footer > div {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
