/* Home: Seattle Science Foundation. Owned by the ssf section agent (homepage 100x work, 2026-09-23). */

/* ---------------------------------------------------------------------------------------------
   Round 2: decluttered. At rest the section is the heading, one line, four facts, one button, the
   photo and Rod Oskouian's plate. Every detail waits behind a "+", in Apple's disclosure language as
   read off apple.com (Mac, MacBook Pro, iPhone Pro pages) on 2026-09-23:
   - a fact opens by animating its height, and its copy rises 8px out of a short blur, staggered;
   - the "+" turns 45 degrees into a close on Apple's tile-button curve (0.414s, 0.66 0 0.1 1);
   - an open fact becomes a white card lifting off the mist;
   - Rod's plate opens upward over the photo, and the photo softens and dims behind it.
   --------------------------------------------------------------------------------------------- */
.ssf-sec {
  --ssf-ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --ssf-turn: cubic-bezier(0.66, 0, 0.1, 1);
  --ssf-now: 97.92%;
  position: relative;
  overflow-x: clip;
}
.ssf-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  column-gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}
.ssf-copy { max-width: 33rem; }
.ssf-intro { margin-top: 1.2rem; max-width: 40ch; color: var(--muted); }

/* ---- the facts ---- */
.ssf-facts { list-style: none; padding: 0; margin: clamp(2.2rem, 4vw, 3rem) -1rem 0; }
.ssf-fact { position: relative; isolation: isolate; }
/* the card an open fact becomes (and, fainter, the highlight a pointed fact gets) */
.ssf-fact::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  border-radius: var(--r-card); background: #fff;
  box-shadow: 0 1px 2px rgba(10, 13, 18, 0.04), 0 14px 34px rgba(10, 13, 18, 0.08);
  opacity: 0; transform: scale(0.97);
  transition: opacity 0.45s var(--ssf-ease), transform 0.6s var(--ssf-ease), box-shadow 0.45s var(--ssf-ease);
}
.ssf-fact.ssf-open::before { opacity: 1; transform: none; }
/* hairlines between facts, inset to the text; they step aside for a card */
.ssf-fact + .ssf-fact::after {
  content: ''; position: absolute; top: 0; left: 1rem; right: 1rem;
  border-top: 1px solid var(--line-2);
  transition: opacity 0.35s var(--ssf-ease);
}
.ssf-fact.ssf-open::after, .ssf-fact.ssf-open + .ssf-fact::after { opacity: 0; }
@media (hover: hover) {
  .ssf-fact:not(.ssf-open):hover::before { opacity: 0.62; transform: none; box-shadow: none; }
  .ssf-fact:hover::after, .ssf-fact:hover + .ssf-fact::after { opacity: 0; }
}

.ssf-fact__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  width: 100%; min-height: 3.9rem; margin: 0; padding: 0.95rem 1rem;
  background: none; border: 0; border-radius: var(--r-card);
  font: inherit; text-align: left; color: var(--ink-2); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ssf-fact__btn:focus-visible { outline-offset: -2px; }
.ssf-fact__t { font-size: 1.04rem; line-height: 1.4; transition: color 0.3s var(--ssf-ease); }
.ssf-fact.ssf-open .ssf-fact__t { color: var(--ink); }
/* pointing at Rod's plate names the fact they share */
.ssf-fact.ssf-cue .ssf-fact__t { color: var(--accent); }

