/* ==========================================================================
   Peri, marketing site
   Plain CSS, no build step. Mobile first.
   ========================================================================== */

:root {
  /* Palette. Single source of truth. */
  --clay:      #C98B72;
  --clay-dark: #A8705A;
  --blush:     #EDD5C5;
  --sage:      #8FA68E;
  --dusk:      #8B7B8B;
  --night:     #2C2635;
  --cream:     #FAF6F1;

  /* Type */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Shape */
  --radius-card: 16px;
  --radius-pill: 50px;

  /* Rhythm */
  --pad-card: 24px;
  --gutter: 20px;
  --max-width: 1100px;
  --section-gap: 72px;

  /* Derived surfaces */
  --card-gradient: linear-gradient(180deg, var(--cream) 0%, #F6EAE0 100%);
  --card-border: rgba(237, 213, 197, 0.85);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--night);
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--clay-dark); }

/* Focus, visible and calm. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--clay-dark);
  outline-offset: 4px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--night);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-card) 0;
  z-index: 20;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Shared type
   -------------------------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;   /* never bold */
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--night);
}

h1 { font-size: clamp(2.5rem, 7.5vw, 3.75rem); }
h2 { font-size: clamp(2rem, 6vw, 2.9rem); }
h3 { font-size: clamp(1.75rem, 5vw, 2.35rem); }

p { margin: 0; }

.eyebrow {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 14px;
}

.lede {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--dusk);
  max-width: 34em;
}

/* --------------------------------------------------------------------------
   App Store badge
   -------------------------------------------------------------------------- */

.badge-link {
  display: inline-block;
  border-radius: 10px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.badge-link img { width: 180px; height: auto; }
.badge-link:hover { transform: translateY(-2px); opacity: 0.88; }
.badge-link:focus-visible { outline-offset: 6px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.wordmark__icon {
  width: 36px; height: 36px;
  border-radius: 9px;
}
.wordmark__text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--clay);
}
.wordmark--dark .wordmark__text { color: var(--blush); }
.wordmark--dark .wordmark__icon { width: 32px; height: 32px; }

.header-link {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--night);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.5);
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.header-link:hover {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Phone mockups
   -------------------------------------------------------------------------- */

.phone {
  margin: 0;
  background: var(--night);
  border-radius: 30px;
  padding: 8px;
  width: 100%;
  max-width: 240px;
  box-shadow:
    0 1px 2px rgba(44, 38, 53, 0.10),
    0 22px 48px -18px rgba(44, 38, 53, 0.36);
}
.phone img {
  width: 100%;
  border-radius: 23px;
  display: block;
}

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

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px var(--gutter) var(--section-gap);
  display: grid;
  gap: 48px;
}

.hero__text { max-width: 34em; }
.hero h1 { margin-bottom: 20px; }
.hero .lede { margin-bottom: 32px; }
.hero__note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--dusk);
}

.hero__media {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
}
.hero__media .phone--back {
  display: none;   /* one phone on small screens */
}

/* --------------------------------------------------------------------------
   Feature rows
   -------------------------------------------------------------------------- */

.features {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 28px;
}

.feature {
  background: var(--card-gradient);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 32px var(--pad-card) 0;
  display: grid;
  gap: 28px;
  overflow: hidden;
}

.feature__text h3 { margin-bottom: 12px; }
.feature__text p {
  color: var(--dusk);
  font-size: 1.02rem;
  max-width: 30em;
}

.feature__media {
  margin: 0 auto;
  max-width: 204px;
  /* The phone sits into the bottom edge of the card, like the App Store frames. */
  margin-bottom: -56px;
}

/* Reveal on scroll. Neutralised under prefers-reduced-motion, below. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 640ms ease, transform 640ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Trust strip
   -------------------------------------------------------------------------- */

