/* Albert Manes Media — implemented from "Albert Manes Media.dc.html"
   Design tokens mirror the .dc component props (mode / accent / treatment / density). */

:root {
  --amm-accent: #FFC61E;
  --amm-bg:     #0A0A09;
  --amm-fg:     #EFEBE3;
  --amm-muted:  #B4AC9F;
  --amm-dim:    #5F594F;
  --amm-scrim:  rgba(6, 6, 5, .97);
  --amm-ph:     repeating-linear-gradient(135deg, #131211, #131211 8px, #171614 8px, #171614 16px);
  --amm-header: linear-gradient(to bottom, rgba(10,10,9,.95) 0%, rgba(10,10,9,.8) 45%, rgba(10,10,9,0) 100%);

  /* density (px) drives the auto-fit grids */
  --amm-min:    190px;
  --amm-min-lg: 285px;

  /* treatment */
  --amm-filter: none;

  --amm-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --amm-display: 'fatfrank', 'Fat Frank', 'Baloo 2', system-ui, sans-serif;
  --amm-gutter: 34px;
}

:root[data-mode="light"] {
  --amm-bg:     #F4F1EA;
  --amm-fg:     #14120F;
  --amm-muted:  #4A453D;
  --amm-dim:    #8A8377;
  --amm-scrim:  rgba(244, 241, 234, .97);
  --amm-ph:     repeating-linear-gradient(135deg, #E7E2D8, #E7E2D8 8px, #EDE9E0 8px, #EDE9E0 16px);
  --amm-header: linear-gradient(to bottom, rgba(244,241,234,.96) 0%, rgba(244,241,234,.82) 45%, rgba(244,241,234,0) 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--amm-bg);
  color: var(--amm-fg);
  font-family: var(--amm-display);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amm-accent); text-decoration: none; }
a:hover { color: var(--amm-fg); }
::selection { background: var(--amm-accent); color: #0A0A09; }

@keyframes amm-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes amm-in   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- header */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px var(--amm-gutter);
  background: var(--amm-header);
}

.wordmark {
  font-size: clamp(22px, 2.6vw, 36px);
  letter-spacing: .06em;
  color: var(--amm-accent);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--amm-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.site-nav a { color: var(--amm-fg); white-space: nowrap; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--amm-accent); }

.social {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 4px;
  margin-left: 2px;
  border-left: 1px solid rgba(160, 152, 140, .35);
}
.social a { display: flex; color: var(--amm-fg); }
.social a:first-child { padding-left: 14px; }

/* ----------------------------------------------------------------- views */

.view { display: none; }
.view.is-active { display: block; }

.page { padding: 118px 0 90px; }

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 0 var(--amm-gutter) 26px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 66px);
  letter-spacing: .01em;
  color: var(--amm-accent);
}

.rule-link {
  font-family: var(--amm-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--amm-accent);
  padding-bottom: 4px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.hero img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero img.is-current { opacity: 1; }
.hero img[data-position] { object-position: 50% 40%; }
.hero img[data-mono] { filter: grayscale(1) contrast(1.06); }

.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(0,0,0,.5) 0%, rgba(0,0,0,.05) 30%, rgba(0,0,0,.15) 70%, rgba(0,0,0,.55) 100%);
}

.hero-hint {
  position: absolute;
  left: var(--amm-gutter);
  bottom: 30px;
  font-family: var(--amm-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: #EFEBE3;
  opacity: .55;
}

.hero-dots {
  position: absolute;
  right: var(--amm-gutter);
  bottom: 32px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 22px;
  height: 2px;
  padding: 0;
  border: 0;
  background: #EFEBE3;
  opacity: .32;
  cursor: pointer;
  transition: opacity .4s ease;
}
.hero-dots button.is-current { opacity: 1; }

/* --------------------------------------------------------------- gallery */

.masonry {
  padding: 0 6px;
  column-gap: 6px;
}
.masonry--live      { columns: 3 320px; }
.masonry--portraits { columns: 3 300px; }

.masonry figure {
  margin: 0 0 6px;
  break-inside: avoid;
  overflow: hidden;
  background: var(--amm-ph);
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .8s cubic-bezier(.2, .8, .3, 1),
    transform .8s cubic-bezier(.2, .8, .3, 1);
}
.masonry figure.is-revealed { opacity: 1; transform: none; }

.masonry img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  filter: var(--amm-filter);
  transition: opacity .5s ease, filter .5s ease;
}
.masonry img:hover { opacity: .88; }

