@font-face {
  font-family: "Mas Serif";
  src: url("assets/dejavu-serif.ttf") format("truetype");
  font-display: swap;
}

:root {
  --green: #566556;
  --ivory: #f3ede3;
  --ivory-muted: rgba(243, 237, 227, 0.86);
  --ivory-line: rgba(243, 237, 227, 0.46);
  --type-primary: clamp(1.25rem, 1.65vw, 1.65rem);
  --type-meta: 0.75rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--green);
  color: var(--ivory);
  font-family: "Mas Serif", Georgia, serif;
}

.welcome {
  display: grid;
  grid-template-columns: minmax(440px, 44%) minmax(0, 56%);
  min-height: 100svh;
  overflow: hidden;
  background: var(--green);
}

.welcome__content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100svh;
  background: var(--green);
}

.welcome__inner {
  display: flex;
  width: min(100%, 680px);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 72px) clamp(34px, 5.5vw, 84px) 32px;
  flex-direction: column;
}

.welcome__logo {
  width: clamp(230px, 25vw, 360px);
  height: auto;
  align-self: center;
  margin: 0 0 clamp(30px, 4.5vh, 56px);
  object-fit: contain;
  object-position: center;
}

.welcome__top {
  display: flex;
  width: 100%;
  margin: 0 0 clamp(22px, 3vh, 36px);
  flex-direction: column;
  gap: 14px;
}

.welcome__copy {
  max-width: 510px;
  animation: reveal 900ms 120ms both ease-out;
}

.welcome__place {
  align-self: center;
  margin: 0;
  color: var(--ivory-muted);
  font-size: var(--type-meta);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

.language {
  display: flex;
  align-self: flex-end;
  align-items: center;
}

.language--image {
  display: none;
}

.language--panel {
  align-self: flex-start;
}

.language button {
  position: relative;
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: var(--ivory-muted);
  cursor: pointer;
  font: inherit;
  font-size: var(--type-meta);
  letter-spacing: 0.08em;
}

.language button + button {
  border-left: 1px solid var(--ivory-line);
}

.language button[aria-pressed="true"] {
  color: var(--ivory);
}

.language button[aria-pressed="true"]::after {
  position: absolute;
  right: 7px;
  bottom: 0;
  left: 7px;
  height: 1px;
  background: var(--ivory);
  content: "";
}

.language button:focus-visible {
  outline: 1px solid var(--ivory);
  outline-offset: 3px;
}

.welcome__statements {
  max-width: 480px;
  display: grid;
  gap: 18px;
  color: var(--ivory);
  font-size: var(--type-primary);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.012em;
}

.welcome__statements > * {
  margin: 0;
  font: inherit;
  font-weight: 400;
}

.welcome__opening {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 42px;
  color: var(--ivory);
  font-size: var(--type-meta);
  letter-spacing: 0.06em;
}

.welcome__line {
  width: 46px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--ivory-line);
}

.welcome__footer {
  margin-top: 24px;
  color: var(--ivory-muted);
  font-size: var(--type-meta);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.welcome__image {
  position: relative;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background: var(--green);
}

.welcome__image::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(86, 101, 86, 0.22), transparent 18%),
    linear-gradient(180deg, rgba(86, 101, 86, 0.04), rgba(86, 101, 86, 0.13));
  content: "";
  pointer-events: none;
}

.welcome__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% center;
  animation: settle 1.35s both ease-out;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: scale(1.018);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 900px) {
  .welcome {
    display: flex;
    min-height: 100svh;
    flex-direction: column-reverse;
    overflow: visible;
  }

  .welcome__content {
    min-height: auto;
  }

  .welcome__inner {
    width: 100%;
    padding: 24px clamp(24px, 7vw, 54px) 22px;
  }

  .welcome__logo {
    width: min(230px, 62vw);
    margin-bottom: 22px;
  }

  .welcome__top {
    margin-bottom: 16px;
  }

  .language--panel {
    display: none;
  }

  .language--image {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 16px;
    display: flex;
    padding: 3px 4px;
    background: rgba(46, 58, 48, 0.42);
    box-shadow: 0 1px 8px rgba(24, 31, 25, 0.12);
    backdrop-filter: blur(3px);
  }

  .welcome__image {
    min-height: min(34svh, 320px);
  }

  .welcome__image img {
    position: absolute;
    inset: 0;
    object-position: center 44%;
  }

  .welcome__opening {
    margin-top: 26px;
    padding-top: 0;
  }

  .welcome__footer {
    margin-top: 16px;
  }

  .welcome__statements {
    gap: 12px;
    line-height: 1.34;
  }
}

@media (max-width: 520px) {
  .welcome__content {
    min-height: auto;
  }

  .welcome__inner {
    padding-top: 22px;
  }

  .welcome__place {
    letter-spacing: 0.14em;
  }

  .welcome__statements {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
