@font-face {
  font-family: "Patrick Hand";
  src: url("assets/PatrickHand-Regular.woff2") format("woff2"),
       url("assets/PatrickHand-Regular.woff") format("woff");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --black: #000;
  --page: #697988;
  --white: #fff;
  --gray: #313b44;
  --link-blue: #7b90a0;
  --nav-height: 64px;
  --download-height: 106px;
  --download-gap: 64px;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--page);
  color: var(--white);
  font-family: "Patrick Hand", cursive;
  letter-spacing: .04em;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.page {
  width: 100%;
  min-width: 0;
  height: 100dvh;
  min-height: 560px;
  padding: calc(var(--nav-height) + 18px) 20px calc(var(--download-height) + var(--download-gap) + 18px);
  display: grid;
  place-items: center;
}

.site-nav {
  position: fixed;
  z-index: 20;
  right: 0;
  top: 12px;
  left: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 8px 18px 0;
  background: linear-gradient(to bottom, var(--page) 68%, rgb(25 24 22 / 0%));
  color: var(--gray);
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.site-nav a {
  padding: 12px 4px;
}

.site-nav a[aria-current="page"],
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--white);
}

.home-layout {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.phone-shell {
  position: relative;
  isolation: isolate;
  width: min(310px, 76vw);
  aspect-ratio: 390 / 760;
  flex: none;
  padding: 7px;
  border: 2px solid #494640;
  border-radius: 46px;
  background: #090909;
}

.phone-shell::before {
  position: absolute;
  z-index: -1;
  inset: 7% 5% 2%;
  border-radius: 42px;
  background: rgb(0 0 0 / 72%);
  filter: blur(44px);
  transform: translateY(24px);
  content: "";
  pointer-events: none;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 38px;
  padding: 34px 14px;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-transform: uppercase;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  animation: none !important;
  transition: none !important;
}

.phone-screen:active {
  background: var(--black);
  color: var(--white);
  filter: none;
  opacity: 1;
}

.phone-screen:focus-visible {
  outline: 2px solid var(--gray);
  outline-offset: 5px;
}

.dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 88px;
  height: 23px;
  border-radius: 999px;
  background: #070707;
  transform: translateX(-50%);
}

.story-copy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 94%;
  transform: translate(-50%, -50%);
  font-size: clamp(38px, 9.4vw, 52px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: .04em;
  text-align: center;
  text-wrap: balance;
  white-space: pre-line;
  animation: none !important;
  transition: none !important;
}

.orientation-message { display: none; }

@media (hover: none) and (pointer: coarse) {
  .site-nav a,
  .app-name {
    -webkit-text-stroke: .25px currentColor;
    paint-order: stroke fill;
  }
}

.tap-hint {
  position: absolute;
  right: 0;
  bottom: 24px;
  left: 0;
  color: var(--link-blue);
  font-size: 13px;
  letter-spacing: .04em;
  text-align: center;
}

.download-dock {
  position: fixed;
  z-index: 19;
  right: 0;
  bottom: var(--download-gap);
  left: 0;
  height: var(--download-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 8px;
  background: linear-gradient(to bottom, rgb(25 24 22 / 0%), var(--page) 24%);
}

.app-name {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 19px;
  letter-spacing: .04em;
}

.app-store-badge {
  display: block;
  width: 128px;
}

.app-store-badge img {
  display: block;
  width: 100%;
  height: auto;
}

.simple-panel {
  position: relative;
  width: min(720px, calc(100vw - 48px));
  text-align: center;
}

.simple-panel h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 54px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-wrap: balance;
}

.landscape-phone {
  position: relative;
  isolation: isolate;
  width: 604px;
  max-width: calc(100vw - 48px);
  aspect-ratio: 760 / 390;
  flex: none;
  padding: 7px;
  border: 2px solid #494640;
  border-radius: 46px;
  background: #090909;
}

.landscape-phone::before {
  position: absolute;
  z-index: -1;
  inset: 7% 3% 2%;
  border-radius: 42px;
  background: rgb(0 0 0 / 72%);
  filter: blur(44px);
  transform: translateY(24px);
  content: "";
  pointer-events: none;
}

.landscape-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: var(--black);
}

.landscape-island {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 23px;
  height: 88px;
  border-radius: 999px;
  background: #070707;
  transform: translateY(-50%);
}

.landscape-copy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.landscape-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-wrap: balance;
}

