:root {
  --background: hsl(42 34% 95%);
  --foreground: hsl(192 38% 14%);
  --surface: hsl(40 35% 98%);
  --surface-alt: hsl(42 22% 91%);
  --primary: hsl(184 45% 25%);
  --primary-soft: hsl(177 27% 79%);
  --accent: hsl(20 42% 56%);
  --border: hsl(40 19% 84%);
  --muted: hsl(195 16% 38%);
  --white-soft: hsl(42 32% 97%);
  --shadow-soft: 0 24px 60px -26px hsl(184 40% 20% / 0.22);
  --shadow-card: 0 12px 40px -24px hsl(184 40% 20% / 0.18);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
a,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  overflow-x: clip;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
}

.header-contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.88rem;
  color: var(--primary);
  max-width: min(100%, 520px);
}

.header-contacts a {
  color: var(--primary);
  text-decoration: none;
}

.header-contacts a:hover {
  color: var(--accent);
}

.header-contacts__sep {
  color: var(--muted);
  user-select: none;
}

.brand {
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 3rem;
  line-height: 1;
  color: var(--primary);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-left: auto;
  margin-right: 12px;
}

.site-nav a,
.footer-grid a {
  transition: color 0.25s ease;
}

.site-nav a:hover,
.footer-grid a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid hsl(184 20% 30% / 0.12);
  border-radius: 50%;
  background: hsl(40 35% 98% / 0.92);
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--primary);
  border-radius: 999px;
}

button {
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.78;
  transform: none;
}

.button-solid {
  background: var(--primary);
  color: var(--white-soft);
  box-shadow: var(--shadow-soft);
}

.button-outline {
  border-color: hsl(184 35% 30% / 0.2);
  color: var(--primary);
  background: transparent;
}

.button-light {
  background: var(--white-soft);
  color: var(--primary);
}

.hero-section {
  position: relative;
  padding: 152px 0 72px;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--background);
  background-image: linear-gradient(135deg, hsl(42 34% 95%) 0%, hsl(42 34% 95% / 0.96) 42%, hsl(42 34% 95% / 0.22) 100%), url('./assets/hero-waves.jpg');
  background-repeat: no-repeat;
  background-position: center, right center;
  background-size: auto, cover;
}

.hero-grid,
.features-row,
.features-tagline,
.about-grid,
.section-heading,
.services-grid {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  min-height: 520px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 2rem;
  line-height: 1.1;
}

.eyebrow.light {
  color: hsl(42 30% 96% / 0.9);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

h1 {
  margin-top: 16px;
  font-size: clamp(3.25rem, 5vw, 5.3rem);
  line-height: 1.02;
  color: var(--primary);
}

h1 em {
  color: var(--accent);
  font-style: normal;
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-weight: 400;
}

.hero-text {
  max-width: 540px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.features-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 86px;
}

.features-tagline {
  margin-top: 36px;
}

.features-callout {
  margin: 0;
  padding: 26px 28px 26px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid hsl(40 15% 84% / 0.85);
  border-left: 5px solid var(--accent);
  box-shadow: var(--shadow-card);
}

.features-callout__lead {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.14rem;
  line-height: 1.45;
  color: var(--foreground);
}

.features-callout__lead strong {
  color: var(--primary);
  font-weight: 700;
}

.features-callout__question {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid hsl(40 19% 84% / 0.65);
  font-size: 1rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--muted);
}

.feature-card,
.service-card,
.experience-badge {
  background: var(--surface);
  border: 1px solid hsl(40 15% 84% / 0.8);
  box-shadow: var(--shadow-card);
}

.feature-card,
.service-card {
  padding: 32px;
  border-radius: var(--radius-md);
}

.feature-icon,
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: hsl(184 30% 94%);
  font-size: 1.4rem;
}

.feature-card h2,
.service-card h3,
.about-copy h2,
.section-heading h2 {
  color: var(--primary);
}

.feature-card h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.feature-card p,
.service-card p,
.about-copy p,
.section-heading p,
.footer-brand p,
.footer-grid li,
.stat-item span {
  color: var(--muted);
}

.section-space {
  padding: 124px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.about-media {
  position: relative;
}

.about-media img {
  width: 100%;
  aspect-ratio: 1.2 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.experience-badge {
  position: absolute;
  right: -28px;
  bottom: -28px;
  display: grid;
  gap: 4px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
}

.experience-badge strong,
.stat-item strong {
  color: var(--primary);
  font-family: Georgia, "Times New Roman", serif;
}

.experience-badge strong {
  font-size: 2.5rem;
  line-height: 1;
}

.experience-badge--text strong {
  font-size: 1.35rem;
  line-height: 1.15;
}

.experience-badge--text span {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--muted);
}

.about-copy h2,
.section-heading h2 {
  margin-top: 10px;
  font-size: clamp(2.3rem, 4vw, 3.6rem);
  line-height: 1.08;
}

.about-copy > p:not(.eyebrow):not(.about-lead) {
  margin-top: 24px;
  font-size: 1.04rem;
}

.about-lead {
  margin: 0 0 16px;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--primary);
}

.about-copy .about-lead + .eyebrow {
  margin-top: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 22px;
  margin-top: 36px;
}

.stat-item {
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

.stat-item strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}

.stat-item span {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
}

.services-section {
  background: hsl(40 20% 91% / 0.45);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 60px;
  text-align: center;
}

