/* LoveForRyan.com
   Fonts are self-hosted in /fonts so the site loads fast in Ecuador and the US. */

@font-face { font-family: "Literata"; src: url("fonts/literata.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Birthstone"; src: url("fonts/birthstone.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #FCFBF8;
  --ink: #22302A;
  --muted: #56635C;
  --rose: #B4233A;
  --rose-deep: #93192D;
  --blush: #F7EDE9;
  --blush-line: #EBD6CF;
  --gold: #B8893A;
  --sage: #3F6E4D;
  --sage-bg: #E8F0E9;
  --amber: #8A510D;
  --amber-bg: #FAEFDC;
  --line: #E5E0D7;
  --white: #FFFFFF;
  --night: #22302A;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --script: "Birthstone", "Brush Script MT", cursive;

  --measure: 39rem;
  --wide: 70rem;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.72;
  font-variation-settings: "opsz" 14;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 760px) { body { font-size: 1.125rem; } }

img, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
p { margin: 0 0 1em; }
a { color: var(--rose-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--white); color: var(--ink); padding: 10px 14px; font-family: var(--sans); border-radius: 8px; }
.skip:focus { left: 12px; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); text-wrap: balance; }
h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 60;
  font-weight: 560;
  font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin-bottom: 0.6em;
}
h3 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 30;
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 1.8em 0 0.55em;
}
h4 { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; line-height: 1.3; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }
.center { margin-left: auto; margin-right: auto; }
.section { padding: 64px 0; }
@media (min-width: 760px) { .section { padding: 96px 0; } :root { --gutter: 28px; } }
.lead { font-size: 1.12em; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-family: var(--sans); font-size: 0.92rem; line-height: 1.55; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--sans); font-weight: 650; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center;
  border-radius: 999px; padding: 0.9em 1.45em; min-height: 48px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--rose); color: var(--white); }
.btn-primary:hover { background: var(--rose-deep); color: var(--white); }
.btn-quiet { background: transparent; color: var(--ink); border-color: rgba(34, 48, 42, 0.35); }
.btn-quiet:hover { border-color: var(--ink); background: rgba(34, 48, 42, 0.04); color: var(--ink); }
.btn-lg { font-size: 1.1rem; padding: 1em 1.7em; min-height: 56px; }
.btn-small { font-size: 0.95rem; padding: 0.6em 1.1em; min-height: 42px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: rgba(252, 251, 248, 0.93);
  -webkit-backdrop-filter: saturate(140%) blur(8px); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.wordmark { font-family: var(--script); font-size: 2.05rem; line-height: 1; color: var(--rose); text-decoration: none; padding-top: 6px; white-space: nowrap; }
.wordmark:hover { color: var(--rose-deep); }
.head-links { display: flex; align-items: center; gap: 18px; font-family: var(--sans); font-size: 0.95rem; }
.head-links a:not(.btn) { color: var(--ink); text-decoration: none; display: none; }
.head-links a:not(.btn):hover { color: var(--rose-deep); }
@media (min-width: 900px) { .head-links a:not(.btn) { display: inline; } }

/* Hero */
.hero { padding: 40px 0 56px; text-align: center; }
@media (min-width: 760px) { .hero { padding: 64px 0 80px; } }
.hero-title {
  font-family: var(--script); font-weight: 400; color: var(--rose);
  font-size: clamp(4.4rem, 2.6rem + 9vw, 9rem); line-height: 0.95;
  margin: 0 0 0.12em; letter-spacing: 0;
}
@media (min-width: 760px) { .hero-title { margin-bottom: 0.3em; } }
@media (max-width: 559px) {
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 24rem; margin-left: auto; margin-right: auto; }
}
.hero-sub { font-size: clamp(1.08rem, 1rem + 0.5vw, 1.3rem); color: var(--muted); max-width: 32rem; margin: 0 auto 32px; line-height: 1.55; }
.hero-actions { justify-content: center; margin-top: 28px; }
.latest-line { font-family: var(--sans); font-size: 0.95rem; color: var(--muted); margin: 20px 0 0; }
.latest-line a { font-weight: 600; }

