/* ===== Тематичні CSS-змінні: Salud auditiva (DARK) ===== */
:root {
  --ear-bg: #0D1117;
  --ear-surface: #161B22;
  --ear-surface-alt: #1C2330;
  --ear-tone: #3DDC97;
  --ear-tone-hover: #5CF0B5;
  --ear-gold: #F5C542;
  --ear-ink: #E6EDF3;
  --ear-ink-dark: #0D1117;
  --ear-muted: #A9B4C2;
  --ear-line: #2D3748;
  --ear-gradient: linear-gradient(135deg, #3DDC97 0%, #2F80ED 100%);
  --ear-glow: 0 0 0 1px rgba(61, 220, 151, 0.18), 0 18px 40px rgba(0, 0, 0, 0.55);
  --ear-neo-dark: 10px 10px 22px #090C11;
  --ear-neo-light: -8px -8px 18px #1D2431;
  --ear-radius: 16px;
  --ear-radius-pill: 999px;
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

/* ===== Base (scoped під .ear-page, щоб перемагати preflight Tailwind) ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

.ear-page {
  margin: 0;
  background: var(--ear-bg);
  color: var(--ear-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}
.ear-page h1, .ear-page h2, .ear-page h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: var(--ear-ink);
  font-weight: 700;
}
.ear-page h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); margin: 0 0 0.5em; }
.ear-page h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin: 0 0 0.6em; }
.ear-page h3 { font-size: 1.25rem; margin: 0 0 0.5em; }
.ear-page p { margin: 0 0 1em; }
.ear-page a { color: var(--ear-tone); text-underline-offset: 3px; }
.ear-page a:hover { color: var(--ear-tone-hover); }
.ear-page a:focus-visible,
.ear-page button:focus-visible,
.ear-page input:focus-visible,
.ear-page textarea:focus-visible,
.ear-page summary:focus-visible {
  outline: 3px solid var(--ear-gold);
  outline-offset: 3px;
}
.ear-page img { max-width: 100%; height: auto; display: block; }

/* ===== Header ===== */
.ear-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 5%;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ear-line);
}
.ear-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 3px;
  width: 100%;
  background: var(--ear-gradient);
  transform-origin: 0 50%;
  animation: ear-grow linear both;
  animation-timeline: scroll(root);
}
.ear-brand a { display: inline-flex; align-items: center; }
.ear-brand img { height: 44px; width: auto; }

.ear-nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.ear-menu-button {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 12px;
  background: var(--ear-surface-alt);
  cursor: pointer;
  box-shadow: var(--ear-neo-light), var(--ear-neo-dark);
}
.ear-menu-button span {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 3px;
  background: var(--ear-ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.ear-nav-toggle:focus-visible + .ear-menu-button {
  outline: 3px solid var(--ear-gold);
  outline-offset: 3px;
}
.ear-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ear-nav a {
  color: var(--ear-ink);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.ear-nav a:hover { color: var(--ear-tone); border-color: var(--ear-tone); }

/* ===== Hero ===== */
.ear-hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(61, 220, 151, 0.14), transparent 45%),
    var(--ear-bg);
}
.ear-hero-inner {
  position: relative;
  z-index: 10;
  width: 45%;
  min-width: 300px;
  padding: 10vh 0 10vh 5%;
}
.ear-kicker {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--ear-radius-pill);
  background: rgba(245, 197, 66, 0.12);
  color: var(--ear-gold);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.ear-lead {
  font-size: 1.12rem;
  color: var(--ear-muted);
  max-width: 52ch;
}
.ear-hero-visual {
  position: absolute;
  top: 0;
  right: 0;
  width: 58%;
  height: 100%;
  margin: 0;
  opacity: 0.6;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 1;
}
.ear-hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.ear-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ear-bg) 0%, transparent 45%);
}

