@charset "utf-8";

/* ============================================================================
   Teola Blake — Life & Legacy
   ----------------------------------------------------------------------------
   The look is taken from her printed funeral program: cream paper, a formal
   script for her name, a high-contrast serif for everything else, hairline
   rules, and pale roses. The roses are the site's own line art rather than a
   photograph of the printed page, so nothing looks pasted in.

   Deliberately short: a header, who she was, her photographs, a footer. Nothing
   else. Mobile-first throughout — the family reads this on phones.
   ========================================================================== */

/* ------------------------------------------------------------------ fonts */
/* Self-hosted. A memorial page shouldn't call out to a third party on every
   visit, and these keep working if a CDN doesn't. */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant-garamond-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Pinyon Script';
  src: url('fonts/pinyon-script-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
  --paper:      #faf5ef;
  --paper-alt:  #f3eae0;
  --blush:      #efd9cc;
  --ink:        #4a3b33;   /* 9.9:1 on --paper */
  --ink-soft:   #6e5449;   /* 6.4:1 on --paper */
  --rule:       #8c6f60;

  --font-body:   'Cormorant Garamond', Cormorant, Georgia, 'Times New Roman', serif;
  --font-script: 'Pinyon Script', 'Snell Roundhand', 'Apple Chancery', cursive;

  --tracking: 0.18em;
  --measure: 34em;
  --wide: 60rem;

  --section-y: clamp(3rem, 9vw, 5.75rem);
}

/* ------------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 4.4vw, 1.25rem);
  font-weight: 400;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--blush); color: var(--ink); }

a { color: var(--ink-soft); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--rule);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: var(--tracking);
  text-transform: uppercase;
}
.skip-link:focus { left: 0; }

/* -------------------------------------------------------------- the rose */
/* One SVG, tinted by CSS so it can be blush in the margins and rule-brown in
   the ornaments without shipping two files. */

.rose {
  display: block;
  background-color: var(--blush);
  -webkit-mask: url('img/rose.svg') no-repeat center / contain;
          mask: url('img/rose.svg') no-repeat center / contain;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: min(19rem, 80%);
}

.ornament__rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
  opacity: 0.5;
}

.rose--mark {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  background-color: var(--rule);
  opacity: 0.75;
}

/* --------------------------------------------------------------- the hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.75rem, 9vw, 6rem) 1.25rem clamp(2.25rem, 7vw, 4.5rem);
  text-align: center;
  background:
    radial-gradient(58% 46% at 22% 12%, rgba(239, 217, 204, 0.55) 0%, rgba(239, 217, 204, 0) 70%),
    radial-gradient(52% 40% at 84% 22%, rgba(239, 217, 204, 0.45) 0%, rgba(239, 217, 204, 0) 72%),
    radial-gradient(70% 48% at 50% 104%, rgba(239, 217, 204, 0.50) 0%, rgba(239, 217, 204, 0) 74%),
    var(--paper);
}

/* Two faint concentric rings, echoing the blind-embossed circle on the printed
   cover. Purely decorative, so they sit behind everything and take no clicks. */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(140, 111, 96, 0.13);
  transform: translateX(-50%);
  pointer-events: none;
}
.hero::before { top: -8%; width: min(47.5rem, 150%); height: min(47.5rem, 150%); }
.hero::after  { top:  2%; width: min(35rem, 120%);   height: min(35rem, 120%);
                border-color: rgba(140, 111, 96, 0.10); }

.hero__roses {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__roses .rose {
  position: absolute;
  opacity: 0.4;
}
.rose--a { top: 4%;  left: -3rem;  width: 12rem; height: 12rem; transform: rotate(-14deg); }
.rose--b { top: 12%; right: -4rem; width: 15rem; height: 15rem; transform: rotate(22deg); opacity: 0.32; }
.rose--c { bottom: -2rem; left: 12%; width: 9rem; height: 9rem; transform: rotate(9deg); opacity: 0.3; }
.rose--d { bottom: 6%; right: 6%;  width: 7rem;  height: 7rem;  transform: rotate(-28deg); opacity: 0.26; }

.hero__inner {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.1rem, 3.4vw, 1.9rem);
}

