/* Точечные правки после визуальной проверки прототипа. */
.calculator-sheet .form-section > legend {
  font-weight: 800;
}

.order-review {
  display: block;
  width: 100%;
  margin: 14px 0;
  box-sizing: border-box;
}

/* Небольшой знак апельсина вместо обычной точки в названии. */
.brand-block strong {
  position: relative;
  display: inline-block;
  width: max-content;
}

.brand-block > span {
  margin-top: 0;
  line-height: 1.05;
}

.brand-logo {
  display: block;
  width: 190px;
  height: auto;
}

.brand-dot {
  position: absolute;
  display: inline-block;
  width: 8px;
  height: 8px;
  right: -7px;
  bottom: 4px;
  margin: 0;
  border-radius: 50%;
  background: var(--orange);
  color: transparent;
  letter-spacing: 0;
  transform: none;
}

.order-form > .estimate-note,
.order-form > .button--wide {
  width: 100%;
  margin-inline: 0;
  box-sizing: border-box;
}

.brand-dot::after {
  content: "";
  position: absolute;
  left: 5px;
  top: -3px;
  width: 6px;
  height: 4px;
  border-radius: 100% 0 100% 0;
  background: #91a88a;
  transform: rotate(-24deg);
  transform-origin: left bottom;
}

/* Все три колонки подвала начинаются на одной высоте. */
footer > * {
  align-self: start;
}

footer h3 {
  margin: 0 0 14px;
  line-height: 1.15;
}

footer p {
  margin-top: 0;
}

.type-grid label:last-child {
  row-gap: 8px;
}

.type-grid label:last-child > strong,
.type-grid label:last-child > small {
  align-self: end;
}

/* Правдоподобные контурные эскизы для карточек основных услуг. */
.service-sketch--curtain {
  right: -6px;
  bottom: -12px;
  width: 52%;
  height: 68%;
}

.service-sketch--cornices {
  right: -12px;
  bottom: 8px;
  width: 61%;
  height: 48%;
}

.service-sketch--interior {
  right: -8px;
  bottom: -10px;
  width: 55%;
  height: 66%;
}

@media (hover: none) {
  .service-sketch {
    opacity: .13;
    transform: translateY(0);
  }
}

/* Загруженные снимки живут внутри растущей области загрузки. */
.upload-zone {
  min-height: 112px;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px dashed #cfbda9;
  border-radius: 10px;
  background: var(--orange-soft);
}

.upload-zone .upload {
  flex: 1 1 100%;
  min-height: 90px;
  border: 0;
  background: transparent;
}

.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.upload-zone .photo-preview {
  width: 100%;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-zone .photo-preview figure {
  margin: 0;
}

.upload-zone.has-photos {
  align-items: flex-start;
}

.upload-zone.has-photos .photo-preview {
  order: 1;
  flex: 1 1 auto;
  width: auto;
}

.upload-zone.has-photos .upload {
  order: 2;
  flex: 0 0 105px;
  width: 105px;
  min-height: 100px;
  border: 1px dashed #d6a17f;
  border-radius: 8px;
}

.upload-zone.has-photos .upload-prompt {
  display: none;
}

.upload-zone.has-photos .upload-plus {
  font-size: 28px;
}

@media (max-width: 720px) {
  .order-review {
    margin-top: 14px;
  }
}

/* Карточка услуги целиком ведёт к соответствующей заявке. */
.service-card {
  justify-content: center;
  cursor: pointer;
}

.service-card__content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.service-card__content .card-link {
  display: block;
  margin-top: 18px;
}

.service-card:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* Достижения студии и место под будущую фотографию салона. */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6vw;
  align-items: stretch;
  min-height: auto;
  padding-top: 54px;
  padding-bottom: 54px;
}

.about__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.about__content h2 {
  max-width: 560px;
}

.about__facts {
  display: grid;
  margin-top: 26px;
  border-top: 1px solid rgba(39, 48, 43, .16);
}

