/* Full-viewport GSAP slider, adapted from Nidal95 (CodePen qENQPBp) for Rio y Sol */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
}

.slider {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: none;
}

.slider .lang-toggle__btn {
  cursor: pointer;
}

.slider__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  flex-shrink: 0;
}

.slider__menu {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: none;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease;
  text-decoration: none;
  color: #fff;
}

.slider__menu:link,
.slider__menu:visited,
.slider__menu:hover,
.slider__menu:active {
  color: #fff;
}

.slider__menu:hover {
  border-color: rgba(255, 255, 255, 0.8);
}

.slider__menu-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: block;
  color: #fff;
  stroke: #fff;
}

.slider__header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.lang-toggle {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  overflow: hidden;
  flex-shrink: 0;
}

.lang-toggle__btn {
  margin: 0;
  appearance: none;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.lang-toggle__btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.lang-toggle__btn.is-active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.lang-toggle--about {
  border-color: rgba(56, 189, 248, 0.45);
}

.lang-toggle--about .lang-toggle__btn {
  color: rgba(255, 255, 255, 0.72);
}

.lang-toggle--about .lang-toggle__btn:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
}

.lang-toggle--about .lang-toggle__btn.is-active {
  background: rgba(56, 189, 248, 0.28);
  color: #fff;
}

.slider__label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  display: none;
}

.slider__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 32px 40px;
  min-height: 0;
  position: relative;
}

.slider__left {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  position: relative;
  z-index: 4;
}

.slider__title {
  font-size: clamp(42px, 11vw, 160px);
  font-weight: 700;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -0.02em;
  overflow: visible;
  position: relative;
  margin-top: auto;
  margin-bottom: auto;
  width: 100%;
  max-width: 100%;
}

/* One word = one line (no mid-word wraps from inline-block letters). Scale applied in JS when needed. */
.slider__title-line {
  display: block;
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
  transform-origin: left center;
}

.slider__title span {
  display: inline-block;
  will-change: transform;
}

.slider__footer {
  flex-shrink: 0;
  margin-top: 32px;
}

.slider__description {
  font-size: clamp(18px, 3.2vw, 28px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.38;
  text-transform: uppercase;
  max-width: min(100%, 38rem);
  text-wrap: balance;
  hyphens: manual;
}

@media (min-width: 1024px) {
  .slider__description br {
    display: none;
  }
}
.slider__cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  will-change: transform;
  z-index: 10;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  font-weight: 700;
}

.slider__right {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.slider__images {
  width: 100%;
  height: 100%;
  position: relative;
}

.slider__slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 55%;
  aspect-ratio: 1.4;
  overflow: hidden;
  will-change: transform, filter, opacity;
  contain: layout style;
}

.slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9);
}

/* Mobile: language toggle readable on bright slides; respect notch / home indicator */
@media screen and (max-width: 767px) {
  .slider__header {
    padding-top: max(24px, calc(24px + env(safe-area-inset-top, 0px)));
    padding-left: max(20px, calc(20px + env(safe-area-inset-left, 0px)));
    padding-right: max(20px, calc(20px + env(safe-area-inset-right, 0px)));
  }

  .slider__header-right {
    flex-shrink: 0;
    min-width: 0;
  }

  .slider__header .lang-toggle {
    position: relative;
    z-index: 6;
    background: rgba(0, 0, 0, 0.48);
    border-color: rgba(255, 255, 255, 0.58);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

@media screen and (min-width: 768px) {
  .slider__header {
    padding: 40px 56px;
  }

  .lang-toggle__btn {
    padding: 9px 14px;
    font-size: 11px;
  }

  .slider__menu {
    width: 92px;
    height: 92px;
  }

  .slider__menu-icon {
    width: 42px;
    height: 42px;
  }

  .slider__label {
    display: inline;
  }

  .slider__header-right {
    flex-direction: row;
    align-items: baseline;
    gap: 18px;
  }

  .slider__body {
    padding: 0 56px 56px;
  }

  .slider__footer {
    margin-top: 48px;
  }

  .slider__slide {
    width: 60%;
  }

  .slider__cursor {
    width: 88px;
    height: 88px;
  }
}

@media screen and (min-width: 1024px) {
  .slider__body {
    flex-direction: row;
  }

  .slider__left {
    width: 55%;
    flex-shrink: 0;
    min-width: 0;
    z-index: auto;
  }

  .slider__right {
    position: static;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    opacity: 1;
    pointer-events: auto;
  }

  .slider__slide {
    width: 68%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slider {
    cursor: auto;
  }

  .slider__menu {
    cursor: pointer;
  }

  .slider__cursor {
    display: none !important;
  }

  .slider__slide,
  .slider__title span {
    will-change: auto;
  }
}

/* --- About page (long-form strategy) --- */
/* One scroll root on <html>; dual overflow-y:auto on html+body breaks mouse wheel on some browsers */
html.about-root {
  height: auto;
  min-height: 100dvh;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: none;
}

html.about-root body {
  min-height: 100dvh;
  height: auto;
  overflow: visible;
  overscroll-behavior: none;
}

body.about {
  --strokeDashoffset: 0;
  --tabletVerticaloffset: 0px;
  font-weight: 400;
  background: #0c1222;
  color: rgba(255, 255, 255, 0.92);
  -webkit-font-smoothing: antialiased;
}

/* Gist-aligned: #world3d + #tablet parallax field */
.about__world3d {
  position: fixed;
  top: var(--tabletVerticaloffset);
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  z-index: 0;
  width: 90vw;
  max-width: 1200px;
  padding-top: 5vw;
  -webkit-perspective: 1000px;
  perspective: 1000px;
  shape-rendering: crispEdges;
  overflow: visible;
  pointer-events: none;
}

.about__tablet {
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transform-origin: 0% 50%;
  transform-origin: 0% 50%;
  -webkit-transform: rotateY(20deg);
  transform: rotateY(20deg);
  position: relative;
  display: block;
  width: 100%;
  height: 150vh;
  padding: 40px;
  padding-left: 140px;
  border-radius: 30px;
  opacity: 0.25;
  background: linear-gradient(109.61deg, #2d3d4f 4.26%, #12181f 84.84%);
}

.about__tablet::before {
  position: absolute;
  left: 120px;
  top: 20px;
  right: 20px;
  bottom: 20px;
  content: "";
  display: block;
  background-color: #0c1222;
  border: thin solid rgba(86, 90, 100, 0.53);
  border-radius: 20px;
}

.about__shell {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.about__river-svg-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow-x: clip;
}

/* Gist #svgPaths */
#aboutSvgPaths {
  position: absolute;
  top: 75px;
  left: 50%;
  z-index: 5;
  width: 740px;
  max-width: 100%;
  height: calc(100% - 75px);
  overflow: visible;
  filter: blur(1px);
  transform: translateX(-50%);
}

@media (min-width: 576px) {
  #aboutSvgPaths {
    transform: translateX(calc(-50% + 6vw));
  }
}

#aboutSvgPaths use {
  fill: none;
  stroke: url(#cl1);
  stroke-linecap: round;
  stroke-width: var(--dot);
  stroke-dashoffset: var(--strokeDashoffset);
}

/* Gist patterns per path (same order as <use> in markup) */
#aboutSvgPaths use:nth-of-type(1) {
  --dot: 20px;
  --gap: 50px;
  stroke-dasharray: var(--dot) var(--gap) 120px var(--gap) var(--dot) var(--gap) 300px var(--gap) var(--dot) var(--gap) 150px var(--gap) var(--dot) 20000px;
}

#aboutSvgPaths use:nth-of-type(2) {
  --dot: 34px;
  --gap: 60px;
  stroke-dasharray: var(--dot) var(--gap) 120px var(--gap) var(--dot) var(--gap) 300px var(--gap) var(--dot) var(--gap) 150px var(--gap) var(--dot) 20000px;
}

