:root {
  color-scheme: light;
  --welcome-paper: #faf9f5;
  --welcome-ivory: #f3f0e9;
  --welcome-ink: #282c2b;
  --welcome-accent: #6e5e3e;
  --welcome-gold: #d5c29d;
  --welcome-rule: #dfd9cc;
  --welcome-gutter: clamp(24px, 4.45vw, 104px);
}

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

body.turiim-welcome {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding-bottom: clamp(18px, 2.05vw, 45px);
  display: flex;
  flex-direction: column;
  background: var(--welcome-paper);
  color: var(--welcome-ink);
  font: 400 16px/1.55 Manrope, Arial, sans-serif;
}

.turiim-welcome a { color: inherit; text-decoration: none; }
.turiim-welcome a:focus-visible {
  outline: 2px solid #7b6641;
  outline-offset: 5px;
}

.welcome-skip {
  position: absolute;
  top: 12px;
  left: var(--welcome-gutter);
  z-index: 2;
  padding: 10px 16px;
  background: var(--welcome-paper);
  transform: translateY(-150%);
}

.welcome-skip:focus { transform: none; }

.welcome-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: clamp(66px, 6.3vw, 118px);
  padding: 10px var(--welcome-gutter);
  border-bottom: 1px solid var(--welcome-rule);
}

.welcome-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 clamp(22px, 3.5vw, 56px);
}

.welcome-header a,
.welcome-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
}

.welcome-header a:hover,
.welcome-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.welcome-main {
  display: flex;
  flex: 1;
  background: var(--welcome-ivory);
}

.welcome-hero {
  position: relative;
  width: 100%;
  max-width: 2160px;
  min-height: clamp(435px, 39vw, 820px);
  margin-inline: auto;
  padding: clamp(38px, 3.8vw, 80px) var(--welcome-gutter);
  display: flex;
  align-items: center;
  isolation: isolate;
}

.welcome-copy {
  position: relative;
  z-index: 1;
  width: 45%;
  max-width: 700px;
}

.welcome-copy h1 { margin: 0; line-height: 0; }
.welcome-logo {
  position: relative;
  display: block;
  width: 108%;
  aspect-ratio: 1320 / 494;
  margin-inline-start: -2.6%;
  isolation: isolate;
}

.welcome-logo-fallback {
  display: block;
  width: 100%;
  height: 100%;
}