.about__facts article {
  padding: 16px 0;
  border-bottom: 1px solid rgba(39, 48, 43, .16);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.about__facts a {
  color: var(--orange-dark);
  font-size: 17px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.about__facts a:hover,
.about__facts a:focus-visible {
  color: var(--ink);
}

.about__accent {
  color: var(--orange);
  font-size: 17px;
}

.about__photo {
  position: relative;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  border: 1px solid rgba(39, 48, 43, .1);
  border-radius: 180px 180px 14px 14px;
  background: #e8e4dc;
  box-shadow: 0 18px 45px rgba(39, 48, 43, .12);
  color: var(--ink);
  text-align: center;
}

.about__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% center;
}

.upload-prompt small:first-of-type {
  max-width: 520px;
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 900px) {
  .about {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .about__photo {
    min-height: 340px;
  }
}

@media (min-width: 901px) {
  .about {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 5vw;
    min-height: calc(100svh - 132px);
    align-items: center;
  }

  .about__photo {
    width: 100%;
    height: clamp(390px, 58vh, 480px);
  }
}

/* Согласованный информационный подвал: реквизиты, маршрут и контакты. */
footer#contacts {
  padding: 30px max(8vw, 32px) 42px;
  grid-template-columns: minmax(220px, .85fr) minmax(310px, 1.35fr) minmax(210px, 1fr);
  gap: clamp(28px, 4vw, 64px);
}

footer#contacts h3 {
  margin: 0 0 12px;
}

.footer-identity,
.footer-location,
.footer-contacts {
  min-width: 0;
}

.footer-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-identity .brand-block {
  margin-bottom: 22px;
}

.footer-requisites {
  display: grid;
  gap: 4px;
}

.footer-requisites p,
.footer-location p,
.footer-contacts p {
  margin: 0;
}

.footer-requisites p {
  color: #f2f4f2;
  line-height: 1.45;
}

.footer-legal-links {
  display: grid;
  gap: 2px;
  margin-top: 18px;
}

.footer-legal-links a {
  width: max-content;
  max-width: 100%;
  color: #d8ddd8;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus-visible {
  color: #ff9b69;
}

.footer-legal-links a:nth-child(1) {
  margin-top: -10px;
}

.footer-legal-links a:nth-child(2),
.footer-legal-links a:nth-child(3) {
  margin-top: 5px;
}

@media (min-width: 1100px) {
  footer#contacts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-legal-links a {
    white-space: nowrap;
  }
}

.legal-link-placeholder {
  color: #d8ddd8;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: default;
}

.consent .legal-link-placeholder {
  color: inherit;
}

.consent a {
  color: #e87939;
}

.footer-legal-links .legal-link-placeholder {
  font-size: 14px;
  line-height: 1.35;
}

.footer-location address {
  display: grid;
  gap: 2px;
  color: #f2f4f2;
  font-size: 14px;
  font-style: normal;
  line-height: 1.45;
}

.footer-location address span {
  color: #d8ddd8;
}

.footer-hours {
  margin-top: 10px !important;
  color: #f2f4f2;
  font-weight: 700;
}

.footer-map-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: 166px;
  height: 40px;
  margin-top: 14px;
  padding: 0 13px;
  border: 1px solid #6b766f;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: background .18s ease, border-color .18s ease;
}

.footer-map-link > span {
  white-space: nowrap;
}

.footer-map-link img {
  display: block;
  width: 106px;
  height: auto;
  margin-left: -13px;
}

.footer-map-link:hover,
.footer-map-link:focus-visible {
  border-color: var(--orange);
  background: #fff7f2;
}

.footer-route {
  margin-top: 12px !important;
  line-height: 1.5;
}

.footer-contact-list {
  display: grid;
  gap: 5px;
}

.footer-contact-list p {
  color: #eef1ef;
  font-size: 14px;
  font-weight: 700;
}