/* ---- the "+": Apple's round tile button, turning into a close ---- */
.ssf-plus {
  position: relative; flex: none; display: block;
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.414s var(--ssf-turn), scale 0.25s var(--ssf-ease);
}
/* a press gives way under the finger, then springs back as the pane opens */
.ssf-fact__btn:active .ssf-plus, .ssf-partner__btn:active .ssf-plus { scale: 0.88; }
.ssf-plus::before, .ssf-plus::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px; border-radius: 1px;
  background: var(--ink); transition: background-color 0.3s;
}
.ssf-plus::after { transform: rotate(90deg); }
[aria-expanded="true"] > .ssf-plus { transform: rotate(45deg); background: var(--ink); box-shadow: none; }
[aria-expanded="true"] > .ssf-plus::before, [aria-expanded="true"] > .ssf-plus::after { background: #fff; }
@media (hover: hover) {
  .ssf-fact__btn[aria-expanded="false"]:hover .ssf-plus,
  .ssf-partner:hover [aria-expanded="false"] > .ssf-plus { background: var(--lightbox); box-shadow: none; }
  [aria-expanded="true"]:hover > .ssf-plus { background: var(--accent); }
}
/* without JS every detail is simply shown, and there is nothing to press */
html:not(.js) .ssf-plus, html:not(.js) .ssf-partner__btn { display: none; }

/* ---- the pane: height opens first, then the copy rises into it ---- */
.ssf-pane { display: grid; grid-template-rows: 1fr; }
.ssf-pane__in { min-height: 0; overflow: hidden; }
.js .ssf-pane {
  grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows 0.45s var(--ssf-ease) 0.08s, visibility 0s linear 0.53s;
}
.js .ssf-open > .ssf-pane {
  grid-template-rows: 1fr; visibility: visible;
  transition: grid-template-rows 0.55s var(--ssf-ease), visibility 0s;
}
.js .ssf-pane__in > * {
  opacity: 0; transform: translateY(8px); filter: blur(5px);
  transition: opacity 0.18s var(--ssf-ease), transform 0.3s var(--ssf-ease), filter 0.18s;
}
.js .ssf-open > .ssf-pane .ssf-pane__in > * {
  opacity: 1; transform: none; filter: blur(0);
  transition:
    opacity 0.5s var(--ssf-ease) var(--ssf-d, 0.14s),
    transform 0.6s var(--ssf-ease) var(--ssf-d, 0.14s),
    filter 0.5s var(--ssf-ease) var(--ssf-d, 0.14s);
}
.ssf-pane__in > :nth-child(2) { --ssf-d: 0.2s; }
.ssf-pane__in > :nth-child(3) { --ssf-d: 0.26s; }
.ssf-pane__p { margin: 0.85rem 1rem 1.15rem; font-size: 0.95rem; line-height: 1.55; color: var(--ink-2); max-width: 46ch; }

/* ---- the record inside a fact: his SSF years on one scale, January 2014 to now ---- */
.ssf-viz { position: relative; height: 34px; margin: 0.15rem 1rem 0; color: var(--accent); }
.ssf-viz::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--line-2); }
.ssf-viz i { position: absolute; bottom: 0; left: var(--ssf-at, 0%); }
/* the summits: one stroke per chairmanship, at its month */
.ssf-viz--summit i { width: 3px; height: 100%; margin-left: -1.5px; border-radius: 2px 2px 0 0; background: currentColor; transform-origin: 50% 100%; }
/* the journal clubs: one line per club, from its start to now, named where it starts */
.ssf-viz--clubs i { right: calc(100% - var(--ssf-now)); height: 2px; bottom: 9px; }
.ssf-viz--clubs i + i { bottom: 23px; }
.ssf-viz--clubs i::before { content: ''; position: absolute; inset: 0; border-radius: 1px; background: currentColor; transform-origin: 0 50%; }
.ssf-viz--clubs b { position: absolute; right: 100%; top: 50%; margin-right: 0.5rem; transform: translateY(-50%); font: 600 0.76rem/1 var(--label); white-space: nowrap; }
/* the cadaver labs: one tooth per month, January 2014 to now (153 months) */
.ssf-viz--labs i { left: 0; right: calc(100% - var(--ssf-now)); top: 7px; background: repeating-linear-gradient(to right, currentColor 0 1px, transparent 1px calc(100% / 153)); }
/* the papers with Rod: one bar per year, as tall as that year's count against the busiest (2017) */
.ssf-viz--papers i { width: calc(var(--ssf-w) - 3px); height: calc(3px + 31px * var(--ssf-h)); border-radius: 2px 2px 0 0; background: currentColor; transform-origin: 50% 100%; }

.ssf-scale { position: relative; height: 1.55rem; margin: 0 1rem; font: 600 0.74rem/1 var(--label); color: var(--muted); }
.ssf-scale::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: repeating-linear-gradient(to right, var(--line-2) 0 1px, transparent 1px calc(100% / 13)); }
.ssf-scale span { position: absolute; top: 0.5rem; left: var(--ssf-at); transform: translateX(-50%); white-space: nowrap; }
.ssf-scale span:first-child { transform: none; }
.ssf-scale .ssf-scale__now { transform: translateX(-100%); color: var(--accent); }

