* {
  box-sizing: border-box;
}

:root {
  --selva-dark: #042918;
  --selva-green: #00a859;
  --selva-bright: #39db80;
  --selva-cream: #fffdf5;
  --selva-sand: #f2eddd;
  --selva-text: #163424;
  --selva-muted: #5d735f;
  --selva-line: rgba(4, 41, 24, 0.12);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", Arial, sans-serif;
  color: var(--selva-text);
  background: var(--selva-sand);
}

main {
  width: 100%;
  overflow: hidden;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  background: var(--selva-cream);
}

body.is-lesson-mode .hero {
  display: none;
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(56px, 7vw, 96px) clamp(32px, 8vw, 120px);
  color: #fff;
  background:
    linear-gradient(rgba(4, 41, 24, 0.86), rgba(4, 41, 24, 0.92)),
    url("images/gardener.png") center / cover;
  border-radius: 0 72px 220px 0;
  box-shadow: 18px 0 36px rgba(4, 41, 24, 0.15);
}

.brand-mark,
.section-tag,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-mark {
  background: #124d2d;
  color: var(--selva-bright);
}

.leaf {
  color: var(--selva-bright);
  font-size: 10px;
}

h1,
h2 {
  margin: 0;
  font-family: "Barlow Condensed", "DM Sans", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  margin-top: 34px;
  font-size: clamp(58px, 7vw, 108px);
  line-height: 0.9;
}

.hero-subtitle {
  max-width: 790px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.35;
  font-weight: 650;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 42px;
}

.hero-points span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(57, 219, 128, 0.32);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.lead-panel {
  align-self: center;
  width: min(100% - 40px, 420px);
  margin: 40px auto;
  padding: 30px;
  border: 1px solid var(--selva-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(4, 41, 24, 0.12);
}

.panel-kicker,
.section-tag {
  background: rgba(0, 168, 89, 0.1);
  color: #087541;
}

.lead-panel h2 {
  margin-top: 18px;
  color: var(--selva-dark);
  font-size: 42px;
  line-height: 0.95;
}

.lead-panel p {
  color: var(--selva-muted);
  font-weight: 650;
  line-height: 1.45;
}

.lead-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.lead-form label {
  display: grid;
  gap: 7px;
  color: var(--selva-dark);
  font-size: 14px;
  font-weight: 850;
}

.lead-form input,
.lead-form select {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid rgba(4, 41, 24, 0.18);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--selva-text);
  background: #fffdf8;
  font: inherit;
  font-weight: 650;
}

.lead-form input:focus,
.lead-form select:focus {
  outline: 3px solid rgba(57, 219, 128, 0.24);
  border-color: var(--selva-green);
}

.lead-form input.is-invalid {
  border-color: #b42318;
  background: #fff8f6;
}

.field-error {
  display: none;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.field-error:not(:empty) {
  display: block;
}

.lead-form button,
.whatsapp-cta {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 14px 18px;
  color: #fff;
  background: var(--selva-green);
  box-shadow: 0 10px 24px rgba(0, 168, 89, 0.24);
  font: inherit;
  font-size: 17px;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.lead-form button:hover,
.whatsapp-cta:hover {
  background: #00be64;
}

.privacy-note {
  margin-bottom: 0;
  font-size: 12px;
}

.lesson-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 74px 0;
}

body.is-lesson-mode .lesson-section {
  width: min(1280px, calc(100% - 32px));
  min-height: 100vh;
  padding: clamp(24px, 4vw, 54px) 0;
}

.lesson-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.lesson-header h2 {
  max-width: 760px;
  margin-top: 16px;
  color: var(--selva-dark);
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.95;
}

.lesson-progress {
  width: min(520px, 100%);
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(4, 41, 24, 0.12);
  box-shadow: inset 0 0 0 1px rgba(4, 41, 24, 0.06);
}

.lesson-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--selva-green), var(--selva-bright));
  transition: width 0.25s ease;
}

.lesson-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  gap: 24px;
  align-items: start;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 8px solid var(--selva-dark);
  background: #000;
  box-shadow: 0 18px 44px rgba(4, 41, 24, 0.18);
  cursor: pointer;
}

