/* =========================================================
   RESET
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  position: relative;
  background: #002d86;
}

button,
input {
  font-family: inherit;
}

button {
  border: none;
  outline: none;
  cursor: pointer;
}

/* =========================================================
   PAGE
   ========================================================= */
.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  background-image: url("/images/bg-image.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.page.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================================================
   Z INDEX
   ========================================================= */
#page-language {
  z-index: 10;
}
#page-details {
  z-index: 20;
}
#page-loading {
  z-index: 30;
}
#page-video {
  z-index: 40;
}
#page-thankyou {
  z-index: 50;
}

/* =========================================================
   HEADER / LOGO
   ========================================================= */
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100dvw;
  padding-top: 2.2dvh;
  padding-left: 4.2dvw;
  z-index: 10;
}

.logo {
  display: block;
  width: clamp(38px, 24dvw, 228px);

  height: auto;
  object-fit: contain;
  margin: 0.5rem;
}

/* =========================================================
   COMMON PAGE CONTENT
   ========================================================= */
.page-content {
  position: relative;
  width: 100dvw;
  height: 100dvh;
  padding-left: 5dvw;
  padding-right: 5dvw;
}

/* =========================================================
   COMMON RED BUTTON
   ========================================================= */
.red-button {
  display: flex;
  align-items: center;
  justify-content: center;
  /* height: clamp(38px, 6dvh, 48px); */
  background: #ed0b16;
  color: #ffffff;
  font-size: clamp(14px, 2.8dvw, 26px);
  padding: 0.8rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 1px;
  transition:
    transform 0.1s ease,
    opacity 0.1s ease;
}

.red-button:active {
  transform: scale(0.97);
}
.red-button:hover {
  opacity: 0.92;
}

/* =========================================================
   PAGE 1: LANGUAGE SELECTION
   ========================================================= */
.language-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.language-heading {
  color: #ffffff;
  font-size: clamp(16px, 7.2dvw, 52px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2dvh;
  text-align: center;
}

.language-grid {
  width: min(80dvw, 528px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(3px, 1.3dvw, 6px);
}

.language-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 2px;
  color: #092b7c;
  position: relative;
  transition:
    transform 0.1s ease,
    background 0.15s ease;
}

.language-card:active {
  transform: scale(0.96);
}
.language-card.selected {
  background: #ed0b16;
  color: #ffffff;
}

.language-native {
  height: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 8.8dvw, 48px);
  line-height: 1;
  font-weight: 700;
}

.language-name {
  margin-top: 0.5dvh;
  font-size: clamp(8px, 3.2dvw, 28px);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.english-card .language-native {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(24px, 7.5dvw, 32px);
}

.language-confirm {
  position: absolute;
  left: 50%;
  bottom: 3dvh;
  /* width: min(42dvw, 165px); */
  transform: translateX(-50%);
}

.language-confirm:active {
  transform: translateX(-50%) scale(0.97);
}

/* =========================================================
   PAGE 2: STORE DETAILS
   ========================================================= */
.details-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  top: 20dvh;
}

.details-heading {
  width: 100%;
  color: #ffffff;
  text-align: center;
  /* font-size: clamp(16px, 4.4dvw, 21px); */
  font-size: clamp(16px, 6.2dvw, 52px);
  font-weight: 700;
  margin-bottom: 3dvh;
}

.details-form {
  width: min(85dvw, 560px);
  margin-top: 2dvh;
}

.form-field {
  width: 100%;
  margin-bottom: 2.2dvh;
}

.form-label {
  display: block;
  color: #ffffff;
  /* font-size: clamp(8px, 2.5dvw, 11px); */
  font-size: clamp(14px, 2dvw, 52px);
  font-weight: 700;
  margin-bottom: 0.8dvh;
  letter-spacing: 0.1px;
}

.text-input {
  width: 100%;
  /* height: clamp(38px, 6dvh, 44px); */
  height: clamp(38px, 6dvh, 92px);
  padding-left: 4dvw;
  padding-right: 4dvw;
  border: none;
  outline: none;
  border-radius: 2px;
  background: #ffffff;
  color: #222222;
  /* font-size: clamp(9px, 2.7dvw, 12px); */
  font-size: clamp(9px, 3.2dvw, 28px);
  font-style: italic;
}

.text-input::placeholder {
  color: #5c6680;
  opacity: 1;
}

