:root {
  color-scheme: light;
  --paper: #f3eadc;
  --paper-deep: #e6d8c5;
  --ink: #403c34;
  --muted-ink: #645c51;
  --accent: #87745b;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 38% 24%, rgb(255 252 246 / 0.32), transparent 34%),
    radial-gradient(circle at 68% 66%, rgb(174 139 91 / 0.12), transparent 34%),
    linear-gradient(145deg, #f9f0e4 0%, var(--paper) 50%, var(--paper-deep) 140%);
}

.page::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.rio-pattern {
  position: absolute;
  z-index: 0;
  left: -2%;
  width: 104%;
  pointer-events: none;
  background-image: url("assets/rio-pattern.webp");
  background-repeat: repeat-x;
  background-position: center;
  background-size: 720px auto;
  filter: sepia(1) saturate(0.38) contrast(0.82);
  mix-blend-mode: multiply;
}

.rio-pattern--bottom {
  bottom: -2.4rem;
  height: 225px;
  opacity: 0.24;
  -webkit-mask-image: linear-gradient(to top, #000 28%, transparent 100%);
  mask-image: linear-gradient(to top, #000 28%, transparent 100%);
}

.hero {
  --hero-y: -1.5vh;
  z-index: 1;
  display: flex;
  width: min(92vw, 700px);
  padding:
    max(2.2rem, env(safe-area-inset-top))
    1.5rem
    max(10.5rem, calc(9rem + env(safe-area-inset-bottom)));
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(var(--hero-y));
  animation: hero-arrival 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.logo {
  display: block;
  width: clamp(340px, 31vw, 455px);
  margin: -4.5rem 0 -3.75rem;
  mix-blend-mode: multiply;
  user-select: none;
}

.logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.08) saturate(0.86);
  -webkit-user-drag: none;
}

.coming-soon {
  margin: 1.15rem 0 0;
  font-size: clamp(0.78rem, 0.9vw, 0.92rem);
  font-weight: 400;
  letter-spacing: 0.48em;
  line-height: 1;
  text-transform: uppercase;
}

.contact {
  display: grid;
  justify-items: center;
  gap: 0.78rem;
  margin-top: 1.85rem;
  color: var(--muted-ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(0.75rem, 0.82vw, 0.88rem);
  letter-spacing: 0.1em;
}

.contact a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.28em;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  margin-top: 0;
}

.social a {
  display: grid;
  width: 3.15rem;
  height: 3.15rem;
  place-items: center;
  border: 1px solid rgb(117 105 87 / 0.28);
  border-radius: 50%;
  color: #675f53;
  background: rgb(255 252 246 / 0.52);
  box-shadow: 0 0.45rem 1.3rem rgb(78 67 51 / 0.055);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.social a:hover,
.social a:focus-visible {
  border-color: rgb(102 90 72 / 0.52);
  color: #302c26;
  background: rgb(255 252 246 / 0.84);
  text-decoration: none;
  transform: translateY(-2px);
}

.social a:nth-child(1):hover,
.social a:nth-child(1):focus-visible,
.social a:nth-child(1):active {
  border-color: rgb(112 91 63 / 0.48);
  color: #705b3f;
  background: rgb(249 241 229 / 0.92);
}

.social a:nth-child(2):hover,
.social a:nth-child(2):focus-visible,
.social a:nth-child(2):active {
  border-color: rgb(193 53 132 / 0.45);
  color: #c13584;
  background: rgb(253 242 248 / 0.88);
}

.social a:nth-child(3):hover,
.social a:nth-child(3):focus-visible,
.social a:nth-child(3):active {
  border-color: rgb(255 0 0 / 0.38);
  color: #d90000;
  background: rgb(255 244 242 / 0.9);
}

.social a:nth-child(4):hover,
.social a:nth-child(4):focus-visible,
.social a:nth-child(4):active {
  border-color: rgb(24 119 242 / 0.4);
  color: #1877f2;
  background: rgb(241 247 255 / 0.9);
}

.social a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.social svg {
  width: 1.48rem;
  height: 1.48rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social__dot,
.social__fill {
  fill: currentColor;
  stroke: none;
}

@media (max-width: 700px) {
  .rio-pattern {
    left: -28%;
    width: 156%;
    background-size: 540px auto;
  }

  .rio-pattern--bottom {
    bottom: -1.5rem;
    height: 175px;
    opacity: 0.26;
  }

  .hero {
    --hero-y: -0.8vh;
    width: 100%;
    padding:
      max(1rem, env(safe-area-inset-top))
      1.15rem
      max(9rem, calc(7.8rem + env(safe-area-inset-bottom)));
    transform: translateY(var(--hero-y));
  }

  .logo {
    width: min(94vw, 370px);
    margin: -3.2rem 0 -3rem;
  }

  .coming-soon {
    margin-top: 1rem;
    font-size: 0.73rem;
    letter-spacing: 0.42em;
  }

  .contact {
    gap: 0.72rem;
    margin-top: 1.65rem;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
  }

  .social {
    gap: 0.55rem;
    margin-top: 0.38rem;
  }

  .social a {
    width: 3.45rem;
    height: 3.45rem;
  }

  .social svg {
    width: 1.62rem;
    height: 1.62rem;
  }
}

@keyframes hero-arrival {
  from {
    opacity: 0;
    transform: translateY(calc(var(--hero-y) + 12px));
  }

  to {
    opacity: 1;
    transform: translateY(var(--hero-y));
  }
}

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

@media (max-width: 390px) {
  .hero {
    padding-bottom: max(8.2rem, calc(7rem + env(safe-area-inset-bottom)));
  }

  .logo {
    width: min(96vw, 340px);
    margin-top: -2.6rem;
    margin-bottom: -2.65rem;
  }

  .contact {
    margin-top: 1.4rem;
  }
}

@media (max-height: 700px) {
  .hero {
    padding-top: max(0.35rem, env(safe-area-inset-top));
    padding-bottom: max(6.8rem, calc(5.8rem + env(safe-area-inset-bottom)));
  }

  .logo {
    width: min(66vh, 330px);
    margin-top: -2.7rem;
    margin-bottom: -2.65rem;
  }

  .coming-soon {
    margin-top: 0.78rem;
  }

  .contact {
    gap: 0.55rem;
    margin-top: 1.1rem;
  }

  .social a {
    width: 2.85rem;
    height: 2.85rem;
  }

  .social svg {
    width: 1.35rem;
    height: 1.35rem;
  }

  .rio-pattern--bottom {
    height: 150px;
  }
}

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