/* Readay site. Tokens mirror the app (readayapp/docs/tokens.css, Colors.swift).
   Light only for now. System sans for everything the site says; Cormorant
   Garamond only for content (the wordmark, titles, quotes); Space Grotesk for
   numbers. One wash, flat cards, no shadows. */

:root {
  --background: #f7f8f9;
  --foreground: #131517;
  --card: #ffffff;
  --primary: #333537;
  --muted: #ecedee;
  --muted-foreground: #6e7071;
  --border: #e5e7eb;
  --ring: #f31a7c;
  --body-ink: #2c2e30;

  --tint-peach: #ffe4d6;  --tint-peach-fg: #8a3d1c;
  --tint-butter: #fff3c4; --tint-butter-fg: #7a5a00;
  --tint-mint: #d9f2e3;   --tint-mint-fg: #1f5e3c;
  --tint-sky: #dcebfb;    --tint-sky-fg: #1f4f86;
  --tint-lilac: #e8e0fb;  --tint-lilac-fg: #4b3690;
  --tint-blush: #fbdceb;  --tint-blush-fg: #8c2156;

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Cormorant Garamond", ui-serif, Georgia, serif;
  --font-num: "Space Grotesk", var(--font-sans);

  --page-x: 24px;
  --edge: max(var(--page-x), calc((100vw - 1080px) / 2 + var(--page-x)));
  --spring: cubic-bezier(.34, 1.45, .64, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  position: relative;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 17px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  isolation: isolate;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--page-x); }
.narrow { max-width: 720px; }
.rail > * { max-width: 720px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums lining-nums; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted-foreground); }
.lede { margin: 14px 0 0; font-size: clamp(18px, 2vw, 21px); line-height: 1.4; color: var(--muted-foreground); }
.meta { font-size: 14px; color: var(--muted-foreground); }
.wordmark { font-family: var(--font-serif); font-weight: 600; font-size: 28px; line-height: 1; letter-spacing: -0.01em; text-decoration: none; }

/* ---------- the wash: sky → lilac → blush, fading down the page ---------- */

.wash {
  position: absolute; left: 0; right: 0; top: 0; z-index: -1;
  pointer-events: none;
  background: linear-gradient(160deg, var(--tint-sky) 0%, var(--tint-lilac) 45%, var(--tint-blush) 100%);
  opacity: .9;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.65) 0, #000 35%, transparent 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65) 0, #000 35%, transparent 100%);
}
.wash-home { height: 860px; }
.wash-page { height: 420px; }
.wash-low {
  top: auto; bottom: 0; height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 60%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 60%, #000 100%);
}

/* ---------- header / footer ---------- */

.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a:not(.btn) { font-size: 15px; font-weight: 600; color: var(--muted-foreground); text-decoration: none; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current] { color: var(--foreground); }

.site-footer { border-top: 1px solid var(--border); padding: 32px 0 44px; }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.site-footer .wordmark { font-size: 22px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer nav a, .site-footer small { font-size: 14px; color: var(--muted-foreground); text-decoration: none; }
.site-footer nav a:hover { color: var(--foreground); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--primary); color: #fff;
  font-size: 17px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease-out, opacity .12s ease-out, background-color .15s;
}
.btn:hover { background: #1f2123; }
.btn:active { transform: translateY(1px) scale(.975); opacity: .92; }
.btn-sm { height: 40px; padding: 0 18px; font-size: 15px; }

.circle-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--card); color: var(--foreground);
  cursor: pointer; transition: transform .12s ease-out, opacity .15s;
}
.circle-btn svg { width: 20px; height: 20px; }
.circle-btn:active { transform: scale(.94); }
.circle-btn:disabled { opacity: .35; cursor: default; }

/* ---------- phone (a real screen, cropped from the store screenshots) ---------- */

.phone {
  --w: 300px;
  --r: calc((var(--w) - 20px) * .118);
  width: var(--w);
  padding: 10px 10px 0;
  background: #131517;
  border-radius: calc(var(--r) + 10px) calc(var(--r) + 10px) 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 97%);
  mask-image: linear-gradient(to bottom, #000 60%, transparent 97%);
}
.phone img { width: 100%; border-radius: var(--r) var(--r) 0 0; background: var(--background); }

