:root {
  --color-text: #1d1d1f;
  --color-muted: #5f5f66;
  --color-accent: #b3121f;
  --color-accent-dark: #8e0e18;
  --color-bg: #ffffff;
  --color-error: #b00020;
  --color-tint: #f2f2f3;
  --color-line: #e2e2e5;
  --radius: 12px;
  /* One cross-stitch tile of the Stand's ornament: a red lattice with a white stitched cross. */
  --ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%23d42a35' d='M0 0h1v1H0zM11 0h1v1h-1zM1 1h1v1H1zM10 1h1v1h-1zM2 2h1v1H2zM9 2h1v1H9zM3 3h1v1H3zM8 3h1v1H8zM4 4h1v1H4zM7 4h1v1H7zM5 5h2v2H5zM4 7h1v1H4zM7 7h1v1H7zM3 8h1v1H3zM8 8h1v1H8zM2 9h1v1H2zM9 9h1v1H9zM1 10h1v1H1zM10 10h1v1h-1zM0 11h1v1H0zM11 11h1v1h-1z'/%3E%3Cpath fill='%23ffffff' d='M0 4h1v4H0zM1 5h1v2H1zM11 4h1v4h-1zM10 5h1v2h-1z'/%3E%3C/svg%3E");
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  accent-color: var(--color-accent);
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--color-accent);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

a {
  text-underline-offset: 0.2em;
}

body {
  margin: 0;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 20px;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 8px;
}

/* 1. Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-weight: 800;
  color: inherit;
  text-decoration: none;
  padding-block: 10px;
}

.logo__ownership {
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.product-name {
  color: var(--color-muted);
  white-space: nowrap;
}

.site-header__order {
  margin-left: auto;
  min-height: 44px;
}

.icon-link {
  display: inline-flex;
  padding: 10px;
  margin-right: -10px;
  color: inherit;
}

@media (max-width: 599px) {
  .site-header__inner {
    gap: 8px;
  }

  .logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .logo__ownership {
    font-size: 0.6875rem;
  }

  .product-name {
    display: none;
  }
}

@media (max-width: 359px) {
  .site-header__inner {
    gap: 4px;
  }
}

/* Buttons and small bits */
.button {
  display: inline-block;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--color-accent-dark);
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.button--small {
  padding: 8px 16px;
}

.button--large {
  width: 100%;
  max-width: 420px;
  padding: 16px 24px;
  font-size: 1.15rem;
}

.button--light {
  background: #fff;
  color: var(--color-accent);
}

.button--light:hover {
  background: #f3e9e9;
}

.link-button {
  display: inline-block;
  padding-block: 12px;
  color: var(--color-accent);
}

.link-button--light {
  color: #fff;
}

/* The Order terms under the hero's button, each with a drawn check. */
.terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.terms li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terms li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--color-accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 2. Hero */
.hero {
  display: grid;
  grid-template-areas: "text" "photo" "buy";
  gap: 20px;
  padding-block: 20px 8px;
}

.hero__text {
  grid-area: text;
}

.hero__photo {
  grid-area: photo;
}

.hero__buy {
  grid-area: buy;
}

.hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 12px;
}

.hero__subtitle {
  color: var(--color-muted);
  margin: 0;
}

/* 4:5 keeps the whole Z-profile in frame on a phone; the full 3:4 shot from 800px up. */
.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 55%;
  border-radius: var(--radius);
}

.hero__request {
  margin: 4px 0 0;
}

@media (min-width: 800px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "photo ." "photo text" "photo buy" "photo .";
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: 56px;
    row-gap: 28px;
    padding-block: 40px 56px;
  }

  .hero__photo img {
    aspect-ratio: 3 / 4;
  }

  .hero__subtitle {
    font-size: 1.1rem;
    max-width: 36em;
  }
}

/* Sections */
.section {
  padding-block: 48px;
}

.benefits,
.guarantee {
  background: var(--color-tint);
}

/* 3. Social proof (hidden until the Seller fills it in) */
.sold-count {
  font-size: 1.15rem;
  text-align: center;
  margin: 0 0 32px;
}

