/* Sana · sanaredpen. Static, mobile-first. Tokens follow the Unsendables PDF:
   cream ground, tomato-red pen, warm wood hairlines, ink text. Dark mode = the same
   kitchen after midnight (when most people are holding a draft). */

:root {
  --ground: #F7F0E4;
  --raised: #FBF7EF;
  --bubble: #ECE4D6;
  --ink: #2B2421;
  --ink-2: #5B4E47;
  --line: rgba(154, 106, 69, 0.38);
  --red: #D2402A;
  --red-hover: #B5361F;
  --red-ink: #B5361F;
  --on-red: #FBF4EA;
  --field: #D2402A;
  --focus: #2B2421;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --text: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --hand: 'Caveat', 'Bradley Hand', cursive;

  --r-bubble: 22px;
  --r-tail: 6px;
  --pad: clamp(20px, 5vw, 56px);
  --maxw: 1240px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-pen: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1F1916;
    --raised: #29211D;
    --bubble: #372D28;
    --ink: #F2E9DA;
    --ink-2: #CBBEAD;
    --line: rgba(214, 170, 130, 0.26);
    --red: #E5573D;
    --red-hover: #CF4A31;
    --red-ink: #F07A61;
    --on-red: #FFF6EC;
    --field: #B7371F;
    --focus: #F2E9DA;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) var(--ground); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.58 var(--text);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--red); color: var(--on-red); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 420; margin: 0; text-wrap: balance; font-variation-settings: "SOFT" 40, "WONK" 0; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 999px; z-index: 10; text-decoration: none; }
.skip:focus { top: 12px; }

/* header */
.site-head { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.mark {
  font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.7rem; line-height: 1;
  letter-spacing: -0.01em; text-decoration: none; font-variation-settings: "SOFT" 100, "WONK" 1;
}
.mark span { color: var(--red); }
.socials { display: flex; gap: 2px; margin-right: -10px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px;
  color: var(--ink); transition: background-color 0.2s var(--ease-out);
}
.icon-btn:hover { background: var(--bubble); }
.icon-btn svg { width: 22px; height: 22px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--red); color: var(--on-red);
  font: 600 1.0625rem/1 var(--text); text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.btn:hover { background: var(--red-hover); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--bubble); }

/* hero */
.hero { display: grid; gap: 26px; padding-bottom: clamp(56px, 9vw, 104px); }
.hero-photo {
  margin-inline: calc(-1 * var(--pad));
  height: min(58svh, 560px); width: calc(100% + 2 * var(--pad)); max-width: none;
  object-fit: cover; object-position: 50% 28%;
  background: var(--bubble);
}
.hero h1 {
  font-size: clamp(3.1rem, 12.4vw, 6.4rem); line-height: 0.94; letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}
.yet { position: relative; display: inline-block; white-space: nowrap; }
.yet svg { position: absolute; left: -2%; right: -4%; bottom: -0.16em; width: 106%; height: 0.32em; overflow: visible; }
.yet path { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 33ch; margin: 22px 0 28px; }

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); align-items: center; column-gap: clamp(40px, 6vw, 96px);
    min-height: calc(100svh - 64px); padding-bottom: 48px;
  }
  .hero-photo { margin: 0; width: 100%; height: min(84svh, 880px); object-position: 40% 30%; }
}