.trust {
  background: var(--night);
  color: var(--cream);
  margin-top: var(--section-gap);
  padding: 56px 0;
}
.trust__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.trust__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 32px;
}
.trust__list li {
  display: block;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(250, 246, 241, 0.72);
}
.trust__list strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--cream);
  margin-bottom: 8px;
}
.trust__mark {
  display: block;
  width: 26px;
  height: 1px;
  background: var(--sage);
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Closing CTA
   -------------------------------------------------------------------------- */

.closing {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-gap) var(--gutter);
  text-align: center;
}
.closing h2 { margin-bottom: 16px; }
.closing p {
  color: var(--dusk);
  margin: 0 auto 32px;
  max-width: 26em;
}

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

.site-footer {
  background: var(--night);
  color: rgba(250, 246, 241, 0.7);
  padding: 44px 0;
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 24px;
  justify-items: center;
  text-align: center;
}
.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  color: var(--blush);
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(237, 213, 197, 0.3);
  padding-bottom: 2px;
  transition: color 200ms ease, border-color 200ms ease;
}
.footer-links a:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.footer-links a:focus-visible { outline-color: var(--blush); }
.copyright {
  font-size: 0.82rem;
  color: rgba(250, 246, 241, 0.5);
}

/* --------------------------------------------------------------------------
   Legal pages (privacy)
   -------------------------------------------------------------------------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px var(--gutter) 88px;
}

.legal h1 {
  font-size: clamp(2.25rem, 6.5vw, 2.9rem);
  margin-bottom: 8px;
}

.legal__updated {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--dusk);
  margin-bottom: 36px;
}

.legal__lead {
  font-size: 1.08rem;
  line-height: 1.68;
  margin-bottom: 4px;
}

.legal__callout {
  background: var(--card-gradient);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--clay);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin: 26px 0 8px;
  font-size: 1rem;
  line-height: 1.62;
}

.legal h2 {
  font-size: clamp(1.4rem, 4vw, 1.7rem);
  margin: 42px 0 12px;
}

.legal p {
  margin-bottom: 16px;
  color: var(--night);
  line-height: 1.68;
}

/* The lead-in phrase that opens several paragraphs. DM Sans 500 is the
   heaviest weight we load, so this never renders faux bold. */
.legal strong {
  font-weight: 500;
  color: var(--night);
}

.legal a {
  color: var(--clay-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 139, 114, 0.45);
  padding-bottom: 1px;
  transition: border-color 200ms ease;
}
.legal a:hover { border-bottom-color: var(--clay-dark); }

@media (min-width: 700px) {
  .legal { padding-top: 40px; }
}

/* --------------------------------------------------------------------------
   Tablet and up
   -------------------------------------------------------------------------- */

@media (min-width: 700px) {
  :root {
    --gutter: 32px;
    --pad-card: 40px;
    --section-gap: 104px;
  }

  body { font-size: 18px; }

  .trust__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .closing p { margin-bottom: 36px; }
}

/* --------------------------------------------------------------------------
   Desktop
   -------------------------------------------------------------------------- */

@media (min-width: 960px) {
  .site-header { padding-top: 32px; }

  .hero {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 56px;
    padding-top: 40px;
    padding-bottom: 72px;
  }
  .hero__media {
    align-items: center;
    justify-content: flex-end;
  }
  .hero__media .phone--back {
    display: block;
    max-width: 210px;
    margin-right: -56px;
    transform: translateY(-22px) rotate(-4deg);
    z-index: 0;
  }
  .hero__media .phone--front {
    max-width: 250px;
    position: relative;
    z-index: 1;
  }

  .features { gap: 32px; }

  .feature {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    padding: 56px var(--pad-card) 0;
    min-height: 400px;
  }
  .feature__text { padding-bottom: 56px; }

  .feature__media {
    max-width: 246px;
    margin-bottom: -64px;
    justify-self: center;
  }

  /* Alternate the sides, text right on every other row. */
  .feature:nth-of-type(even) .feature__media { order: -1; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .badge-link:hover { transform: none; }
}
