@font-face {
  font-family: "Grobold";
  src: url("assets/fonts/GROBOLD.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #17151d;
  --muted: #6f6a78;
  --line: #e7e3e9;
  --paper: #fffdfb;
  --soft: #f7f4f7;
  --pink: #f3428b;
  --pink-dark: #ca1765;
  --blue: #33a9e8;
  --yellow: #ffce3a;
  --green: #6bcf8e;
  --shadow: 0 20px 60px rgba(31, 24, 39, 0.09);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: linear-gradient(180deg, #fffafc 0, #fff 34rem); }
button, input, select { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.site-header { position: sticky; top: 0; z-index: 20; box-shadow: 0 8px 26px rgba(35, 26, 40, .08); }
.shipping-banner {
  height: 50px; padding: 10px 20px; display: grid; place-items: center; text-align: center;
  background: #965a9b; color: white; font-size: 15px; letter-spacing: .01em;
}
.shipping-banner strong { margin: 0 .22em; font-weight: 850; }
.store-nav {
  height: 86px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 210px minmax(0, 1fr);
  align-items: center; gap: 20px; padding: 0 max(28px, calc((100vw - 1380px) / 2)); background: rgba(255,255,255,.97);
  border-bottom: 1px solid #ece8ee; backdrop-filter: blur(16px);
}
.nav-cluster { display: flex; align-items: center; gap: clamp(22px, 3vw, 52px); }
.nav-left { justify-content: flex-start; }
.nav-right { justify-content: flex-end; padding-right: 122px; }
.nav-link {
  color: #92559a; text-decoration: none; text-transform: uppercase; white-space: nowrap; font-family: "Grobold", "Arial Narrow", Arial, sans-serif;
  font-weight: 400; font-size: 16px; letter-spacing: .01em; transition: color .18s ease, transform .18s ease;
}
.nav-link span { display: inline-block; margin-left: 4px; transform: translateY(-1px); font-family: Arial, sans-serif; font-size: 15px; }
.nav-link:hover { color: #397ec5; transform: translateY(-1px); }
.home-link { color: #397ec5; }
.nav-logo {
  position: relative; align-self: stretch; display: block; width: 210px; height: 116px; margin-bottom: -30px; overflow: hidden; z-index: 2;
  background: white; border-radius: 0 0 36px 36px; box-shadow: 0 9px 16px rgba(36, 31, 42, .06); justify-self: center;
}
.nav-logo img { position: absolute; width: 198px; max-width: none; height: 198px; left: 50%; top: 50%; transform: translate(-50%, -52%); }
.nav-actions { position: absolute; right: max(24px, calc((100vw - 1380px) / 2)); top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 17px; }
.nav-actions a, .mobile-menu { width: 27px; height: 27px; display: grid; place-items: center; color: #17151d; }
.nav-actions svg, .mobile-menu svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mobile-menu { display: none; border: 0; padding: 0; background: transparent; }

main { max-width: 1380px; margin: 0 auto; padding: 0 22px 70px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: end; padding: 64px 2px 38px; }
.eyebrow, .step-label { margin: 0 0 9px; color: var(--pink-dark); font-weight: 850; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
h1 { max-width: 900px; margin: 0; font-size: clamp(38px, 5.1vw, 72px); letter-spacing: -.055em; line-height: .98; }
.hero-copy { margin: 24px 0 0; max-width: 700px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.privacy-note { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 18px; background: white; padding: 17px; box-shadow: 0 12px 38px rgba(30,20,40,.05); }
.privacy-note span { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: #e7f7ed; color: #188644; font-weight: 900; }
.privacy-note p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.privacy-note strong { color: var(--ink); }

.studio-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(390px, .75fr); gap: 22px; align-items: start; }
.workspace-card, .results-card { width: 100%; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.workspace-card { padding: clamp(20px, 3vw, 38px); }
.results-card { min-height: 620px; padding: clamp(20px, 2.4vw, 32px); position: sticky; top: 158px; max-height: calc(100vh - 180px); overflow: auto; }
.step-heading { display: flex; align-items: center; gap: 15px; }
.step-heading h2, .results-header h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.step-heading.compact { margin-bottom: 17px; }
.step-heading.compact h2 { font-size: 21px; }
.step-heading.compact .step-label { margin-bottom: 4px; }
.step-number { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--ink); color: white; font-weight: 900; }

.upload-zone { min-height: 136px; margin-top: 23px; border: 2px dashed #d8d1db; border-radius: 22px; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 26px; cursor: pointer; background: #fbf9fb; transition: .2s ease; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--pink); background: #fff4f8; transform: translateY(-1px); }
.upload-zone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-zone > span:last-child { display: flex; flex-direction: column; }
.upload-zone strong { font-size: 17px; }
.upload-zone small { margin-top: 4px; color: var(--muted); }
.upload-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: white; border: 1px solid var(--line); font-size: 25px; color: var(--pink-dark); }
.sample-row { margin: 18px 0 0; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.sample-buttons { display: flex; min-width: 0; max-width: 100%; gap: 8px; overflow-x: auto; padding: 3px; }
.sample-button { width: 50px; height: 50px; flex: 0 0 50px; padding: 0; border: 2px solid white; border-radius: 14px; background-size: cover; background-position: center; box-shadow: 0 0 0 1px var(--line); }
.sample-button:hover, .sample-button:focus-visible { box-shadow: 0 0 0 3px var(--pink); outline: none; }

.canvas-shell { position: relative; margin-top: 23px; border-radius: 22px; overflow: hidden; background: #211e25; min-height: 300px; line-height: 0; }
#photoCanvas { display: block; width: 100%; max-height: 68vh; min-height: 300px; object-fit: contain; cursor: crosshair; touch-action: none; }
.canvas-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); border-radius: 99px; padding: 11px 16px; color: white; background: rgba(20,18,23,.74); backdrop-filter: blur(10px); line-height: 1; font-size: 13px; font-weight: 750; pointer-events: none; transition: opacity .25s; }
.selection-tools { margin-top: 25px; }
.tool-row { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; padding: 13px; border-radius: 17px; background: var(--soft); }
.tool-row label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 750; color: #504a56; }
.tool-row input { accent-color: var(--pink); width: 116px; }
.tool-row select { padding: 8px 28px 8px 10px; border: 1px solid var(--line); background: white; border-radius: 10px; color: var(--ink); }
.text-button { border: 0; background: transparent; padding: 8px; font-weight: 800; color: #554f5c; }
.text-button.danger { color: #bd3260; }
.palette { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.palette-chip { min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: 9px; background: white; }
.palette-chip .swatch { height: 42px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.palette-chip strong, .palette-chip small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-chip strong { margin-top: 8px; font-size: 12px; }
.palette-chip small { margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; }

.results-empty { min-height: 555px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.results-empty h2 { margin: 26px 0 9px; letter-spacing: -.03em; }
.results-empty p { max-width: 350px; margin: 0; color: var(--muted); line-height: 1.55; }
.empty-orbit { width: 106px; height: 106px; border: 2px dashed #d8ccd3; border-radius: 50%; display: grid; place-items: center; animation: orbit 14s linear infinite; }
.empty-orbit span { width: 42px; height: 53px; display: block; background: var(--pink); border-radius: 50% 50% 45% 45%; transform: rotate(20deg); box-shadow: 28px 15px 0 -7px var(--blue), -24px 22px 0 -9px var(--yellow); }
@keyframes orbit { to { transform: rotate(360deg); } }
.results-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.results-header .step-label { margin-bottom: 4px; }
.secondary-button { border: 1px solid var(--line); border-radius: 12px; background: white; padding: 10px 12px; font-weight: 800; color: var(--ink); }
.prototype-warning { margin: 18px 0; border-left: 3px solid var(--yellow); background: #fff8dc; padding: 12px 13px; color: #6c5a17; font-size: 12px; line-height: 1.45; }
.match-group { border-top: 1px solid var(--line); padding: 20px 0 6px; }
.match-group:first-child { border-top: 0; }
.match-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.match-title > div { display: flex; gap: 10px; align-items: center; }
.match-swatch { width: 36px; height: 36px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.match-title h3 { margin: 0; font-size: 15px; }
.match-title p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.match-index { font-size: 11px; font-weight: 850; color: var(--muted); }
.product-match { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 8px; background: white; }
.product-match.best { border-color: #edb7ce; background: #fff9fb; }
.product-image { width: 68px; height: 68px; border-radius: 12px; object-fit: contain; background: #f7f7f7; }
.product-brand { color: var(--pink-dark); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.product-copy h4 { margin: 3px 0 5px; font-size: 13px; line-height: 1.25; }
.product-meta { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.stock { color: #197641; font-weight: 800; }
.stock.out { color: #9b3b53; }
.product-options { margin-top: 8px; }
.option-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.option-links { display: flex; flex-wrap: wrap; gap: 5px; }
.option-chip { border: 1px solid #e3d9df; border-radius: 8px; background: white; color: var(--ink); padding: 5px 7px; font-size: 9px; font-weight: 800; line-height: 1; text-decoration: none; }
.option-chip:hover { border-color: var(--pink); color: var(--pink-dark); }
.product-action { text-align: right; }
.score { display: block; margin-bottom: 7px; color: #514b58; font-size: 11px; font-weight: 850; }
.shop-link { display: inline-block; border-radius: 10px; background: var(--ink); color: white; text-decoration: none; padding: 8px 10px; font-size: 11px; font-weight: 850; }
.unavailable-note { margin: 10px 0 6px; font-size: 11px; color: var(--muted); }
.feedback-row { display: flex; justify-content: flex-end; gap: 7px; margin-top: 9px; }
.feedback-button { border: 0; border-radius: 9px; background: var(--soft); color: #5e5765; padding: 7px 9px; font-size: 10px; font-weight: 750; }
.feedback-button.selected { background: #f4d9e5; color: #8f2052; }

.how-it-works { margin: 86px 0 10px; text-align: center; }
.how-it-works > h2 { margin: 0 auto 30px; max-width: 680px; font-size: clamp(28px, 4vw, 47px); letter-spacing: -.045em; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; text-align: left; }
.feature-grid article { border: 1px solid var(--line); border-radius: 22px; padding: 26px; background: white; }
.feature-grid span { color: var(--pink); font-weight: 900; }
.feature-grid h3 { margin: 20px 0 8px; font-size: 18px; }
.feature-grid p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
footer { border-top: 1px solid var(--line); padding: 22px max(22px, calc((100vw - 1380px)/2)); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 120px); z-index: 30; opacity: 0; background: var(--ink); color: white; padding: 12px 17px; border-radius: 99px; font-size: 13px; font-weight: 750; transition: .25s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1050px) {
  .store-nav { height: 82px; grid-template-columns: 52px minmax(0, 1fr) 118px; gap: 8px; padding: 0 22px; }
  .nav-cluster { display: none; }
  .mobile-menu { display: grid; grid-column: 1; justify-self: start; }
  .nav-logo { grid-column: 2; width: 142px; height: 94px; margin-bottom: -12px; border-radius: 0 0 25px 25px; }
  .nav-logo img { width: 148px; height: 148px; }
  .nav-actions { grid-column: 3; position: static; transform: none; justify-self: end; gap: 13px; }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 22px; padding-top: 44px; }
  .privacy-note { max-width: 300px; }
  .studio-grid { grid-template-columns: 1fr; }
  .results-card { position: static; max-height: none; min-height: 420px; }
  .results-empty { min-height: 360px; }
}
@media (max-width: 640px) {
  .shipping-banner { height: 34px; padding: 7px 10px; font-size: 11px; }
  .store-nav { height: 70px; grid-template-columns: 32px minmax(0, 1fr) 98px; padding: 0 14px; }
  .nav-logo { width: 118px; height: 78px; margin-bottom: -8px; border-radius: 0 0 21px 21px; }
  .nav-logo img { width: 132px; height: 132px; }
  .nav-actions { gap: 10px; }
  .nav-actions a, .mobile-menu { width: 24px; height: 24px; }
  .nav-actions svg, .mobile-menu svg { width: 22px; height: 22px; }
  main { padding: 0 12px 50px; }
  .hero { padding: 35px 5px 25px; }
  .hero-copy { font-size: 16px; }
  .workspace-card, .results-card { border-radius: 21px; padding: 17px; }
  .sample-row { align-items: flex-start; flex-direction: column; }
  .palette { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .tool-row { align-items: flex-start; }
  .tool-row label { width: 100%; justify-content: space-between; }
  .product-match { grid-template-columns: 58px minmax(0,1fr); }
  .product-image { width: 58px; height: 58px; }
  .product-action { grid-column: 2; display: flex; justify-content: space-between; align-items: center; }
  .score { margin: 0; }
  .feature-grid { grid-template-columns: 1fr; }
  footer { padding-inline: 18px; flex-direction: column; }
}