/* ===== Pill button ===== */
.ear-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 30px;
  border-radius: var(--ear-radius-pill);
  background: var(--ear-tone);
  color: var(--ear-ink-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 28px rgba(61, 220, 151, 0.28);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.ear-pill:hover {
  background: var(--ear-tone-hover);
  color: var(--ear-ink-dark);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(61, 220, 151, 0.38);
}

/* ===== Divider ===== */
.ear-divider {
  position: relative;
  height: 90px;
  background: var(--ear-bg);
  margin-top: -1px;
}
.ear-divider svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ear-wave-path { fill: var(--ear-surface); }

/* ===== Sections ===== */
.ear-section {
  position: relative;
  isolation: isolate;
  padding-top: 10vh;
  padding-top: 10dvh;
  padding-bottom: 10vh;
  padding-bottom: 10dvh;
  overflow: hidden;
}
.ear-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.6' fill='%233DDC97'/%3E%3C/svg%3E");
}
.ear-section-inner {
  position: relative;
  z-index: 10;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 5%;
}
.ear-section-content {
  background:
    linear-gradient(rgba(13, 17, 23, 0.9), rgba(13, 17, 23, 0.94)),
    url("img/bg2.webp") center / cover no-repeat;
}

/* Split (Content 1) */
.ear-split { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.ear-split-text { flex: 1 1 380px; }
.ear-split-figure { flex: 1 1 380px; margin: 0; }
.ear-split-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--ear-radius);
  box-shadow: var(--ear-glow);
}
.ear-pull {
  position: relative;
  margin: 28px 0;
  padding: 24px 28px 24px 34px;
  border-left: 6px solid var(--ear-tone);
  background: var(--ear-surface-alt);
  border-radius: var(--ear-radius);
  box-shadow: var(--ear-neo-dark), var(--ear-neo-light);
}
.ear-pull p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--ear-ink);
}
.ear-tip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--ear-radius);
  background: rgba(245, 197, 66, 0.08);
  border: 1px dashed rgba(245, 197, 66, 0.5);
}
.ear-tip p { margin: 0; color: var(--ear-muted); }
.ear-tip strong { color: var(--ear-gold); }

/* CTA strip */
.ear-cta-strip {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding-top: 10vh;
  padding-top: 10dvh;
  padding-bottom: 10vh;
  padding-bottom: 10dvh;
  background: url("img/bg.webp") center / cover no-repeat fixed;
}
.ear-cta-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, rgba(13, 17, 23, 0.92) 0%, rgba(13, 17, 23, 0.8) 55%, rgba(47, 128, 237, 0.45) 100%);
}
.ear-cta-strip .ear-section-inner { max-width: 760px; }
.ear-cta-text { color: var(--ear-muted); font-size: 1.1rem; }
.ear-cta-strip .ear-pill { margin-top: 18px; }

/* Features */
.ear-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}
@media (min-width: 680px) {
  .ear-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ear-feature {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 30px;
  border-radius: var(--ear-radius);
  background: var(--ear-surface);
  box-shadow: var(--ear-neo-dark), var(--ear-neo-light);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.ear-feature:hover { transform: translateY(-6px); box-shadow: var(--ear-glow); }
.ear-feature-icon {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ear-gold);
  color: var(--ear-ink-dark);
  box-shadow: 0 10px 24px rgba(245, 197, 66, 0.25);
}
.ear-icon { width: 64px; height: 64px; }
.ear-feature h3 { margin-bottom: 8px; }
.ear-feature p { color: var(--ear-muted); margin: 0; }
@media (min-width: 560px) {
  .ear-feature { flex-direction: row; align-items: flex-start; }
}

/* Content 2 strip */
.ear-strip {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: var(--ear-radius);
  overflow: hidden;
  background: var(--ear-surface);
  box-shadow: var(--ear-glow);
}
@media (min-width: 860px) {
  .ear-strip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
.ear-strip-figure { margin: 0; min-height: 320px; }
.ear-strip-figure img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.ear-strip-block { padding: 44px 40px; }
.ear-step-list {
  list-style: decimal;
  padding-left: 1.4em;
  margin: 18px 0 0;
  color: var(--ear-muted);
}
.ear-step-list li { margin-bottom: 12px; padding-left: 6px; }
.ear-step-list li::marker { color: var(--ear-tone); font-weight: 700; }

/* Form (floating card) */
.ear-form-card {
  position: relative;
  z-index: 10;
  max-width: 700px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px);
  border-radius: 24px;
  background: var(--ear-surface);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(61, 220, 151, 0.12);
}
.ear-address {
  font-style: normal;
  padding: 18px 20px;
  margin-bottom: 26px;
  border-radius: var(--ear-radius);
  background: var(--ear-surface-alt);
  color: var(--ear-muted);
}
.ear-address p { margin: 0 0 6px; }
.ear-address a { color: var(--ear-tone); }
.ear-form-field { display: block; margin-bottom: 18px; }
.ear-form-field span {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ear-ink);
}
.ear-form-field input,
.ear-form-field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--ear-line);
  background: var(--ear-bg);
  color: var(--ear-ink);
  font-family: var(--font-body);
  font-size: 1rem;
}
.ear-form-field textarea { min-height: 140px; resize: vertical; }
.ear-form-field input:focus,
.ear-form-field textarea:focus { border-color: var(--ear-tone); }
.ear-submit {
  width: 100%;
  margin-top: 6px;
  padding: 16px;
  border: 0;
  border-radius: var(--ear-radius-pill);
  background: var(--ear-tone);
  color: var(--ear-ink-dark);
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}
.ear-submit:hover { background: var(--ear-tone-hover); transform: translateY(-2px); }

