/* Open When I'm Gone by Forever and a Day. One stylesheet, system fonts, no external requests. */
:root {
  --paper: #f7f3ec;
  --paper-deep: #efe7db;
  --card: #fffdf9;
  --ink: #2a241e;
  --ink-soft: #4a4038;
  --muted: #6e645a;
  --line: #e4dccf;
  --accent: #7b4a2b;
  --accent-deep: #5e3820;
  --accent-ink: #fffaf3;
  --accent-soft: #f1e4d6;
  --gold: #b8873e;
  --seal: #8e2f24;
  --ok: #3f6b3a;
  --night: #241d18;
  --night-ink: #f3ebe0;
  --focus: #c98a4b;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --wrap: 1120px;
  --shadow: 0 1px 2px rgba(42, 36, 30, 0.05), 0 8px 28px rgba(42, 36, 30, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 600; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.mono { font-family: var(--mono); letter-spacing: 0.03em; }
.eyebrow { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 0.9em; display: block; }
.lead { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.6; }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 12px; top: 12px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247, 243, 236, 0.92); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.2rem; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink-soft); padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover { background: var(--accent-soft); color: var(--accent-deep); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav .btn { margin-left: 8px; padding: 9px 18px; color: var(--accent-ink); }
.nav .btn:hover { color: var(--accent-ink); }
.menu-toggle { display: none; }
@media (max-width: 880px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 0.95rem; color: var(--ink); cursor: pointer; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--card); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); color: var(--accent-ink); text-decoration: none; border: 1px solid var(--accent); border-radius: 999px; padding: 14px 28px; font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer; transition: background 0.15s, transform 0.15s, box-shadow 0.15s; }
.btn:hover { background: var(--accent-deep); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(123, 74, 43, 0.25); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--accent); border-color: rgba(123, 74, 43, 0.35); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-deep); box-shadow: none; }
.btn-light { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.btn-light:hover { background: #fff; color: var(--night); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* sections */
section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.band { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-deep { background: var(--paper-deep); }
.night { background: var(--night); color: var(--night-ink); }
.night h2, .night h3 { color: var(--night-ink); }
.night .muted { color: #c7b9a8; }
.night a { color: #e8c48f; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* hero */
.hero { padding: 72px 0 88px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%; background: radial-gradient(closest-side, rgba(184, 135, 62, 0.13), transparent 70%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 56px; align-items: center; position: relative; }
.hero h1 { margin-bottom: 0.4em; }
.hero .lead { max-width: 560px; margin-bottom: 1.6em; }
.hero-note { margin-top: 18px; font-size: 0.92rem; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding-top: 40px; } }

/* envelope illustration */
.keepsake { position: relative; width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 1 / 0.92; }
.letter { position: absolute; left: 9%; right: 9%; top: 2%; height: 64%; background: var(--card); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); padding: 26px 28px; transform: rotate(-3deg); font-family: var(--serif); color: var(--ink-soft); }
.letter .salutation { font-style: italic; font-size: 1.25rem; color: var(--accent); margin-bottom: 10px; }
.letter .lines span { display: block; height: 9px; border-radius: 9px; background: var(--paper-deep); margin: 13px 0; }
.letter .lines span:nth-child(2) { width: 88%; } .letter .lines span:nth-child(3) { width: 94%; } .letter .lines span:nth-child(4) { width: 70%; }
.envelope { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; }
.envelope svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 18px 30px rgba(42, 36, 30, 0.16)); }
.envelope-label { position: absolute; left: 0; right: 0; bottom: 9%; text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--ink-soft); }
.envelope-label small { display: block; font-style: normal; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* trust strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.strip ul { list-style: none; margin: 0; padding: 18px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px; font-size: 0.95rem; color: var(--ink-soft); }
.strip li { margin: 0; display: flex; align-items: center; gap: 10px; }
.strip svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

/* cards and grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } section { padding: 64px 0; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 22px; height: 22px; }

/* moments (emotional examples) */
.moments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .moments { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .moments { grid-template-columns: 1fr; } }
.moment { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.moment .tag { display: inline-block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.moment .tag.photo { background: #e5eee0; color: var(--ok); }
.moment .tag.voice { background: #efe4f0; color: #6b3f73; }
.moment .tag.file { background: #e9e6df; color: #5c5246; }
.moment h3 { font-size: 1.2rem; margin-bottom: 0.35em; }
.moment p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 8px; }
.step-num { font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--gold); display: block; margin-bottom: 12px; }
.step h3 { margin-bottom: 0.4em; }
.step p { color: var(--ink-soft); }

/* split rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } .split.reverse > :first-child { order: 0; } }

/* app mock */
.app-mock { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; font-size: 0.9rem; }
.app-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); font-family: var(--serif); color: var(--accent); }
.app-bar span:last-child { font-family: var(--sans); color: var(--muted); font-size: 0.82rem; }
.app-body { padding: 20px 18px; background: var(--paper); }
.app-body h4 { font-size: 1.5rem; color: var(--accent); margin-bottom: 12px; }
.app-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.app-actions span { border: 1px solid var(--line); background: var(--card); border-radius: 7px; padding: 5px 10px; font-size: 0.78rem; color: var(--ink-soft); }
.app-actions span:first-child { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.app-list { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.app-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); }
.app-row:first-child { border-top: 0; }
.app-row .kind { width: 58px; text-align: center; font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 6px; padding: 4px 0; background: var(--accent-soft); color: var(--accent); flex: none; }
.app-row .kind.v { background: #efe4f0; color: #6b3f73; } .app-row .kind.p { background: #e5eee0; color: var(--ok); } .app-row .kind.d { background: #e9e6df; color: #5c5246; }
.app-row b { font-weight: 600; display: block; color: var(--ink); }
.app-row small { color: var(--muted); }

/* check-in timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 23px; top: 8px; bottom: 48px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 26px 64px; margin: 0; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .dot { position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; font-size: 0.66rem; line-height: 1.05; text-align: center; font-weight: 700; color: var(--accent); }
.timeline li.key .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.timeline h4 { font-family: var(--sans); font-weight: 600; font-size: 1rem; margin: 6px 0 4px; }
.timeline p { color: var(--ink-soft); margin: 0; font-size: 0.97rem; }

/* phone notice mock */
.notice { background: #1f1a16; color: #f3ebe0; border-radius: 22px; padding: 14px; max-width: 330px; margin: 0 auto; box-shadow: var(--shadow); }
.notice-card { background: rgba(255, 255, 255, 0.1); border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.notice-card + .notice-card { margin-top: 10px; }
.notice-icon { width: 34px; height: 34px; border-radius: 9px; background: #3a6ea5; display: grid; place-items: center; flex: none; }
.notice-icon svg { width: 18px; height: 18px; color: #fff; }
.notice-card b { display: block; font-size: 0.88rem; }
.notice-card span { font-size: 0.82rem; color: #d8cdbf; }
.notice-time { float: right; font-size: 0.72rem; color: #a99c8d; }

/* key callouts */
.callout { border-left: 3px solid var(--gold); background: var(--card); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; }
.callout p:last-child { margin-bottom: 0; }
.notwill { display: flex; gap: 22px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.notwill svg { width: 36px; height: 36px; color: var(--accent); flex: none; margin-top: 2px; }
.notwill h3 { margin-bottom: 0.3em; }
.notwill p { margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) { .notwill { flex-direction: column; gap: 12px; } }

/* checks list */
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 32px; margin-bottom: 12px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%237b4a2b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.night .checks li::before { background-color: rgba(255, 255, 255, 0.1); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23e8c48f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.crosses li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6.5 6.5l7 7M13.5 6.5l-7 7' fill='none' stroke='%237b4a2b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* pricing */
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 40px; box-shadow: var(--shadow); max-width: 520px; margin: 0 auto; text-align: left; }
.price { font-family: var(--serif); font-size: 4rem; line-height: 1; color: var(--ink); }
.price sup { font-size: 1.6rem; vertical-align: top; position: relative; top: 0.55rem; margin-right: 2px; }
.price-sub { color: var(--muted); margin: 8px 0 24px; }
.price-card .btn { width: 100%; margin-top: 12px; }

/* faq */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 18px 52px 18px 22px; font-family: var(--serif); font-size: 1.15rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 1.5rem; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 22px 18px; color: var(--ink-soft); }
.faq .answer p:last-child, .faq .answer ul:last-child { margin-bottom: 0; }
.faq h2 { margin-top: 48px; font-size: 1.6rem; }
.faq h2:first-of-type { margin-top: 0; }

/* page head */
.page-head { padding: 64px 0 40px; }
.page-head h1 { margin-bottom: 0.3em; }
.page-head .lead { max-width: 720px; }

/* prose (legal and long pages) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.5em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose .updated { color: var(--muted); font-size: 0.92rem; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 32px; }
.toc ol { margin: 0; }

/* forms */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.field input { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #d6cbbb; border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(201, 138, 75, 0.2); }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row-2, .row-3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; color: var(--ink-soft); margin: 14px 0; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.alert { border-radius: 10px; padding: 12px 16px; margin: 14px 0; font-size: 0.95rem; }
.alert-error { background: #f7e3df; color: #7d2a1f; border: 1px solid #ecc5bd; }
.alert-ok { background: #e5eee0; color: #2f5229; border: 1px solid #cddcc5; }
.buy-grid { display: grid; grid-template-columns: 1fr 0.8fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .buy-grid { grid-template-columns: 1fr; } }
.summary { position: sticky; top: 92px; }
.summary .line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary .total { font-weight: 700; border-bottom: 0; font-size: 1.1rem; }
.secure-note { display: flex; gap: 10px; align-items: center; font-size: 0.86rem; color: var(--muted); margin-top: 14px; }
.secure-note svg { width: 16px; height: 16px; flex: none; }
.codebox { font-family: var(--mono); font-size: clamp(1.1rem, 4vw, 1.6rem); letter-spacing: 0.06em; background: var(--paper); border: 1px dashed var(--gold); border-radius: 12px; padding: 18px; text-align: center; user-select: all; word-break: break-all; color: var(--ink); }
.done-steps li { margin-bottom: 10px; }
.hidden { display: none !important; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* footer */
.site-footer { background: var(--night); color: #cbbfb0; padding: 64px 0 40px; font-size: 0.93rem; }
.site-footer a { color: #e9dccb; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #f3ebe0; font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer .brand { color: #f3ebe0; margin-bottom: 14px; }
.site-footer .brand-name small { color: #a99c8d; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 40px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; color: #a99c8d; font-size: 0.85rem; }

/* checkout switch: the server adds class "checkout-off" to body while CHECKOUT_ENABLED is not true */
#buy-soon { display: none; }
.checkout-off #buy-soon { display: block; }
.checkout-off #buy-form, .checkout-off #buy-done { display: none !important; }