/* the record draws itself as its fact opens, a beat after the copy starts to rise */
.ssf-open .ssf-viz--summit i, .ssf-open .ssf-viz--papers i { animation: ssf-rise 0.7s var(--ease-spring) both; animation-delay: calc(0.24s + var(--ssf-n, 0) * 38ms); }
.ssf-viz--summit i:nth-child(2) { --ssf-n: 1; }
.ssf-viz--summit i:nth-child(3) { --ssf-n: 2; }
.ssf-viz--summit i:nth-child(4) { --ssf-n: 3; }
.ssf-viz--summit i:nth-child(5) { --ssf-n: 4; }
.ssf-open .ssf-viz--clubs i::before { animation: ssf-grow 0.9s var(--ssf-ease) both 0.26s; }
.ssf-open .ssf-viz--clubs i + i::before { animation-delay: 0.4s; }
.ssf-open .ssf-viz--labs i { animation: ssf-draw 1.1s var(--ssf-ease) both 0.24s; }
@keyframes ssf-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ssf-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ssf-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.ssf-go { margin-top: clamp(2rem, 3.5vw, 2.6rem); }
.ssf-go .btn { min-height: 44px; }

/* ---- the photographs: a stack of prints, one per fact (2026-10-24) ----
   Four prints from Kien's June 2026 session at the Foundation lie on top of each other, the back three
   turned a few degrees so their edges show. At rest the white coat with the Foundation's mark is on
   top. Opening a fact brings its print to the front: the lectern for the Summit, Global Spine Journal
   for the journal clubs, the lab for the cadaver labs. ssf.js pulls the print out sideways from behind
   the stack and lays it on top; the others settle back one place. Each print's place is data-depth
   (0 is the front), and only these custom properties change with it. Clicking the stack opens the
   next fact, so the pictures and the words always move together. */