/* Ultra-wide sequence strip — too wide for a masonry column, so it runs
   full width beneath the grid. Shares the grid's reveal treatment. */
.portrait-strip {
  margin: 0 6px 6px;
  overflow: hidden;
  background: var(--amm-ph);
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .8s cubic-bezier(.2, .8, .3, 1),
    transform .8s cubic-bezier(.2, .8, .3, 1);
}
.portrait-strip.is-revealed { opacity: 1; transform: none; }

.portrait-strip img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  filter: var(--amm-filter);
  transition: opacity .5s ease, filter .5s ease;
}
.portrait-strip img:hover { opacity: .88; }

/* ----------------------------------------------------------------- video */

.reels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--amm-min-lg), 1fr));
  gap: 2px;
}

.reel {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  background: var(--amm-ph);
}

.reel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: var(--amm-filter);
  transition: transform .9s cubic-bezier(.2, .8, .3, 1), filter .5s ease;
}
.reel:hover img { transform: scale(1.05); }

.reel-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(0,0,0,.82) 0%, rgba(0,0,0,.12) 42%, rgba(0,0,0,.35) 100%);
}

.reel-play {
  position: absolute;
  top: 14px;
  right: 14px;
  pointer-events: none;
  font-family: var(--amm-mono);
  font-size: 14px;
  color: #EFEBE3;
}

.reel-meta {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;              /* stays legible above the hover overlay */
  padding: 18px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Big centred numbers on hover, over the bottom stats rather than
   replacing them. Gated on real hover so touch devices never stick. */
.reel-hover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  pointer-events: none;
  background: rgba(6, 6, 5, .74);
  opacity: 0;
  transition: opacity .3s ease;
}

.reel-hover .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateY(8px);
  transition: transform .45s cubic-bezier(.2, .8, .3, 1);
}
.reel-hover .stat:last-child { transition-delay: .05s; }

.reel-hover .big {
  font-family: var(--amm-display);
  font-size: clamp(30px, 3.2vw, 52px);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--amm-accent);
}

.reel-hover .cap {
  font-family: var(--amm-mono);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #EFEBE3;
}

@media (hover: hover) {
  .reel:hover .reel-hover { opacity: 1; }
  .reel:hover .reel-hover .stat { transform: none; }
}
.reel-meta .label {
  font-family: var(--amm-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #EFEBE3;
}
.reel-meta .stats {
  display: flex;
  flex-wrap: wrap;      /* never overflow a narrow tile at low density */
  gap: 6px 16px;
  font-family: var(--amm-mono);
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--amm-accent);
}

.note {
  margin: 34px var(--amm-gutter) 0;
  font-family: var(--amm-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amm-dim);
}

.recaps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 300px));
  gap: 20px;
  padding: 0 var(--amm-gutter);
}

.recap { margin: 0; }

.recap video {
  display: block;
  width: 100%;
  height: auto;          /* override the intrinsic height attribute */
  aspect-ratio: 9 / 16;
  background: #000;
  object-fit: cover;
}

.recap figcaption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  font-family: var(--amm-mono);
}
.recap .label {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--amm-dim);
}
.recap .title {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--amm-accent);
}

.section-head {
  margin: 74px var(--amm-gutter) 26px;
  font-size: clamp(26px, 3.4vw, 44px);
  letter-spacing: .01em;
  color: var(--amm-accent);
}

