/* Matheus Charone — cinematic portfolio
   Mobile-first. One stylesheet for every page. */

:root {
  --bg: #050505;
  --bg-2: #0c0c0c;
  --fg: #f3f3f1;
  --muted: rgba(243, 243, 241, 0.62);
  --faint: rgba(243, 243, 241, 0.38);
  --line: rgba(243, 243, 241, 0.14);
  --gutter: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter Tight", "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --micro: 0.6875rem;        /* 11px — nav, labels */
  --micro-track: 0.16em;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--fg); color: var(--bg); }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }
.skip-link {
  position: absolute; left: var(--gutter); top: 12px; z-index: 200;
  padding: 10px 14px; background: var(--fg); color: var(--bg);
  font-size: var(--micro); letter-spacing: var(--micro-track); text-transform: uppercase;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Shared micro type: nav, indexes, links */
.micro {
  font-size: var(--micro);
  font-weight: 500;
  letter-spacing: var(--micro-track);
  text-transform: uppercase;
  line-height: 1;
}
.arrow-link { display: inline-flex; align-items: center; gap: 0.55em; }
.arrow-link svg { width: 0.8em; height: 0.8em; flex: none; transition: transform 0.4s var(--ease); }
.arrow-link:hover svg, .band:hover .arrow-link svg, .band:focus-visible .arrow-link svg { transform: translate(2px, -2px); }

/* ── HEADER ───────────────────────────────────────────── */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) calc(var(--gutter) + env(safe-area-inset-right)) 14px calc(var(--gutter) + env(safe-area-inset-left));
}
.brand {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 12px 0; /* tap target */
}
.nav { display: none; }
.nav a { padding: 12px 0; color: var(--fg); opacity: 0.86; transition: opacity 0.3s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.menu-toggle {
  width: 44px; height: 44px; margin-right: -12px;
  display: grid; place-items: center;
}
.menu-toggle .bars { display: block; width: 20px; height: 1px; background: var(--fg); box-shadow: 0 -6px 0 var(--fg), 0 6px 0 var(--fg); }

.menu {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 5, 5, 0.97);
  display: flex; flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) calc(28px + env(safe-area-inset-bottom));
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu-top { display: flex; align-items: center; justify-content: space-between; }
.menu-close { width: 44px; height: 44px; margin-right: -12px; display: grid; place-items: center; }
.menu-close svg { width: 18px; height: 18px; }
.menu-links { margin-top: auto; display: grid; gap: 4px; }
.menu-links a {
  display: block; padding: 6px 0;
  font-size: clamp(2.25rem, 11vw, 3.25rem); font-weight: 600; letter-spacing: -0.01em; text-transform: uppercase; line-height: 1.05;
}
.menu-meta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 18px 28px; color: var(--muted); }
.menu-meta a { padding: 10px 0; }

/* ── HERO ─────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  height: min(100svh, 75vw);
  min-height: 260px;
  background: #000;
}
@supports not (height: 100svh) { .hero { height: min(100vh, 75vw); } }
.hero-media, .hero-media img, .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
}
.hero-video { opacity: 0; transition: opacity 1.2s var(--ease); }
.hero.is-playing .hero-video { opacity: 1; }
.hero::after { /* legibility only: soft top & bottom falloff, no solid bar */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 26%),
    linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 30%),
    rgba(0,0,0,0.12);
}
.hero-foot {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; align-items: flex-end;
  padding: 0 var(--gutter) calc(14px + env(safe-area-inset-bottom));
}
.scroll-cue { padding: 12px 8px; font-size: 0.5625rem; letter-spacing: 0.22em; opacity: 0.92; }
.reel-toggle {
  position: absolute; right: calc(var(--gutter) - 14px); bottom: calc(6px + env(safe-area-inset-bottom));
  width: 44px; height: 44px; display: grid; place-items: center; opacity: 0.55;
  transition: opacity 0.3s var(--ease);
}
.reel-toggle svg { width: 10px; height: 10px; }
.reel-toggle:hover, .reel-toggle:focus-visible { opacity: 1; }
.reel-toggle[hidden] { display: none; }

