/* ==========================================================================
   SkyPets — Home page
   Layout, components and interactions.
   ========================================================================== */

.desktop-sticky {
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 8px 22px rgba(15, 46, 32, 0.14);
}

.nav-inner,
.hero-inner,
.content-grid,
.footer-inner {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.main-nav {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid rgba(36, 95, 59, 0.14);
  backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--green);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.logo-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: transparent;
}

.logo-mark img {
  width: 76px;
  height: 76px;
  display: block;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 700;
}

.nav-links a {
  min-width: 104px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: #fff7df;
  border: 1px solid rgba(36, 95, 59, 0.12);
  transition:
    color 0.22s ease,
    background 0.22s ease,
    transform var(--hover-duration) var(--hover-ease),
    box-shadow var(--hover-duration) ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--green-deep);
  background: var(--yellow);
  box-shadow: var(--hover-shadow);
  transform: translateY(var(--hover-lift)) scale(var(--hover-scale));
}

.nav-links a[aria-current="page"] {
  color: var(--green-deep);
  background: var(--yellow);
}

.nav-links a:active {
  transform: translateY(-1px) scale(1.04);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-phone .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-phone-label {
  display: none;
}

.lang {
  position: relative;
  color: var(--green);
  font-weight: 800;
}

.language-switcher {
  position: relative;
}

.language-toggle {
  min-height: 42px;
  border: 1px solid rgba(36, 95, 59, 0.22);
  border-radius: var(--radius);
  padding: 0 14px;
  background: #fff7df;
  color: var(--green);
  font-weight: 900;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.language-toggle::after {
  content: "▾";
  margin-left: 8px;
  font-size: 11px;
}

.language-toggle:hover,
.language-switcher.open .language-toggle {
  background: var(--yellow);
  color: var(--green-deep);
  box-shadow: 0 10px 22px rgba(36, 95, 59, 0.18);
  transform: translateY(-1px);
}

.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 92px;
  display: none;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 34px rgba(15, 46, 32, 0.13);
  z-index: 50;
}

.language-switcher.open .language-menu {
  display: grid;
  gap: 4px;
}

.language-menu button {
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--green-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
}

.language-menu button:hover {
  background: var(--yellow-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(36, 95, 59, 0.18);
}

.btn-primary {
  background: var(--yellow);
  color: var(--green-deep);
}

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-outline {
  background: #fff7df;
  color: var(--green);
  border: 1px solid rgba(36, 95, 59, 0.22);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.28) 38%, rgba(0, 0, 0, 0.02) 72%),
    url("../images/main-page-dog.jpg") center center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(0deg, var(--cream), rgba(251, 248, 237, 0));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 72px 0 92px;
}