/* the edit demo */
.edit { padding-block: clamp(72px, 11vw, 150px); border-top: 1px solid var(--line); }
.edit h2, .moments-sec h2, .honest h2 { font-size: clamp(2.3rem, 6.2vw, 4.3rem); line-height: 1.02; letter-spacing: -0.022em; }
.edit h2 { max-width: 13ch; }
.intro { max-width: 46ch; color: var(--ink-2); margin-top: 18px; font-size: 1.125rem; }
.thread { display: grid; gap: 22px; margin-top: 52px; max-width: 900px; grid-template-areas: "draft" "notes" "send"; }
.draft-block, .send-block { display: grid; gap: 12px; max-width: 460px; }
.draft-block { grid-area: draft; }
.send-block { grid-area: send; }
.notes { grid-area: notes; }
.t1 { --d: 0.15s; } .t2 { --d: 0.45s; } .t3 { --d: 0.6s; } .t4 { --d: 0.95s; } .t5 { --d: 1.25s; } .t6 { --d: 1.4s; }
.t7 { --d: 1.75s; } .t8 { --d: 2.05s; } .t9 { --d: 2.2s; } .t10 { --d: 3s; } .t11 { --d: 3.25s; }
.tag { font-style: italic; color: var(--ink-2); font-size: 0.95rem; }
.bubble {
  border-radius: var(--r-bubble) var(--r-bubble) var(--r-tail) var(--r-bubble);
  padding: 15px 18px; font-size: 1.05rem; line-height: 1.5;
}
.bubble-draft { background: var(--bubble); }
.bubble-sent { background: var(--red); color: var(--on-red); justify-self: end; max-width: 88%; }
.cut {
  background-image: linear-gradient(var(--red), var(--red)); background-repeat: no-repeat;
  background-position: 0 58%; background-size: 100% 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.n {
  display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%;
  border: 1.5px solid var(--red); color: var(--red-ink); font: 600 0.68rem/1 var(--text);
  vertical-align: 0.18em; margin-left: 3px;
}
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: start; }
.notes li { display: flex; gap: 8px; align-items: baseline; font-family: var(--hand); font-weight: 600; font-size: 1.5rem; line-height: 1.12; color: var(--red-ink); }
.notes li .n { flex: none; transform: translateY(-2px); }
.now { font-family: var(--display); font-style: italic; font-weight: 450; font-size: 1.7rem; color: var(--red-ink); justify-self: end; margin-top: 8px; font-variation-settings: "SOFT" 100, "WONK" 1; }
.rule-line { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); max-width: 460px; }
.rule-line b { display: block; font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.35rem; margin-bottom: 4px; }
.rule-line p { color: var(--ink-2); }
@media (min-width: 900px) {
  .thread { grid-template-columns: minmax(0, 460px) minmax(0, 320px); grid-template-areas: "draft notes" "send notes"; column-gap: 64px; }
  .notes { padding-top: 40px; }
}

/* motion: visible by default; JS arms the start state, the observer plays it once */
@media (prefers-reduced-motion: no-preference) {
  .js .demo:not(.played) .cut { background-size: 0% 2px; }
  .js .demo:not(.played) .n, .js .demo:not(.played) .notes li { opacity: 0; transform: translateY(6px) rotate(-2deg); }
  .js .demo:not(.played) .now, .js .demo:not(.played) .bubble-sent { opacity: 0; transform: translateY(14px); }
  .js .demo .cut { transition: background-size 0.55s var(--ease-pen) var(--d, 0s); }
  .js .demo .n, .js .demo .notes li { transition: opacity 0.45s var(--ease-out) var(--d, 0s), transform 0.6s var(--ease-out) var(--d, 0s); }
  .js .demo .now, .js .demo .bubble-sent { transition: opacity 0.6s var(--ease-out) var(--d, 0s), transform 0.8s var(--ease-out) var(--d, 0s); }
  .js .hero .yet path { stroke-dasharray: 300; stroke-dashoffset: 300; animation: pen 0.9s var(--ease-pen) 0.45s forwards; }
  .js .hero-photo { animation: lift 1.1s var(--ease-out) both; }
}
@keyframes pen { to { stroke-dashoffset: 0; } }
@keyframes lift { from { opacity: 0; transform: scale(1.015); } to { opacity: 1; transform: none; } }