/* ── WORK BANDS ───────────────────────────────────────── */
.work { border-top: 1px solid var(--line); }
.band {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  min-height: max(172px, 45vw);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.band-media {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease), filter 0.8s var(--ease);
  filter: brightness(0.78) saturate(0.9);
}
.band::before { /* darkens the text side so titles stay readable over any frame */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(5,5,5,0.88) 0%, rgba(5,5,5,0.55) 42%, rgba(5,5,5,0.08) 78%);
}
.band:hover .band-media, .band:focus-visible .band-media { transform: scale(1.03); filter: brightness(0.92) saturate(1); }
.band:focus-visible { outline-offset: -6px; }
.band-inner {
  position: relative; min-height: inherit;
  display: flex; flex-direction: column; justify-content: center;
  padding: 26px var(--gutter);
}
.index {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.5625rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.index::after { content: ""; width: 30px; height: 1px; background: currentColor; opacity: 0.7; }
.band-title {
  margin: 10px 0 12px;
  font-size: clamp(1.875rem, 8.4vw, 2.75rem); font-weight: 700; line-height: 0.95;
  letter-spacing: -0.012em; text-transform: uppercase;
  max-width: 9.5em;
}
.band .arrow-link { font-size: 0.5625rem; letter-spacing: 0.18em; }

/* Per-frame crops (keep faces/action inside the letterbox) */
.band--sports .band-media { object-position: 50% 32%; }
.band--church .band-media { object-position: 50% 12%; }
.band--events .band-media { object-position: 50% 60%; }

/* ── ABOUT / CLOSING ──────────────────────────────────── */
.closing { border-bottom: 1px solid var(--line); }
.closing-text { padding: 34px var(--gutter) 30px; }
.quote {
  margin-top: 14px;
  font-size: clamp(1.25rem, 5.4vw, 1.625rem); font-weight: 400; line-height: 1.17; letter-spacing: -0.018em;
}
.quote br { display: none; }
@media (min-width: 380px) { .quote br { display: inline; } }
.closing .arrow-link { margin-top: 20px; font-size: 0.5625rem; letter-spacing: 0.18em; padding: 10px 0; }
.closing-photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #111; }
.closing-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

/* ── FOOTER ───────────────────────────────────────────── */
.site-footer {
  padding: 26px calc(var(--gutter) + env(safe-area-inset-right)) calc(26px + env(safe-area-inset-bottom)) calc(var(--gutter) + env(safe-area-inset-left));
  display: grid; grid-template-columns: 1fr auto; gap: 18px 16px; align-items: center;
}
.footer-brand { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-social { grid-row: 1; grid-column: 2; display: flex; gap: 6px; margin-right: -10px; }
.footer-social a { width: 40px; height: 40px; display: grid; place-items: center; opacity: 0.86; transition: opacity 0.3s var(--ease); }
.footer-social a:hover { opacity: 1; }
.footer-social svg { width: 16px; height: 16px; }
.footer-nav { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 26px; font-size: 0.5625rem; color: var(--muted); }
.footer-nav a { padding: 13px 0; transition: color 0.3s var(--ease); }
.footer-nav a:hover { color: var(--fg); }
.footer-meta {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px;
  font-size: 0.5625rem; color: var(--faint);
}
.footer-meta a { color: var(--muted); padding: 10px 0; text-transform: none; letter-spacing: 0.04em; font-size: 0.6875rem; }
@media (max-width: 767px) {
  .footer-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer-meta a { order: -1; }
}
.footer-meta a:hover { color: var(--fg); }

/* ── WORK DETAIL PAGES ────────────────────────────────── */
.page { padding-top: calc(78px + env(safe-area-inset-top)); }
.page-head { padding: 22px var(--gutter) 22px; display: grid; gap: 14px; }
.page-head-top { display: flex; justify-content: space-between; align-items: center; }
.back { color: var(--muted); padding: 10px 0; transition: color 0.3s var(--ease); }
.back:hover { color: var(--fg); }
.back:hover svg { transform: translateX(-2px); }
.page-title {
  font-size: clamp(2.5rem, 12vw, 3.5rem); font-weight: 700; line-height: 0.92;
  letter-spacing: -0.015em; text-transform: uppercase;
}
.page-blurb { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; max-width: 34em; }
.page-count { color: var(--faint); }

.stage { display: grid; gap: 0; border-top: 1px solid var(--line); }
.player-col { position: sticky; top: 0; z-index: 5; background: var(--bg); }
.player {
  position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden;
}
.player > iframe, .player > div:not(.player-msg) { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-msg {
  position: absolute; inset: 0; z-index: 2; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center; background: #000; color: var(--muted); font-size: 0.875rem;
}
.player-msg.is-shown { display: flex; }
.player-msg a { color: var(--fg); }
.now {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px;
  padding: 14px var(--gutter); border-bottom: 1px solid var(--line);
}
.now-title { font-size: 0.9375rem; font-weight: 500; }
.now-title .micro { color: var(--faint); margin-right: 10px; font-size: 0.5625rem; }
.now-links { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--muted); font-size: 0.5625rem; }
.now-links a { padding: 12px 0; transition: color 0.3s var(--ease); }
.now-links a:hover { color: var(--fg); }

.list-col { position: relative; }
.films { counter-reset: film; }
.film {
  width: 100%; display: grid; grid-template-columns: 22px 112px 1fr; gap: 14px; align-items: center;
  padding: 12px var(--gutter); text-align: left;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}
.film:hover { background: rgba(255,255,255,0.035); }
.film-num { font-size: 0.625rem; letter-spacing: 0.08em; color: var(--faint); font-variant-numeric: tabular-nums; }
.film-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #151515; }
.film-thumb img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.82); transition: filter 0.4s var(--ease); }
.film:hover .film-thumb img, .film[aria-current="true"] .film-thumb img { filter: none; }
.film-text { min-width: 0; display: grid; gap: 6px; }
.film-title { font-size: 0.875rem; font-weight: 500; line-height: 1.25; color: var(--muted); transition: color 0.3s var(--ease); }
.film:hover .film-title, .film[aria-current="true"] .film-title { color: var(--fg); }
.film-time { font-size: 0.625rem; letter-spacing: 0.08em; color: var(--faint); font-variant-numeric: tabular-nums; }
.film[aria-current="true"] .film-num { color: var(--fg); }
.film-state { display: none; font-size: 0.5625rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg); }
.film[aria-current="true"] .film-state { display: inline; }
.film[aria-current="true"] .film-time { display: none; }