.landscape-copy .about-links {
  margin-top: 38px;
  justify-content: center;
  gap: 84px;
  color: var(--link-blue);
  font-size: 14.4px;
}

.nowrap { white-space: nowrap; }

.about-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 34px;
  color: var(--gray);
  font-size: 18px;
  letter-spacing: .04em;
}

.panel-links {
  position: absolute;
  z-index: 2;
  right: 0;
  top: calc(100% + 34px);
  left: 0;
  margin-top: 0;
}

.about-links a:hover,
.about-links a:focus-visible {
  color: var(--white);
}

@media (max-height: 820px) and (min-width: 721px) {
  .phone-shell { width: 270px; }
}

@media (max-width: 720px) {
  :root {
    --nav-height: 68px;
    --download-height: 158px;
    --download-gap: 0px;
  }
  body {
    height: 100dvh;
    min-height: 560px;
    display: grid;
    grid-template-rows: var(--nav-height) minmax(0, 1fr) var(--download-height);
    grid-template-areas:
      "nav"
      "main"
      "download";
    grid-template-columns: minmax(0, 1fr);
  }
  .site-nav {
    position: static;
    grid-area: nav;
    height: auto;
    padding: 16px 18px 0;
    background: none;
  }
  .page {
    grid-area: main;
    height: auto;
    min-height: 0;
    padding: 10px 16px 4px;
  }
  .home-layout { min-height: 0; }
  .phone-shell {
    width: auto;
    height: 100%;
    max-width: min(298px, 79vw);
    max-height: 581px;
  }
  .download-dock {
    position: static;
    grid-area: download;
    height: auto;
    justify-content: flex-start;
    padding: 22px 0 18px;
    background: none;
  }
  .story-copy {
    width: 98%;
    font-size: 42px;
  }
  .site-nav { gap: 24px; font-size: 12px; }
  .about-links { flex-direction: column; gap: 17px; }
  .landscape-page {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .landscape-phone {
    width: 604px;
    max-width: none;
  }
  .landscape-copy { width: min(82%, calc(100vw - 32px)); }
  .landscape-copy h1 { font-size: 37px; }
  .landscape-copy .about-links {
    flex-direction: row;
    gap: 64px;
    margin-top: 34px;
    font-size: 22px;
  }
}

@media (orientation: portrait) and (max-width: 720px) {
  .site-nav {
    gap: 28px;
    font-size: 18px;
  }
  .app-name {
    margin-bottom: 10px;
    font-size: 27px;
  }
  .app-store-badge { width: 176px; }
}

@media (max-height: 700px) {
  :root { --download-height: 92px; --download-gap: 34px; }
  .phone-shell { width: 225px; }
  .app-name { margin-bottom: 7px; }
  .app-store-badge { width: 112px; }
}

@media (max-width: 720px) and (max-height: 700px) {
  :root { --download-height: 126px; --download-gap: 0px; }
  .phone-shell {
    width: auto;
    height: 100%;
    max-width: min(260px, 72vw);
  }
  .download-dock { padding-top: 12px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  :root {
    --nav-height: 54px;
    --download-height: 0px;
    --download-gap: 0px;
  }
  body {
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--nav-height) minmax(0, 1fr);
    grid-template-areas:
      "nav"
      "main";
  }
  .site-nav {
    position: static;
    grid-area: nav;
    height: auto;
    padding: 8px 18px 0;
    gap: 30px;
    background: none;
    font-size: 12px;
  }
  .page {
    grid-area: main;
    height: auto;
    min-height: 0;
    padding: 6px 20px 14px;
    overflow: hidden;
  }
  .home-layout { display: none; }
  .orientation-message {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .download-dock {
    position: fixed;
    z-index: 30;
    top: 11px;
    right: 15px;
    bottom: auto;
    left: auto;
    width: 112px;
    height: auto;
    display: block;
    padding: 0;
    background: none;
  }
  .download-dock .app-name { display: none; }
  .app-store-badge { width: 112px; }
  .landscape-page {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .landscape-phone {
    width: auto;
    height: 100%;
    max-width: 78vw;
    max-height: 310px;
  }
  .orientation-message .landscape-phone {
    width: auto;
    height: 100%;
    max-width: 78vw;
    max-height: 310px;
  }
  .orientation-message .landscape-phone::before { display: none; }
  .landscape-copy h1 { font-size: clamp(26px, 5vw, 40px); }
  .landscape-copy .about-links {
    gap: 54px;
    margin-top: 24px;
    font-size: 12px;
  }
}
