:root {
  color-scheme: light;
  --canvas: #f7f5ed;
  --paper: #fffcf5;
  --ink: #173a30;
  --muted: #505d53;
  --deep: #15382e;
  --accent: #e7eb9d;
  --line: #deded0;
  --burgundy: #772e3d;
  --display: Georgia, 'Times New Roman', serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.55 var(--body); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid #9b4150; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
.shell { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }

.header { height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 700 1.24rem/1 var(--display); text-decoration: none; }
.brand-mark { display: inline-grid; place-content: center; width: 31px; height: 31px; border-radius: 50%; background: var(--deep); color: var(--accent); font: 1.15rem/1 var(--display); }
.header nav { display: flex; align-items: center; gap: 20px; font-size: .91rem; font-weight: 600; }
.header nav a { text-decoration: none; }
.header nav a:hover { text-decoration: underline; }
.nav-bot { padding: 8px 14px; border: 1px solid #b8c0ac; border-radius: 100px; }

.hero { display: grid; grid-template-columns: 1.03fr .97fr; min-height: 485px; border-radius: 27px; overflow: hidden; background: var(--deep); color: #faf7ec; }
.hero-copy { padding: 52px clamp(32px, 4.6vw, 70px) 54px; display: flex; flex-direction: column; align-items: start; justify-content: center; }
.occasion-label { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: .86rem; letter-spacing: .06em; }
.occasion-label span { font-size: 1.24rem; line-height: 1; }
.hero .occasion-label { color: var(--accent); }
.hero h1 { margin-block: 24px 20px; font: 400 clamp(2.65rem, 5.6vw, 5rem)/.99 var(--display); letter-spacing: -.06em; }
.hero h1 em { color: var(--accent); font-weight: 400; }
.hero p { color: #e7eadb; max-width: 37ch; }
.hero-image { position: relative; min-width: 0; }
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% center; }
.button { min-height: 49px; border: 1px solid transparent; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; font-weight: 675; text-decoration: none; text-align: center; }
.primary { background: var(--deep); color: #faf7ec; }
.primary:hover:not(:disabled) { background: #255247; }
.hero-cta { margin-top: 28px; background: var(--accent); color: var(--deep); }
.hero-cta:hover:not(:disabled) { background: #f1f3ba; }
.secondary { color: var(--deep); border-color: var(--line); background: transparent; }
.secondary:hover { border-color: var(--deep); }

.market-strip { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 25px 16px; border-bottom: 1px solid var(--line); }
.market-strip p { color: var(--muted); font-size: .91rem; font-weight: 650; }
.market-list { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(15px, 4.2vw, 56px); }
.market-name { font-size: 1.13rem; font-weight: 750; letter-spacing: -.055em; }
.kaspi { color: #a83031; }
.kaspi span { font-weight: 500; }
.ozon { color: #1750ad; }
.wildberries { color: #892773; }

.finder { display: grid; grid-template-columns: .68fr 1fr; gap: clamp(24px, 5vw, 85px); padding-block: 66px; scroll-margin-top: 20px; }
.section-lead { padding-top: 20px; }
.section-lead .occasion-label { color: var(--burgundy); }
h2 { font: 400 clamp(2.18rem, 4.2vw, 3.55rem)/1.02 var(--display); letter-spacing: -.038em; }
.section-lead h2 { margin-block: 16px; }
.section-lead p, .price-row p, .how p, #result-note { color: var(--muted); }
.mode-label { display: inline-block; margin-top: 17px; padding: 6px 12px; border-radius: 6px; background: #edeae0; font-size: .88rem; }
.finder-card { min-width: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 22px; padding: clamp(19px, 3.3vw, 35px); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0 0 28px; padding: 0; gap: 10px; }
.steps li { padding-bottom: 8px; border-bottom: 2px solid var(--line); color: var(--muted); font-size: .88rem; }
.steps [aria-current="step"] { color: var(--ink); border-color: var(--deep); font-weight: 700; }
.price-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.price-row h3, #result-title { font: 700 1.57rem/1.16 var(--display); }
.price-row p { margin-top: 7px; font-size: .95rem; }
.price { flex-shrink: 0; white-space: nowrap; font: 700 clamp(1.35rem, 3vw, 2rem)/1 var(--display); }

label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 650; }
textarea, input, select { display: block; width: 100%; min-width: 0; border: 1px solid #c8cbbb; border-radius: 9px; background: #fffdfa; padding: 10px 11px; color: var(--ink); }
textarea { resize: vertical; min-height: 104px; }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 49%, #536357 50% 65%, transparent 66%), linear-gradient(-45deg, transparent 49%, #536357 50% 65%, transparent 66%); background-size: 7px 7px; background-position: right 17px center, right 12px center; background-repeat: no-repeat; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 15px; }
.budget-note { min-height: 1.42em; margin: 12px 0; color: var(--muted); font-size: .9rem; }
.error, .status { margin-bottom: 16px; padding: 10px 12px; border-radius: 8px; font-size: .94rem; }
.error { background: #f7e6e7; color: #732c37; }
.status { background: #eef0e1; color: var(--deep); }

#result-note { margin: 7px 0 18px; font-size: .95rem; }
.result-list { display: grid; gap: 12px; margin-bottom: 17px; }
.result-card { padding: 14px; border-radius: 13px; border: 1px solid var(--line); overflow-wrap: anywhere; }
.result-card.has-image { display: grid; grid-template-columns: 65px 1fr; column-gap: 13px; }
.result-card img { width: 65px; height: 65px; object-fit: contain; border-radius: 8px; background: #f7f5ed; }
.result-card h4 { margin: 0; font-size: 1.01rem; line-height: 1.35; }
.result-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 11px; margin-top: 6px; font-size: .88rem; font-weight: 650; }
.result-score { border-radius: 20px; background: #edf0cd; padding: 1px 9px; white-space: nowrap; }
.result-card p { margin-block: 7px; color: var(--muted); font-size: .91rem; }
.result-card a { font-size: .89rem; font-weight: 650; }

.how { border-block: 1px solid var(--line); padding-block: 35px 39px; }
.how h2 { font-size: clamp(2.12rem, 3.5vw, 3rem); margin-bottom: 23px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 27px; }
.how h3 { font: 700 1.24rem/1.12 var(--display); margin-bottom: 6px; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 27px; color: var(--muted); font-size: .88rem; }

@media (max-width: 850px) {
  .shell { width: calc(100% - 42px); }
  .hero { min-height: 380px; }
  .hero-copy { padding: 34px 28px; }
  .hero h1 { font-size: clamp(2.45rem, 6.4vw, 4rem); }
  .finder { grid-template-columns: 1fr; gap: 22px; padding-block: 39px; }
  .section-lead { padding-top: 0; }
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 30px); }
  .header { height: 61px; }
  .brand { gap: 6px; font-size: 1.05rem; }
  .brand-mark { width: 25px; height: 25px; font-size: .92rem; }
  .header nav { gap: 10px; font-size: .78rem; }
  .nav-bot { padding: 5px 8px; }
  .hero { grid-template-columns: 1fr; border-radius: 18px; }
  .hero-copy { padding: 30px 20px 25px; }
  .hero h1 { font-size: clamp(2.8rem, 10.2vw, 3.85rem); margin-block: 15px; }
  .hero-image { min-height: 235px; max-height: 310px; aspect-ratio: 1.65; }
  .hero-cta { margin-top: 20px; }
  .market-strip { align-items: flex-start; flex-direction: column; gap: 6px; padding: 16px 3px; }
  .how-grid { grid-template-columns: 1fr; }
  .footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 365px) {
  .form-grid { grid-template-columns: 1fr; }
  .header .nav-how { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
