/* Jordyn Shellhart: paper, ink, and one red thread (from the hand-drawn single covers). */

:root {
  --hero-bg: #d4d9d8;          /* matched to the window photo's fade */
  --hero-ink: #1b1d1c;
  --paper: #eef0ed;
  --paper-2: #e3e7e4;
  --ink: #1b1d1c;
  --muted: #586059;
  --line: rgba(27, 29, 28, .14);
  --thread: #b0281f;
  --field: rgba(255, 255, 255, .62);
  --field-line: rgba(27, 29, 28, .16);
  --material: rgba(238, 240, 237, .72);
  --shadow: 0 1px 2px rgba(20, 22, 21, .06), 0 12px 32px -12px rgba(20, 22, 21, .28);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --gutter: max(20px, env(safe-area-inset-left));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131514; --paper-2: #1a1d1c; --ink: #e8ebe8; --muted: #a4aba6;
    --line: rgba(232, 235, 232, .14); --thread: #e3584c;
    --field: rgba(255, 255, 255, .06); --field-line: rgba(232, 235, 232, .18);
    --material: rgba(19, 21, 20, .72);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131514; --paper-2: #1a1d1c; --ink: #e8ebe8; --muted: #a4aba6;
  --line: rgba(232, 235, 232, .14); --thread: #e3584c;
  --field: rgba(255, 255, 255, .06); --field-line: rgba(232, 235, 232, .18);
  --material: rgba(19, 21, 20, .72);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1.0625rem/1.55 var(--sans); letter-spacing: 0;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--thread); outline-offset: 3px; border-radius: 6px; }

.display { font-family: var(--serif); font-weight: 400; letter-spacing: -0.012em; line-height: 1.02; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: 720px; }

/* Section label: small caps with a short red stitch before it */
.section-title {
  display: flex; align-items: center; gap: .75rem; margin: 0 0 2rem;
  font: 600 .75rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.section-title::before { content: ""; width: 28px; height: 1.5px; background: var(--thread); border-radius: 2px; }

/* ---------- Translucent top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 30; height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 var(--gutter); padding-top: env(safe-area-inset-top);
  color: var(--hero-ink);
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
/* Over the photo: a soft wash so the name stays legible on her hair */
.bar::before {
  content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(212, 217, 216, .82), rgba(212, 217, 216, 0));
  transition: opacity .25s ease;
}
.bar.solid::before { opacity: 0; }
.bar.solid {
  background: var(--material); color: var(--ink);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  box-shadow: 0 1px 0 var(--line);
}
.wordmark { font: 1.4rem/1 var(--serif); text-decoration: none; letter-spacing: -0.005em; }
.bar nav { display: none; gap: 1.6rem; }
.bar nav a { text-decoration: none; font-size: .9rem; letter-spacing: .01em; opacity: .78; }
.bar nav a:hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--hero-bg); color: var(--hero-ink); overflow: hidden; isolation: isolate; }
/* The source photos crop the top of her head, so the photo starts below the bar,
   shows from the very top, and the top edge softens into the background. */
.hero-photo { height: 42svh; min-height: 300px; padding-top: calc(52px + env(safe-area-inset-top)); }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 64%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 64%, transparent 100%);
}
.hero-copy { position: relative; z-index: 2; padding: 0 var(--gutter) 28px; margin-top: -40px; }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .7rem;
  font: 600 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--thread); box-shadow: 0 0 0 0 rgba(176, 40, 31, .45); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(176, 40, 31, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(176, 40, 31, 0); } }