.ssf-media { position: relative; padding-top: clamp(1rem, 2vw, 1.75rem); }
.ssf-shot { margin: 0; transform: translate3d(0, var(--ssf-y, 0px), 0); }
.ssf-stack {
  --settle: cubic-bezier(0.32, 0.72, 0, 1);
  position: relative; aspect-ratio: 4 / 5; width: min(100%, 29rem);
  margin: 0 clamp(0rem, 4vw, 3.5rem) 0 auto;
}
.js .ssf-stack { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ssf-print {
  --x: 0%; --y: 0%; --r: 0deg; --s: 1;
  position: absolute; inset: 0; border-radius: 18px;
  transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--s));
  box-shadow: 0 2px 6px rgba(10, 13, 18, 0.06), 0 30px 60px -18px rgba(10, 13, 18, 0.24);
  transition: transform 0.8s var(--settle), filter 0.6s var(--ssf-ease), box-shadow 0.6s var(--ssf-ease);
}
.ssf-print img { display: block; }
.ssf-print[data-depth="0"] { z-index: 4; }
.ssf-print[data-depth="1"] { z-index: 3; --x: -5%; --y: -3%; --r: -4deg; --s: 0.95; }
.ssf-print[data-depth="2"] { z-index: 2; --x: 5.5%; --y: -5%; --r: 3.5deg; --s: 0.92; }
.ssf-print[data-depth="3"] { z-index: 1; --x: -1.5%; --y: -7.5%; --r: -1.5deg; --s: 0.89; }
/* the prints behind sit a little greyer and flatter, so the eye stays on the front one */
.ssf-print:not([data-depth="0"]) {
  filter: saturate(0.72) brightness(0.97);
  box-shadow: 0 1px 3px rgba(10, 13, 18, 0.08), 0 14px 30px -14px rgba(10, 13, 18, 0.22);
}
/* the journal cover is a page, not a photograph: it lies on a sheet of mist */
.ssf-print--cover { background: #fff; }
.ssf-print--cover img { object-fit: contain; padding: 9% 11%; }

/* pointing at the stack fans it a little, so it reads as something to pick up */
@media (hover: hover) and (pointer: fine) {
  .ssf-stack:hover .ssf-print[data-depth="0"] { --y: 1.2%; --r: 0.6deg; }
  .ssf-stack:hover .ssf-print[data-depth="1"] { --x: -9%; --y: -3.5%; --r: -6.5deg; }
  .ssf-stack:hover .ssf-print[data-depth="2"] { --x: 10%; --y: -6%; --r: 6deg; }
  .ssf-stack:hover .ssf-print[data-depth="3"] { --x: -2%; --y: -10%; --r: -2.5deg; }
}

/* ---- Rod Oskouian's plate: name, role, the one line they share; the rest behind its "+" ---- */
.ssf-partner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name name" "role role" "line line" "pane pane" "site btn";
  width: min(23rem, 100% - 2rem);
  margin: -3rem 1.5rem 0 auto;
  padding: 1.25rem 0.9rem 0.45rem 1.4rem;
  background: #fff; border-radius: var(--r-card);
  box-shadow: 0 2px 6px rgba(10, 13, 18, 0.07), 0 22px 52px rgba(10, 13, 18, 0.13);
  transform: translate3d(0, var(--ssf-y, 0px), 0);
  transition: translate 0.5s var(--ssf-ease), scale 0.5s var(--ssf-ease), box-shadow 0.5s var(--ssf-ease);
}
/* with JS it is anchored by its foot, so it opens upward over the photo and its "+" never moves */
.js .ssf-partner { position: absolute; right: clamp(1rem, 2.5vw, 2rem); bottom: 0; margin: 0; cursor: pointer; }
.ssf-partner__name { grid-area: name; padding-right: 0.5rem; font-size: 1.35rem; transition: color 0.3s var(--ssf-ease); }
.ssf-partner__role { grid-area: role; margin-top: 0.15rem; padding-right: 0.5rem; font: 600 0.86rem/1.35 var(--label); color: var(--muted); }
.ssf-partner__line { grid-area: line; margin-top: 0.7rem; padding-right: 0.5rem; font-size: 0.95rem; line-height: 1.5; color: var(--ink-2); }
.ssf-partner__pane { grid-area: pane; }
.ssf-partner__pane .ssf-pane__p { margin: 0.6rem 0.5rem 0 0; }
.ssf-partner__watch { font-size: 0.95rem; }
.ssf-partner__site { grid-area: site; align-self: center; font-size: 0.95rem; }
/* 44px tall hit areas without changing how the links look */
.ssf-partner__watch a, .ssf-partner__site a { display: inline-block; padding: 0.6rem 0; background-position: 0 calc(100% - 0.6rem); }
.ssf-partner__btn {
  grid-area: btn; align-self: center; position: relative;
  display: grid; place-items: center; width: 44px; height: 44px;
  margin: 0; padding: 0; background: none; border: 0; border-radius: 50%; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ssf-partner__btn .ssf-plus { width: 34px; height: 34px; }
.ssf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* Apple's tile hover: a gentle scale and a softer, larger shadow, only while the plate is closed */
@media (hover: hover) {
  .ssf-partner:not(.ssf-open):hover { scale: 1.02; box-shadow: 0 2px 6px rgba(10, 13, 18, 0.06), 0 32px 68px rgba(10, 13, 18, 0.16); }
}
.ssf-partner.ssf-near, .ssf-partner.ssf-lit { translate: 0 -5px; }
.ssf-partner.ssf-lit .ssf-partner__name { color: var(--accent); }
.ssf-partner.ssf-open { box-shadow: 0 2px 6px rgba(10, 13, 18, 0.07), 0 34px 70px rgba(10, 13, 18, 0.18); }

@media (max-width: 960px) {
  .ssf-grid { grid-template-columns: minmax(0, 1fr); row-gap: clamp(2.75rem, 8vw, 3.75rem); }
  .ssf-copy { max-width: 36rem; }
  .ssf-stack { margin: 0 auto; width: min(100% - 3rem, 26rem); }
}
@media (max-width: 560px) {
  /* every other year on a phone, or the labels collide */
  .ssf-scale span:nth-child(2), .ssf-scale span:nth-child(4), .ssf-scale span:nth-child(6) { display: none; }
  .ssf-stack { width: min(100% - 2.5rem, 22rem); margin: 0 auto; }
  .js .ssf-partner { right: 0.75rem; width: min(23rem, 100% - 1.5rem); }
}

/* Reduced motion: site.css shortens every duration but leaves delays, so the staggers here would
   still hold the record and the copy back for a beat. Everything opens complete, at once. */
@media (prefers-reduced-motion: reduce) {
  .ssf-sec *, .ssf-sec *::before, .ssf-sec *::after { animation-delay: 0s !important; transition-delay: 0s !important; }
}

/* Windows high contrast drops backgrounds, which would erase the record: keep it drawn */
@media (forced-colors: active) {
  .ssf-viz i, .ssf-viz--clubs i::before { forced-color-adjust: none; background-color: CanvasText; }
  .ssf-viz--clubs i { background: none; }
  .ssf-viz--labs i { background: repeating-linear-gradient(to right, CanvasText 0 1px, transparent 1px calc(100% / 153)); }
  .ssf-fact.ssf-open { outline: 2px solid Highlight; outline-offset: -2px; }
}