.reviews {
  padding-bottom: 48px;
}

.reviews__list {
  display: grid;
  gap: 16px;
}

.review {
  margin: 0;
  padding: 20px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.08);
}

.review blockquote {
  margin: 0 0 12px;
}

.review figcaption {
  color: var(--color-muted);
  font-size: 0.9rem;
}

@media (min-width: 800px) {
  .reviews__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 4. Problem → solution */
.problem__grid {
  display: grid;
  gap: 32px;
}

.problem__text {
  max-width: 38em;
}

.problem__answer {
  margin-top: 24px;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: pretty;
}

.problem__photo img,
.craft img {
  width: 100%;
  border-radius: var(--radius);
}

@media (min-width: 800px) {
  .problem__grid {
    grid-template-columns: 3fr 2fr;
    align-items: center;
  }
}

/* 5. Benefits: one row per benefit, its headline beside its explanation from 700px up. */
.benefits__list {
  border-top: 1px solid var(--color-line);
}

.benefit {
  display: grid;
  gap: 4px 32px;
  padding-block: 20px;
  border-bottom: 1px solid var(--color-line);
}

.benefit h3 {
  margin: 0;
}

.benefit p {
  margin: 0;
  color: var(--color-muted);
  max-width: 38em;
}

@media (min-width: 700px) {
  .benefit {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    padding-block: 24px;
  }
}

.craft {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.craft figure {
  margin: 0;
}

.craft figcaption {
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 0.95rem;
}

@media (min-width: 600px) {
  .craft {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 6. How it works */
.steps__list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps__list li {
  position: relative;
  padding-left: 52px;
  counter-increment: step;
}

.steps__list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-text);
  color: #fff;
  font-weight: 700;
}

.steps__list p {
  margin: 0;
  color: var(--color-muted);
}

@media (min-width: 800px) {
  .steps__list {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 7. The guarantee */
.guarantee__box {
  display: flex;
  align-items: center;
  gap: 24px;
}

.guarantee__box p {
  margin: 0;
}

.guarantee__days {
  flex: none;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  width: 96px;
  height: 96px;
  border: 4px solid var(--color-accent);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-accent);
}

.guarantee__days span {
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 479px) {
  .guarantee__box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 8. FAQ */
.faq__list {
  max-width: 760px;
}

.faq details {
  border-bottom: 1px solid var(--color-line);
}

.faq summary {
  padding: 16px 40px 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* A drawn plus that turns into a minus when the answer is open. */
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 16px;
  height: 2px;
  margin-top: -1px;
  border-radius: 1px;
  background: var(--color-accent);
  transition: transform 0.2s ease-out;
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: rotate(0deg);
}

.faq details p {
  margin: 0 0 16px;
  color: var(--color-muted);
}

/* 9. Final CTA, under a band of the Stand's cross-stitch ornament */
.section.final {
  position: relative;
  padding-top: 72px;
  background: var(--color-text);
  color: #fff;
  text-align: center;
}

.section.final::before {
  content: "";
  position: absolute;
  inset: 20px 0 auto;
  height: 24px;
  background: var(--ornament) repeat-x center / 24px 24px;
}

.final__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.final__lead {
  max-width: 34em;
  margin: 0 0 24px;
  color: #d9d6d0;
  text-wrap: balance;
}

.final__request {
  margin: 8px 0 0;
}

.final :focus-visible {
  outline-color: #fff;
}

.dialog {
  width: min(440px, calc(100% - 32px));
  border: 0;
  border-radius: var(--radius);
  padding: 24px;
}

.dialog::backdrop {
  background: rgb(0 0 0 / 0.5);
}

.dialog__close {
  float: right;
  border: 0;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.field {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.field label,
.field legend {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.field input[type="text"],
.field input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
}

.field input[aria-invalid="true"] {
  border-color: var(--color-error);
}

.field .choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  font-weight: 400;
}

.field__error,
.form__error {
  color: var(--color-error);
  font-size: 0.9rem;
  margin: 4px 0 0;
}

/* ---- Order form (ticket 03) ---- */

.button--block {
  display: block;
  width: 100%;
}

.dialog--wide {
  width: min(560px, calc(100% - 32px));
}

.field select,
.field textarea {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
}

.field textarea {
  width: 100%;
}

.field select {
  min-width: 5em;
}

.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--color-error);
}

.field__hint {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 4px 0 0;
}

.field__optional {
  color: var(--color-muted);
  font-weight: 400;
}

.field .choice--block {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 8px;
}

.choice__hint {
  flex-basis: 100%;
  padding-left: 1.6em;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.order-form__total {
  margin: 8px 0 0;
  font-size: 1.1rem;
}

.order-form__note {
  margin: -8px 0 16px;
}

.order-form__offer {
  margin-top: 12px;
  text-align: center;
}

.order-form__offer a {
  color: var(--color-accent);
}

/* ---- Nova Poshta city and branch search (ticket 06) ---- */

.lookup {
  position: relative;
}

.lookup__options {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  max-height: 280px;
  margin: 4px 0 0;
  padding: 4px 0;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}

.lookup__option {
  padding: 10px 12px;
  cursor: pointer;
  line-height: 1.3;
}

.lookup__option[aria-selected="true"],
.lookup__option:hover {
  background: var(--color-tint);
}

.lookup__message {
  padding: 10px 12px;
  color: var(--color-muted);
}

/* ---- Bot protection: the Turnstile widget on both forms (ticket 07) ---- */

.turnstile {
  margin: 8px 0 12px;
  min-height: 65px; /* the widget's height, so the button doesn't jump when it appears */
}

/* ---- Thank-you pages (ticket 03; ticket 04's payment result can reuse them) ---- */

.thank-you {
  max-width: 640px;
  padding-block: 48px;
}

.thank-you__lead {
  font-size: 1.2rem;
}

.thank-you__note {
  color: var(--color-muted);
}

/* The failed-payment page's "another Payment method" form (story 39). */
.switch-payment {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-line);
}

/* ---- Seller placeholders (ticket 10) ---- */
/* Highlights fields the Seller must fill in before launch; see docs/placeholders.md. */

.placeholder {
  background: #fff1a8;
  color: var(--color-text);
  outline: 1px dashed #b88a00;
  border-radius: 3px;
  padding: 0 0.2em;
  font-weight: 600;
}

/* ---- Legal pages: offer, privacy, returns (ticket 10) ---- */

.site-header .logo {
  color: inherit;
  text-decoration: none;
}

.legal-back {
  margin-left: auto;
  color: var(--color-accent);
}

.legal {
  max-width: 760px;
  padding-block: 24px 48px;
}

.legal h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 8px;
}

.legal h2 {
  font-size: 1.2rem;
  margin: 32px 0 8px;
}

.legal__lead {
  color: var(--color-muted);
}

.legal a {
  color: var(--color-accent);
}

.legal__seller {
  margin: 24px 0;
  padding: 12px 16px;
  border: 1px solid var(--color-line);
  background: #fff;
  border-radius: var(--radius);
}

.legal__seller p {
  margin: 4px 0;
}

.legal__details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
}

.legal__details dt {
  font-weight: 600;
}

.legal__details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---- Footer (ticket 10) ---- */

.site-footer {
  margin-top: 48px;
  padding-block: 32px;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 0.95rem;
}

.site-footer--compact {
  margin-top: 0;
  padding-block: 24px;
}

.site-footer__inner {
  display: grid;
  gap: 24px;
}

@media (min-width: 800px) {
  .site-footer__inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

.site-footer p {
  margin: 0 0 4px;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-weight: 700;
  color: var(--color-text);
}

.site-footer__ownership {
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.site-footer__contacts a {
  display: inline-block;
  min-height: 44px;
  padding-block: 10px;
  color: var(--color-accent);
  vertical-align: middle;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-footer--compact .site-footer__links {
  flex-flow: row wrap;
  gap: 0 24px;
}

.site-footer__links a {
  color: inherit;
  padding-block: 11px;
}