#aboutSvgPaths use:nth-of-type(3) {
  --dot: 25px;
  --gap: 40px;
  stroke-dasharray: var(--dot) var(--gap) 120px var(--gap) var(--dot) var(--gap) 250px var(--gap) var(--dot) var(--gap) 150px var(--gap) var(--dot) 20000px;
}

#aboutSvgPaths use:nth-of-type(4) {
  --dot: 40px;
  --gap: 70px;
  stroke-dasharray: var(--dot) var(--gap) 100px var(--gap) var(--dot) var(--gap) 200px var(--gap) var(--dot) 20000px;
}

@media (prefers-reduced-motion: reduce) {
  body.about {
    --strokeDashoffset: -2400;
    --tabletVerticaloffset: -65vh;
  }
}

.about__skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 16px;
  background: #38bdf8;
  color: #0c1222;
  font-weight: 600;
  z-index: 100;
}

.about__skip:focus {
  left: 16px;
  top: 16px;
}

.about__header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 4vw, 48px);
  background: rgba(12, 18, 34, 0.92);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  backdrop-filter: blur(10px);
}

.about__header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 16px;
  margin-left: auto;
}

.about__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.about__back:hover {
  border-color: rgba(56, 189, 248, 0.9);
  background: rgba(56, 189, 248, 0.12);
}

.about__back-icon {
  font-size: 18px;
  line-height: 1;
  opacity: 0.85;
}

.about__header-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(56, 189, 248, 0.85);
}

@media screen and (max-width: 640px) {
  .about__header {
    padding-top: max(20px, calc(20px + env(safe-area-inset-top, 0px)));
    padding-left: max(16px, calc(16px + env(safe-area-inset-left, 0px)));
    padding-right: max(16px, calc(16px + env(safe-area-inset-right, 0px)));
  }

  .about__header-right {
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px 12px;
  }

  .about__header-tag {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
  }

  .about__header .lang-toggle {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
  }
}

.about__main {
  position: relative;
  z-index: 1;
  padding: clamp(32px, 5vw, 64px) clamp(20px, 5vw, 72px) 80px;
  max-width: 44rem;
  margin: 0 auto;
}

.about__article {
  font-size: 17px;
  line-height: 1.65;
  text-align: justify;
  hyphens: none;
  -webkit-hyphens: none;
}

.about__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(56, 189, 248, 0.9);
  margin-bottom: 16px;
  text-align: start;
}

.about__title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: #fff;
  text-align: start;
}

.about__lede {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.about__section {
  margin-bottom: 36px;
}

.about__h2 {
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  margin-bottom: 14px;
  color: #e2e8f0;
  letter-spacing: -0.01em;
  text-align: start;
}

.about__section p {
  margin-bottom: 14px;
  color: rgba(226, 232, 240, 0.92);
}

.about__section p:last-child {
  margin-bottom: 0;
}

.about__section strong {
  font-weight: 600;
  color: #fff;
}

.about__section em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.88);
}

.about__footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 16px;
  text-align: start;
}

.about__footer p {
  margin-bottom: 12px;
  color: rgba(226, 232, 240, 0.88);
}

.about__link {
  color: #38bdf8;
  font-weight: 600;
  text-underline-offset: 3px;
}

.about__link:hover {
  color: #7dd3fc;
}