.jump { margin: 28px auto 0; max-width: 46rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-family: var(--sans); font-size: 0.98rem; }
.jump a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); padding: 4px 0; }
.jump a:hover { color: var(--rose-deep); border-color: var(--rose); }

/* Video */
.video-frame { max-width: 56rem; margin: 0 auto; border-radius: 18px; overflow: hidden; background: var(--night); box-shadow: 0 1px 0 rgba(34, 48, 42, 0.08), 0 18px 40px -24px rgba(34, 48, 42, 0.55); }
.video-embed { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder { display: grid; grid-template-columns: 38% 1fr; aspect-ratio: 16 / 9; color: var(--paper); text-align: left; }
.video-placeholder img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.video-placeholder .vp-text { align-self: center; padding: 16px 18px 16px 20px; }
.vp-title { font-family: var(--script); font-size: clamp(1.9rem, 1.2rem + 3.5vw, 3.6rem); line-height: 1; color: #F4D9D3; margin: 0 0 0.3em; }
.vp-note { font-family: var(--sans); font-size: clamp(0.85rem, 0.75rem + 0.6vw, 1.1rem); line-height: 1.45; margin: 0; color: rgba(252, 251, 248, 0.86); max-width: 22rem; }

/* Short update */
.update-grid { display: grid; gap: 40px; }
@media (min-width: 980px) {
  .update-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; align-items: start; }
  .update-aside { position: sticky; top: 96px; }
}
.byline { font-family: var(--sans); color: var(--muted); font-size: 0.98rem; margin: -0.2em 0 1.8em; }
.update-aside figure { margin: 0; }
.update-aside img { border-radius: 14px; box-shadow: 0 18px 40px -26px rgba(34, 48, 42, 0.7); }
.update-aside figcaption { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin-top: 10px; }
.callout { border-left: 3px solid var(--gold); padding: 2px 0 2px 18px; margin: 1.6em 0; }
.callout p:last-child { margin-bottom: 0; }
.signoff { margin-top: 2em; }
.signature { font-family: var(--script); color: var(--rose); font-size: 3.4rem; line-height: 1; margin: 0.1em 0 0.05em; }
.after-letter { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }

/* Support */
.support { background: var(--blush); border-top: 1px solid var(--blush-line); border-bottom: 1px solid var(--blush-line); }
.gofundme {
  background: var(--white); border-radius: 20px; padding: 28px 22px;
  border: 1px solid var(--blush-line); margin: 32px 0 48px;
  box-shadow: 0 22px 50px -34px rgba(147, 25, 45, 0.55);
}
@media (min-width: 760px) { .gofundme { padding: 40px 44px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; } }
.gofundme .gf-name { font-family: var(--serif); font-variation-settings: "opsz" 40; font-weight: 600; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); line-height: 1.2; margin: 0 0 0.35em; }
.gofundme .gf-meta { font-family: var(--sans); color: var(--muted); margin: 0; font-size: 1rem; }
.gofundme .btn { width: 100%; margin-top: 22px; }
@media (min-width: 760px) { .gofundme .btn { width: auto; margin-top: 0; } }

