:root {
  color-scheme: light;
  --sand: #f5f1e8;
  --ink: #203b3b;
  --turquoise: #2b8e8a;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
  background: var(--sand);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

.home {
  width: 100%;
  padding: 24px 0 0;
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  min-height: 64px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  background: rgb(245 241 232 / 96%);
  box-shadow: 0 -4px 18px rgb(32 59 59 / 7%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bottom-nav__link {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__link img {
  display: block;
  width: 24px;
  height: 24px;
}

.bottom-nav__link:focus-visible {
  outline: 2px solid var(--turquoise);
  outline-offset: 2px;
}

.featured {
  width: min(calc(100% - 36px), 620px);
  margin: 0 auto 14px;
}

.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1.52;
  border-radius: 20px;
  background: #d8e5df;
  box-shadow: 0 12px 30px rgb(39 64 57 / 10%);
  touch-action: pan-y;
}

.carousel__track {
  display: flex;
  height: 100%;
  transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
}

.carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 88%);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 3px 12px rgb(0 0 0 / 12%);
  -webkit-tap-highlight-color: transparent;
}

.carousel__arrow--previous {
  left: 12px;
}

.carousel__arrow--next {
  right: 12px;
}

.carousel__arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.carousel__arrow:focus-visible,
.carousel__dot:focus-visible {
  outline: 3px solid var(--turquoise);
  outline-offset: 3px;
}

.carousel__footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 9px 2px 0;
}

.carousel__count {
  color: #617171;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.carousel__count {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.carousel__dots {
  display: flex;
  position: absolute;
  left: 50%;
  gap: 7px;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
}

.carousel__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #bdc8c2;
  cursor: pointer;
  transition: width 180ms ease, background-color 180ms ease;
}

.carousel__dot.is-active {
  width: 20px;
  border-radius: 8px;
  background: var(--turquoise);
}

.section-nav {
  display: grid;
  width: min(calc(100% - 24px), 620px);
  min-height: 58px;
  margin: 0 auto 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
}

.section-nav a {
  min-width: 0;
  padding: 10px 2px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(11px, 3.35vw, 15px);
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.section-nav a:hover,
.section-nav a:focus-visible {
  color: var(--turquoise);
  text-decoration-color: currentColor;
}

.section-nav a:focus-visible,
.sea-video__sound:focus-visible {
  outline: 2px solid var(--turquoise);
  outline-offset: 3px;
}

.sea-video {
  position: relative;
  display: grid;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 420px;
  overflow: hidden;
  place-items: center;
  background-color: #6caaa9;
  background-image:
    linear-gradient(180deg, rgb(12 40 42 / 15%), rgb(12 40 42 / 30%)),
    url("../../../vidios/vidiodemar.jpeg");
  background-position: center;
  background-size: cover;
  color: var(--white);
  isolation: isolate;
}

.sea-video__media {
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  inset: 0;
  object-fit: cover;
}

.sea-video__phrase {
  margin: 0;
  padding: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 8vw, 52px);
  font-weight: 400;
  letter-spacing: 0.015em;
  text-align: center;
  text-shadow: 0 2px 18px rgb(0 0 0 / 24%);
}

.sea-video__sound {
  position: absolute;
  right: 18px;
  bottom: max(22px, env(safe-area-inset-bottom));
  display: grid;
  width: 42px;
  height: 42px;
  padding: 10px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  background: rgb(20 49 49 / 28%);
  color: var(--white);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sea-video__sound svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.sea-video__sound-off {
  display: none;
}

.sea-video__sound.is-muted .sea-video__sound-on {
  display: none;
}

.sea-video__sound.is-muted .sea-video__sound-off {
  display: block;
}

@media (min-width: 600px) {
  .home {
    padding-top: 32px;
  }

  .featured {
    margin-bottom: 16px;
  }

  .carousel {
    aspect-ratio: 1.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