/* FAQ */
.ear-faq-list {
  display: grid;
  gap: 20px;
  max-width: 860px;
  margin: 40px auto 0;
  padding: 0;
  list-style: none;
}
.ear-faq-item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 26px 28px;
  border-radius: var(--ear-radius);
  background: var(--ear-surface);
  box-shadow: var(--ear-neo-dark), var(--ear-neo-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ear-faq-item:hover { transform: translateX(6px); box-shadow: var(--ear-glow); }
.ear-faq-num {
  position: absolute;
  right: 14px;
  top: -14px;
  z-index: 0;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  opacity: 0.08;
  color: var(--ear-tone);
  pointer-events: none;
  user-select: none;
}
.ear-faq-details { position: relative; z-index: 10; }
.ear-faq-details summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding-right: 40px;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: var(--ear-ink);
}
.ear-faq-details summary::-webkit-details-marker { display: none; }
.ear-faq-details summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -4px;
  color: var(--ear-tone);
  font-size: 1.6rem;
}
.ear-faq-details[open] summary::after { content: "–"; }
.ear-faq-answer { margin: 14px 0 0; color: var(--ear-muted); }

/* Footer */
.ear-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 36px 5%;
  background: var(--ear-surface);
  border-top: 1px solid var(--ear-line);
  text-align: center;
}
.ear-footer-logo img { height: 48px; width: auto; margin: 0 auto; }
.ear-footer-links ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ear-footer-links a { color: var(--ear-tone); text-decoration: none; }
.ear-footer-links a:hover { color: var(--ear-tone-hover); text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .ear-menu-button { display: flex; }
  .ear-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 16px 5%;
    background: var(--ear-surface);
    border-bottom: 1px solid var(--ear-line);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }
  .ear-nav ul { flex-direction: column; gap: 4px; }
  .ear-nav-toggle:checked ~ .ear-nav { display: block; }
  .ear-nav-toggle:checked + .ear-menu-button span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .ear-nav-toggle:checked + .ear-menu-button span:nth-child(2) { opacity: 0; }
  .ear-nav-toggle:checked + .ear-menu-button span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

  .ear-hero-inner { width: 100%; padding: 12vh 5%; }
  .ear-hero-visual { width: 100%; clip-path: none; opacity: 0.25; }
  .ear-hero-visual::after {
    background: linear-gradient(180deg, var(--ear-bg) 0%, rgba(13, 17, 23, 0.4) 50%, var(--ear-bg) 100%);
  }
}
@media (min-width: 901px) {
  .ear-footer { flex-direction: row; justify-content: space-between; text-align: left; }
  .ear-footer-links ul { flex-direction: row; flex-wrap: wrap; gap: 24px; }
}
@media (max-width: 380px) {
  .ear-topbar { padding-left: 4%; padding-right: 4%; }
  .ear-brand img { height: 38px; }
  .ear-strip-block { padding: 32px 24px; }
  .ear-form-card { padding: 22px 18px; }
}

/* ===== Scroll-driven animations (CSS only) ===== */
@keyframes ear-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes ear-rise {
  from { opacity: 0; transform: translateY(48px); }
  to { opacity: 1; transform: translateY(0); }
}
.ear-reveal {
  animation: ear-rise linear both;
  animation-timeline: view();
  animation-range: entry 0% cover 32%;
}

@media (prefers-reduced-motion: reduce) {
  .ear-reveal, .ear-progress { animation: none; }
  .ear-page *, .ear-page *::before, .ear-page *::after { transition: none !important; }
  html { scroll-behavior: auto; }
}