/* ──────────────────────────────────────────────────────────────
   Sophia Garrow — bio-link site
   Mobile-first. Dark, warm, editorial. Show cards are ticket stubs.
   ────────────────────────────────────────────────────────────── */

:root {
  --bg: #15100c;
  --bg-raised: #1f1812;
  --bg-raised-hover: #2a2018;

  --ink: #f5ecdf;
  --ink-muted: #b8a996;
  --ink-faint: #948675;
  --line: rgba(245, 236, 223, 0.14);
  --line-strong: rgba(245, 236, 223, 0.26);

  --paper: #f6ecdc;
  --paper-ink: #1d1611;
  --paper-muted: #6b5d4f;
  --paper-line: rgba(29, 22, 17, 0.25);

  --accent: #f0a53a;
  --accent-deep: #bf3f1a;
  --accent-deeper: #9c3213;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 16px;
}

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

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

/* sections that have nothing to show yet stay out of the page entirely */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  /* a warm spotlight falling on the header */
  background-image: radial-gradient(ellipse 85% 400px at 50% -90px, rgba(240, 165, 58, 0.2), transparent 72%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 44px 18px calc(36px + env(safe-area-inset-bottom));
}

/* 404 page: one message, vertically centred */
.page--center {
  display: grid;
  align-content: center;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ───────── Profile ───────── */

.profile {
  text-align: center;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #3b2a1b, #231910);
  box-shadow:
    0 0 0 4px var(--bg),
    0 0 0 5.5px rgba(240, 165, 58, 0.7);
}

.avatar__initials {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.avatar__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.avatar__img.is-loaded {
  opacity: 1;
}

.profile__name {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 10vw, 2.9rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.profile__bio {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.profile__bio span {
  margin: 0 0.35em;
  color: var(--accent);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.social {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(245, 236, 223, 0.04);
  color: var(--ink);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.social svg {
  width: 20px;
  height: 20px;
}

.social:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

/* ───────── Sections ───────── */

.section {
  margin-top: 38px;
}

.section__title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ───────── Show cards (ticket stubs) ───────── */

.shows {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.show {
  --stub: 78px;
  --notch: 8px;

  display: grid;
  grid-template-columns: var(--stub) minmax(0, 1fr);
  min-height: 120px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--paper-ink);
  text-decoration: none;
  transition: transform 0.18s ease;
  animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 55ms);

  /* punch a half-circle out of the top and bottom edge at the perforation */
  -webkit-mask:
    radial-gradient(circle var(--notch) at calc(var(--stub) - 1px) 0, #0000 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(var(--stub) - 1px) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at calc(var(--stub) - 1px) 0, #0000 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(var(--stub) - 1px) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
}

a.show:hover {
  transform: translateY(-2px);
}

a.show:active {
  transform: scale(0.985);
}

.show__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 14px 4px;
  border-right: 2px dashed var(--paper-line);
  text-align: center;
}

.show__dow,
.show__month {
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.show__dow {
  color: var(--accent-deep);
}

.show__month {
  color: var(--paper-muted);
}

.show__day {
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.show__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 15px 16px 15px 17px;
}

.show__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.012em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.show__where {
  margin: 4px 0 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--paper-muted);
  text-wrap: balance;
}

.show__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
}

.show__time {
  margin-right: 2px;
  font-size: 0.86rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(29, 22, 17, 0.09);
  color: #4a3d31;
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge--tonight {
  background: var(--paper-ink);
  color: var(--accent);
}

.show__cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 16px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fff7ec;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  transition: background-color 0.18s ease;
}

.show__arrow {
  transition: transform 0.18s ease;
}

a.show:hover .show__cta {
  background: var(--accent-deeper);
}

a.show:hover .show__arrow {
  transform: translateX(3px);
}

/* no ticket link yet */
.show--tba .show__cta {
  border-color: rgba(29, 22, 17, 0.32);
  border-style: dashed;
  background: transparent;
  color: var(--paper-muted);
}

/* loading placeholders */
.show-skeleton {
  min-height: 120px;
  border-radius: var(--radius);
  background: rgba(245, 236, 223, 0.07);
  animation: pulse 1.4s ease-in-out infinite;
}

/* empty state */
.empty {
  margin: 0;
  padding: 30px 22px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-muted);
  text-align: center;
}

.empty__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.empty__text {
  margin: 0;
}

.empty a {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 3px;
}

/* ───────── Mailing list ───────── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.signup {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.signup__pitch {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.2;
}

.signup__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signup__input,
.signup__button {
  min-height: 48px;
  border-radius: 999px;
  font: inherit;
}

/* the field takes the spare width; when the row wraps, each takes a full line */
.signup__input {
  flex: 999 1 200px;
  min-width: 0;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
}

.signup__input::placeholder {
  color: var(--ink-faint);
}

.signup__button {
  flex: 1 0 auto;
  padding: 0 24px;
  border: 0;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.signup__button:hover {
  background: #f7b757;
  transform: translateY(-1px);
}

.signup__note {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

/* ───────── Portfolio: clips ───────── */

.clips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clip {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* shown when a clip has no thumbnail */
  background:
    radial-gradient(circle at 50% 38%, rgba(240, 165, 58, 0.24), transparent 60%),
    var(--bg-raised);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.clip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* a lone clip gets the full width instead of half a row */
.clips li:only-child {
  grid-column: 1 / -1;
}

.clips li:only-child .clip {
  aspect-ratio: 16 / 10;
}

.clip__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* darkens the bottom of the tile so the caption stays readable over any thumbnail */
.clip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(21, 16, 12, 0.94) 0%, rgba(21, 16, 12, 0.4) 42%, transparent 68%);
}

.clip__play {
  position: absolute;
  top: 38%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.18s ease;
}

.clip__play::before {
  content: "";
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--bg);
}

.clip:hover .clip__play {
  transform: scale(1.08);
}

.clip__caption {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 12px 14px 13px;
}

.clip__title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.clip__platform {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ───────── Portfolio: credits ───────── */

.credits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.credit {
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(245, 236, 223, 0.04);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-style: italic;
  line-height: 1.25;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease;
}

a.credit:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ───────── Portfolio: photos ───────── */

.photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.photo {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-raised);
}

.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo:hover img {
  transform: scale(1.04);
}

/* ───────── Evergreen links ───────── */

.links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.link__arrow {
  color: var(--accent);
  transition: transform 0.18s ease;
}

.link:hover {
  border-color: var(--accent);
  background: var(--bg-raised-hover);
  transform: translateY(-2px);
}

.link:hover .link__arrow {
  transform: translateX(3px);
}

/* ───────── Footer ───────── */

.footer {
  margin-top: 44px;
  font-size: 0.76rem;
  color: var(--ink-faint);
  text-align: center;
}

.footer p {
  margin: 0 0 4px;
}

/* ───────── Focus, motion, larger screens ───────── */

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

/* the ticket mask would clip an outer ring, so draw this one inside the card */
a.show:focus-visible {
  outline-color: var(--accent-deep);
  outline-offset: -5px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

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

@media (min-width: 600px) {
  .page {
    padding-top: 72px;
    padding-bottom: 56px;
  }

  .show {
    --stub: 92px;
  }

  .show__body {
    padding: 18px 22px 18px 23px;
  }

  .show__title {
    font-size: 1.24rem;
  }

  .clips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