.give-title { font-family: var(--serif); font-variation-settings: "opsz" 30; font-weight: 600; font-size: 1.35rem; margin: 0 0 6px; }
.give-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--blush-line); }
.give-row { display: grid; gap: 10px; padding: 24px 0; border-bottom: 1px solid var(--blush-line); }
@media (min-width: 760px) { .give-row { grid-template-columns: 13rem 1fr; gap: 28px; } }
.give-row h4 { font-size: 1.12rem; }
.give-for { font-family: var(--sans); font-size: 0.92rem; color: var(--muted); margin: 2px 0 0; }
.give-body > *:last-child { margin-bottom: 0; }
.handle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-family: var(--sans); font-size: 1.08rem; font-weight: 600; margin: 0 0 12px; word-break: break-all; }
.copy {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 650; color: var(--rose-deep);
  background: var(--white); border: 1px solid var(--blush-line); border-radius: 999px;
  padding: 0.4em 0.95em; cursor: pointer; min-height: 34px; word-break: normal;
}
.copy:hover { border-color: var(--rose); }
.copy.is-copied { background: var(--sage-bg); color: var(--sage); border-color: #C7DACB; }
.note { font-family: var(--sans); font-size: 0.95rem; line-height: 1.55; background: rgba(255, 255, 255, 0.65); border: 1px solid var(--blush-line); border-radius: 12px; padding: 12px 14px; margin: 14px 0 0; }
.note strong { font-weight: 700; }
details.qr { margin-top: 14px; font-family: var(--sans); font-size: 0.95rem; }
details.qr summary { cursor: pointer; color: var(--rose-deep); font-weight: 600; width: fit-content; }
details.qr img { width: 220px; margin-top: 12px; border-radius: 12px; background: var(--white); padding: 4px; border: 1px solid var(--blush-line); }
.pending { font-family: var(--sans); color: var(--muted); font-style: normal; margin: 0; }
dl.details { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-family: var(--sans); font-size: 1rem; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; font-weight: 600; word-break: break-word; }
.why { margin-top: 48px; }
.no-pressure { font-style: italic; }

/* Full story teaser */
.story-teaser { display: grid; gap: 28px; }
@media (min-width: 900px) { .story-teaser { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 64px; align-items: start; } }
.author { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.author p { margin: 0; font-family: var(--sans); font-size: 0.95rem; color: var(--muted); line-height: 1.4; }
.author strong { color: var(--ink); font-weight: 650; }
.chapters { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); font-family: var(--sans); }
.chapters li { border-bottom: 1px solid var(--line); }
.chapters a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; }
.chapters a:hover { color: var(--rose-deep); }
.chapters-label { font-family: var(--sans); font-weight: 650; font-size: 0.95rem; color: var(--muted); margin: 0 0 8px; }

/* Medical */
.medical { background: #F5F6F2; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 20px; margin: 28px 0 56px;
}
@media (min-width: 760px) { .status { padding: 30px 34px; } }
.status h3 { margin-top: 0; }
.status ul { list-style: none; margin: 0; padding: 0; }
.status li { display: grid; grid-template-columns: 7.2rem 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); align-items: baseline; }
.status li:first-child { border-top: 0; padding-top: 6px; }
@media (max-width: 520px) { .status li { grid-template-columns: 1fr; gap: 6px; } }
.tag { display: inline-block; font-family: var(--sans); font-size: 0.82rem; font-weight: 700; line-height: 1.2; padding: 0.35em 0.75em; border-radius: 999px; white-space: nowrap; width: fit-content; }
.tag-amber { color: var(--amber); background: var(--amber-bg); }
.tag-sage { color: var(--sage); background: var(--sage-bg); }
.tag-ink { color: var(--ink); background: #ECEEEA; }

.history { margin: 0 0 56px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 22px 32px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--gold); }
.timeline li.now::before { background: var(--rose); border-color: var(--rose); }
.timeline .when { display: block; font-family: var(--sans); font-weight: 700; font-size: 0.95rem; color: var(--muted); }
.timeline li p { margin: 0; }