/* the free PDF: a committed red field */
.free { background: var(--field); color: var(--on-red); }
.free .wrap { display: grid; gap: 36px; padding-block: clamp(72px, 11vw, 140px); grid-template-areas: "head" "cover" "rest"; }
.free-head { grid-area: head; }
.free-rest { grid-area: rest; }
.free .cover-shot { grid-area: cover; }
.free h2 { font-size: clamp(2.7rem, 8vw, 5.4rem); line-height: 0.98; letter-spacing: -0.028em; color: var(--on-red); }
.free .sub { font-size: 1.175rem; margin-top: 16px; max-width: 36ch; }
.cover-shot { width: min(78%, 400px); transform: rotate(-3deg); box-shadow: 0 22px 48px -18px rgba(70, 14, 4, 0.55), 0 2px 6px rgba(70, 14, 4, 0.25); justify-self: center; }
.five { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 6px; }
.five li {
  font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.25;
  background-image: linear-gradient(rgba(255, 246, 236, 0.7), rgba(255, 246, 236, 0.7)); background-repeat: no-repeat;
  background-position: 0 60%; background-size: 100% 1.5px; width: fit-content;
}
.signup { margin-top: 34px; display: grid; gap: 10px; max-width: 480px; }
.signup label { font-weight: 600; }
.field { display: flex; flex-wrap: wrap; gap: 10px; }
.field input {
  flex: 1 1 230px; min-width: 0; height: 54px; border-radius: 999px; border: 1.5px solid transparent;
  background: #FBF4EA; color: #2B2421; padding: 0 22px; font: 400 1.0625rem var(--text);
}
.field input::placeholder { color: #6A5C54; }
.field input:focus-visible { outline: 2px solid #2B2421; outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: #2B2421; }
.free .btn { background: #2B2421; color: #FBF4EA; }
.free .btn:hover { background: #45382F; }
.free :focus-visible { outline-color: #FBF4EA; }
.help { font-size: 0.95rem; line-height: 1.45; }
.help a { text-decoration-color: currentColor; }
.status { font-weight: 600; min-height: 1.4em; }
@media (min-width: 900px) {
  .free .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); grid-template-areas: "head cover" "rest cover"; align-items: center; column-gap: clamp(48px, 7vw, 112px); row-gap: 0; }
  .free-head { align-self: end; }
  .free-rest { align-self: start; }
  .cover-shot { width: min(100%, 440px); }
}

/* Now Send. waitlist teaser: a loose thread of moments */
.moments-sec { padding-block: clamp(72px, 11vw, 150px); }
.moments-sec .intro { margin-bottom: 36px; }
.moments {
  list-style: none; margin: 0 calc(-1 * var(--pad)); padding: 4px var(--pad) 14px;
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.moments li {
  flex: 0 0 auto; max-width: 250px; scroll-snap-align: start;
  background: var(--bubble); border-radius: var(--r-bubble) var(--r-bubble) var(--r-bubble) var(--r-tail);
  padding: 13px 17px; font-size: 1rem; line-height: 1.38;
}
.moments-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.moments-cta p { color: var(--ink-2); font-size: 0.98rem; }
@media (min-width: 900px) {
  .moments { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; max-width: 1060px; gap: 12px 10px; }
  .moments li { max-width: none; white-space: nowrap; }
}

/* honest */
.honest { border-top: 1px solid var(--line); }
.honest .wrap { display: grid; gap: 36px; padding-block: clamp(72px, 11vw, 150px); }
.honest-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; background: var(--bubble); max-width: 460px; }
.honest .body { display: grid; gap: 16px; max-width: 52ch; margin-top: 20px; font-size: 1.125rem; }
.honest .body p:first-child { font-family: var(--display); font-style: italic; font-size: 1.45rem; line-height: 1.3; font-variation-settings: "SOFT" 100, "WONK" 1; }
.dm { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; max-width: 52ch; }
.dm h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
.dm p { color: var(--ink-2); }
.dm-row { display: flex; flex-wrap: wrap; gap: 10px; }
.safety { font-size: 0.95rem; color: var(--ink-2); margin-top: 8px; }
@media (min-width: 900px) {
  .honest .wrap { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); column-gap: clamp(48px, 7vw, 112px); align-items: start; }
  .honest-photo { position: sticky; top: 32px; }
}

/* footer */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap { display: grid; gap: 18px; padding-block: 40px 48px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.98rem; }
.fine { font-size: 0.9rem; color: var(--ink-2); max-width: 70ch; }

/* inner pages */
.page { padding-block: clamp(40px, 8vw, 96px) clamp(72px, 11vw, 140px); }
.page h1 { font-size: clamp(2.7rem, 9vw, 5.2rem); line-height: 0.98; letter-spacing: -0.028em; max-width: 14ch; font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0; }
.page .lede { max-width: 42ch; }
.page-grid { display: grid; gap: 48px; }
.page .signup label { color: var(--ink); }
.page .field input { border-color: var(--line); background: var(--raised); color: var(--ink); }
.page .field input::placeholder { color: var(--ink-2); }
.page .field input:focus-visible { outline-color: var(--focus); }
.page .field input[aria-invalid="true"] { border-color: var(--red); }
.page .help { color: var(--ink-2); }
.page .status { color: var(--red-ink); }
.sample { background: var(--raised); border: 1px solid var(--line); border-radius: 28px; padding: clamp(20px, 4vw, 34px); display: grid; gap: 14px; max-width: 500px; }
.sample h2 { font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.01em; }
.sample .feel { font-style: italic; color: var(--ink-2); font-size: 0.98rem; }
.sends { display: grid; gap: 8px; }
.sends .bubble-sent { font-size: 1rem; }
.sends small { display: block; font: 600 0.78rem/1 var(--text); letter-spacing: 0.04em; opacity: 0.85; margin-bottom: 6px; }
@media (min-width: 900px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); align-items: start; column-gap: clamp(48px, 7vw, 112px); }
}

/* privacy / long text */
.doc { max-width: 68ch; }
.doc h1 { font-size: clamp(2.4rem, 7vw, 4rem); max-width: none; }
.doc h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 40px 0 10px; }
.doc p, .doc li { color: var(--ink); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; margin: 10px 0 0; display: grid; gap: 6px; }
.doc .todo { background: var(--bubble); border-radius: 6px; padding: 0 6px; font-style: italic; }
.updated { color: var(--ink-2); margin-top: 14px; }
