/*
  MORTRR — coming soon page
  One screen, no scroll. Sizes use svh/vw so everything fits any viewport.

  1. Variables
  2. Base
  3. Stage (background)
  4. Logo
  5. Hanging sign
  6. Wordmark
  7. Phone mockup
  8. Footer
  9. Responsive
  10. Animations
*/

/* 1. Variables ------------------------------------------------------- */
:root {
  --ink: #121212;
  --yellow: #ffd21f;
  --sun-light: #ffe04d;
  --sun-dark: #ffc400;
  --green: #1f8a4c;
  --red: #e5484d;

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-hand: "Caveat", cursive;

  /* The phone drives the layout: everything inside it scales with --phone. */
  --phone: min(68vw, 40svh);
  --phone-top: 46svh;
}

/* 2. Base ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--sun-dark);
  color: var(--ink);
  font-family: var(--font-body);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 3. Stage ----------------------------------------------------------- */
.stage {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 50% 38%, rgb(255 255 255 / 0.45), transparent 70%),
    linear-gradient(180deg, var(--sun-light), var(--yellow) 45%, var(--sun-dark));
}

/* 4. Logo ------------------------------------------------------------ */
.logo {
  position: absolute;
  z-index: 5;
  top: clamp(16px, 3svh, 32px);
  left: clamp(16px, 3vw, 40px);
  display: grid;
  place-items: center;
  width: clamp(44px, 6svh, 56px);
  aspect-ratio: 1;
  border-radius: 30%;
  background: var(--ink);
  box-shadow: 0 10px 24px -10px rgb(18 18 18 / 0.6);
}

.logo svg {
  width: 62%;
  fill: var(--yellow);
}

/* 5. Hanging sign ---------------------------------------------------- */
.sign {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 50%;
  width: clamp(190px, 26svh, 280px);
  height: clamp(130px, 21svh, 230px);
  translate: -50% 0;
  transform-origin: top center;
  animation: swing 5s ease-in-out infinite;
}

.sign-string {
  position: absolute;
  top: 0;
  width: 2px;
  height: 34%;
  background: var(--ink);
}

.sign-string--left { left: 20%; }
.sign-string--right { right: 20%; }

.sign-board {
  position: absolute;
  inset: auto 0 0;
  height: 68%;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 0.4em 0.6em;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 30px -16px rgb(18 18 18 / 0.55);
  rotate: -3deg;
  font-size: clamp(14px, 2.15svh, 22px);
}

.sign-script {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 2em;
  line-height: 0.8;
}

.sign-small {
  font-weight: 800;
  font-size: 0.9em;
  letter-spacing: 0.2em;
}

.sign-big {
  padding: 0.08em 0.3em 0.12em;
  border-radius: 0.14em;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.05em;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* 6. Wordmark (sits behind the phone) -------------------------------- */
.wordmark {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: calc(var(--phone-top) + 1svh);
  translate: -50% -100%;
  padding-right: 0.06em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: min(17.5vw, 27svh);
  line-height: 0.78;
  letter-spacing: -0.065em;
  white-space: nowrap;
  animation: rise-wordmark 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* 7. Phone mockup ---------------------------------------------------- */
.phone,
.phone-shadow {
  position: absolute;
  left: 50%;
  top: var(--phone-top);
  width: var(--phone);
  height: calc(var(--phone) * 2.05);
  border-radius: calc(var(--phone) * 0.15);
  animation: rise-phone 1.1s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.phone {
  z-index: 3;
  translate: -50% 0;
  padding: calc(var(--phone) * 0.035);
  background: linear-gradient(145deg, #3a3a3a, var(--ink) 40%, #0a0a0a);
  box-shadow: inset 0 0 0 2px #4a4a4a, 0 -10px 40px -10px rgb(18 18 18 / 0.35);
}

/* Soft shadow cast on the wall behind the phone */
.phone-shadow {
  z-index: 2;
  translate: -32% 3svh;
  rotate: 7deg;
  background: rgb(110 70 0 / 0.42);
  filter: blur(18px);
}

.phone-island {
  position: absolute;
  z-index: 2;
  top: calc(var(--phone) * 0.065);
  left: 34%;
  width: 32%;
  height: calc(var(--phone) * 0.085);
  border-radius: 999px;
  background: #000;
}

.phone-status {
  position: absolute;
  z-index: 2;
  top: calc(var(--phone) * 0.075);
  left: 13%;
  right: 12%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-weight: 700;
  font-size: calc(var(--phone) * 0.045);
}

.phone-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 0.8em;
}

.phone-bars i {
  width: 3px;
  border-radius: 1px;
  background: #fff;
}

.phone-bars i:nth-child(1) { height: 35%; }
.phone-bars i:nth-child(2) { height: 55%; }
.phone-bars i:nth-child(3) { height: 75%; }
.phone-bars i:nth-child(4) { height: 100%; }

.phone-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(var(--phone) * 0.3);
  border-radius: calc(var(--phone) * 0.12);
  overflow: hidden;
  background:
    radial-gradient(90% 45% at 50% 22%, rgb(255 214 51 / 0.32), transparent 70%),
    linear-gradient(180deg, #1c1a14, var(--ink) 55%);
  color: #fff;
  text-align: center;
}

.app-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--phone) * 0.3);
  aspect-ratio: 1;
  border-radius: 26%;
  background: linear-gradient(145deg, var(--sun-light), var(--sun-dark));
  box-shadow: 0 14px 30px -8px rgb(255 196 0 / 0.55);
  animation: breathe 3.2s 1.3s ease-in-out infinite;
}

