/* Diana Y. Winter memorial: translation of the Claude Design file (design/diana-winter-memorial.dc.html) into classes.
   Values (oklch colours, sizes, spacings, radii, clamp() scale, 1080 px container, 660 px measure) are the design's.
   Self-hosted fonts (SIL OFL 1.1), Latin subset: Newsreader (opsz variable roman 300-500; italic 300-400) and Instrument Sans 400-600. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 500; font-display: swap; src: url(fonts/newsreader-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 400; font-display: swap; src: url(fonts/newsreader-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/instrument-sans.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f9f6f2; --bg: oklch(0.975 0.006 75);
  --ink: #241e1a; --ink: oklch(0.24 0.012 55);
  --muted: oklch(0.42 0.012 55);          /* secondary text */
  --muted-2: oklch(0.47 0.012 55);        /* labels and dates (checked on the tinted band: 6.0:1) */
  --soft: oklch(0.38 0.012 55);
  --tint: oklch(0.955 0.009 75);          /* tinted bands */
  --cell: oklch(0.985 0.005 75);
  --line: oklch(0.9 0.008 70);
  --line-2: oklch(0.88 0.01 70);
  --accent: oklch(0.45 0.08 30);
  --accent-dark: oklch(0.32 0.08 30);
  --accent-rule: oklch(0.5 0.07 30);
  --dark: oklch(0.27 0.014 50);
  --dark-hover: oklch(0.2 0.014 50);
  --on-dark: oklch(0.95 0.008 75);
  --gold: #856e03;                        /* the design's #B69704 is 2.6:1 at 12 px; this is the same hue at 4.6:1 */
  --field-border: oklch(0.63 0.01 70);    /* the design's 0.84 is 1.6:1; 3.4:1 here */
  --field-bg: oklch(0.99 0.004 75);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--serif); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
::selection { background: oklch(0.88 0.04 30); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.band-dark :focus-visible { outline-color: var(--on-dark); }
h1, h2, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.wrap { max-width: 1080px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) 24px; }
#service, #flowers, #photos, #life, #guestbook, #support { scroll-margin-top: 60px; }

