:root {
  --page-bg: #f8f8f7;
  --ink: #404040;
  --frame-bg: #eeeeed;
  --control-bg: var(--frame-bg);
  --safe-vh: 100dvh;
  --side-pad: clamp(12px, 1.1vw, 28px);
  --top-pad: clamp(12px, 1.1vw, 28px);
  --top-size: clamp(44px, 2vw, 51px);
  --frame-gap: clamp(14px, 1vw, 24px);
  --frame-radius: clamp(16px, 1.35vw, 28px);
  --logo-width: clamp(148px, 6.55vw, 180px);
  --cursor-size: clamp(11px, 0.72vw, 17px);
  --cursor-hover-size: min(calc(var(--cursor-size) * 3), clamp(34px, 2.15vw, 44px));
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: var(--safe-vh);
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page-bg);
  font-family: "Suisse Intl", "Inter", "Arial", sans-serif;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  color: #ffffff;
  background: rgb(213 136 87 / 62%);
}

.page-shell {
  display: grid;
  grid-template-rows: var(--top-size) minmax(0, 1fr);
  gap: var(--frame-gap);
  min-height: 100vh;
  min-height: var(--safe-vh);
  padding: var(--top-pad) var(--side-pad) var(--side-pad);
}

.page-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.brand {
  display: block;
  width: var(--logo-width);
  max-width: min(46vw, 190px);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: var(--top-size);
  object-fit: contain;
  object-position: left center;
}

.top-decor {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(8px, 0.7vw, 13px);
}

.decor-circle,
.decor-pill {
  display: block;
  background: var(--control-bg);
}

.decor-circle {
  width: var(--top-size);
  aspect-ratio: 1;
  border-radius: 50%;
}

.decor-pill {
  width: clamp(110px, 6.72vw, 172px);
  height: var(--top-size);
  border-radius: 999px;
}

.render-card {
  position: relative;
  min-width: 0;
  min-height: min(
    calc(var(--safe-vh) - var(--top-pad) - var(--side-pad) - var(--top-size) - var(--frame-gap)),
    calc(var(--safe-vh) - var(--top-pad) - var(--side-pad))
  );
  overflow: hidden;
  border-radius: var(--frame-radius);
  background:
    linear-gradient(115deg, #eeeeed 0%, #f3f3f2 50%, #eeeeed 100%);
  isolation: isolate;
}

.render-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -65%;
  z-index: 0;
  width: 190%;
  background:
    linear-gradient(
      96deg,
      rgba(238, 238, 237, 0) 30%,
      rgba(232, 232, 230, 0.28) 38%,
      rgba(255, 255, 255, 0.46) 49%,
      rgba(235, 235, 233, 0.34) 58%,
      rgba(238, 238, 237, 0) 66%
    );
  opacity: 0.68;
  pointer-events: none;
  transform: translate3d(-20%, 0, 0);
  animation: render-sheen 8.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.55vw, 38px);
  width: min(calc(100% - clamp(32px, 8vw, 160px)), 1120px);
  transform: translate(-50%, -50%);
}

.status h1 {
  margin: 0;
  color: #404040;
  font-size: clamp(28px, 1.74vw, 45px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.status h1 span {
  display: inline;
}

.loading-dots {
  display: flex;
  flex: 0 0 auto;
  order: 2;
  align-items: center;
  gap: clamp(8px, 0.42vw, 9px);
}

.loading-dots span {
  width: clamp(12px, 0.92vw, 23px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #404040;
  animation: dot-bounce 1.45s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

.email {
  position: absolute;
  right: clamp(18px, 5vw, 88px);
  bottom: clamp(28px, 3.8vw, 62px);
  left: clamp(18px, 5vw, 88px);
  z-index: 2;
  display: block;
  overflow-wrap: anywhere;
  color: #404040;
  font-size: clamp(18px, 1.23vw, 32px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-align: center;
  transition: opacity 300ms ease-out;
}

.email.is-cursor-hover {
  opacity: 0.84;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  display: none;
  width: var(--cursor-size);
  height: var(--cursor-size);
  border: 0 solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  transition:
    opacity 160ms ease,
    width 320ms ease-out,
    height 320ms ease-out,
    border-width 320ms ease-out,
    background-color 320ms ease-out;
  will-change: transform, width, height, border-width, background-color;
}

.custom-cursor.is-visible {
  opacity: 1;
}

.custom-cursor.is-email-hover {
  width: var(--cursor-hover-size);
  height: var(--cursor-hover-size);
  border-width: 1.5px;
  background: transparent;
}

@keyframes render-sheen {
  0% {
    transform: translate3d(-20%, 0, 0);
    opacity: 0;
  }

  12% {
    opacity: 0.62;
  }

  50% {
    opacity: 0.76;
  }

  88% {
    opacity: 0.62;
  }

  100% {
    transform: translate3d(20%, 0, 0);
    opacity: 0;
  }
}

@keyframes dot-bounce {
  0%,
  70%,
  100% {
    transform: translateY(0);
  }

  35% {
    transform: translateY(clamp(-6px, -0.42vw, -4px));
  }
}

@media (max-width: 920px) {
  :root {
    --logo-width: clamp(136px, 19vw, 156px);
  }

  .decor-pill {
    display: none;
  }

  .status {
    width: min(calc(100% - 40px), 700px);
  }
}

@media (max-width: 640px) {
  :root {
    --side-pad: 12px;
    --top-pad: 12px;
    --top-size: clamp(46px, 12.7vw, 51px);
    --frame-gap: clamp(14px, 3.5vw, 16px);
    --frame-radius: 16px;
    --logo-width: clamp(132px, 37vw, 150px);
  }

  .brand {
    max-width: 44vw;
  }

  .status {
    top: 50%;
    flex-direction: column;
    gap: clamp(19px, 5vw, 24px);
    width: min(calc(100% - 44px), 310px);
  }

  .loading-dots {
    order: -1;
    gap: clamp(5px, 1.25vw, 6px);
  }

  .loading-dots span {
    width: clamp(12px, 3.6vw, 15px);
  }

  .status h1 {
    font-size: clamp(24px, 6.85vw, 29px);
    line-height: 1.1;
    text-align: center;
    white-space: normal;
  }

  .status h1 span {
    display: block;
  }

  .email {
    right: clamp(24px, 8vw, 52px);
    bottom: clamp(36px, 6vw, 47px);
    left: clamp(24px, 8vw, 52px);
    font-size: clamp(20px, 6vw, 27px);
    text-align: center;
  }
}

@media (hover: hover) and (pointer: fine) {
  body,
  a,
  button {
    cursor: none;
  }

  .custom-cursor {
    display: block;
  }
}

@media (max-width: 360px) {
  .status {
    width: min(calc(100% - 28px), 286px);
  }

  .status h1 {
    font-size: clamp(22px, 6.35vw, 24px);
  }

  .email {
    font-size: clamp(18px, 5.4vw, 20px);
  }
}

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

  .render-card::before,
  .loading-dots span {
    animation: none !important;
  }
}