.video-shell:fullscreen,
.video-shell:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: #000;
}

.video-shell.is-mobile-expanded {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.video-shell:fullscreen .youtube-player,
.video-shell:fullscreen .youtube-player iframe,
.video-shell:-webkit-full-screen .youtube-player,
.video-shell:-webkit-full-screen .youtube-player iframe {
  width: 100vw;
  height: 100dvh;
  aspect-ratio: auto;
}

.video-shell.is-mobile-expanded .youtube-player,
.video-shell.is-mobile-expanded .youtube-player iframe {
  width: 100vw;
  height: min(56.25vw, 100dvh);
  aspect-ratio: 16 / 9;
}

.video-shell.is-mobile-expanded .youtube-top-mask {
  display: none;
}

.video-shell.is-mobile-expanded .custom-video-controls {
  top: calc(50% + min(28.125vw, 50dvh) - 78px);
  bottom: auto;
  left: 12px;
  right: 12px;
}

.youtube-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  pointer-events: none;
}

.youtube-player iframe {
  width: 100%;
  height: 100%;
}

.youtube-top-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0));
  pointer-events: auto;
  z-index: 2;
}

.custom-video-controls {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(57, 219, 128, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: rgba(2, 31, 18, 0.92);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.video-shell:focus-within .custom-video-controls,
.video-shell.is-controls-visible .custom-video-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.custom-video-controls button {
  min-height: 42px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--selva-green);
  font: inherit;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

.custom-video-controls .fullscreen-toggle {
  width: 42px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.custom-video-controls .fullscreen-toggle:hover {
  background: rgba(57, 219, 128, 0.2);
}

.video-progress-block {
  min-width: 170px;
  flex: 1;
  display: grid;
  gap: 8px;
}

.video-progress-block span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.video-progress-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.video-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--selva-bright);
  transition: width 0.25s ease;
}

.diagnosis-panel {
  position: relative;
  border-radius: 8px;
  padding: 26px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(0, 168, 89, 0.18), rgba(4, 41, 24, 0) 46%),
    var(--selva-dark);
  border: 1px solid rgba(57, 219, 128, 0.2);
  box-shadow: 0 18px 44px rgba(4, 41, 24, 0.16);
}

.diagnosis-kicker {
  display: inline-flex;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--selva-bright);
  background: rgba(57, 219, 128, 0.12);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diagnosis-panel h3 {
  margin: 18px 0 12px;
  font-family: "Barlow Condensed", "DM Sans", Arial, sans-serif;
  font-size: clamp(38px, 3.5vw, 52px);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.diagnosis-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.42;
  font-weight: 750;
}

.authority-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}

.authority-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.15;
  font-weight: 850;
}

.authority-list span:first-child,
.authority-list span:nth-child(2) {
  color: var(--selva-bright);
  background: rgba(57, 219, 128, 0.12);
}

.authority-note {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}

.diagnosis-microcopy {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}

.whatsapp-cta {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
  text-align: center;
}

@media (max-width: 920px) {
  .hero,
  .lesson-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-copy {
    min-height: 560px;
    border-radius: 0 0 80px 0;
  }

  .lead-panel {
    width: min(100% - 28px, 520px);
    margin: -52px auto 42px;
    z-index: 2;
  }

  .lesson-header {
    align-items: start;
    flex-direction: column;
  }

  .custom-video-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 12px;
  }
}

@media (max-width: 560px) {
  .hero-copy {
    padding: 42px 22px 92px;
  }

  h1 {
    font-size: 58px;
  }

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

  .lead-panel {
    padding: 22px;
  }

  .lead-panel h2 {
    font-size: 36px;
  }

  .lesson-section {
    width: min(100% - 28px, 1180px);
    padding: 48px 0;
  }

  .custom-video-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .video-progress-block {
    min-width: 0;
  }

  .video-progress-block span {
    text-align: left;
  }

  .diagnosis-panel {
    padding: 22px;
  }
}
