:root {
  --paper: #f2eee4;
  --paper-shadow: #e2dbc8;
  --ink: #1a1a1a;
  --muted: #6b6b63;
  --danger: #8a2c2c;
  --accent: #1b4a3f;
  --font-headline: "Nyght Serif", "Times New Roman", serif;
}

@font-face {
  font-family: "Nyght Serif";
  src: url("/fonts/NyghtSerif-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)),
    var(--paper);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
}

body > main {
  flex: 1 0 auto;
}

.navbar {
  width: 100%;
  padding: 10px 20px 8px;
  border-bottom: 1px dashed var(--ink);
}

.navbar-inner,
.hero,
.footer {
  margin: 0 auto;
}

.navbar-inner {
  width: min(100%, 1180px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.logo:hover,
.logo:focus-visible {
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 64px;
  height: auto;
}

.brand-wordmark {
  margin-left: 10px;
  color: inherit;
  font-size: 1.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-family: var(--font-headline);
}

.nav-cta {
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  opacity: 0.88;
  cursor: not-allowed;
  box-shadow: 0 6px 16px rgba(34, 28, 25, 0.08);
}

.hero {
  width: min(100%, 1180px);
  padding: 20px 28px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 48px;
}

.hero-copy {
  text-align: left;
  align-self: center;
}

.stars,
.dotted-line {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.22em;
  font-size: 0.74rem;
}

.stars {
  width: min(100%, 520px);
  text-align: center;
}

.headline {
  --cycling-row-height: 1.18em;
  margin: 0 0 28px;
  font-size: clamp(2rem, 4.2vw, 4rem);
  line-height: 1.08;
  letter-spacing: 0.05em;
  font-family: var(--font-headline);
}

.hero-description {
  width: min(100%, 420px);
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.92rem, 1vw, 1rem);
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.app-store-button {
  display: inline-flex;
  align-items: center;
  margin: 30px 0 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: not-allowed;
  opacity: 0.92;
  box-shadow: 0 10px 26px rgba(34, 28, 25, 0.12);
}

.app-store-badge {
  display: block;
  width: 144px;
  height: auto;
  border-radius: 14px;
}

.nav-cta .app-store-badge {
  width: 126px;
}

.headline-static,
.cycling-line {
  display: block;
}

.headline-static {
  margin-bottom: 0.18em;
}

.cycling-line {
  color: var(--accent);
  height: var(--cycling-row-height);
}

.cycling-window {
  display: inline-block;
  height: var(--cycling-row-height);
  overflow: hidden;
  vertical-align: top;
}

.cycling-track {
  display: flex;
  flex-direction: column;
  width: max-content;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.cycling-phrase {
  display: flex;
  flex: 0 0 var(--cycling-row-height);
  align-items: center;
  height: var(--cycling-row-height);
  white-space: nowrap;
}

.hero-device {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 620px;
  padding: 0 52px;
}

.phone-carousel {
  width: 300px;
  height: 600px;
  position: relative;
}

.phone-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.phone-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.phone-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.phone-slide.has-image img {
  display: block;
}

.phone-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.phone-slide.has-image .phone-fallback {
  display: none;
}

.phone-label {
  margin: 0;
  color: #f5f1e8;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
}

.phone-subcopy {
  margin: 14px 0 0;
  color: rgba(245, 241, 232, 0.7);
  font-size: 0.74rem;
  line-height: 1.6;
  max-width: 18ch;
}

.phone-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.72);
  color: #f5f1e8;
  font-size: 1.55rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.phone-nav:hover,
.phone-nav:focus-visible {
  background: rgba(27, 74, 63, 0.92);
  border-color: rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

.phone-nav-prev {
  left: 8px;
}

.phone-nav-next {
  right: 8px;
}

.site-footer {
  width: 100%;
  margin-top: auto;
  padding: 34px 28px 20px;
  background: var(--accent);
  color: var(--paper);
}

.site-footer-top {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, auto) minmax(160px, 1fr);
  align-items: center;
  gap: 24px;
}

.site-footer-brand {
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.site-footer-brand:hover,
.site-footer-brand:focus-visible {
  color: var(--paper);
  text-decoration: none;
}

.brand-logo-footer {
  width: 112px;
}

.site-footer-socials {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  flex-direction: column;
}

.footer-social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer-legal {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  justify-self: end;
}

.footer-section-label {
  color: rgba(242, 238, 228, 0.68);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.footer-legal-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.footer-link {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  transition: opacity 140ms ease, transform 140ms ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  opacity: 0.8;
  transform: translateY(-1px);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: var(--paper);
  transition: opacity 140ms ease;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: not-allowed;
  opacity: 0.68;
}

.social-link,
.social-link * {
  cursor: not-allowed;
}

.social-link:disabled {
  pointer-events: none;
}

.social-link:hover,
.social-link:focus-visible {
  opacity: 0.68;
  transform: none;
}

.site-footer-bottom {
  width: min(100%, 1180px);
  margin: 18px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(242, 238, 228, 0.18);
  color: rgba(242, 238, 228, 0.78);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.legal-page {
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.legal-page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 40px 28px 56px;
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
}

.legal-page-shell h1 {
  margin: 0 0 8px;
  font-family: var(--font-headline);
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.legal-page-shell h2 {
  margin: 28px 0 10px;
  font-family: var(--font-headline);
  font-size: 1.25rem;
}

.legal-page-shell p,
.legal-page-shell li {
  line-height: 1.7;
  color: var(--muted);
}

.legal-updated,
.legal-note {
  font-size: 0.9rem;
}

.legal-note {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--ink);
}

.legal-email a {
  color: var(--accent);
  text-decoration: none;
}

.legal-email a:hover,
.legal-email a:focus-visible {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .cycling-track,
  .phone-slide {
    transition: none;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-description {
    margin-inline: auto;
  }

  .app-store-button {
    margin-inline: auto;
  }

  .hero-device {
    min-height: 580px;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .navbar-inner {
    width: 100%;
  }

  .logo {
    font-size: 0.92rem;
  }

  .brand-logo {
    width: 54px;
  }

  .brand-logo-footer {
    width: 96px;
  }

  .brand-wordmark {
    font-size: 1.4rem;
  }

  .hero {
    width: 100%;
    gap: 24px;
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .headline {
    --cycling-row-height: 1.14em;
    font-size: clamp(1.7rem, 9vw, 2.2rem);
    line-height: 1.04;
  }

  .headline-static {
    margin-bottom: 0.22em;
  }

  .hero-description {
    width: 100%;
    margin-inline: auto;
    max-width: 24ch;
    font-size: 0.95rem;
  }

  .app-store-button {
    margin-inline: auto;
    padding: 12px 18px 12px 16px;
  }

  .hero-device {
    order: 2;
    min-height: 520px;
    padding: 12px 24px;
  }

  .phone-carousel {
    width: min(100%, 280px);
    height: 560px;
  }

  .site-footer-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-legal-links {
    justify-content: center;
    align-items: center;
  }

  .site-footer-bottom {
    text-align: center;
  }
}