.eyebrow {
  margin: 0;
  font-size: clamp(0.69rem, 2.6vw, 0.8rem);
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero__name {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  /* Pinyon has long descenders and swashes; the tight leading plus the extra
     bottom padding stop the "l" and "k" clipping on narrow screens. */
  font-size: clamp(3.4rem, 17vw, 8.25rem);
  line-height: 0.94;
  padding-bottom: 0.08em;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.hero__sub {
  margin: 0;
  font-size: clamp(1.5rem, 6.4vw, 2.75rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

.hero__dates {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 0.6rem;
  font-size: clamp(0.94rem, 3.8vw, 1.2rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}

.hero__dash { opacity: 0.75; }

/* --------------------------------------------------------- picture frames */
/* The program mounts each photo in a thin ruled box on cream. Every photograph
   on this page uses that same frame. */

.portrait,
.shot {
  margin: 0;
  padding: 0.6rem;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.portrait {
  width: min(21.25rem, 78vw);
  margin-top: clamp(0.5rem, 2vw, 1.15rem);
}

/* -------------------------------------------------------------- sections */

.section { padding: var(--section-y) 1.25rem; }
.section--alt { background: var(--paper-alt); }
.section--alt .shot { background: var(--paper); }

.wrap { max-width: var(--wide); margin: 0 auto; }
.wrap--text { max-width: var(--measure); }
/* Three big photographs would dominate a page this quiet. Holding the album
   in from the full width keeps them sitting with the writing rather than
   shouting over it -- and the section rule lines up with them. */
.wrap--album { max-width: 52rem; }

.section__label {
  margin: 0 0 clamp(1.6rem, 5vw, 2.4rem);
  font-size: clamp(0.75rem, 3vw, 0.875rem);
  font-weight: 500;
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* The hairline under every section label. */
.section__label::after {
  content: '';
  display: block;
  height: 1px;
  margin-top: 0.45rem;
  background: var(--rule);
  opacity: 0.45;
}

#life p {
  margin: 0 0 1.5em;
  text-wrap: pretty;
  hyphens: none;
}
#life p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- photographs */
/* An assorted mosaic, not an even grid — one photograph carries the block and
   the others sit beside it, the way an album page is laid out. */

.mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.15rem, 4vw, 1.9rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mosaic__cell { min-width: 0; }

.shot {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.shot__btn {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  /* Stacked on a phone every photograph gets the same portrait crop, so the
     column reads as a set rather than three unrelated snapshots. */
  aspect-ratio: 4 / 5;
}

.shot__btn picture { display: block; height: 100%; }

.shot__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Her face sits high in all three frames. */
  object-position: 50% 27%;
}

@media (min-width: 48rem) {
  .mosaic {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
  /* Staggered rather than lined up: the outer two hang a little lower than the
     middle, the way photographs actually get arranged on an album page. It
     reads as assorted without any of them being bigger than the others. */
  .mosaic__cell:nth-child(odd) { margin-top: 2.25rem; }
}

/* Each photograph is framed differently, so a single crop origin loses
   something in one of them. These keep the subject in frame. */
.shot__btn--dog img { object-position: 50% 42%; }

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

.footer {
  padding: clamp(3rem, 9vw, 5.4rem) 1.25rem clamp(3.5rem, 10vw, 6rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.4rem);
}

.footer .ornament { width: min(35rem, 100%); }

.footer__name {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(2.1rem, 9vw, 3.25rem);
  line-height: 1.1;
  padding-bottom: 0.08em;
  color: var(--ink);
}

.footer__dates {
  margin: 0;
  font-size: clamp(0.75rem, 3vw, 0.81rem);
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.footer__line {
  margin: 0;
  font-size: clamp(0.94rem, 3.8vw, 1.06rem);
  font-style: italic;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* Sits a little apart from the tribute lines above it — it's a legal notice,
   not part of the sentiment. Quiet, but still 4.6:1 on the paper. */
.footer__legal {
  margin: clamp(0.5rem, 2vw, 1rem) 0 0;
  font-size: clamp(0.72rem, 2.9vw, 0.78rem);
  letter-spacing: 0.06em;
  color: #7d6357;
  text-wrap: pretty;
}

.footer__sep {
  padding: 0 0.35em;
  color: var(--rule);
}

/* --------------------------------------------------------------- lightbox */
/* Additive only. There is no "tap to enlarge" label anywhere — a photograph
   simply opens if you touch it, and the page reads fine if you never do. */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  /* Near-solid. At 0.94 the text behind it still ghosted through. */
  background: rgba(74, 59, 51, 0.985);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  cursor: default;
}

.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  border: 1px solid rgba(250, 245, 239, 0.5);
}

.lightbox__cap {
  font-size: 0.75rem;
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  text-align: center;
  color: var(--paper);
}

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1;
  cursor: pointer;
  /* Comfortably tappable on a phone. */
  min-width: 3rem;
  min-height: 3rem;
}

.lightbox__close { top: 0.75rem; right: 0.75rem; font-size: 2.25rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox__nav--prev { left: 0.25rem; }
.lightbox__nav--next { right: 0.25rem; }
.lightbox__nav[hidden] { display: none; }

/* ------------------------------------------------------------------ print */
/* Families print these. */

@media print {
  .skip-link, .lightbox, .hero__roses { display: none !important; }

  body { background: #fff; font-size: 11pt; }
  .section { padding: 1.5rem 0; page-break-inside: avoid; }
  .section--alt { background: none; }
  .hero { padding: 0 0 1.5rem; }
  .hero::before, .hero::after { display: none; }
  .mosaic { grid-template-columns: 1fr 1fr; }
  .mosaic__cell:nth-child(odd) { margin-top: 0; }
}
