html {
  font-size: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  html {
    font-size: 50%;
  }
}

body {
  margin: 0;
  background: #fff;
  color: #111;

  font-family: "Roboto", sans-serif;
  font-size: 1.6rem;
  width: 100%;
}

body.is-loading {
  overflow: hidden;
}

.page-loader,
.map-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(15, 15, 15, 0.94);
}

.map-loader {
  position: absolute;
  inset: 0;
  z-index: 3100;
  background: rgba(15, 15, 15, 0.66);
}

.page-loader.is-hidden,
.map-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 0.3rem solid;
  border-color: #fff #fff transparent transparent;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

.loader::after,
.loader::before {
  content: "";
  box-sizing: border-box;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 0.3rem solid;
  border-color: transparent transparent #dc0510 #dc0510;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  animation: rotationBack 0.5s linear infinite;
  transform-origin: center center;
}

.loader::before {
  width: 3.2rem;
  height: 3.2rem;
  border-color: #fff #fff transparent transparent;
  animation: rotation 1.5s linear infinite;
}

.map-loader .loader {
  transform: scale(0.85);
}

.loader-text {
  margin: 0;
  color: #ebebeb;
  letter-spacing: 0.04em;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes rotationBack {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

@keyframes caret-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.title {
  position: relative;
  width: 100%;
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  font-size: 2rem;
  text-align: center;
  margin: 0 auto;
  color: #fff;
}

.bg {
  position: absolute;
  top: 0;
  width: 100%;
  height: 80vh;
  background-image:
    linear-gradient(rgba(15, 15, 15, 0.5), rgba(15, 15, 15, 0.45)),
    url("./assets/images/bg1.jpg");
  background-position: 50% 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #0f0f0f;
}

.logo {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 20%;
  height: auto;
}

.title-scroll-btn {
  position: absolute;
  bottom: 1rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  z-index: 30;
}

.title-scroll-btn:focus-visible {
  outline: 0.2rem solid #ebebeb;
  outline-offset: 0.3rem;
  border-radius: 0.4rem;
}

.title-scroll-btn .ph-caret-down {
  display: block;
  font-size: 5rem;
  color: #ebebeb;
  animation: caret-pulse 1.4s ease-in-out infinite;
}

.title .text {
  position: absolute;
}

.title h1 {
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 5rem;
  line-height: 1.2;
}

.title-break-mobile {
  display: inline;
  margin-left: 0.25ch;
}

.title h2 {
  /* opacity: 0.8; */
  margin-bottom: 3rem;
  max-width: 58ch;
  line-height: 1.2;
}

.title h3 {
  font-weight: 400;
  display: inline-block;
  text-align: center;
  max-width: 48ch;
  line-height: 1.2;
}

.authors {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
  text-align: center;
  line-height: 1.2;
  padding-bottom: 1.6erem;
}

.authors p {
  margin: 0;
  font-size: 1.2rem;
  color: #0f0f0f;
  opacity: 0.8;
}

.spacer {
  position: relative;
}

.map-cta {
  font-size: 1.6rem;
  color: #84030a;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  padding-top: 2rem;
}

.map-cta p {
  width: 80%;
  text-align: center;
  margin: 0 auto;
}

.map-cta p:last-child {
  margin-top: 0.8rem;
}

.map-cta-up-btn {
  border: 0;
  background: transparent;
  color: #84030a;

  cursor: pointer;
  line-height: 1;
  position: absolute;
  top: 0.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
}

.map-cta-up-btn:focus-visible {
  outline: 0.2rem solid #84030a;
  outline-offset: 0.25rem;
  border-radius: 0.4rem;
}

.map-cta-up-btn .ph-caret-up {
  display: block;
  font-size: 3rem;
  animation: caret-pulse 1.4s ease-in-out infinite;
}

.map-wrap {
  position: relative;
}

.map-cta-down-btn {
  border: 0;
  background: transparent;
  color: #84030a;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
}

.map-cta-down-btn:focus-visible {
  outline: 0.2rem solid #84030a;
  outline-offset: 0.25rem;
  border-radius: 0.4rem;
}

.map-cta-down-btn .ph-caret-down {
  display: block;
  font-size: 3rem;
  animation: caret-pulse 1.4s ease-in-out infinite;
}

.day {
  display: inline;
  position: absolute;
  top: 10%;
  left: 5%;
  z-index: 30;
  padding: 1rem;
  background-color: #0f0f0f;
}

.day p {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  color: #ebebeb;
  font-size: 1.6rem;
  font-weight: 500;
}

#map {
  --map-vertical-padding: clamp(24px, 6vh, 32px);
  /* width: min(110rem, calc(100vw - 4rem), calc((100vh - 7rem) * 16 / 9)); */

  width: min(110rem, calc(100vw - 4rem), calc((100dvh - 7rem) * 16 / 9));

  padding-top: var(--map-vertical-padding);
  padding-bottom: var(--map-vertical-padding);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

.country {
  fill: #d9d9d9;
  stroke: #fff;
  stroke-width: 0.06rem;
}

.target-ring {
  fill: none;
  stroke: #dc0510;
  stroke-width: 1rem;
  opacity: 1;

  @media (max-width: 768px) {
    stroke-width: 0.5rem;
  }
}

.route {
  stroke: #dc0510;
  stroke-width: 0.2rem;
  fill: none;
}

.impact {
  fill: #dc0510;
}

.map-labels {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  color: #ebebeb;
  font-weight: lighter;
}

.map-label {
  position: absolute;
  background: #0f0f0f;
  border-radius: 0.4rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(40%, 30%);
  box-sizing: border-box;
}

.map-label--iran {
  background: none;
  color: #fff;
  text-transform: uppercase;
  font-size: 2rem;
  font-weight: lighter;
  transform: translate(0%, 30%);
}

.map-label--tehran,
.map-label--natanz,
.map-label--isfahan {
  opacity: 0;
}

.map-card {
  position: absolute;
  width: 20%;
  background: rgba(15, 15, 15, 0.8);
  color: #ebebeb;
  padding: 1rem;
  font-size: 1.6rem;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  z-index: 20;
}

.map-card--1 {
  opacity: 1;
}

.map-card--2 {
  opacity: 0;
}

.map-ui--day2 .map-card,
.map-ui--day4 .map-card,
.map-ui--day5 .map-card {
  left: 10%;
}

.map-target-cards {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.target-card {
  position: absolute;
  width: 32rem;
  background: #ebebeb;
  padding: 1.2rem;
  box-sizing: border-box;
  opacity: 0;
  display: flex;
}

.target-card h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.target-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.target-card img {
  width: 16rem;
  height: 16rem;
  align-self: center;
  object-fit: cover;
}

.target-card__text {
  margin-left: 1rem;
  align-self: center;
}

.target-point {
  fill: #0f0f0f;
  stroke: #ffffff;
  stroke-width: 0.2rem;
}

.day2-labels {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.map-label--day2 {
  background: #0f0f0f;
  color: #ebebeb;
  border-radius: 0.4rem;
  padding: 0.35rem 0.6rem;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.route--day2 {
  fill: none;
  stroke: #e2a321;
  stroke-width: 0.3rem;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.country-day2 {
  stroke: #ebebeb;
  stroke-width: 0.06rem;
}

.route--day3,
.route--day4 {
  fill: none;
  stroke: #e2a321;
  stroke-width: 0.2rem;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route--day5 {
  fill: none;
  stroke: #dc0510;
  stroke-width: 0.2rem;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.country-day3 {
  stroke: #ebebeb;
  stroke-width: 0.06rem;
}

.day3-labels {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.map-label--day3,
.map-label--day4 {
  background: #0f0f0f;
  color: #ebebeb;
  border-radius: 0.4rem;
  padding: 0.35rem 0.6rem;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.map-ui--day3 .map-card {
  right: auto;
  left: 3rem;
}

.map-ui--day3 .map-card--day3-3 {
  left: 4rem;
}
.impact--day3,
.impact--day2,
.impact--day4,
.impact--day5 {
  fill: #0f0f0f;
  stroke: #ffffff;
  stroke-width: 0.1rem;
}

.route--day3-response {
  fill: none;
  stroke: #dc0510;
  stroke-width: 0.2rem;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route--turkey-intercepted {
  fill: none;
  stroke: #e2a321;
  stroke-width: 0.2rem;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-card--day4-2 {
  z-index: 20;
}

.map-card--day5-target {
  z-index: 20;
}

/* scroll progress  */
.scroll-progress {
  position: absolute;
  top: var(--map-vertical-padding);
  bottom: var(--map-vertical-padding);
  right: 0;
  width: 1.5rem;

  z-index: 3000;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.scroll-progress__track {
  position: relative;
  width: 0.4rem;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: visible;
  pointer-events: none;
}

.scroll-progress__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: auto;
  width: 100%;
  height: 0%;
  border-radius: 999px;
  background: linear-gradient(to top, #dc0510 0%, #fbb525 100%);
}

.scroll-progress__thumb {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: auto;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, 50%);
  box-shadow: 0 0 0 0.125rem rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.scroll-progress__markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scroll-progress__marker {
  position: absolute;
  left: 50%;
  width: 0.8rem;
  height: 0.8rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  transform: translate(-50%, 50%);
  cursor: pointer;
  pointer-events: auto;
}

.scroll-progress__marker::after {
  content: attr(data-label);
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 1.6rem;
  color: #fff;
  text-shadow: #0f0f0f 1px 0 5px;
}

.scroll-progress__marker.is-active {
  background: #fbb525;
}

@media (max-width: 1024px) {
  #map {
    aspect-ratio: 4/4;
  }
  .title h1 {
    margin-bottom: 3rem;
  }

  .map-card {
    font-size: 1.2rem;
    right: 15%;
  }

  .bg {
    height: 100%;
    background-attachment: scroll;
    background-image:
      linear-gradient(rgba(15, 15, 15, 0.5), rgba(15, 15, 15, 0.45)),
      url("./assets/images/bg1-mobile.jpg");
    /* background-position: 50% 800%; */
    background-position: center bottom;
  }
}

@media (max-width: 1280px) and (min-width: 769px) {
  .map-card {
    width: 20%;
    font-size: 1.2rem;
    padding: 0.8rem;
  }

  .target-card {
    width: 24rem;
    max-width: calc(100% - 2rem);
    padding: 1rem;
  }

  .target-card img {
    width: 12rem;
    height: 12rem;
  }

  .day p {
    font-size: 1.2rem;
  }
}

@media (max-width: 769px) {
  #map {
    aspect-ratio: 4/4;
  }
  .scroll-progress {
    width: 1rem;
  }

  .scroll-progress__track {
    width: 0.4rem;
  }

  .scroll-progress__thumb {
    width: 0.8rem;
    height: 0.8rem;
  }
}

@media (max-width: 768px) {
  .scroll-progress {
    right: 0.6rem;
  }

  .scroll-progress__marker::after {
    font-size: 1.2rem;
    right: 1.9rem;
  }

  .scroll-progress__marker {
    width: 0.1rem;
    height: 1.4rem;
  }
}

.outro {
  margin-bottom: 5rem;
}

/* mobile */
@media (max-width: 768px) {
  html {
    font-size: 50%;
  }
  .title {
    min-height: 100svh;
    font-size: 3rem;
  }

  .title-break-mobile {
    display: block;
    margin-left: 0;
  }

  .logo {
    width: 50%;
  }

  #map {
    width: calc(100vw - 2rem);
    /* aspect-ratio: 9 / 16; */
    aspect-ratio: 4/5;
    --map-vertical-padding: 0;
  }

  .map-card {
    width: 50%;
    right: 10%;
    top: 20%;
    padding: 1rem;
  }

  .target-card {
    /* width: 90%; */
    flex-direction: column;
    padding: 1rem;
    transform: translate(-50%, 1.5rem);
    /* left: 50%; */
  }

  .target-card img {
    width: 100%;
    height: auto;
    align-self: flex-start;
    padding-left: 1rem;
  }

  .target-card h3 {
    line-height: normal;
    font-size: 1.4rem;
    padding-top: 0.6rem;
  }

  .map-label {
    font-size: 1rem;
  }

  .map-label--day3,
  .map-label--day4 {
    font-size: 1rem;
  }

  .route,
  .route--day3,
  .route--day4 {
    stroke-width: 0.15rem;
  }

  .target-ring {
    stroke-width: 0.5rem;
  }

  .target-card img {
    width: 50%;
    height: auto;
  }

  .target-card {
    width: 50%;
  }

  .day {
    padding: 0.2rem 0.6rem;
  }

  .day p {
    font-size: 1.4rem;
  }

  .country p {
    font-size: 0.2rem;
  }

  .map-label {
    transform: translate(0%, 10%); /* less shift on mobile */
  }

  .map-label--day3,
  .map-label--day4 {
    transform: translate(0%, 10%);
  }

  .map-label--day2-hormuz {
    width: 10rem;
    text-wrap: wrap;
  }

  .ship-icon {
    width: 1.2rem;
    height: 1.2rem;
  }
}

@media (max-width: 480px) {
  #map {
    aspect-ratio: 9/16;
  }
  .map-cta {
    font-size: 1.3rem;
  }

  .target-card {
    padding: 0.8rem;
  }

  .title h1 {
    font-size: 3.2rem;
  }

  .title h2 {
    font-size: 2rem;
  }

  .title h3 {
    font-size: 1.6rem;
  }

  .map-card {
    line-height: 1.2;
  }
}
