@font-face {
  font-family: 'Instrument Serif';
  src: url('./assets/InstrumentSerif-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Mea Culpa';
  src: url('./assets/MeaCulpa-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --sand: #E9E2D5;
  --ink: #241F16;
  --ink-muted: rgba(64, 56, 40, 0.62);
  --wordmark: #ddc5b7;
  /* Phone mock: every frame dimension is derived from this one width. */
  --phone-w: min(270px, 68vw);
  /* Screenshot corner radius, matched to phone-frame.png's screen cutout. */
  --phone-r: calc(var(--phone-w) * 0.075);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--sand);
  font-family: 'Instrument Serif', Georgia, serif;
}

a { color: var(--ink-muted); }
a:hover { color: var(--ink); }

.page {
  background: var(--sand);
  overflow: hidden;
}

/* ---------- Hero ---------- */

.hero {
  height: 100vh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.blob {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
}

.blob--1 {
  top: -18%;
  left: -12%;
  width: 60%;
  background: radial-gradient(circle, oklch(0.9 0.06 85 / 0.55), transparent 70%);
}

.blob--2 {
  bottom: -20%;
  right: -14%;
  width: 62%;
  background: radial-gradient(circle, oklch(0.9 0.06 55 / 0.5), transparent 70%);
}

.blob--3 {
  top: 30%;
  right: -18%;
  width: 50%;
  background: radial-gradient(circle, oklch(0.9 0.05 250 / 0.4), transparent 70%);
}

.hero-row {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: clamp(84px, 16vw, 150px);
  height: auto;
  animation: logoFadeIn 1s ease 0.15s both;
}

.hero-wordmark {
  font-family: 'Mea Culpa', cursive;
  font-size: clamp(56px, 13vw, 118px);
  color: var(--wordmark);
  line-height: 1;
  animation: wordmarkFadeIn 1s ease 0.7s both;
}

.hero-arrow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(22px, 5vh, 46px);
  display: flex;
  justify-content: center;
  z-index: 1;
}

.hero-arrow-inner {
  animation:
    arrowSlideUp 0.6s cubic-bezier(0.22, 0.9, 0.3, 1) 1.5s both,
    arrowBounce 2s ease-in-out 2.1s infinite;
}

@keyframes logoFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wordmarkFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes arrowSlideUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes arrowBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-9px); }
  60% { transform: translateY(-4px); }
}

/* ---------- Selling points ---------- */

.section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 6vw, 80px);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 110px) clamp(24px, 6vw, 56px);
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.section--even { flex-direction: row; }
.section--odd { flex-direction: row-reverse; }

.section.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.section-media {
  flex: 1 1 260px;
  display: flex;
  justify-content: center;
}

.section-copy {
  flex: 1 1 300px;
  min-width: 260px;
}

.headline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.2px;
  color: var(--ink);
  text-wrap: pretty;
  margin: 0;
  font-weight: 400;
}

/* ---------- Phone mock ---------- */

.phone {
  position: relative;
  width: var(--phone-w);
  aspect-ratio: 1350 / 2760;
  filter: drop-shadow(0 26px 46px rgba(43, 33, 22, 0.24));
}

.section--even .phone { transform: rotate(-2.2deg); }
.section--odd .phone { transform: rotate(2.2deg); }
.no-tilt .phone { transform: none; }

/* Insets match the transparent screen cutout in phone-frame.png exactly
   (measured from the PNG's alpha channel), so the shot sits flush under it. */
.phone-shot {
  position: absolute;
  left: 5.2593%;
  top: 2.4638%;
  width: 89.4074%;
  height: 95.0362%;
  object-fit: cover;
  display: block;
  border-radius: var(--phone-r);
  z-index: 1;
}

/* Official device render — bezel and dynamic island are baked into the PNG. */
.phone-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  display: block;
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: clamp(40px, 8vw, 80px) 24px clamp(64px, 10vw, 110px);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.badge-appstore {
  display: inline-block;
  line-height: 0;
}

.badge-appstore img {
  height: 54px;
  width: auto;
}

.badge-github {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  width: calc(54px * 119.664 / 40);
  border-radius: calc(54px * 8 / 40);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.18);
  padding: 7px 13px;
}

.badge-github img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  display: block;
}

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

.legal a {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  letter-spacing: -0.1px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo,
  .hero-wordmark,
  .hero-arrow-inner {
    animation: none;
  }
  .section {
    transition: none;
  }
}