.films {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  padding: 0 var(--amm-gutter);
}

.film {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.film iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------- contact */

.contact {
  width: calc(100% - 2 * var(--amm-gutter));
  max-width: 1040px;
  margin: 0 auto;
  padding: 136px 0 88px;
}
.contact-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding-top: 32px;
  border-top: 1px solid var(--amm-line);
}
.contact-details { min-width: 0; }
.contact h1 {
  margin: 0 0 34px;
  font-family: var(--amm-display);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 80px);
  line-height: .95;
  color: var(--amm-accent);
}
.contact-links { margin: 0; font: 1rem/1.6 var(--amm-mono); }
.contact-links a {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 18px;
  align-items: baseline;
  gap: 16px;
  min-height: 58px;
  padding: 16px 0;
  border-bottom: 1px solid var(--amm-line);
  color: var(--amm-fg);
}
.contact-label { font-size: .875rem; color: var(--amm-muted); }
.contact-value { min-width: 0; overflow-wrap: anywhere; }
.contact-links a:hover .contact-value { color: var(--amm-accent); }
.contact-links a:hover { text-decoration: none; }
.contact-photo { margin: 0; width: 100%; max-width: 280px; overflow: hidden; background: var(--amm-ph); }
.contact-photo[hidden] { display: none; }
.contact-photo img {
  display: block;
  width: 100%;
  min-height: 0;
  height: auto;
  max-height: 190px;
  object-fit: contain;
  filter: var(--amm-filter);
}
@media (max-width: 760px) {
  .contact { padding: 150px 0 60px; }
  .contact h1 { margin-bottom: 24px; }
  .contact-body { grid-template-columns: 1fr; gap: 32px; padding-top: 12px; }
  .contact-details { order: -1; }
  .contact-photo { max-width: 220px; }
  .contact-photo img { max-height: 150px; }
  .contact-links a { grid-template-columns: 1fr 18px; gap: 4px 12px; }
  .contact-label { grid-column: 1 / -1; }
}

/* -------------------------------------------------------------- lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 72px;
  background: var(--amm-scrim);
  cursor: zoom-out;
  animation: amm-in .28s ease both;
}
.lightbox[hidden] { display: none; }

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 14px;
  border: 0;
  background: none;
  color: var(--amm-fg);
  font-family: var(--amm-mono);
  font-size: 22px;
  cursor: pointer;
}
.lightbox button:hover { color: var(--amm-accent); }
.lightbox .lb-prev { left: 20px; }
.lightbox .lb-next { right: 20px; }

.lightbox .lb-esc,
.lightbox .lb-count {
  position: absolute;
  font-family: var(--amm-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--amm-dim);
}
.lightbox .lb-esc   { top: 24px; right: 30px; }
.lightbox .lb-count { bottom: 24px; left: 30px; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px var(--amm-gutter) 40px;
  font-family: var(--amm-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amm-dim);
}
.site-footer a { color: var(--amm-dim); }
.site-footer a:hover { color: var(--amm-accent); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  :root { --amm-gutter: 22px; }
  .site-header { padding: 18px var(--amm-gutter); gap: 14px; flex-wrap: wrap; }
  .site-nav { gap: 18px; font-size: 10px; letter-spacing: .16em; }
  .social { gap: 13px; }
  .social a:first-child { padding-left: 11px; }
  .page { padding: 132px 0 70px; }
  .films { grid-template-columns: 1fr; }
  .lightbox { padding: 56px 16px; }
}

@media (max-width: 560px) {
  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    column-gap: 10px;
    row-gap: 12px;
  }
  .social { margin-left: 0; }
  .hero-hint { font-size: 10px; letter-spacing: .18em; }
  .hero-dots button { width: 14px; }
  .section-head { margin-top: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .masonry figure { opacity: 1; transform: none; }
}