.section-heading > p:not(.eyebrow) {
  margin: 18px auto 0;
  max-width: 560px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  min-height: 260px;
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.mission-section {
  background: hsl(40 20% 91% / 0.45);
}

.mission-panel {
  position: relative;
  z-index: 1;
  overflow: hidden;
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 48px 44px;
  border-radius: var(--radius-lg);
  text-align: center;
  background: var(--surface);
  border: 1px solid hsl(40 15% 84% / 0.85);
  box-shadow: var(--shadow-card);
}

.mission-panel__eyebrow {
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 1.85rem);
}

.mission-panel h2,
.mission-panel__lead {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.mission-panel h2 {
  margin-top: 12px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.18;
  color: var(--primary);
}

.mission-panel__lead {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.62;
}

.mission-panel .button {
  margin-top: 28px;
}

.site-footer {
  padding: 96px 0 40px;
  background: var(--primary);
  color: var(--white-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.brand-footer {
  display: inline-block;
  color: var(--white-soft);
}

/* Длинное название + .brand { white-space: nowrap } ломали колонки */
.footer-brand {
  min-width: 0;
}

.footer-brand .brand.brand-footer {
  display: block;
  max-width: 100%;
  white-space: normal;
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  hyphens: manual;
  color: var(--white-soft);
}

.footer-brand p,
.footer-grid ul {
  margin: 18px 0 0;
}

.footer-grid h3 {
  font-size: 1.15rem;
  color: var(--white-soft);
}

.footer-grid ul {
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 12px;
}

.site-footer .footer-brand p,
.site-footer .footer-grid li,
.site-footer .footer-bottom span {
  color: hsl(42 24% 94% / 0.76);
}

.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 24px;
  row-gap: 10px;
  padding-top: 30px;
  margin-top: 54px;
  border-top: 1px solid hsl(42 24% 94% / 0.22);
  font-size: 0.84rem;
  line-height: 1.45;
}

.footer-bottom span:first-child {
  min-width: 0;
}

.site-footer .footer-bottom a {
  color: hsl(42 24% 94% / 0.88);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer .footer-bottom a:hover {
  color: var(--accent);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: hsl(192 38% 14% / 0.55);
  cursor: pointer;
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  max-height: none;
  overflow: visible;
  padding: 28px 28px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

@media (max-height: 720px) {
  .modal__dialog {
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
  }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.modal__close:hover {
  color: var(--primary);
}

.modal__title {
  margin: 0 36px 8px 0;
  font-size: 1.5rem;
  color: var(--primary);
}

.modal__hint {
  margin: 0 0 20px;
  font-size: 0.92rem;
  color: var(--muted);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--foreground);
}

.modal-form__field input,
.modal-form__field textarea {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white-soft);
}

.modal-form__field textarea {
  resize: vertical;
  min-height: 100px;
}

.modal-form__field input.modal-field--error,
.modal-form__field textarea.modal-field--error {
  border-color: hsl(8 65% 52%);
  box-shadow: 0 0 0 1px hsl(8 65% 52% / 0.35);
}

.modal-form__check--error {
  padding: 10px 12px;
  margin: -10px -12px;
  border-radius: var(--radius-sm);
  outline: 2px solid hsl(8 65% 52%);
  outline-offset: 0;
}

.modal-form__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--muted);
  cursor: pointer;
}

.modal-form__check input {
  margin-top: 3px;
}

.modal-form__check a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-form__check a:hover {
  color: var(--accent);
}

.modal-form__submit {
  margin-top: 4px;
}

@keyframes formSuccessFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.success-notification {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10100;
  max-width: min(90vw, 420px);
  padding: 1.75rem 1.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.success-notification.active {
  display: block;
  animation: formSuccessFadeIn 0.3s ease-out;
}

.success-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.success-content svg {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  color: hsl(158 55% 38%);
}

.success-content__title {
  margin: 0 0 0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.success-content__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Политика конфиденциальности */
.legal-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.legal-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  font-size: 0.95rem;
  text-decoration: none;
}

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

.legal-page {
  padding: 48px 0 72px;
}

.legal-page__inner {
  max-width: 720px;
}

.legal-page h1 {
  margin: 0 0 28px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--primary);
}

.legal-page h2 {
  margin: 32px 0 12px;
  font-size: 1.15rem;
  color: var(--primary);
}

.legal-page p,
.legal-page li {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

.legal-page ul {
  margin: 12px 0 0;
  padding-left: 1.35rem;
}

.legal-page a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.legal-footer {
  padding: 28px 0 48px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

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

@media (max-width: 1100px) {
  .hero-grid,
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .features-row {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: 440px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .experience-badge {
    right: 20px;
    bottom: 20px;
  }
}

@media (max-width: 820px) {
  .site-header {
    position: absolute;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 20px 0;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav,
  .header-cta {
    display: none;
  }

  .site-nav.is-open {
    display: flex;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 20px;
    background: hsl(40 35% 98% / 0.98);
    border: 1px solid hsl(40 15% 84% / 0.9);
    box-shadow: var(--shadow-card);
  }

  .hero-section {
    padding-top: 136px;
  }

  .section-space {
    padding: 92px 0;
  }

  .mission-panel {
    padding: 52px 28px;
    border-radius: 28px;
  }

}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .brand {
    font-size: 2.5rem;
  }

  h1 {
    font-size: 2.9rem;
  }

  .hero-text,
  .about-copy > p:not(.eyebrow):not(.about-lead),
  .section-heading > p:not(.eyebrow),
  .mission-panel__lead {
    font-size: 1rem;
  }

  .hero-actions,
  .stats-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .feature-card,
  .service-card {
    padding: 26px;
  }

  .experience-badge {
    position: static;
    margin-top: 16px;
  }

  .stats-grid {
    display: grid;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    justify-items: start;
    row-gap: 8px;
  }
}