.footer-copy-contact {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-copy-contact:hover,
.footer-copy-contact:focus-visible {
  color: #ff9b69;
}

.footer-contacts .contact-buttons {
  margin-top: 14px;
}

.footer-contacts .contact-button {
  flex: 0 0 38px;
}

@media (min-width: 1100px) {
  .footer-location,
  .footer-contacts {
    min-width: 0;
    justify-self: center;
  }

  .footer-location {
    width: min(100%, 520px);
    margin: 0;
  }

  .footer-contacts {
    width: max-content;
    max-width: 100%;
  }

  .footer-route {
    margin-right: 0 !important;
  }
}

@media (min-width: 901px) and (max-width: 1099px) {
  footer#contacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-location {
    margin: 0;
  }

  .footer-route {
    margin-right: 0 !important;
  }

  .footer-contacts {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  footer#contacts {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-inline: 25px;
  }

  .footer-location {
    max-width: 620px;
  }

  .footer-contacts {
    max-width: 520px;
  }
}

@media (max-width: 520px) {
  footer#contacts {
    padding-inline: 20px;
  }
}

@media (max-width: 650px) {
  .brand-logo {
    width: 158px;
  }
}

@media (max-width: 520px) {
  .about__photo {
    min-height: 285px;
    border-radius: 110px 110px 12px 12px;
  }
}

/* Реальная работа APELSIN вместо декоративной заглушки на первом экране. */
.hero__visual {
  isolation: isolate;
  background: var(--cream);
  border-radius: 0;
}

.hero__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% center;
}

.hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--cream) 0%,
    var(--cream) 18%,
    rgba(251, 250, 245, .98) 26%,
    rgba(251, 250, 245, .9) 34%,
    rgba(251, 250, 245, .68) 43%,
    rgba(251, 250, 245, .3) 52%,
    rgba(251, 250, 245, .06) 61%,
    transparent 70%
  );
}

@media (min-width: 901px) {
  .hero {
    position: relative;
    isolation: isolate;
    margin-bottom: 50px;
  }

  .hero__copy {
    position: relative;
    z-index: 2;
  }

  .hero__visual {
    position: absolute;
    z-index: 1;
    inset: 0 0 0 25%;
    width: auto;
    height: auto;
  }

  .hero__visual img {
    width: 89%;
    height: calc(100% + 28px);
    margin-left: auto;
    margin-top: -28px;
  }
}

@media (max-width: 900px) {
  .hero__visual {
    width: calc(100% + 50px);
    margin-inline: -25px;
  }
}

/* Телефонный первый экран: внимание остаётся на тексте и действии. */
@media (max-width: 650px) {
  .hero__visual {
    display: none;
  }

  .nav {
    justify-content: center;
    gap: clamp(9px, 3vw, 15px);
    overflow-x: clip;
    padding-inline: 8px;
  }
}

/* При переходе к разделу предыдущий экран не просвечивает под шапкой. */
.site-header {
  background: #fff;
  backdrop-filter: none;
}

#services,
#gallery,
#about,
#order,
#contacts {
  scroll-margin-top: 120px;
}

/* Экранные разделы остаются самостоятельными слоями без взаимного наложения. */
.services,
.gallery-teaser,
.about,
.order,
footer {
  position: relative;
  z-index: 1;
}

.services {
  background: var(--cream);
  isolation: isolate;
}

.services > * {
  position: relative;
  z-index: 1;
}

@media (min-width: 901px) {
  .hero,
  .services,
  .gallery-teaser,
  .about {
    min-height: calc(100svh - 116px);
  }

  .gallery-teaser {
    justify-content: flex-start;
    padding-top: 48px;
    padding-bottom: 30px;
  }

  .services {
    justify-content: flex-start;
    padding-top: 48px;
    padding-bottom: 30px;
  }

  .services .section-heading {
    margin-bottom: 22px;
  }

  .gallery-teaser .section-heading {
    margin-bottom: 22px;
  }

  .gallery-teaser .marquee-card {
    width: 400px;
    height: clamp(290px, 45vh, 340px);
  }

  .gallery-teaser .marquee-card:nth-child(3n + 2) {
    width: 325px;
  }
}

/* Карточки видов штор имеют одинаковую компактную высоту. */
.type-grid label,
.type-grid label.type-option--unknown {
  min-height: 154px;
}

