/* Hallmark · shape: contact poster (custom, after the iOS contact card the owner supplied) · genre: editorial · theme: custom (by request) · job: save contact
 * hero: full-bleed portrait, name set over its fade · nav: four round contact actions · footer: none · imagery: the owner's portrait, also blurred as the page ground · signature: the portrait dissolving into a frosted sheet of contacts · ink: dark glass
 * axes: dark/system-sans/neutral-blue · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P2 H2 E2 S2 R2 V2 · weakest: E, one photograph only; the blurred copy carries the ground so the page does not need a second */
/* waive F5 · round icon buttons · the owner asked for the iOS contact card, whose actions are exactly this */
/* waive 1 · system face first · the reference is Apple's own contact card; San Francisco on Apple, Inter elsewhere */
/* waive 29 · the blurred layer is the portrait itself, the iOS poster ground, not a decorative wash */
/* waive section-count · four parts only · a contact card scanned at an event; more would bury the contacts */

:root {
  --bg: oklch(22% 0.06 258);
  --text: oklch(98% 0.005 255);
  --text-2: oklch(86% 0.01 255);
  --text-3: oklch(74% 0.012 255);
  --glass-top: oklch(100% 0.005 255 / 0.17);
  --glass-bottom: oklch(100% 0.005 255 / 0.05);
  --glass-hover: oklch(100% 0.005 255 / 0.24);
  --rim-hi: oklch(100% 0.005 255 / 0.6);
  --rim-mid: oklch(100% 0.005 255 / 0.22);
  --rim-off: oklch(100% 0.005 255 / 0.06);
  --rim-top: oklch(100% 0.005 255 / 0.3);
  --drop: oklch(8% 0.03 255 / 0.35);
  --tint: oklch(34% 0.07 258 / 0.42);
  --text-glow: oklch(12% 0.04 258 / 0.5);
  --glass-solid: oklch(30% 0.02 255 / 0.92);
  --hair: oklch(100% 0.005 255 / 0.12);
  --fade: oklch(20% 0.02 255 / 0);
  --shade: oklch(12% 0.02 255 / 0.5);
  --shade-deep: oklch(12% 0.03 258 / 0.72);
  --mask-on: oklch(0% 0 0);
  --mask-off: oklch(0% 0 0 / 0);
  --button: oklch(98% 0.005 255);
  --button-hover: oklch(90% 0.01 255);
  --button-text: oklch(18% 0.02 255);
  --focus: oklch(98% 0.005 255);
  --font: -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --font-display: var(--font);
  --gutter: 16px;
  --radius-glass: 22px;
  --dur: 140ms;
}

