/*
 * The site wears the app's design system (src/ui/styles.css): morning light, paper and cocoa ink,
 * the blue of a pen for the one gesture, soft round things that land with a little bounce.
 * Light only, like the app.
 */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
}

:root {
  --dawn-top: #fff3ea;
  --dawn-bottom: #fde2cf;
  --paper: #fffaf0;
  --ivory: #fffaf2;
  --ink: #3a2a22;
  --text: rgba(58, 42, 34, 0.94);
  --text-2: rgba(58, 42, 34, 0.68);
  --text-3: rgba(58, 42, 34, 0.46);
  --hairline: rgba(58, 42, 34, 0.12);
  --accent: #3d5ae0;
  --shadow: 0 6px 18px rgba(92, 58, 34, 0.13), 0 1px 3px rgba(92, 58, 34, 0.08);
  --shadow-deep: 0 30px 60px rgba(92, 58, 34, 0.2), 0 6px 16px rgba(92, 58, 34, 0.1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.2, 1.3, 0.35, 1);
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --gutter: clamp(20px, 5vw, 56px);
  --wide: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--dawn-top);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ul,
figure {
  margin: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(46px, 7.4vw, 88px);
  line-height: 0.98;
}

h2 {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.02;
}

p {
  text-wrap: balance;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---- top bar ------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--gutter);
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(255, 243, 234, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 26px;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.pill {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ivory);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.35s var(--spring);
}

.pill:hover {
  transform: scale(1.05);
}

.pill:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 999px;
}

/* ---- hero ---------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(56px, 8vw, 110px);
}

.lead {
  max-width: 26em;
  margin-top: 24px;
  color: var(--text-2);
  font-size: clamp(18px, 1.7vw, 21px);
}

.store {
  display: inline-flex;
  flex-direction: column;
  margin-top: 34px;
  padding: 11px 28px 12px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--ivory);
  line-height: 1.15;
  box-shadow: var(--shadow);
}

.store small {
  font-size: 12px;
  letter-spacing: 0.02em;
  opacity: 0.78;
}

.store strong {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---- the phone ----------------------------------------------------------- */

.phone {
  width: min(300px, 70vw);
  max-width: 100%;
  margin: 0 auto;
  padding: 9px;
  border-radius: 50px;
  background: var(--ink);
  box-shadow: var(--shadow-deep);
}

.phone img {
  width: 100%;
  border-radius: 41px;
  aspect-ratio: 780 / 1688;
  object-fit: cover;
  background: var(--dawn-bottom);
}

.phone.tilt {
  width: min(330px, 72vw);
  transform: rotate(3deg);
}

/* ---- real people and places: each photo is a thought somebody sent ------- */

.moments {
  padding: 0 0 clamp(40px, 6vw, 80px);
  background: var(--dawn-top);
}

.moments ul {
  display: flex;
  gap: clamp(12px, 2vw, 20px);
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 8px var(--gutter) 28px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.moments ul::-webkit-scrollbar {
  display: none;
}

.moments li {
  position: relative;
  flex: 0 0 clamp(210px, 23vw, 250px);
  aspect-ratio: 4 / 5.2;
  border-radius: 28px;
  overflow: hidden;
  background: var(--dawn-bottom);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.moments li:nth-child(odd) {
  transform: translateY(14px);
}

.moments img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.from {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.92);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  box-shadow: var(--shadow);
}

.from i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(#e7c6f5, #c58ef0);
  font-family: var(--serif);
  font-size: 17px;
  font-style: normal;
  font-weight: 400;
}

.moments li:nth-child(2) .from i {
  background: linear-gradient(#f9b9c0, #ef7f86);
}

.moments li:nth-child(3) .from i {
  background: linear-gradient(#b8dcf8, #7eaef0);
}

.moments li:nth-child(4) .from i {
  background: linear-gradient(#f5e9a3, #dfd572);
}

.from small {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

/* ---- what it does -------------------------------------------------------- */

.features {
  background: linear-gradient(var(--dawn-top), var(--dawn-bottom));
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 6vw, 96px);
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
}

.feature.flip .featuretext {
  order: 2;
}

.featuretext p:not(.step) {
  max-width: 22em;
  margin-top: 18px;
  color: var(--text-2);
  font-size: clamp(18px, 1.7vw, 21px);
}

.step {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---- what it leaves out -------------------------------------------------- */

.calm {
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  background: var(--paper);
  text-align: center;
}

.calm ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: var(--wide);
  margin: clamp(32px, 4vw, 52px) auto 0;
  padding: 0;
  list-style: none;
}

.calm li {
  position: relative;
  aspect-ratio: 4 / 4.6;
  border-radius: 28px;
  overflow: hidden;
  background: var(--dawn-bottom);
  box-shadow: var(--shadow);
  text-align: left;
}

.calm li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.calm li div {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 64px 22px 22px;
  background: linear-gradient(transparent, rgba(34, 22, 16, 0.72));
  color: var(--ivory);
}

.calm strong {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.05;
}

.calm span {
  font-size: 16px;
  opacity: 0.92;
}

/* ---- get it -------------------------------------------------------------- */

.get {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(72px, 10vw, 130px) var(--gutter);
  background: linear-gradient(var(--dawn-top), var(--dawn-bottom));
  text-align: center;
  scroll-margin-top: 60px;
}

.get img {
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 22px var(--gutter);
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  background: var(--dawn-bottom);
  color: var(--text-3);
  font-size: 14px;
}

.foot a {
  color: inherit;
}

/* ---- landing softly ------------------------------------------------------ */

.rise {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.9s var(--spring);
}

.rise.in {
  opacity: 1;
  transform: none;
}

/* ---- a phone in the hand ------------------------------------------------- */

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .hero,
  .feature {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .hero {
    gap: 44px;
  }

  .feature {
    gap: 36px;
  }

  .feature.flip .featuretext {
    order: 0;
  }

  .lead,
  .featuretext p:not(.step) {
    margin-left: auto;
    margin-right: auto;
  }

  .calm ul {
    grid-template-columns: minmax(0, 1fr);
    max-width: 420px;
  }

  .moments li {
    flex-basis: 62vw;
  }

  .brand {
    font-size: 23px;
    gap: 10px;
  }

  .brand img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .pill {
    padding: 9px 16px;
    font-size: 15px;
  }
}
