@font-face {
  font-family: Qomra;
  src: url("assets/qomra-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Qomra;
  src: url("assets/qomra-bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Lato Digits";
  src: url("assets/lato-digits.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0030-0039;
}

:root {
  color-scheme: dark;
  --background: #002623;
  --primary: #054239;
  --accent: #b9a779;
  --foreground: #edebe0;
  --muted-foreground: #d4d8cc;
  --gutter: clamp(24px, 5vw, 88px);
  font-family: "Lato Digits", Qomra, "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--background);
  color: var(--foreground);
}

body {
  isolation: isolate;
}
p,
h1 {
  margin: 0;
}

.landscape,
.texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.landscape {
  overflow: hidden;
  background: var(--background);
}

.landscape-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-position, 50% 50%);
  opacity: 0;
  transition: opacity 1600ms ease-in-out;
}

.landscape-slide.is-active {
  opacity: 1;
}

.landscape-mosque {
  --photo-position: 50% 48%;
}

.landscape-theatre {
  --photo-position: 50% 58%;
}

.landscape-falls {
  --photo-position: 52% 50%;
}

.landscape::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgb(0 38 35 / 74%),
      rgb(5 66 57 / 52%) 40%,
      rgb(0 38 35 / 82%)
    ),
    linear-gradient(
      90deg,
      rgb(0 38 35 / 30%),
      transparent 45%,
      rgb(0 38 35 / 20%)
    );
}

.texture {
  inset-inline-start: auto;
  width: min(36vw, 480px);
  background: var(--accent);
  mask: url("assets/texture.svg") right center / 540px repeat;
  -webkit-mask: url("assets/texture.svg") right center / 540px repeat;
  opacity: 0.075;
}

.page {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: max(24px, env(safe-area-inset-top)) var(--gutter)
    max(22px, env(safe-area-inset-bottom));
}

.header,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 18px;
}

.identity {
  color: var(--foreground);
}

.language {
  min-height: 44px;
  padding: 8px 17px;
  border: 1px solid rgb(185 167 121 / 48%);
  border-radius: 24px;
  background: rgb(0 38 35 / 20%);
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.language:hover {
  background: var(--primary);
  border-color: var(--accent);
}
.language:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
.language[hidden] {
  display: none;
}

.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vh, 52px);
  min-height: 0;
  text-align: center;
  padding-bottom: 3vh;
}

.logo {
  width: clamp(154px, 19vw, 240px);
  height: auto;
  max-height: 20vh;
  object-fit: contain;
  flex-shrink: 0;
}

.announcement {
  max-width: 640px;
}
.portal {
  font-size: clamp(20px, 2.2vw, 28px);
}

h1 {
  font-size: clamp(80px, 12vw, 156px);
  line-height: 1.12;
  font-weight: 700;
  color: var(--foreground);
  margin: 6px 0 14px;
}

.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 25px;
}

.flourish::before,
.flourish::after {
  content: "";
  width: 65px;
  height: 1px;
  background: var(--accent);
  opacity: 0.65;
}

.flourish span {
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}

.message,
.invitation {
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.65;
  color: var(--muted-foreground);
}

.invitation {
  color: var(--foreground);
}

.footer {
  padding-top: 16px;
  border-top: 1px solid rgb(185 167 121 / 24%);
  color: var(--muted-foreground);
  font-size: 16px;
}

.place {
  display: flex;
  align-items: center;
  gap: 9px;
}
.location {
  display: block;
  position: relative;
  width: 11px;
  height: 14px;
  border: 1px solid var(--accent);
  border-radius: 8px 8px 7px 7px;
}
.location::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  inset: 3px auto auto 3px;
}

html[lang="en"] .portal {
  font-size: clamp(16px, 2vw, 23px);
}
html[lang="en"] h1 {
  font-size: clamp(48px, 7.5vw, 104px);
  line-height: 1.2;
  margin: 22px 0 26px;
}
html[lang="en"] .message,
html[lang="en"] .invitation {
  font-size: clamp(14px, 1.5vw, 18px);
}
html[lang="en"] .footer {
  font-size: 13px;
}

@media (max-width: 600px) {
  .landscape-mosque {
    --photo-position: 65% 50%;
  }
  .landscape-theatre {
    --photo-position: 50% 60%;
  }
  .landscape-falls {
    --photo-position: 52% 50%;
  }
  .landscape::after {
    background: linear-gradient(
      180deg,
      rgb(0 38 35 / 78%),
      rgb(0 38 35 / 60%) 45%,
      rgb(0 38 35 / 86%)
    );
  }
  .texture {
    width: 48vw;
    opacity: 0.05;
  }
  .main {
    gap: 35px;
    padding-bottom: 5vh;
  }
  .logo {
    width: 186px;
  }
  h1 {
    font-size: clamp(80px, 25vw, 112px);
  }
  .header {
    font-size: 17px;
  }
  .language {
    font-size: 12px;
    padding-inline: 14px;
  }
  .footer {
    font-size: 14px;
    gap: 12px;
  }
  html[lang="en"] .footer {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landscape-slide {
    transition: none;
  }
}

@media (max-height: 600px) {
  .page {
    padding-block: max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-bottom));
  }
  .main {
    gap: 14px;
    padding-block: 8px;
  }
  .logo {
    width: 130px;
    max-height: 16vh;
  }
  .portal {
    font-size: 18px;
  }
  h1 {
    font-size: clamp(54px, 15vh, 85px);
    margin-block: 0 6px;
  }
  .flourish {
    margin-bottom: 10px;
  }
  .message,
  .invitation {
    font-size: 17px;
    line-height: 1.4;
  }
  .footer {
    padding-top: 10px;
  }
  html[lang="en"] h1 {
    font-size: clamp(34px, 10vh, 60px);
    margin-block: 10px;
  }
}

@media (max-height: 400px) and (min-width: 600px) {
  .main {
    flex-direction: row;
    gap: 48px;
  }
  .logo {
    max-height: 36vh;
    width: 150px;
  }
  .announcement {
    max-width: 460px;
  }
  h1 {
    font-size: 64px;
  }
  .portal {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .announcement {
    animation: arrive 900ms ease both;
  }
  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