/* Apple devices use San Francisco and never download these; Android and Windows get Inter, its closest open match */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; min-height: 100svh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.45; -webkit-font-smoothing: antialiased; }
/* the same portrait, blurred, is the ground every glass panel sits on */
/* fixed layers, as on an iOS contact poster: the ground and the photo stay put while the sheet scrolls over them */
.ground { position: fixed; inset: -10%; z-index: -2; background: url("ground.jpg") center / cover; filter: blur(40px) brightness(0.5) saturate(1.3); -webkit-mask-image: linear-gradient(to bottom, var(--mask-on) 35%, var(--mask-off) 85%); mask-image: linear-gradient(to bottom, var(--mask-on) 35%, var(--mask-off) 85%); }
/* the photo fills the whole screen like an iOS contact poster: sharp at the top, the same picture blurred below it, one shadow running all the way down */
.photo { position: fixed; inset: 0; z-index: -1; height: 100lvh; overflow: hidden; }
.photo img { position: absolute; top: 0; left: 50%; width: min(100%, 28rem); aspect-ratio: 900 / 1324; height: auto; object-fit: cover; object-position: 50% 20%; transform: translateX(-50%); }
.photo .ext { inset: 0; left: 0; width: 100%; height: 100%; aspect-ratio: auto; transform: none; object-position: 50% 70%; }
.photo .sharp, .photo .soft { -webkit-mask-image: linear-gradient(to bottom, var(--mask-on) 78%, var(--mask-off)); mask-image: linear-gradient(to bottom, var(--mask-on) 78%, var(--mask-off)); }
/* fine grain over the blurred areas, the way a frosted iOS poster has texture rather than a flat smear */
.photo::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: url("grain.png"); opacity: 0.45; -webkit-mask-image: linear-gradient(to bottom, var(--mask-off) 20%, var(--mask-on) 60%); mask-image: linear-gradient(to bottom, var(--mask-off) 20%, var(--mask-on) 60%); }
.photo::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, var(--fade) 35%, var(--shade) 65%, var(--shade-deep)); }
/* the blur is baked into poster-blur.jpg, so scrolling only fades one plain image: no filter work per frame */
.photo .soft { display: none; }
.js .photo .soft { display: block; opacity: 0; will-change: opacity; }
@supports (animation-timeline: scroll()) {
  .js .photo .soft { animation: soften linear both; animation-timeline: scroll(root); animation-range: 0 55vh; }
}
@keyframes soften { to { opacity: 1; } }
img, svg { display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1, h2, p, dl, dd { margin: 0; }

.sheet { max-width: 28rem; margin-inline: auto; padding: 0 var(--gutter) 56px; display: grid; gap: 16px; }

.poster { position: relative; margin-inline: calc(var(--gutter) * -1); aspect-ratio: 4 / 5; }
.who { position: absolute; inset: auto var(--gutter) 18px; z-index: 1; text-align: center; display: grid; gap: 8px; }
.who h1, .who p { text-shadow: 0 1px 2px var(--text-glow), 0 2px 18px var(--text-glow); }
.who h1 { font-family: var(--font-display); font-size: clamp(1.875rem, 7vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
.hint { font-size: 0.8125rem; color: var(--text-3); text-align: center; }
.who p { color: var(--text-2); font-size: 0.9375rem; text-wrap: balance; }

.actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-block: 4px 8px; }
.actions a { display: grid; justify-items: center; gap: 8px; color: var(--text-2); font-size: 0.8125rem; text-decoration: none; border-radius: 16px; }
.round { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: var(--text); transition: transform var(--dur); }
.round svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.actions a:hover .round { --glass-top: var(--glass-hover); }
.actions a:active .round { transform: scale(0.94); }

.save { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: 999px; background: var(--button); color: var(--button-text); font-weight: 600; font-size: 1.0625rem; text-decoration: none; transition: background-color var(--dur), transform var(--dur); }
.save svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.save:hover { background: var(--button-hover); }
.save:active { transform: scale(0.98); }

.glass { border-radius: var(--radius-glass); padding: 16px 20px; }

/* glass material: a lit-from-above fill, a specular rim brightest at the top-left, a soft drop */
.glass, .round { position: relative; background: linear-gradient(160deg, var(--glass-top), var(--glass-bottom)), var(--tint); box-shadow: inset 0 1px 0 var(--rim-top), 0 12px 32px var(--drop); }
.glass::before, .round::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: linear-gradient(140deg, var(--rim-hi), var(--rim-off) 35%, var(--rim-off) 65%, var(--rim-mid)); -webkit-mask: linear-gradient(var(--mask-on) 0 0) content-box, linear-gradient(var(--mask-on) 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.sheet > .glass:first-of-type { margin-top: 16px; }
.stats { margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { display: grid; align-content: start; gap: 8px; padding: 16px; margin: 0; }
.stat b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.875rem; line-height: 1.35; color: var(--text-2); }
.glass h2 { font-size: 0.8125rem; font-weight: 600; color: var(--text-3); padding-bottom: 4px; }
.glass dl > div { padding-block: 12px; }
.glass dl > div + div { border-top: 1px solid var(--hair); }
.glass dt { font-size: 0.8125rem; color: var(--text-3); }
.glass dd { font-size: 1.0625rem; line-height: 1.35; margin-top: 2px; }

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass, .round { -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .round { background: var(--glass-solid); }
}


/* wider than the photo: soften its sides too, so it melts into the blurred copy instead of standing as a strip */
@media (min-width: 30rem) {
  .photo .sharp, .photo .soft { -webkit-mask-image: linear-gradient(to bottom, var(--mask-on) 78%, var(--mask-off)), linear-gradient(to right, var(--mask-off), var(--mask-on) 14%, var(--mask-on) 86%, var(--mask-off)); -webkit-mask-composite: source-in; mask-image: linear-gradient(to bottom, var(--mask-on) 78%, var(--mask-off)), linear-gradient(to right, var(--mask-off), var(--mask-on) 14%, var(--mask-on) 86%, var(--mask-off)); mask-composite: intersect; }
}

/* desktop: the portrait takes the left half and stays still, the card reads in the right half */
@media (min-width: 64rem) {
  .photo { right: auto; width: 50vw; height: 100vh; -webkit-mask-image: linear-gradient(to right, var(--mask-on) 72%, var(--mask-off)); mask-image: linear-gradient(to right, var(--mask-on) 72%, var(--mask-off)); }
  .photo .sharp { left: 0; width: 100%; height: 100%; aspect-ratio: auto; transform: none; object-position: 50% 22%; -webkit-mask-image: none; mask-image: none; }
  .photo .ext { display: none; }
  .js .photo .soft { display: none; }
  .photo::after, .photo::before { display: none; }
  .sheet { max-width: 34rem; margin-left: calc(50vw + clamp(2rem, 5vw, 7rem)); margin-right: auto; padding: clamp(4rem, 14vh, 9rem) 0 96px; gap: 24px; }
  .poster { aspect-ratio: auto; margin-inline: 0; }
    .who { position: static; text-align: left; gap: 12px; }
  .who h1 { font-size: clamp(3rem, 3.6vw, 3.5rem); text-wrap: nowrap; }
  .who p { font-size: 1.1875rem; }
  .actions { padding-block: 8px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {

  .round, .save { transition: none; }
  .actions a:active .round, .save:active { transform: none; }
}