.app-icon svg {
  width: 70%;
  fill: var(--ink);
}

.app-badge {
  position: absolute;
  top: -12%;
  right: -12%;
  display: grid;
  place-items: center;
  min-width: 36%;
  height: 36%;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--red);
  font-weight: 800;
  font-size: calc(var(--phone) * 0.05);
  animation: pop 0.5s 1.25s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.app-name {
  margin-top: calc(var(--phone) * 0.03);
  font-weight: 700;
  font-size: calc(var(--phone) * 0.05);
}

.app-soon {
  margin-top: calc(var(--phone) * 0.12);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--phone) * 0.13);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.app-pill {
  margin-top: calc(var(--phone) * 0.07);
  padding: 0.6em 1.3em;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  font-size: calc(var(--phone) * 0.045);
  text-decoration: none;
  box-shadow: 0 10px 24px -10px rgb(255 196 0 / 0.6);
  transition: scale 0.2s;
}

.app-pill:hover { scale: 1.05; }

/* Register buttons ----------------------------------------------------- */
.top-cta,
.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 26px -12px rgb(18 18 18 / 0.7);
  transition: translate 0.2s, box-shadow 0.2s;
}

.top-cta:hover,
.footer-cta:hover {
  translate: 0 -2px;
  box-shadow: 0 16px 30px -12px rgb(18 18 18 / 0.75);
}

.top-cta:focus-visible,
.footer-cta:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* Desktop: top-right, same height as the logo tile */
.top-cta {
  position: absolute;
  z-index: 5;
  top: clamp(16px, 3svh, 32px);
  right: clamp(16px, 3vw, 40px);
  height: clamp(44px, 6svh, 56px);
  padding: 0 clamp(18px, 1.8vw, 26px);
  font-size: clamp(12px, 1.6svh, 15px);
}

/* Phones: lives in the footer instead (hidden on desktop) */
.footer-cta {
  display: none;
  height: 52px;
  padding: 0 26px;
  font-size: 14px;
  /* sits over the dark phone, so it's yellow here */
  background: linear-gradient(145deg, var(--sun-light), var(--sun-dark));
  color: var(--ink);
  box-shadow: 0 0 0 3px rgb(18 18 18 / 0.9), 0 14px 30px -10px rgb(255 196 0 / 0.6);
}

.cta-arrow { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }

/* 8. Footer ---------------------------------------------------------- */
.footer {
  position: absolute;
  z-index: 4;
  left: clamp(16px, 3vw, 40px);
  right: clamp(16px, 3vw, 40px);
  bottom: clamp(14px, 3svh, 32px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.85);
  box-shadow: 0 10px 24px -14px rgb(18 18 18 / 0.5);
  font-weight: 700;
  font-size: clamp(12px, 1.6svh, 15px);
}

.footer-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  animation: ping 2s infinite;
}

.footer-domain {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(13px, 1.8svh, 17px);
  letter-spacing: -0.02em;
}

/* 9. Responsive ------------------------------------------------------ */

/* Portrait (phones, tall tablets) */
@media (max-aspect-ratio: 3/4) {
  :root {
    --phone: min(72vw, 38svh);
    --phone-top: 39svh;
  }

  .sign {
    left: auto;
    right: clamp(12px, 5vw, 32px);
    width: clamp(150px, 42vw, 220px);
    height: clamp(110px, 18svh, 170px);
    translate: 0 0;
  }

  .sign-board { font-size: clamp(11px, 1.7svh, 16px); }
  .sign-big { font-size: 1.7em; }
  .wordmark { font-size: min(17vw, 22svh); }
  .footer { flex-direction: column; justify-content: center; gap: 10px; }
  .footer-domain { display: none; }
  .app-pill { display: none; } /* would sit under the footer */

  /* The hanging sign takes the top-right corner on phones, so the button moves to the footer */
  .top-cta { display: none; }
  .footer-cta { display: inline-flex; }
}

/* Short landscape (phones turned sideways) */
@media (max-height: 520px) and (min-aspect-ratio: 4/3) {
  :root {
    --phone: 30svh;
    --phone-top: 40svh;
  }

  .sign { display: none; }
}

/* 10. Animations ----------------------------------------------------- */
@keyframes swing {
  0%, 100% { rotate: -2deg; }
  50% { rotate: 2deg; }
}

@keyframes rise-wordmark {
  from { translate: -50% -88%; }
  to { translate: -50% -100%; }
}

@keyframes rise-phone {
  from { transform: translateY(14svh); }
  to { transform: none; }
}

@keyframes pop {
  from { scale: 0; }
  to { scale: 1; }
}

@keyframes breathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.05; }
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgb(31 138 76 / 0.55); }
  70%, 100% { box-shadow: 0 0 0 9px rgb(31 138 76 / 0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