/* ---------- vibe stamps (VibeStampMark) ---------- */

.stamp {
  --size: 84px;
  position: absolute; z-index: 1;
  width: var(--size); height: var(--size);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--ink);
  background:
    linear-gradient(155deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 58%, color-mix(in srgb, var(--ink) 14%, transparent) 100%),
    var(--tint);
  border: 2px solid var(--ink);
  border-radius: var(--shape);
  transform: rotate(var(--tilt));
}
.stamp::after {
  content: ""; position: absolute; inset: 7px;
  border: 1.1px solid color-mix(in srgb, var(--ink) 45%, transparent);
  border-radius: var(--inner, var(--shape));
}
.stamp svg { width: 18px; height: 18px; opacity: .85; }
.stamp span { font-family: var(--font-serif); font-weight: 600; font-size: 15px; line-height: 1; }
.stamp.warm   { --tint: var(--tint-peach); --ink: var(--tint-peach-fg); }
.stamp.eerie  { --tint: var(--tint-lilac); --ink: var(--tint-lilac-fg); }
.stamp.bright { --tint: var(--tint-mint);  --ink: var(--tint-mint-fg); }
.stamp.charged{ --tint: var(--tint-blush); --ink: var(--tint-blush-fg); }
.stamp.circle   { --shape: 50%; }
.stamp.squircle { --shape: 26px; --inner: 19px; }
.stamp.burst    { --shape: 42px 42px 42px 10px; --inner: 35px 35px 35px 4px; }

/* ---------- home: hero ---------- */

.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: 40px; }
.hero-copy { padding: 56px 0 140px; }
.hero-copy .mascot { width: 52px; height: 52px; }
.hero h1 { margin-top: 24px; font-size: clamp(46px, 6.8vw, 78px); line-height: 1.0; letter-spacing: -0.04em; }
.hero .lede { max-width: 26ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 34px; }

.hero-visual { position: relative; justify-self: center; padding: 24px 56px 0; }
.hero-visual .phone { --w: 312px; }
.hero-visual .s1 { left: 0;     top: 124px; --tilt: -4deg; --i: 0; }
.hero-visual .s2 { right: 4px;  top: 250px; --tilt: 3deg;  --i: 1; }
.hero-visual .s3 { left: -4px;  top: 420px; --tilt: -2deg; --i: 2; }

/* ---------- home: screens ---------- */