.scan { display: grid; gap: 22px; margin: 0 0 56px; }
@media (min-width: 900px) { .scan { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; } }
.scan figure { margin: 0; }
.scan figure a { display: block; border-radius: 14px; overflow: hidden; background: #000; }
.scan figcaption { font-family: var(--sans); font-size: 0.92rem; line-height: 1.5; color: var(--muted); margin-top: 10px; }
.scan h3 { margin-top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.scan ul, .result ul { padding-left: 1.15em; margin: 0 0 1em; }
.scan li, .result li { margin-bottom: 0.45em; }

.results { display: grid; gap: 18px; margin-bottom: 56px; }
@media (min-width: 900px) { .results { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.result { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px 20px; }
.result h3 { margin: 10px 0 10px; font-size: 1.2rem; }
.result p:last-child, .result ul:last-child { margin-bottom: 0; }
.result .date { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }

.unconfirmed { border-left: 3px solid var(--amber); padding-left: 20px; }
.unconfirmed h3 { margin-top: 0; }
.fineprint { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin-top: 32px; }

/* Updates */
.updates-list { list-style: none; margin: 32px 0 0; padding: 0; position: relative; }
.update { position: relative; padding: 0 0 40px 30px; border-left: 2px solid var(--line); margin-left: 6px; }
.update:last-child { padding-bottom: 4px; }
.update::before { content: ""; position: absolute; left: -9px; top: 0.35em; width: 16px; height: 16px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 4px var(--paper); }
.update time { display: block; font-family: var(--sans); font-weight: 700; font-size: 0.95rem; color: var(--rose-deep); margin-bottom: 4px; }
.update h3 { margin: 0 0 0.45em; }
.update-photo { border-radius: 12px; margin: 8px 0 14px; max-height: 520px; width: auto; }
.update .video-embed { border-radius: 12px; overflow: hidden; margin: 8px 0 14px; }
.update-by { font-family: var(--sans); font-size: 0.92rem; color: var(--muted); }
.empty { font-family: var(--sans); color: var(--muted); }

/* Contact */
.contact-grid { display: grid; gap: 40px; margin-top: 8px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 64px; } }
.contact-grid h3 { margin-top: 0; }
.offline { background: var(--night); color: var(--paper); border-radius: 20px; padding: 26px 22px; margin: 28px 0 48px; }
@media (min-width: 760px) { .offline { padding: 36px 40px; } }
.offline h3 { color: var(--paper); margin-top: 0; }
.offline p:last-child { margin-bottom: 0; }
.offline a { color: #F4D9D3; }
.offline .not-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 4px 0 18px; }
.offline .not-list li { font-family: var(--sans); font-size: 0.92rem; border: 1px solid rgba(252, 251, 248, 0.3); border-radius: 999px; padding: 0.3em 0.9em; }
.help-list { padding-left: 1.15em; margin: 0 0 1em; }
.help-list li { margin-bottom: 0.4em; }
.arrow-note { background: var(--blush); border: 1px solid var(--blush-line); border-radius: 16px; padding: 20px; }
.arrow-note p:last-child { margin-bottom: 0; }

/* Footer */
.site-foot { padding: 64px 0 48px; text-align: center; border-top: 1px solid var(--line); }
.foot-mark { font-family: var(--script); color: var(--rose); font-size: 3rem; line-height: 1; margin: 0 0 12px; }
.site-foot p { max-width: 34rem; margin-left: auto; margin-right: auto; }
.site-foot .small { margin-top: 18px; }

/* Story page */
.story-head { padding: 48px 0 8px; }
@media (min-width: 760px) { .story-head { padding: 80px 0 16px; } }
.story-head h1 {
  font-family: var(--serif); font-variation-settings: "opsz" 72; font-weight: 520;
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 24px;
}
.back { font-family: var(--sans); font-size: 0.95rem; display: inline-block; margin-bottom: 28px; text-decoration: none; }
.story { padding-bottom: 72px; }
.story h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.05rem); margin: 2.2em 0 0.8em; }
.story p { margin-bottom: 0.95em; }
.story .stanza { line-height: 1.6; padding-left: 18px; border-left: 2px solid var(--line); margin: 0.4em 0 1.3em; }
.story .beat { font-size: 1.12em; font-style: italic; }
.story figure { margin: 2.4em 0; }
.story figure img { border-radius: 14px; width: 100%; max-width: 26rem; }
.story .inline-note { font-family: var(--sans); font-size: 0.98rem; line-height: 1.55; background: #F5F6F2; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.story-end { margin-top: 3em; padding: 28px 22px; background: var(--blush); border: 1px solid var(--blush-line); border-radius: 18px; }
.story-end h2 { margin-top: 0; }
.story-end p { margin-bottom: 1.2em; }
.toc { font-family: var(--sans); font-size: 0.98rem; margin: 0 0 8px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.toc summary { cursor: pointer; font-weight: 650; }
.toc ol { margin: 12px 0 0; padding-left: 1.3em; }
.toc li { margin: 6px 0; }
.toc a { color: var(--ink); }