.hero h1 { font-size: clamp(2.15rem, 9vw, 4.25rem); margin: 0 0 .7rem; text-wrap: balance; }
.lede { margin: 0 0 1.2rem; font-size: 1.02rem; line-height: 1.45; color: #3e4542; max-width: 30rem; text-wrap: pretty; }

/* Hero is always light (it sits on the photo), whatever the theme */
.hero .field { --field: rgba(255, 255, 255, .62); --field-line: rgba(27, 29, 28, .16); color: var(--hero-ink); }
.hero .fine, .hero .nowplaying small { color: #4c5350; }
.hero .btn.primary { background: var(--hero-ink); color: #f4f5f3; }
.hero { --thread: #b0281f; }

/* ---------- Forms ---------- */
.capture { margin: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.fields .wide { grid-column: 1 / -1; }
.fields.three { grid-template-columns: 1fr 1fr; }
.fields.three .field:last-child { grid-column: 1 / -1; }
.field {
  position: relative; display: block; height: 54px; border-radius: 12px;
  background: var(--field); box-shadow: inset 0 0 0 1px var(--field-line);
  transition: box-shadow .15s ease, background-color .15s ease;
}
.field span {
  position: absolute; left: 14px; top: 7px; font-size: .75rem; letter-spacing: .02em; opacity: .62; pointer-events: none;
}
.field input {
  position: absolute; inset: 0; width: 100%; padding: 22px 14px 6px; border: 0; background: transparent;
  font: 1rem/1.2 var(--sans); color: inherit; border-radius: 12px; outline: none;
}
.field:focus-within { box-shadow: inset 0 0 0 1.5px currentColor; }
.field.invalid { box-shadow: inset 0 0 0 1.5px var(--thread); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 52px; padding: 0 1.4rem; border-radius: var(--radius); border: 0; cursor: pointer;
  font: 600 1rem/1 var(--sans); letter-spacing: .005em; text-decoration: none;
  background: transparent; color: inherit; box-shadow: inset 0 0 0 1px var(--field-line);
  transition: transform .1s ease-out, opacity .15s ease; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--paper); box-shadow: none; }
.capture .btn { width: 100%; }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

.fine { margin: .7rem 0 0; font-size: .78rem; line-height: 1.45; color: var(--muted); }
.fine a { color: inherit; }
.status { margin: .5rem 0 0; font-size: .85rem; color: var(--thread); min-height: 0; }
.status:empty { display: none; }

.done { padding: 18px 18px 16px; border-radius: 16px; background: var(--field); box-shadow: inset 0 0 0 1px var(--field-line); }
.done strong { display: block; font: 400 1.7rem/1.1 var(--serif); margin-bottom: .3rem; }
.done p { margin: 0; color: var(--muted); font-size: .95rem; }
.hero .done p { color: #4c5350; }

/* Small "now playing" chip under the hero form */
.nowplaying {
  display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 8px 14px 8px 8px;
  border-radius: 14px; text-decoration: none; background: rgba(255, 255, 255, .38);
  box-shadow: inset 0 0 0 1px rgba(27, 29, 28, .1); max-width: 22rem;
  transition: transform .1s ease-out;
}
.nowplaying:active { transform: scale(.98); }
.nowplaying img { width: 44px; height: 44px; border-radius: 6px; }
.nowplaying span { flex: 1; font: 1.25rem/1.1 var(--serif); }
.nowplaying small { display: block; font: 600 .66rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.nowplaying svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; opacity: .55; }

/* The red thread: drawn once on load */
.thread { position: absolute; pointer-events: none; z-index: 1; }
.thread path { fill: none; stroke: var(--thread); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.hero-thread { display: none; }

/* ---------- Songs ---------- */
section { padding-block: clamp(72px, 11vw, 136px); }
.hero { padding-block: 0; }
.songs { padding-top: clamp(64px, 9vw, 112px); }
.feature { display: grid; gap: 1.6rem; align-items: center; margin-bottom: clamp(64px, 9vw, 112px); }
.feature .cover { width: 100%; max-width: 520px; border-radius: 6px; box-shadow: var(--shadow); }
.meta { margin: 0 0 .4rem; font: 600 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.feature h3 { font-size: clamp(2.6rem, 10vw, 5rem); margin: 0 0 .8rem; }
.feature-copy p:not(.meta) { margin: 0 0 1.4rem; color: var(--muted); max-width: 28rem; }
.listen { display: flex; flex-wrap: wrap; gap: 10px; }
.listen .btn { min-width: 9rem; }

.sub-title { font: 400 1.9rem/1.1 var(--serif); margin: 0 0 1.4rem; letter-spacing: -0.01em; }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 16px; }
.shelf.small { grid-template-columns: 1fr 1fr 1fr; gap: 24px 14px; }
.tile { display: block; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; margin-bottom: .7rem; box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.tile:hover img { transform: translateY(-3px); }
.tile:active img { transform: scale(.97); transition-duration: .1s; }
.tile strong { display: block; font: 400 1.3rem/1.15 var(--serif); }
.tile span { display: block; margin-top: .2rem; font-size: .8rem; color: var(--muted); }
.shelf.small strong { font-size: 1.1rem; }

/* ---------- Writing ---------- */
.writing { background: var(--paper-2); }
.intro { font: italic 400 1.6rem/1.25 var(--serif); margin: -.5rem 0 2.4rem; max-width: 34rem; text-wrap: pretty; }
.essays { list-style: none; margin: 0 0 2.6rem; padding: 0; display: grid; }
.essays a { display: block; padding: 1.4rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.essays li:last-child a { border-bottom: 1px solid var(--line); }
.essays time { font-size: .78rem; letter-spacing: .04em; color: var(--muted); }
.essays h3 { font: italic 400 2rem/1.05 var(--serif); margin: .3rem 0 .4rem; letter-spacing: -0.01em; }
.essays p { margin: 0; color: var(--muted); font-size: .98rem; }
.essays a:hover h3 { text-decoration: underline; text-decoration-color: var(--thread); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }

.capture.inline { padding: 20px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); max-width: 34rem; }
.writing .capture.inline { margin-inline: auto; }
.inline-title { font: 400 1.6rem/1.1 var(--serif); margin: 0 0 1rem; }

/* ---------- Videos ---------- */
.videos .section-title { margin-bottom: 1.6rem; }
.reel {
  list-style: none; margin: 0 auto; padding: 0 var(--gutter) 8px; display: flex; gap: 16px; max-width: 1120px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  overscroll-behavior-x: contain; scrollbar-width: none;
}
.reel::-webkit-scrollbar { display: none; }
.reel li { flex: 0 0 min(80vw, 26rem); scroll-snap-align: start; }
.clip { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.clip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow); transition: transform .1s ease-out; }
.clip:active img { transform: scale(.98); }
.clip span { display: block; margin-top: .7rem; font: 400 1.3rem/1.15 var(--serif); }
.clip::after {
  content: ""; position: absolute; left: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7v10l8-5z' fill='%231b1d1c'/%3E%3C/svg%3E") center / 22px no-repeat;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: 2rem; align-items: center; }
.about-grid img { border-radius: 6px; box-shadow: var(--shadow); }
.about-lede { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 1rem; text-wrap: balance; }
.about p:not(.about-lede) { color: var(--muted); max-width: 34rem; }

/* ---------- Shows ---------- */
.shows { background: var(--paper-2); }
.shows-line { font-size: clamp(2.2rem, 7vw, 3.4rem); margin: 0 0 .6rem; }
.shows .wrap > p:not(.display) { color: var(--muted); margin: 0 0 1.6rem; }

/* ---------- Footer: credit is the very last line ---------- */
.foot { padding: 56px 0 calc(96px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.4rem; margin-bottom: 1.6rem; }
.social a { text-decoration: none; font: 400 1.25rem/1.2 var(--serif); }
.social a:hover { text-decoration: underline; text-decoration-color: var(--thread); text-underline-offset: 4px; }
.legal { margin: 0 0 .4rem; font-size: .78rem; color: var(--muted); }
.legal a { color: inherit; }
.credit { margin: 0; font-size: .75rem; color: var(--muted); }
.credit a { color: inherit; }

/* ---------- Dock (floating ask) ---------- */
.dock {
  position: fixed; z-index: 25; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--material); color: var(--ink); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  font: 600 .92rem/1 var(--sans); white-space: nowrap;
  width: max-content; max-width: calc(100vw - 32px); /* left:50% would otherwise cap it at half the screen */
  transform: translate(-50%, 140%); opacity: 0; pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.dock img { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.dock.show { pointer-events: auto; }

/* ---------- Sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 12, 11, .42); opacity: 0; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; margin: 0 auto; width: min(100%, 520px);
  max-height: calc(100svh - 24px); overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0; background: var(--paper); color: var(--ink);
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .35); transform: translateY(110%);
}
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; cursor: grab; touch-action: none; }
.sheet-drag { touch-action: none; }
.sheet h2 { font-size: clamp(2rem, 8vw, 2.6rem); margin: 0 0 .6rem; text-wrap: balance; padding-right: 30px; }
.sheet .lede { color: var(--muted); }
.close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--field); box-shadow: inset 0 0 0 1px var(--field-line);
}
.close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.close:active { transform: scale(.92); }

/* ---------- Video viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(8, 9, 9, .9); opacity: 0; }
.viewer .frame { width: min(100%, 1040px); aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.viewer iframe { width: 100%; height: 100%; border: 0; }
.viewer .close { color: #fff; background: rgba(255, 255, 255, .14); box-shadow: none; top: max(14px, env(safe-area-inset-top)); }

[hidden] { display: none !important; }

/* ---------- Wider screens ---------- */
@media (min-width: 720px) {
  .shelf { grid-template-columns: repeat(4, 1fr); gap: 32px 24px; }
  .shelf.small { grid-template-columns: repeat(6, 1fr); gap: 28px 18px; }
  .essays { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  /* Wider screens: no sideways scrolling, all six videos in a grid */
  .reel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 24px; overflow: visible; scroll-snap-type: none; padding-bottom: 0; }
  .reel li { flex: none; }
  .essays li:nth-last-child(2) a { border-bottom: 1px solid var(--line); }
  .fields.three { grid-template-columns: 1fr 1fr 8rem; }
  .fields.three .field:last-child { grid-column: auto; }
  .sheet { bottom: 24px; border-radius: 24px; }
}
@media (min-width: 900px) {
  .bar nav { display: flex; }
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100svh; }
  .hero-photo { height: auto; min-height: 100svh; }
  .hero-photo img {
    position: absolute; inset: 64px 50% 0 0; width: 50%; height: calc(100% - 64px); object-position: 50% 0;
    -webkit-mask-image: linear-gradient(to right, #000 72%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 9%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, #000 72%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 9%);
    mask-composite: intersect;
  }
  .hero-copy { margin: 0; align-self: center; padding: 96px clamp(32px, 6vw, 96px) 64px clamp(16px, 3vw, 48px); max-width: 38rem; }
  .lede { font-size: 1.1rem; }
  .hero-thread { display: block; right: 0; top: 0; width: 22%; height: 100%; opacity: .9; }
  .feature { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .reel { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1.15fr 1fr; gap: 4rem; }
  .dock { left: auto; right: 24px; transform: translate(0, 140%); }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot { animation: none; }
  .tile img, .btn, .nowplaying { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .bar.solid, .dock { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--ink); --field-line: currentColor; --line: currentColor; }
}