.hero-copy {
  max-width: 660px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--yellow);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow {
  font-size: 18px;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subtitle {
  margin: 20px 0 0;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
  max-width: 650px;
  margin: 30px 0 28px;
}

.hero-point {
  min-height: 76px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 28px rgba(15, 46, 32, 0.08);
  color: var(--green-dark);
}

.hero-point strong {
  display: block;
  color: var(--green);
  margin-bottom: 4px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.section-intro {
  width: min(1180px, calc(100% - 44px));
  margin: 36px auto 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  align-items: end;
  gap: 28px;
}

.section-intro > div,
.section-intro > p {
  justify-self: center;
  text-align: center;
}

.section-intro h2 {
  margin: 0;
  color: var(--green-dark);
  font-size: 34px;
  line-height: 1.1;
}

.section-intro p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

/* TASK-010: Russian copy needs the full grid-track width for balanced
   centring and wrapping. English retains the approved intrinsic layout. */
html[lang="ru"] .section-intro > div {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  text-align: center;
}

html[lang="ru"] .section-intro h2 {
  max-width: 100%;
  font-size: 30px;
}

html[lang="ru"] .section-intro .eyebrow {
  width: 100%;
  max-width: none;
  margin-inline: auto;
}

html[lang="ru"] .section-intro > p {
  width: min(100%, 500px);
  max-width: none;
  margin-inline: auto;
  justify-self: center;
  text-align: center;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 42px;
}

.panel {
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.form-panel {
  padding: 28px;
}

.form-title {
  margin: 0;
  color: var(--green-dark);
  font-size: 28px;
}

.mandatory {
  margin: 8px 0 0;
  color: var(--green);
  font-weight: 900;
}

.form-privacy-note {
  max-width: 100%;
  margin: 6px 0 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.form-block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.form-block h3 {
  margin: 0 0 14px;
  color: var(--green-dark);
  font-size: 17px;
}

.form-contact-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 4px;
}

.form-contact-note {
  color: #d32f2f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pet-specify:not(.is-active) {
  visibility: hidden;
}

@media (max-width: 900px) {
  .pet-specify:not(.is-active) {
    display: none;
  }
}

.pets-list {
  display: grid;
  gap: 22px;
}

.pet-entry {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pet-entry + .pet-entry {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pet-entry-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  padding: 0;
  color: var(--green-dark);
  font-size: 17px;
  font-weight: 900;
}

.pet-badge {
  display: inline-flex;
  width: 190px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #8fb99a;
  border-radius: var(--radius);
  background: #d3e7d6;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.pet-remove,
.pet-add {
  color: var(--green);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.pet-remove {
  padding: 3px 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.pet-add {
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: transparent;
  font-size: 13px;
}

.pet-remove:hover,
.pet-remove:focus-visible,
.pet-add:hover,
.pet-add:focus-visible {
  color: var(--green-dark);
}

.pet-add:disabled {
  opacity: 0.5;
  cursor: default;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfdfa;
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  font: inherit;
  transition: border 0.18s ease, box-shadow 0.18s ease;
}

.pet-grid select {
  height: 43px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(36, 95, 59, 0.1);
  background: #fff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.span-2 {
  grid-column: span 2;
}

.form-footer {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

/* Honeypot: present for bots, but out of view, out of the tab order and out
   of the accessibility tree. */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Before Turnstile renders, the empty slot must not take space. Once rendered
   it stays collapsed on its own and only grows if a challenge has to be shown,
   so it is never hidden with display:none: Turnstile refuses to run a
   challenge inside a hidden container. */
.turnstile-field:empty {
  display: none;
}

.form-status {
  margin: 0;
  font-weight: 800;
  line-height: 1.5;
}

.form-status.is-success {
  padding: 13px 14px;
  border: 1px solid rgba(36, 95, 59, 0.24);
  border-radius: var(--radius);
  background: rgba(36, 95, 59, 0.06);
  color: var(--green);
}

.form-status.is-error {
  padding: 13px 14px;
  border: 1px solid var(--error);
  border-radius: var(--radius);
  background: var(--error-soft);
  color: var(--error);
}

.btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.req {
  color: var(--error);
}

/* Validation state: the red highlight is always accompanied by a text
   message, so colour is never the only error signal. */
.field-invalid > .field-label {
  color: var(--error);
}

.field-error {
  color: var(--error);
  font-size: 12px;
  font-weight: 800;
}

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

input[aria-invalid="true"]:focus,
select[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
  border-color: var(--error);
  box-shadow: 0 0 0 4px var(--error-ring);
}

.form-error {
  margin: 0;
  color: var(--error);
  font-weight: 900;
}

.faq-panel {
  position: sticky;
  top: calc(var(--nav-height) + 22px);
  padding: 24px;
}

.faq-panel h2 {
  margin: 0;
  color: var(--green-dark);
  font-size: 28px;
  line-height: 1.15;
}

.faq-panel > p {
  margin: 10px 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfdfa;
  overflow: hidden;
}

summary {
  padding: 15px 16px;
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 900;
  list-style: none;
}

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

summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--green-deep);
  font-weight: 900;
}

details[open] summary::before {
  content: "-";
}

.faq-answer {
  padding: 0 16px 16px 50px;
  color: var(--muted);
  line-height: 1.55;
}

.faq-answer > * {
  margin: 0 0 10px;
}

.faq-answer > *:last-child {
  margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
  padding-left: 20px;
}

.faq-answer li + li {
  margin-top: 6px;
}

.faq-answer a {
  color: var(--green);
  font-weight: 800;
}

.faq-measurement-guide {
  display: block;
  width: 100%;
  height: auto;
}

.footer {
  background: var(--green-deep);
  color: #fff;
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.86);
}

/* Both footer rows share one three-column grid, so the middle column is
   centred on the page and the side columns stay symmetrical. */
.footer-social,
.footer-legal {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.footer-social {
  min-height: 126px;
}

.footer-social > *:nth-child(2) {
  text-align: center;
}

.footer-contact-group {
  align-self: center;
  justify-self: start;
  padding-top: 10px;
}

.footer-contact-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
}

.footer-contacts {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(237, 247, 229, 0.92);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

/* Real clickable contact buttons. The padding scales with the icon so the
   clickable area grows proportionally. */
.footer-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--green-deep);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}

.footer-contact:focus-visible {
  color: var(--green-deep);
  background: rgba(255, 255, 255, 0.78);
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(15, 46, 32, 0.18);
  outline: 2px solid var(--green-deep);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .footer-contact:hover {
    color: var(--green-deep);
    background: rgba(255, 255, 255, 0.78);
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(15, 46, 32, 0.18);
  }
}

.footer-contact .icon {
  width: 40px;
  height: 40px;
  display: block;
}

.footer-legal {
  margin-top: 14px;
}

.footer-legal > *:first-child {
  grid-column: 2;
  text-align: center;
}

.footer-legal > *:nth-child(2) {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.footer-legal sup,
.footer-credit sup {
  font-size: 0.6em;
  line-height: 0;
  vertical-align: super;
}

.footer-compact {
  padding-block: 12px;
}

.footer-compact .footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;
  row-gap: 10px;
}

.footer-compact .footer-contact-group {
  grid-column: 1;
  grid-row: 1 / -1;
  padding-top: 0;
}

.footer-compact .footer-contact-title {
  margin-bottom: 3px;
}

.footer-compact .footer-contacts {
  padding-block: 5px;
}

.footer-compact .footer-contact {
  padding-block: 3px;
}

.footer-center {
  display: contents;
  line-height: 1.4;
}

.footer-center > span {
  grid-column: 2;
  min-width: 0;
  line-height: 1.4;
  text-align: center;
}

.footer-center > span:first-child {
  grid-row: 2;
}

.footer-center > span:nth-child(2) {
  grid-row: 3;
}

.footer-credit {
  grid-column: 3;
  grid-row: 3;
  align-self: end;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

body[data-page] .footer {
  padding-bottom: 96px;
}

body[data-page] .footer-compact {
  padding-bottom: 12px;
}

.floating-request-cta {
  position: fixed;
  right: max(clamp(14px, 2.4vw, 32px), calc(env(safe-area-inset-right) + 12px));
  bottom: max(clamp(14px, 2.4vw, 32px), calc(env(safe-area-inset-bottom) + 12px));
  z-index: 25;
  min-height: clamp(44px, 3.6vw, 52px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 0.7vw, 10px);
  padding: 0 clamp(14px, 1.6vw, 22px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(0, 20, 8, 0.57);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  box-shadow: 0 10px 24px rgba(15, 46, 32, 0.16);
  color: #fff;
  font-size: clamp(14px, calc(8px + 0.55vw), 16px);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.floating-request-cta-icon {
  width: clamp(17px, 1.4vw, 20px);
  height: clamp(17px, 1.4vw, 20px);
  flex: 0 0 auto;
}

.floating-request-cta:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 20, 8, 0.72);
  box-shadow: 0 12px 28px rgba(15, 46, 32, 0.22);
}

.floating-request-cta:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 3px;
}

.floating-request-cta:active {
  background: rgba(0, 20, 8, 0.76);
}

.floating-request-cta.is-hidden-by-footer {
  visibility: hidden;
  pointer-events: none;
}

#request {
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

/* TASK-011: RU follows the approved EN footer concept with contact links on
   the left and the longer translated registration text on the right. */
html[lang="ru"] .footer-social {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 24px;
}

html[lang="ru"] .footer-contacts {
  justify-content: flex-start;
  flex-wrap: nowrap;
  margin-left: 0;
}

html[lang="ru"] .footer-social > span {
  width: min(100%, 760px);
  justify-self: end;
  text-align: right;
  line-height: 1.5;
}

.mobile-menu {
  display: none;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 11px 14px;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 900px) {
  .footer-compact {
    padding-block: 10px 12px;
  }

  .footer-compact .footer-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    justify-items: center;
    row-gap: 6px;
  }

  .footer-compact .footer-center {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }

  .footer-compact .footer-center > span {
    grid-column: auto;
    grid-row: auto;
  }

  .footer-compact .footer-credit {
    grid-column: 1;
    grid-row: auto;
    align-self: auto;
    justify-self: center;
    text-align: center;
  }

  .footer-compact .footer-contact-group {
    grid-column: 1;
    grid-row: auto;
  }

  .nav-phone {
    position: relative;
    padding-top: 14px;
  }

  .nav-phone-label {
    position: absolute;
    top: 0;
    left: 50%;
    display: block;
    transform: translateX(-50%);
    color: var(--green-dark);
    font-size: 11px;
    line-height: 12px;
    font-weight: 800;
  }

  .footer-social {
    min-height: 0;
  }

  .footer-contact-group {
    justify-self: center;
    padding-top: 0;
    text-align: center;
  }

  .footer-legal > *:first-child,
  .footer-legal > *:nth-child(2) {
    grid-column: auto;
    justify-self: center;
  }

  body[data-page] .footer {
    padding-bottom: 76px;
  }

  body[data-page] .footer-compact {
    padding-bottom: 12px;
  }

  #request {
    scroll-margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-links a,
  .language-toggle,
  .btn,
  .footer-contact,
  .floating-request-cta {
    transition-duration: 0.01ms;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible,
  .footer-contact:hover,
  .footer-contact:focus-visible,
  .btn:hover {
    transform: none;
  }
}