.welcome-logo-metal {
  position: absolute;
  inset: auto 0 0;
  height: calc(100% * 334 / 494);
  z-index: 2;
  background: linear-gradient(115deg, #8e8069 0%, #a99e89 22%, #d0c4ad 38%, #f1e6ce 44%, #c8b99e 49%, #a99e89 65%, #e6d9bc 78%, #a99e89 88%, #958770 100%);
  background-size: 220% 100%;
  background-position: 100% 50%;
  mask: url("/assets/turiim-welcome-full-mask.svg") center / contain no-repeat;
  -webkit-mask: url("/assets/turiim-welcome-full-mask.svg") center / contain no-repeat;
  visibility: hidden;
  animation: welcome-logo-shimmer 9s ease-in-out infinite alternate;
  animation-play-state: paused;
}

.welcome-logo-sparkle {
  position: absolute;
  top: 41.3%;
  left: 64.1%;
  width: 42%;
  aspect-ratio: 1;
  z-index: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  visibility: hidden;
  opacity: 0.7;
  animation: welcome-logo-glint 4.8s ease-in-out infinite;
  animation-play-state: paused;
}

.welcome-logo-sparkle img {
  display: block;
  width: 100%;
  height: 100%;
  filter: brightness(0.45) sepia(0.65);
}

.welcome-logo-sparkle .welcome-logo-sparkle-core {
  position: absolute;
  inset: 0;
  filter: none;
  mask-image: radial-gradient(circle, #000 2%, transparent 14%);
  -webkit-mask-image: radial-gradient(circle, #000 2%, transparent 14%);
}

@supports (mask-image: url("")) or (-webkit-mask-image: url("")) {
  .welcome-logo[data-logo-ready="true"] .welcome-logo-fallback {
    visibility: hidden;
  }
  .welcome-logo[data-logo-ready="true"] .welcome-logo-metal,
  .welcome-logo[data-logo-ready="true"] .welcome-logo-sparkle {
    visibility: visible;
    animation-play-state: running;
  }
}

@keyframes welcome-logo-shimmer {
  from { background-position: 100% 50%; }
  to { background-position: 0% 50%; }
}

@keyframes welcome-logo-glint {
  0%, 100% { opacity: 0.7; }
  35% { opacity: 1; }
  65% { opacity: 0.82; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-logo-metal,
  .welcome-logo-sparkle {
    animation: none;
  }
}

.welcome-tagline {
  margin: 9px 0 0;
  color: var(--welcome-accent);
  font-size: clamp(0.93rem, 1.2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.16em;
}

.welcome-description {
  max-width: 37ch;
  margin: clamp(24px, 3vw, 48px) 0 0;
  color: var(--welcome-ink);
  font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.016em;
  line-height: 1.15;
}

.turiim-welcome .welcome-enter {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(28px, 3.8vw, 62px);
  min-height: 53px;
  margin-top: clamp(25px, 3vw, 46px);
  padding: 11px 19px;
  background: var(--welcome-ink);
  color: var(--welcome-paper);
  font-size: 0.95rem;
  font-weight: 600;
}

.welcome-tagline,
.welcome-description,
.turiim-welcome .welcome-enter {
  margin-inline-start: 6.73%;
}

.turiim-welcome .welcome-enter:hover { background: #40443f; }
.welcome-arrow {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5c29d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14m-7-7 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.welcome-art {
  position: absolute;
  inset: 0 0.35vw 0 46%;
  pointer-events: none;
  container-type: size;
}

.welcome-art > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
  mask-image:
    linear-gradient(to right, transparent 4%, #000 37%, #000 93%, transparent),
    linear-gradient(to bottom, transparent, #000 2%, #000 96%, transparent);
  mask-composite: intersect;
}

.welcome-tower-glints {
  position: absolute;
  top: 50%;
  right: 0;
  width: min(100cqw, 150cqh);
  aspect-ratio: 3 / 2;
  transform: translateY(-50%);
}

.welcome-tower-glint {
  position: absolute;
  width: 14%;
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0;
  filter: sepia(0.25);
  animation: welcome-tower-glint 12s ease-in-out infinite;
}

.welcome-tower-glint-main {
  left: 69.6%;
  top: 50.3%;
}

.welcome-tower-glint-left {
  left: 50.6%;
  top: 55.8%;
  animation-delay: -4s;
}

.welcome-tower-glint-right {
  left: 84.7%;
  top: 43.1%;
  animation-delay: -8s;
}

@keyframes welcome-tower-glint {
  0%, 15%, 65%, 100% { opacity: 0; }
  35% { opacity: 0.75; }
  45% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-tower-glint { animation: none; }
}

.welcome-footer {
  min-height: clamp(62px, 4.7vw, 100px);
  padding: 10px var(--welcome-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  flex-wrap: wrap;
  background: var(--welcome-ink);
  color: var(--welcome-paper);
}

.welcome-footer p {
  margin: 0;
  color: var(--welcome-gold);
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.welcome-footer a { gap: 10px; }
.welcome-footer a:focus-visible { outline-color: var(--welcome-gold); }

@media (max-width: 700px) {
  body.turiim-welcome { padding-bottom: 0; }
  .welcome-header { justify-content: flex-start; }
  .welcome-tagline,
  .welcome-description,
  .turiim-welcome .welcome-enter {
    margin-inline-start: min(6.73%, 24.56px);
  }
  .welcome-hero {
    display: grid;
    align-content: center;
    padding-top: 35px;
    padding-bottom: 9px;
    min-height: auto;
  }
  .welcome-copy { width: 100%; }
  .welcome-copy h1 { max-width: 365px; }
  .welcome-description { margin-top: 19px; }
  .turiim-welcome .welcome-enter { margin-top: 17px; min-height: 46px; }
  .welcome-art {
    position: relative;
    inset: auto;
    width: min(100%, 470px);
    aspect-ratio: 3 / 2;
    margin: -8px 0 0 auto;
  }
}

@media (max-width: 375px) {
  .welcome-footer { column-gap: 12px; }
  .welcome-footer p { font-size: 0.7rem; }
  .welcome-footer a { font-size: 0.8rem; }
}