/* gallery.css -- the showcase gallery (built by tools/showcase/build.mjs).
   Ivory paper, maroon type, gold rules; each template plays in a phone frame. */

@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-500.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-display: swap; src: url("fonts/cormorant-garamond-600.woff2") format("woff2"); }

:root {
  --paper: #f6efe3;
  --paper-deep: #efe4d2;
  --ink: #3b1e1a;
  --ink-soft: #6b4a40;
  --maroon: #7d1f2c;
  --maroon-deep: #5e1520;
  --gold: #b8924f;
  --device: #1c1714;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --motion-fast: 180ms;
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --phone-w: min(76vw, 300px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(120% 60% at 50% 0%, #fbf6ec 0%, rgba(251, 246, 236, 0) 70%),
    var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ------------------------------------------------------------- header */
.intro {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 20px 40px;
  text-align: center;
}
.intro__studio {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--maroon);
}
.rule {
  display: block;
  width: 88px;
  height: 1px;
  margin: 18px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.intro h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(36px, 9vw, 56px);
  line-height: 1.05;
  color: var(--ink);
}
.intro__lede {
  margin: 18px auto 0;
  max-width: 30em;
  font-size: 19px;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------- grid */
.gallery {
  display: grid;
  gap: 64px 32px;
  justify-content: center;
  grid-template-columns: var(--phone-w);
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 20px 72px;
  list-style: none;
}
@media (min-width: 720px) {
  :root { --phone-w: 280px; }
  .gallery { grid-template-columns: repeat(auto-fit, var(--phone-w)); }   /* auto-fit: empty tracks collapse, so a short row stays centred */
}

.card { margin: 0; text-align: center; }

/* ------------------------------------------------------------- phone */
/* The recording is the page area of a 390x844 phone; a 47-unit status bar (with the
   camera island) sits above it, as on a real iPhone, so nothing covers the art. */
.phone {
  position: relative;
  width: var(--phone-w);
  aspect-ratio: 390 / 891;
  margin: 0 auto;
  padding: 9px;
  border-radius: 46px;
  background: var(--device);
  box-shadow:
    inset 0 0 0 1.5px #3a322d,
    0 1px 0 rgba(255, 255, 255, 0.5),
    0 24px 48px -20px rgba(59, 30, 26, 0.45),
    0 8px 18px -10px rgba(59, 30, 26, 0.3);
  -webkit-touch-callout: none;
  user-select: none;
}
.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 37px;
  background: #0e0b0a;
}
.phone__status {
  position: relative;
  flex: none;
  aspect-ratio: 390 / 47;
}
.phone__island {
  position: absolute;
  top: 26%;
  left: 50%;
  width: 30%;
  height: 52%;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}
.phone__screen video {
  display: block;
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  cursor: pointer;
}
/* Big play glyph over the poster; tapping the screen does what the Play button does. */
.phone__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(28, 23, 20, 0.55);
  color: #f6efe3;
  box-shadow: 0 0 0 1px rgba(246, 239, 227, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity var(--motion-fast) var(--ease-standard);
}
.phone__play svg { width: 34px; height: 34px; margin-left: 4px; }
.card.is-playing .phone__play, .card.is-error .phone__play { opacity: 0; }
.phone__fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  margin: 0;
  padding: 24px;
  background: rgba(28, 23, 20, 0.72);
  color: #f6efe3;
  font-size: 18px;
}
.card.is-error .phone__fallback { display: grid; }

/* ------------------------------------------------------------- caption + control */
.card__title {
  margin: 22px 0 2px;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
}
.card__meta {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--ink-soft);
}
.play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--maroon);
  border-radius: 999px;
  background: transparent;
  color: var(--maroon);
  font: 600 17px/1 var(--serif);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard);
}
.play svg { width: 18px; height: 18px; flex: none; }
.play .i-stop { display: none; }
.card.is-playing .play { background: var(--maroon); color: var(--paper); }
.card.is-playing .play .i-stop { display: block; }
.card.is-playing .play .i-play { display: none; }
@media (hover: hover) {
  .play:hover:not(:disabled) { background: var(--maroon-deep); border-color: var(--maroon-deep); color: var(--paper); }
}
.play:focus-visible, .contact__cta:focus-visible, .credit a:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 3px;
}
.play:disabled { opacity: 0.45; cursor: default; }

/* ------------------------------------------------------------- contact + footer */
.contact {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 20px 56px;
  text-align: center;
}
.contact h2 { margin: 0 0 8px; font-weight: 500; font-size: 32px; }
.contact p { margin: 0 0 22px; color: var(--ink-soft); }
.contact__cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--maroon);
  color: var(--paper);
  font: 600 18px/1 var(--serif);
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background-color var(--motion-fast) var(--ease-standard);
}
@media (hover: hover) { .contact__cta:hover { background: var(--maroon-deep); } }

.empty { text-align: center; color: var(--ink-soft); padding: 0 20px 64px; }

.credit {
  margin: 0;
  padding: 22px 20px 32px;
  border-top: 1px solid var(--paper-deep);
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
}
.credit a { color: var(--maroon); }

@media (prefers-reduced-motion: reduce) {
  .play, .phone__play, .contact__cta { transition: none; }
}
