/* ASTERA.style — дизайн-система из Claude Design прототипа */

:root {
  --bg: #f6f2ea;
  --paper: #fffdf8;
  --ink: #211d18;
  --ink-soft: #59524a;
  --muted: #6f675c;
  --faint: #8d8578;
  --accent: #8a5a22;
  --line: rgba(33, 29, 24, .12);
  --line-mid: rgba(33, 29, 24, .18);
  --line-btn: rgba(33, 29, 24, .3);
  --line-strong: rgba(33, 29, 24, .35);
  --serif: 'Prata', Georgia, 'Times New Roman', serif;
  --sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; display: flex; flex-direction: column; }
main > section { flex: 1; }

a { color: var(--ink); }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
[tabindex="-1"]:focus { outline: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
  width: 100%;
}

/* ---------- Кнопки, чипсы ---------- */

.btn {
  font-family: var(--sans);
  border-radius: 999px;
  cursor: pointer;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .15s ease, background .15s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 14px 26px;
  font-size: 14.5px;
  font-weight: 500;
}
.btn-primary:hover { opacity: .88; color: var(--bg); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-btn);
  color: var(--ink);
  padding: 13px 20px;
  font-size: 14px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { min-height: 40px; padding: 10px 18px; font-size: 13px; }

.chip {
  font-family: var(--sans);
  font-size: 14px;
  padding: 11px 18px;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-btn);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.chip[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ---------- Шапка ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(20px, 5vw, 48px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.logo {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: .08em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.logo .tld {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0;
}
.site-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 13.5px;
  flex-wrap: wrap;
}
.site-nav a { text-decoration: none; padding: 12px 4px; margin: -12px -4px; }

/* ---------- Лендинг ---------- */

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(24px, 4vw, 48px);
  padding-block: clamp(32px, 6vw, 60px) clamp(28px, 5vw, 48px);
  align-items: center;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.16;
  margin: 0 0 18px;
  text-wrap: balance;
}
.hero-sub {
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 0 0 26px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hero-note { font-size: 12.5px; color: var(--faint); }
.hero-visual {
  height: clamp(280px, 38vw, 380px);
  border: 1px solid var(--line-mid);
  border-radius: 2px;
  background: repeating-linear-gradient(45deg, #ece5d8 0 10px, #f3eee4 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual span {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  background: var(--bg);
  padding: 6px 10px;
  border: 1px solid var(--line-mid);
}

.method { border-top: 1px solid var(--line); }
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding-block: 28px 36px;
}
.method-num {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--accent);
  margin-bottom: 6px;
}
.method-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.method-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Визард ---------- */

.wiz {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: 16px clamp(20px, 5vw, 48px) 48px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.wiz-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.wiz-logo {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .08em;
  text-decoration: none;
}
.wiz-saved { font-size: 12px; color: var(--faint); }
.wiz-block { font-size: 12.5px; font-weight: 400; color: var(--muted); margin: 0 0 8px; }

.wiz-link { margin-bottom: 16px; font-size: 13px; }
.link-toggle {
  background: none;
  border: none;
  padding: 8px 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}
.link-toggle:hover { text-decoration: underline; }
.link-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.link-form .field-input { max-width: 320px; flex: 1; min-width: 200px; }
.link-note { font-size: 12px; color: var(--faint); margin-top: 6px; }
.link-sent { color: var(--muted); margin-right: 10px; }
.progress { display: flex; gap: 4px; margin-bottom: 10px; }
.progress i { flex: 1; height: 3px; background: rgba(33, 29, 24, .14); }
.progress i.on { background: var(--accent); }
.wiz-hint {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 18px 0 26px;
  max-width: 56ch;
}

.fields { display: flex; flex-direction: column; gap: 26px; }
.field-label { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.field-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}
.field-hint { font-size: 12.5px; color: var(--faint); margin-bottom: 4px; }
.field-input, .field-area {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 11px 0;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  border-radius: 0;
}
.field-area { line-height: 1.5; resize: none; min-height: 48px; overflow: hidden; }
.field-input::placeholder, .field-area::placeholder { color: #7d7466; }
.field-input:focus, .field-area:focus { border-bottom-color: var(--accent); }
.chips-row { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.field-row { display: flex; gap: 18px; flex-wrap: wrap; }
.field-row.stack { flex-direction: column; gap: 14px; }
.field-part { flex: 1; min-width: 130px; }
.part-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.callout, .measure-help {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--paper);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  border-radius: 0 8px 8px 0;
}
.callout { margin: 0 0 22px; }
.measure-help { margin: 8px 0 4px; font-size: 13px; }
.field-input.is-invalid, .field-area.is-invalid { border-bottom-color: #a3492c; }
.field-notice { color: #a3492c; font-size: 12.5px; margin-top: 6px; }

.wiz-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 38px;
  flex-wrap: wrap;
}
.wiz-autosave { font-size: 12px; color: var(--faint); }

/* ---------- Фото-блок ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.photo-cell { display: flex; flex-direction: column; gap: 5px; position: relative; }
.photo-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1.5px dashed var(--line-btn);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  overflow: hidden;
  font-family: var(--sans);
  color: var(--muted);
  transition: border-color .15s ease;
}
.photo-slot:hover, .photo-slot.drag { border-color: var(--accent); }
.photo-slot.filled { border-style: solid; padding: 0; }
.photo-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-plus {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  flex: none;
}
.photo-ph { font-size: 11.5px; text-align: center; line-height: 1.4; overflow-wrap: anywhere; max-width: 100%; }
.photo-cap { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.photo-state { font-size: 11px; color: var(--faint); line-height: 1.4; margin-top: 2px; }
.photo-state.ok { color: #4a7c4e; }
.photo-state.bad { color: #a3492c; }
.photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(33, 29, 24, .78);
  color: var(--bg);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
/* расширенная зона нажатия без изменения визуала */
.photo-remove::after { content: ''; position: absolute; inset: -10px; }

.looks-title { font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.looks-sub { font-size: 12.5px; color: var(--faint); margin: 0 0 14px; }
.looks-list { display: flex; flex-direction: column; gap: 20px; }
.look-label { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.look-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.look-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-mid);
  flex: none;
}
.look-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.look-thumb .photo-remove { top: 2px; right: 2px; width: 24px; height: 24px; font-size: 13px; }
.look-thumb.lost { opacity: .45; border-color: #a3492c; border-style: dashed; }
.look-thumb.noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--muted);
  padding: 3px;
  text-align: center;
  overflow-wrap: anywhere;
  background: var(--paper);
}
.look-add {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1.5px dashed var(--line-btn);
  background: var(--paper);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  flex: none;
}
.look-add:hover, .look-add.drag { border-color: var(--accent); color: var(--accent); }

/* ---------- Финал, приватность ---------- */

#screenDone { display: flex; flex-direction: column; }

.center-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px clamp(20px, 5vw, 48px);
}
.center-screen .logo { margin-bottom: 34px; }
.center-screen h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  margin: 0 0 16px;
  max-width: 22ch;
  text-wrap: balance;
}
.center-screen p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}

.prose {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 5vw, 48px) 56px;
}
.prose h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.5vw, 34px);
  line-height: 1.2;
  margin: 12px 0 20px;
}
.prose p, .prose li { font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.prose ul { padding-left: 20px; }

/* ---------- Футер ---------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 16px clamp(20px, 5vw, 48px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--faint);
}
.site-footer a { color: var(--faint); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Мобильные уточнения ---------- */

@media (max-width: 520px) {
  .wiz-nav { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .wiz-nav .btn { width: 100%; }
  .hero-cta .btn-primary { width: 100%; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

[hidden] { display: none !important; }