.type-grid label.type-option--unknown {
  align-content: initial;
  row-gap: 0;
}

.type-grid label.type-option--unknown > strong {
  width: 100%;
  align-self: flex-start;
  margin-bottom: 0;
  text-align: left;
}

.type-grid label.type-option--unknown > small {
  width: 100%;
  align-self: flex-start;
  margin-top: 5px;
  margin-bottom: 0;
  text-align: left;
}

.range-scale {
  margin-top: -15px;
}

.unknown-note {
  margin-top: 10px;
}

/* Нейтральная карточка выбора материала с вопросительным знаком. */
.fabric-card--unknown .fabric-card__visual i {
  display: grid;
  place-items: center;
  background: #fff;
  color: #87938a;
  font-style: normal;
}

.fabric-card--unknown .fabric-card__visual i::after {
  content: "?";
  font-family: "Playfair Display", Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

/* Validation and required-field treatment agreed for the order form. */
.address-field {
  display: flex !important;
}

.field-label {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  width: max-content;
}

.required-mark {
  position: absolute;
  top: -0.42em;
  left: -0.62em;
  color: #d92d20;
  font-size: 1.12em;
  font-weight: 900;
  line-height: 1;
}

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

.field-error,
.field-notice {
  display: block;
  margin-top: -2px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.field-error {
  color: #d92d20;
}

.field-notice {
  color: var(--muted);
}

.form-grid input.is-invalid,
.form-grid textarea.is-invalid,
.conditional-field input.is-invalid {
  border-color: #d92d20;
  outline-color: #d92d20;
}

.modal-close {
  width: 40px;
  height: 40px;
  margin-right: 9px;
  font-weight: 600;
}

.fabric-note {
  display: block;
  margin: -3px 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.fabric-card__visual {
  height: 76px;
}

.fabric-card__visual img {
  display: block;
  width: 100%;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center;
}

/* Маска телефона и сообщения не меняют высоту отдельных строк контактов. */
.contact-grid {
  row-gap: 30px;
}

.contact-grid > label {
  position: relative;
}

.contact-grid .field-message {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-height: 17px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.phone-input-shell {
  position: relative;
  display: block;
  width: 100%;
}

.phone-input-shell input {
  width: 100%;
}

.phone-inline-hint {
  position: absolute;
  top: 50%;
  left: 25px;
  transform: translateY(-50%);
  color: #969c98;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
}

.phone-input-shell.has-value .phone-inline-hint {
  display: none;
}

.contact-grid .field-message .field-error {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

/* Сводка занимает высоту своего содержимого, без растягивания соседних карточек. */
.order-review__content,
.success-receipt {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 8px;
}

.order-review__content {
  padding: 0 12px 12px;
}

.order-review__content section,
.success-receipt section {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  column-gap: 14px;
  align-self: start;
  align-items: start;
  padding: 10px;
}

.order-review__content h4,
.success-receipt h4 {
  margin: 2px 0 0;
}

.order-review__content dl > div,
.success-receipt dl > div {
  padding: 3px 0;
}

.summary-curtains dl {
  display: block;
}

.summary-curtains > article,
.success-photo-section > .success-photo-list {
  grid-column: 2;
}

/* После отправки состав заявки изначально свёрнут, а действия остаются видимыми. */
.success-receipt-details {
  width: 100%;
  margin-top: 16px;
  border: 1px solid rgba(39, 48, 43, .16);
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
  overflow: hidden;
}

.success-receipt-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  list-style: none;
}

.success-receipt-details > summary::-webkit-details-marker {
  display: none;
}

.success-receipt-details[open] > summary span {
  transform: rotate(45deg);
}

.success-receipt {
  margin: 0;
  padding: 0 12px 12px;
}

.success-actions {
  margin-top: 12px;
}

@media (max-width: 650px) {
  .contact-grid {
    row-gap: 30px;
  }

  .order-review__content section,
  .success-receipt section {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .summary-curtains > article,
  .success-photo-section > .success-photo-list {
    grid-column: 1;
  }
}
.anti-spam-field {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