.delivery { padding: 22px var(--gutter) 24px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.delivery[hidden] { display: none; }
.delivery-label { color: var(--faint); font-size: 0.5625rem; }
.delivery-time { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.012em; line-height: 1.1; }
.delivery-note { color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
/* Phones/tablets: shown under the title (the pinned player would cover it at the list end) */
.delivery--side { display: none; }
.delivery--head { padding: 4px 0 0; border: 0; gap: 6px; }
.delivery--head .delivery-time { font-size: 1.0625rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.delivery--head .delivery-note { font-size: 0.875rem; font-weight: 400; letter-spacing: 0; }

.more { margin-top: 56px; border-top: 1px solid var(--line); }
.more-label { padding: 18px var(--gutter) 14px; color: var(--faint); }
.more .band { min-height: max(140px, 34vw); }
.more .band-title { font-size: clamp(1.5rem, 6.6vw, 2.25rem); margin-bottom: 10px; }

/* ── ABOUT PAGE ───────────────────────────────────────── */
.about-page .page-head { padding-bottom: 34px; }
.about-grid { display: grid; gap: 36px; padding: 0 var(--gutter); }
.about-photo img { width: 100%; height: auto; }
.about-photo figcaption { margin-top: 10px; color: var(--faint); font-size: 0.5625rem; }
.bio p { font-size: 1.0625rem; line-height: 1.6; color: rgba(243,243,241,0.84); max-width: 36em; }
.bio p + p { margin-top: 1.1em; }
.facts { margin-top: 36px; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.facts dt { color: var(--faint); font-size: 0.5625rem; padding-top: 0.45em; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts a { border-bottom: 1px solid var(--line); transition: border-color 0.3s var(--ease); }
.facts a:hover { border-color: var(--fg); }
.voices { margin-top: 72px; border-top: 1px solid var(--line); padding: 0 var(--gutter); }
.voices-label { padding: 18px 0 8px; color: var(--faint); }
.voice { padding: 26px 0; border-bottom: 1px solid var(--line); display: grid; gap: 14px; }
.voice blockquote p { font-size: clamp(1.0625rem, 4.6vw, 1.375rem); line-height: 1.35; letter-spacing: -0.01em; max-width: 34em; }
.voice figcaption { color: var(--muted); font-size: 0.5625rem; }
.not-found { min-height: 80svh; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 120px var(--gutter) 60px; }

/* ── ≥ 768: DESKTOP COMPOSITION ───────────────────────── */
@media (min-width: 768px) {
  :root { --gutter: clamp(28px, 3.4vw, 64px); }
  .site-header { padding-top: calc(22px + env(safe-area-inset-top)); padding-bottom: 22px; }
  .brand { font-size: 0.875rem; }
  .nav { display: flex; gap: clamp(28px, 3.4vw, 56px); }
  .menu-toggle, .menu { display: none; }

  .hero-foot { padding-bottom: 26px; }
  .scroll-cue { font-size: 0.625rem; }
  .reel-toggle { bottom: 14px; }

  .band { min-height: clamp(300px, 33.33vw, 640px); }
  .band-inner { padding: 40px var(--gutter); }
  .index { font-size: 0.625rem; }
  .index::after { width: 40px; }
  .band-title { margin: 14px 0 22px; font-size: clamp(3rem, 5.6vw, 6.5rem); max-width: none; }
  .band .arrow-link { font-size: 0.6875rem; }

  .closing { display: grid; grid-template-columns: 45fr 55fr; min-height: clamp(360px, 36vw, 700px); }
  .closing-text { display: flex; flex-direction: column; justify-content: center; padding: 48px var(--gutter); }
  .quote { margin-top: 20px; font-size: clamp(1.75rem, 2.6vw, 3rem); line-height: 1.12; }
  .closing .arrow-link { margin-top: 28px; font-size: 0.6875rem; }
  .closing-photo { aspect-ratio: auto; height: 100%; }
  .closing-photo img {
    position: absolute; inset: 0; object-position: 50% 24%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.6) 16%, #000 36%);
            mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.6) 16%, #000 36%);
  }

  .site-footer { grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px 40px; padding-top: 34px; padding-bottom: 34px; }
  .footer-brand { display: flex; align-items: center; gap: 22px; font-size: 0.8125rem; }
  .footer-brand::after { content: ""; flex: 1; max-width: 420px; height: 1px; background: var(--line); }
  .footer-nav { grid-column: 2; grid-row: 1; font-size: 0.625rem; gap: clamp(24px, 3vw, 48px); }
  .footer-social { grid-column: 3; grid-row: 1; }
  .footer-meta { font-size: 0.625rem; align-items: baseline; }

  .page { padding-top: 104px; }
  .page-head { padding-top: 34px; padding-bottom: 34px; grid-template-columns: 1fr auto; align-items: end; }
  .page-head-top { grid-column: 1 / -1; }
  .page-title { font-size: clamp(4rem, 8.4vw, 8.5rem); }
  .page-side { display: grid; gap: 12px; justify-items: end; text-align: right; }
  .page-blurb { font-size: 0.9375rem; max-width: 26em; }
  .delivery--head { grid-column: 1 / -1; }

  .film { grid-template-columns: 26px 132px 1fr; }
  .more { margin-top: 96px; }
  .more-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .more .band { min-height: clamp(220px, 20vw, 380px); border-bottom: 0; }
  .more .band + .band { border-left: 1px solid var(--line); }
  .more .band-title { font-size: clamp(2rem, 3.4vw, 3.75rem); }

  .about-grid { grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 120px); align-items: start; }
  .about-photo { position: sticky; top: 32px; }
  .voices { margin-top: 120px; }
  .voices-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(28px, 3vw, 56px); }
}

@media (min-width: 1024px) {
  /* Spotify-like: player left, selector right, same height */
  .stage { grid-template-columns: minmax(0, 7fr) minmax(320px, 3fr); }
  .player-col { position: relative; border-right: 1px solid var(--line); }
  .list-col { overflow: hidden; }
  .list-inner { position: absolute; inset: 0; display: flex; flex-direction: column; }
  .delivery--head { display: none; }
  .delivery--side:not([hidden]) { display: grid; }
  .delivery { flex: none; margin-top: auto; padding: 26px 24px 28px; border-top: 1px solid var(--line); border-bottom: 0; }
  .delivery-time { font-size: clamp(1.375rem, 1.9vw, 2rem); }
  .films { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) transparent; }
  .film { padding-left: 24px; padding-right: 24px; }
}

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