.eyebrow { font-family: var(--sans); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.eyebrow.gold { color: var(--gold); }
.eyebrow.warm { color: oklch(0.8 0.05 40); }
.sec-head { display: flex; flex-direction: column; gap: 10px; }
.sec-head h2 { font-weight: 400; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; }
.lede { font-size: 18px; line-height: 1.55; color: var(--soft); text-wrap: pretty; }
.stack-40 { display: flex; flex-direction: column; gap: 40px; }

/* ---- nav ---- */
.nav { position: sticky; top: 0; z-index: 5; background: oklch(0.975 0.006 75 / 0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-in { max-width: 1080px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--sans); font-size: 13px; letter-spacing: 0.04em; }
.nav-brand { color: inherit; text-decoration: none; font-family: var(--serif); font-size: 17px; letter-spacing: 0; }
.nav-brand:hover { color: inherit; }
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.nav-links a:hover { color: var(--ink); }

/* ---- hero ---- */
.hero { max-width: 1080px; margin: 0 auto; padding: clamp(56px, 9vw, 112px) 24px clamp(48px, 7vw, 88px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(36px, 6vw, 80px); align-items: center; }
.portrait { display: block; max-width: 420px; width: 100%; justify-self: center; }
.portrait img { display: block; width: 100%; height: auto; border-radius: 2px; background: oklch(0.93 0.01 70); }
.hero-text { display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-weight: 300; font-size: clamp(40px, 5.4vw, 68px); line-height: 0.98; letter-spacing: -0.02em; }
@media (min-width: 400px) { .hero h1 { white-space: nowrap; } }
.dates { font-size: 22px; font-weight: 300; color: var(--muted); font-variant-numeric: oldstyle-nums; }
.hero-rule { width: 40px; height: 1px; background: var(--accent-rule); }
.epigraph { font-style: italic; font-weight: 300; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.3; }

/* ---- bands ---- */
.band-tint { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-dark { background: var(--dark); color: var(--on-dark); }

/* ---- service ---- */
.service h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); }
.cell { background: var(--cell); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.cell-label { font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.when { display: flex; flex-direction: column; gap: 4px; }
.when-day, .when-time { font-size: 26px; line-height: 1.2; }
.when-time { color: var(--muted); }
.local { display: flex; flex-direction: column; gap: 2px; font-family: var(--sans); font-size: 14px; color: var(--soft); }
.local[hidden] { display: none; }
.local-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.local-value { font-size: 16px; color: var(--ink); }
.cities { font-family: var(--sans); font-size: 13px; line-height: 1.5; color: var(--muted); }
.cell-link { margin-top: auto; align-self: flex-start; font-family: var(--sans); font-size: 14px; font-weight: 500; }
.where { font-size: 22px; line-height: 1.35; }
.zoom-name { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.75 0.03 70); }
.zoom-pending { font-size: 20px; line-height: 1.4; }
.zoom-btn { align-self: flex-start; }
.zoom-lines { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--soft); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px; font-family: var(--sans); font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn-dark { background: var(--dark); color: oklch(0.97 0.006 75); }
.btn-dark:hover { background: var(--dark-hover); color: oklch(0.97 0.006 75); }
.btn-dark:disabled { opacity: 0.6; cursor: wait; }
.btn-light { background: var(--on-dark); color: var(--ink); font-weight: 600; }
.btn-light:hover { background: #fff; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: oklch(0.6 0.01 60); padding: 0 22px; }
.btn-ghost:hover { border-color: var(--on-dark); }
.btn-ghost[hidden] { display: none; }

/* ---- flowers ---- */
.flowers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px 64px; align-items: start; }
.flowers .sec-head h2 { font-size: clamp(28px, 3.4vw, 36px); }
.flowers-body { display: flex; flex-direction: column; gap: 18px; }
.flowers-body p { font-size: 19px; line-height: 1.6; text-wrap: pretty; }
.flowers-body .cell-link { margin-top: 0; }

/* ---- photographs (only rendered when there are photos) ---- */
.photos { border-top: 1px solid var(--line); }
.photos-head { max-width: 1080px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) 24px 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.photos-ctl { display: flex; align-items: center; gap: 12px; font-family: var(--sans); font-size: 14px; color: var(--muted); }
.photos-ctl[hidden] { display: none; }
.photos-num { min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 1px solid oklch(0.75 0.01 60); background: transparent; color: var(--ink); font-size: 18px; cursor: pointer; }
.round:hover { background: var(--ink); color: var(--bg); }
.photos-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 max(24px, calc((100% - 1032px) / 2)); padding: 8px max(24px, calc((100% - 1032px) / 2)) clamp(48px, 7vw, 88px); scrollbar-width: none; }
.photos-track::-webkit-scrollbar { display: none; }
.tile { position: relative; flex: 0 0 auto; width: clamp(240px, 38vw, 400px); aspect-ratio: 4 / 5; scroll-snap-align: start; border-radius: 2px; overflow: hidden; background: oklch(0.93 0.01 70); margin: 0; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; background: linear-gradient(transparent, oklch(0.2 0.014 50 / 0.78)); color: #fff; font-family: var(--sans); font-size: 13px; }
.video { position: relative; aspect-ratio: 16 / 9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- her life ---- */
.life { border-top: 1px solid var(--line); }
.life-in { max-width: 660px; margin: 0 auto; padding: clamp(64px, 9vw, 120px) 24px clamp(48px, 7vw, 96px); font-size: 20px; line-height: 1.7; font-weight: 400; }
.life-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 56px; text-align: center; }
.life-head h2 { font-weight: 300; font-size: clamp(32px, 4.4vw, 48px); line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
.life-body p { margin: 0 0 1.15em; text-wrap: pretty; }
.life-body > p:first-child::first-letter { float: left; font-size: 4.1em; line-height: 0.8; padding: 0.06em 0.1em 0 0; font-weight: 300; color: var(--accent); }
.life-tight p { margin-bottom: 0.3em; }
.life-body > :last-child { margin-bottom: 0; }
.life-divider { display: flex; justify-content: center; margin: 2.2em 0; }
.life-divider span { width: 6px; height: 6px; transform: rotate(45deg); background: var(--accent-rule); }
.life-quote { margin: 1.6em 0; padding-left: 1.4em; border-left: 1px solid oklch(0.82 0.03 30); font-style: italic; font-weight: 300; font-size: 1.1em; line-height: 1.55; }
.life-quote p { margin: 0 0 0.2em; }
.life-quote p:last-child { margin: 0; }
.life-pull p { margin: 0 0 1.6em; font-size: 1.25em; line-height: 1.4; font-weight: 300; text-wrap: balance; }
.life-stack { display: flex; flex-direction: column; gap: 0.5em; margin: 0 0 1.6em; }
.life-stack p { margin: 0; }
.life-stack.is-tight { gap: 0.3em; }
.life-stack.is-italic { gap: 0.6em; font-style: italic; font-weight: 300; font-size: 1.08em; }
.life-closing p { margin: 1.4em 0; text-align: center; font-style: italic; font-weight: 300; font-size: clamp(30px, 4vw, 40px); line-height: 1.2; color: oklch(0.38 0.07 30); }

/* ---- guestbook ---- */
.guestbook { border-bottom: 0; }
.gb-grid { padding: clamp(56px, 8vw, 104px) 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 48px 72px; align-items: start; }
.gb-form-col { display: flex; flex-direction: column; gap: 24px; }
.gb-feed-col { display: flex; flex-direction: column; }
.gb-form { display: flex; flex-direction: column; gap: 16px; font-family: var(--sans); }
.gb-form[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: 0 14px; border: 1px solid var(--field-border); border-radius: 4px; background: var(--field-bg); color: var(--ink); font-family: var(--sans); font-size: 16px; outline: none; }
.field input { min-height: 48px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field textarea { padding: 12px 14px; font-family: var(--serif); font-size: 18px; line-height: 1.5; min-height: 9em; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent-rule); outline: 2px solid var(--accent-rule); outline-offset: 0; }
.field-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.memory-counter { font-variant-numeric: tabular-nums; }
.field-error { font-size: 13px; color: var(--accent-dark); }
.field-error:empty { display: none; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-actions .btn { padding: 0 26px; }
.memory-status p { font-size: 14px; color: var(--muted); }
.memory-status p.memory-thanks { color: var(--muted); }
.memory-status p.memory-error { color: var(--accent-dark); }
.memories-empty { padding: 28px 0; border-top: 1px solid var(--line-2); font-style: italic; font-size: 19px; color: var(--muted); }
.memories-nojs { padding: 8px 0 0; font-size: 19px; }
.memories-feed { list-style: none; margin: 0; padding: 0; }
.memory-card { padding: 24px 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.memory-text { font-size: 19px; line-height: 1.6; white-space: pre-line; text-wrap: pretty; overflow-wrap: anywhere; }
.memory-more { align-self: flex-start; min-height: 32px; padding: 0; border: 0; background: transparent; color: var(--accent); font-family: var(--sans); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.memory-more:hover { color: var(--accent-dark); }
.memory-meta { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-family: var(--sans); font-size: 13px; }
.memory-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.memory-relation { color: var(--muted); overflow-wrap: anywhere; }
.memory-date { color: var(--muted-2); }
.memories-pages { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line-2); font-family: var(--sans); font-size: 14px; }
.pager-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid oklch(0.75 0.01 60); background: transparent; color: var(--ink); text-decoration: none; }
a.pager-btn:hover { background: var(--ink); color: var(--bg); }
.pager-btn.is-disabled { opacity: 0.45; }
.pager-nums { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pager-num, .pager-gap { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.pager-num { color: var(--ink); text-decoration: none; }
a.pager-num:hover { background: var(--line); color: var(--ink); }
.pager-num.is-current { background: var(--dark); color: oklch(0.97 0.006 75); font-weight: 600; }
.pager-gap { color: var(--muted-2); }

/* ---- support (dark band) and sign-off ---- */
.support-grid { max-width: 1080px; margin: 0 auto; padding: clamp(44px, 6vw, 72px) 24px; display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-start; }
.support-text { display: flex; flex-direction: column; gap: 12px; flex: 2 1 480px; max-width: 640px; }
.support-text p { font-size: 18px; line-height: 1.55; font-weight: 300; text-wrap: pretty; }
.support-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 28px; flex: 1 1 260px; }
.signoff-strip { border-top: 1px solid oklch(0.38 0.012 50); }
.signoff-strip .wrap { padding-top: 22px; padding-bottom: 22px; font-style: italic; font-size: 19px; font-weight: 300; color: oklch(0.86 0.01 70); }
.signoff { border-top: 1px solid var(--line); }
.signoff .wrap { padding-top: 22px; padding-bottom: 22px; font-style: italic; font-size: 19px; font-weight: 300; color: var(--muted); }

/* ---- server-rendered /guestbook ---- */
.guestbook-page .guestbook { border-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
