@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Playfair:ital,opsz,wght@0,5..1200,300..900;1,5..1200,300..900&display=swap');

:root {
  --accent-1: #33cc99;
  --accent-2: #f26d7d;
  --accent-3: #fce130;
  --accent-4: #fff;
  --text-muted: #333;
}

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

html {
  font-size: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--accent-2);
  color: var(--text-muted);
  font-family: "Playfair", serif;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  min-height: 100vh;
}

::selection {
  background: var(--accent-3);
  color: var(--text-muted);
}

::-moz-selection {
  background: var(--accent-3);
  color: var(--text-muted);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
  font-weight: inherit;
  line-height: inherit;
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  font-weight: 600;
  color: var(--accent-4);
}

h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

p {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
}

a {
  color: var(--accent-4);
  transition: 0.5s;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: dashed underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

section {
  position: relative;
}

.navbar {
  position: fixed;
  padding: 20px 0;
  width: 100%;
  z-index: 999;
}

.navbar .container,
footer .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  display: block;
  height: 30px;
  width: auto;
}

#home {
  padding: 0;
  min-height: 100vh;

}

.row {
  width: 100%;
  margin: 0;
}

.landing {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 30px 100px;
  width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
  position: relative;
}

.stage-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  width: 100vw;
  height: 100vh;
  transform: translateY(-10%);
}

.stage {
  width: 100vw;
  margin: auto;
  position: relative;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.layer {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  animation: tilt-wobble 5s infinite alternate ease-in-out -7.5s;
  animation-fill-mode: forwards;
  transform: rotateY(10deg) rotateX(10deg) translateZ(0);
}

.layer:after {
  font: clamp(56px, 14vw, 140px)/0.9 "Playfair Display", serif;
  content: "Rætast is not\a an agency";
  white-space: pre;
  text-align: center;
  height: 100%;
  width: 100%;
  position: absolute;
  color: var(--accent-4);
  filter: blur(var(--depth-blur, 0));
  opacity: var(--depth-opacity, 1);
  will-change: filter, transform;
  /* text-shadow: 2px 0 2px rgba(148, 41, 41, 0.1); */
}

.layer:nth-child(1):after { transform: translateZ(0px); --depth-blur: 0; }
.layer:nth-child(2):after { transform: translateZ(-1.5px); --depth-blur: 0.15px; }
.layer:nth-child(3):after { transform: translateZ(-3px); --depth-blur: 0.25px; }
.layer:nth-child(4):after { transform: translateZ(-4.5px); --depth-blur: 0.4px; }
.layer:nth-child(5):after { transform: translateZ(-6px); --depth-blur: 0.6px; }
.layer:nth-child(6):after { transform: translateZ(-7.5px); --depth-blur: 0.8px; }
.layer:nth-child(7):after { transform: translateZ(-9px); --depth-blur: 1px; }
.layer:nth-child(8):after { transform: translateZ(-10.5px); --depth-blur: 1.25px; }
.layer:nth-child(9):after { transform: translateZ(-12px); --depth-blur: 1.5px; --depth-opacity: 0.95; }
.layer:nth-child(10):after { transform: translateZ(-13.5px); --depth-blur: 1.8px; --depth-opacity: 0.9; }
.layer:nth-child(11):after { transform: translateZ(-15px); --depth-blur: 2.1px; --depth-opacity: 0.85; }
.layer:first-child:after { color: var(--accent-2); text-shadow: none; }

@keyframes tilt-wobble {
  100% {
    transform: rotateY(-40deg) rotateX(-43deg);
  }
}

.info-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px;
  max-width: 1020px;
  width: 100%;
  margin: 40px auto 80px auto;
}

.info-intro {
  grid-column: span 3;
  padding: 10px;
}

.info-link {
  position: relative;
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px;
  transition: color 0.25s ease, transform 0.25s ease;
}

.info-link h3 {
  white-space: nowrap;
}

.info-link:not(.info-tooltip) {
  cursor: pointer;
}

.info-link:not(.info-tooltip) * {
  cursor: pointer;
}

.info-link:before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(99, 40, 47, 0.75);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: -1;
}

.info-link:hover {
  color: var(--accent-4);
  text-decoration: none;
  text-shadow: none;
}

.info-link:hover:before {
  opacity: 1;
}

.info-tooltip {
  --tooltip-x: 50%;
  --tooltip-y: 0;
  cursor: progress !important;
  color: var(--accent-3);
}

.info-tooltip,
.info-tooltip * {
  cursor: progress !important;
}

.info-tooltip:after {
  content: attr(data-tooltip);
  position: absolute;
  left: var(--tooltip-x);
  top: var(--tooltip-y);
  transform: translate(-50%, calc(-100% - 8px));
  padding: 4px 8px;
  background: var(--text-muted);
  color: var(--accent-2);
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.info-tooltip:hover:after {
  opacity: 1;
}

footer {
  position: fixed;
  inset: auto 0 0 0;
  padding: 10px;
  text-align: center;
  z-index: 999;
}

footer p {
  font-size: 14px;
  color: var(--accent-4);
}

@media only screen and (max-width: 767px) {
  h1 {
    font-size: 2.5em;
  }

  .info-grid {
    gap: 40px;
    margin-bottom: 60px;
  }
}

@media only screen and (max-width: 600px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-intro {
    grid-column: auto;
  }
}