.file-input-wrapper {
  position: relative;
  width: 100%;
  /* height: clamp(38px, 6dvh, 44px); */
  height: clamp(38px, 6dvh, 92px);
  display: flex;
  background: #ffffff;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.file-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding-left: 4dvw;
  padding-right: 2dvw;
  color: #5c6680;
  /* font-size: clamp(9px, 2.7dvw, 12px); */
  font-size: clamp(9px, 3.2dvw, 26px);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browse-button {
  /* width: clamp(68px, 20dvw, 80px); */
  width: clamp(68px, 30dvw, 102px);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ed0b16;
  color: #ffffff;
  font-size: clamp(9px, 3dvw, 16px);
  /* font-size: clamp(8px, 2.3dvw, 10px); */
  font-weight: 700;
  cursor: pointer;
}

.real-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.details-continue {
  position: fixed;
  left: 50%;
  bottom: 3dvh;
  width: min(44dvw, 165px);
  margin: 0;
  transform: translateX(-50%);
}

.details-continue:active {
  transform: translateX(-50%) scale(0.97);
}

/* =========================================================
   PAGE 3: LOADING
   ========================================================= */
#page-loading {
  background-image:
    linear-gradient(rgba(0, 14, 50, 0.82), rgba(0, 14, 50, 0.82)),
    url("/images/bg-image.png");
}

.loading-content {
  width: 100dvw;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-bar-container {
  width: min(70dvw, 240px);
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  margin-top: 2dvh;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: #ffffff;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.loading-percent {
  color: #ffffff;
  /* font-size: clamp(9px, 2.5dvw, 12px); */
  font-size: clamp(9px, 4.2dvw, 38px);
  font-weight: 400;
  margin-top: 1dvh;
}

.loading-image {
  /* width: clamp(38px, 11dvw, 48px);
  height: clamp(38px, 11dvw, 48px); */
  width: clamp(38px, 28dvw, 182px);
  height: clamp(38px, 28dvw, 182px);
  object-fit: contain;
  margin-bottom: 1dvh;
}

.loading-text {
  color: #ffffff;
  /* font-size: clamp(9px, 2.7dvw, 12px); */
  font-size: clamp(9px, 4.2dvw, 38px);
  font-weight: 400;
  white-space: nowrap;
  text-align: center;
}

#loading-dots {
  display: inline-block;
  width: 4dvw;
  min-width: 16px;
  text-align: left;
}

/* =========================================================
   PAGE 4: VIDEO RESULT
   ========================================================= */
.video-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 8dvh;
}

.video-container {
  width: min(74dvw, 480px);
  aspect-ratio: 232 / 418;
  position: relative;
  overflow: hidden;
  background: #123a87;
}

.result-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(50px, 16dvw, 64px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  z-index: 2;
}

.video-play-button::after {
  content: "";
  margin-left: 0.8dvw;
  width: 0;
  height: 0;
  border-top: clamp(8px, 3dvw, 12px) solid transparent;
  border-bottom: clamp(8px, 3dvw, 12px) solid transparent;
  border-left: clamp(12px, 4dvw, 18px) solid #ed0b16;
}

.video-actions {
  width: min(74dvw, 480px);
  display: flex;
  gap: 1.5dvw;
  margin-top: 2dvh;
}

.video-action-button {
  flex: 1;
  height: clamp(38px, 6dvh, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ed0b16;
  color: #ffffff;
  font-size: clamp(9px, 2.8dvw, 13px);
  font-weight: 700;
  text-transform: uppercase;
}

.share-icon {
  width: 4dvw;
  height: 4dvw;
  max-width: 16px;
  max-height: 16px;
  margin-right: 1.5dvw;
  position: relative;
}

.share-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 1px;
  width: 70%;
  height: 65%;
  border: 1.5px solid #ffffff;
  border-top: none;
}

.share-icon::after {
  content: "↗";
  position: absolute;
  top: -40%;
  right: -20%;
  color: #ffffff;
  font-size: 4dvw;
  line-height: 1;
  max-font-size: 16px;
}

/* =========================================================
   PAGE 5: THANK YOU
   ========================================================= */
.thankyou-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.thankyou-heading {
  color: #ffffff;
  font-size: clamp(24px, 7dvw, 34px);
  font-weight: 700;
  margin-bottom: 3dvh;
  text-align: center;
}

.homepage-button {
  width: min(50dvw, 190px);
  height: clamp(38px, 6dvh, 44px);
  font-size: clamp(10px, 2.8dvw, 13px);
}
.experience-link {
  color: #ffffff;
  text-align: center;
}
@media only screen and (min-width: 768px) {
  #page-pc-view {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .page.active {
    display: none;
  }
}