.section { padding: 88px 0 0; }
.section h2 { font-size: clamp(32px, 4.4vw, 46px); letter-spacing: -0.03em; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.strip-nav { display: flex; gap: 8px; }

.strip {
  display: flex; gap: 22px;
  margin-top: 36px; padding: 4px var(--page-x) 8px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 auto; margin: 0; scroll-snap-align: center; }
/* Auto margins centre the row when it fits and fall away to 0 when it overflows. */
.shot:first-child { margin-left: auto; }
.shot:last-child { margin-right: auto; }
.strip-nav[hidden] { display: none; }
.shot .phone { --w: 268px; }
.shot figcaption { margin-top: 12px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- home: the small things ---------- */

.rows { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rows li {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 10px 16px;
  background: var(--card); border-radius: 16px;
  font-size: 17px; font-weight: 500;
}
.ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.ic svg { width: 20px; height: 20px; }
.ic.sky    { background: var(--tint-sky);    color: var(--tint-sky-fg); }
.ic.lilac  { background: var(--tint-lilac);  color: var(--tint-lilac-fg); }
.ic.blush  { background: var(--tint-blush);  color: var(--tint-blush-fg); }
.ic.mint   { background: var(--tint-mint);   color: var(--tint-mint-fg); }
.ic.peach  { background: var(--tint-peach);  color: var(--tint-peach-fg); }
.ic.butter { background: var(--tint-butter); color: var(--tint-butter-fg); }
.ic.plain  { background: var(--muted);       color: var(--foreground); }
.rows li.wide { grid-column: 1 / -1; }

/* ---------- home: pricing ---------- */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 32px; }
.plan {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; background: var(--card); border-radius: 16px;
  border: 1px solid transparent;
}
.plan.featured { border-color: var(--primary); }
.plan-name { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.badge { padding: 3px 10px; border-radius: 999px; background: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.plan-price { white-space: nowrap; }
.plan-price .num { font-size: 22px; font-weight: 600; }
.plan-price small { margin-left: 3px; font-size: 14px; color: var(--muted-foreground); }
.fine { margin: 16px 0 0; font-size: 14px; color: var(--muted-foreground); }
.country { position: relative; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--foreground); cursor: pointer; }
.country::after {
  content: ""; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.country select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font: inherit; }
.country:has(select:focus-visible) { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

/* ---------- questions ---------- */

.qa-list { display: grid; gap: 8px; margin-top: 32px; }
.section .qa-list { grid-template-columns: 1fr 1fr; align-items: start; }
.qa { background: var(--card); border-radius: 16px; padding: 0 20px; }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 62px; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; flex: 0 0 auto; width: 14px; height: 14px;
  background: currentColor; transition: transform .25s var(--ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.qa[open] summary::after { transform: rotate(180deg); }
.qa p { margin: -4px 0 20px; color: var(--muted-foreground); }
.qa a { color: var(--foreground); }

/* ---------- home: closing ---------- */

.closing { position: relative; margin-top: 88px; padding: 110px 0 120px; text-align: center; overflow: hidden; isolation: isolate; }
.closing h2 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.03em; }
.closing .btn { margin-top: 28px; }

/* ---------- plain pages: support, privacy, terms, blog ---------- */

.doc { padding: 48px 0 104px; }
.doc h1 { font-size: clamp(40px, 5.6vw, 56px); letter-spacing: -0.035em; }
.doc .updated { margin-top: 12px; }
.doc h2 { margin: 44px 0 10px; font-size: 21px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--body-ink); }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc .summary { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 8px; }
.doc .summary li { display: flex; align-items: center; gap: 14px; margin: 0; padding: 12px 16px; background: var(--card); border-radius: 16px; font-weight: 500; color: var(--foreground); }
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 32px; }
.contact .btn svg { width: 20px; height: 20px; }

/* ---------- blog ---------- */

.post-list { display: grid; gap: 8px; margin-top: 32px; }
.post-card { display: block; padding: 22px 22px 20px; background: var(--card); border-radius: 18px; text-decoration: none; transition: transform .12s ease-out; }
.post-card:active { transform: scale(.99); }
.post-card-icon { display: block; width: 22px; height: 22px; color: var(--muted-foreground); }
.post-card h2 { margin-top: 12px; font-family: var(--font-serif); font-weight: 600; font-size: 28px; line-height: 1.12; letter-spacing: 0; }
.post-card p { margin: 8px 0 12px; color: var(--muted-foreground); }

.post { padding: 32px 0 104px; }
.back { display: inline-flex; align-items: center; gap: 2px; margin-left: -6px; font-size: 17px; text-decoration: none; }
.back svg { width: 22px; height: 22px; }
.post h1 { margin-top: 28px; font-family: var(--font-serif); font-size: clamp(40px, 6vw, 60px); line-height: 1.04; letter-spacing: -0.005em; }
.post > .container > .meta { margin: 14px 0 0; }
.answer { margin-top: 28px; padding: 20px 22px; background: var(--card); border-radius: 20px; }
.answer p { margin: 8px 0 0; font-size: 18px; line-height: 1.5; }
.prose { margin-top: 36px; font-size: 18px; line-height: 1.68; color: var(--body-ink); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 48px 0 12px; font-size: 27px; line-height: 1.15; letter-spacing: -0.02em; color: var(--foreground); }
.prose h3 { margin: 32px 0 8px; font-size: 20px; letter-spacing: -0.01em; color: var(--foreground); }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--foreground); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose blockquote { margin: 30px 0; padding: 2px 0 2px 20px; border-left: 2px solid var(--border); }
.prose blockquote p { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 25px; line-height: 1.32; color: var(--foreground); }
.prose img { margin: 28px 0; border-radius: 16px; }
.prose hr { margin: 40px 0; border: 0; border-top: 1px solid var(--border); }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--muted); font: 15px ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose pre { padding: 16px; overflow-x: auto; border-radius: 16px; background: var(--card); }
.prose pre code { padding: 0; background: none; }
.cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 56px; padding: 24px; background: var(--card); border-radius: 24px; }
.cta-card p { margin: 0; }
.cta-card-title { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.more { margin-top: 64px; }

/* ---------- motion: the fall-in, the stamp, the rise ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-fall] { animation: fall-in .62s var(--spring) both; animation-delay: calc(var(--i, 0) * 45ms + 80ms); }
  .js .hero-visual .phone { animation: rise-in .9s var(--ease) both .1s; }
  .js .stamp { animation: stamp-in .5s var(--spring) both; animation-delay: calc(700ms + var(--i, 0) * 140ms); }
  .js [data-rise] { opacity: 0; transform: translateY(26px); transition: opacity .5s ease, transform .75s var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }
  .js [data-rise].in { opacity: 1; transform: none; }
}
@keyframes fall-in { from { transform: translateY(-20px) scale(1.08); } to { transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes stamp-in {
  from { opacity: 0; transform: rotate(calc(var(--tilt) - 12deg)) scale(1.6); }
  50% { opacity: 1; }
  to { opacity: 1; transform: rotate(var(--tilt)) scale(1); }
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 8px; }
  .hero-copy { padding: 32px 0 0; }
  .hero-visual { padding-top: 28px; }
  .hero-visual .phone { --w: 290px; }
  .rows { grid-template-columns: 1fr 1fr; }
  .section .qa-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --page-x: 16px; }
  .site-header .container { height: 64px; }
  .site-nav { gap: 16px; }
  .site-nav a:not(.btn) { font-size: 14px; }
  .wordmark { font-size: 26px; }
  .hero-copy .mascot { width: 44px; height: 44px; }
  .hero h1 { margin-top: 18px; }
  .hero-visual { padding: 24px 40px 0; }
  .hero-visual .phone { --w: 264px; }
  .stamp { --size: 70px; gap: 4px; }
  .stamp span { font-size: 13px; }
  .stamp svg { width: 15px; height: 15px; }
  .stamp::after { inset: 6px; }
  .stamp.squircle { --shape: 22px; --inner: 16px; }
  .stamp.burst { --shape: 35px 35px 35px 8px; --inner: 29px 29px 29px 3px; }
  .hero-visual .s1 { top: 104px; left: -2px; }
  .hero-visual .s2 { top: 214px; right: -2px; }
  .hero-visual .s3 { top: 360px; left: -4px; }
  .section { padding-top: 72px; }
  .strip-nav { display: none; }
  .strip { gap: 14px; margin-top: 28px; padding-inline: calc(50vw - 118px); }
  .shot .phone { --w: 236px; }
  .rows { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan { padding: 16px; }
  .plan-price .num { font-size: 20px; }
  .closing { margin-top: 72px; padding: 88px 0 96px; }
  .doc { padding: 32px 0 88px; }
  .cta-card { padding: 20px; }
}

.keep { display: inline-block; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The app name sets heavier than the rest of the heading. */
.hero h1 .name { font-weight: 800; letter-spacing: -0.045em; }

/* Typed in (TypewriterText): every glyph is laid out from the start and the
   ones not yet typed are clear, so the line never shifts while it types. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-type]:not([data-typed]) { color: transparent; animation: typed-fallback 0s linear 2.5s forwards; }
}
@keyframes typed-fallback { to { color: var(--muted-foreground); } }
.tw { color: transparent; }
.tw.on { color: inherit; }

/* Latest posts on the home page */
.section-head .more-link { font-size: 15px; font-weight: 600; color: var(--muted-foreground); text-decoration: none; white-space: nowrap; }
.section-head .more-link:hover { color: var(--foreground); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin-top: 32px; }
.empty { margin-top: 32px; }
