/* ============================================================
   Frank F. Ros — site styles
   Theme tokens first; everything else reads from them.
   ============================================================ */
:root {
  --bg: #09090a;
  --bg-2: #0f0f11;
  --surface: #131315;
  --surface-2: #19191c;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #ecebe8;
  --muted: #8d8b87;
  --dim: #5c5b58;
  --gold: #f4b25c;
  --gold-hi: #ffd59a;
  --gold-glow: rgba(244, 178, 92, 0.16);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1360px;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: #120c04; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* Film grain + warm ambient wash */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.ambient {
  position: fixed; top: -30vh; right: -20vw; width: 90vw; height: 90vh; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, var(--gold-glow), transparent 70%);
  filter: blur(40px);
  transition: opacity 1.2s var(--ease);
}

/* Top scrim: content fades out under the floating nav */
.scrim {
  position: fixed; top: 0; left: 0; right: 0; height: 140px; z-index: 40; pointer-events: none;
  background: linear-gradient(var(--bg) 0%, rgba(9, 9, 10, 0.86) 38%, rgba(9, 9, 10, 0) 100%);
  opacity: 0; transition: opacity 0.6s var(--ease);
}
.scrolled .scrim { opacity: 1; }

/* ---------- Brand + floating nav ---------- */
.brand {
  position: fixed; top: 22px; left: var(--gutter); z-index: 60;
  display: flex; align-items: center; gap: 10px;
  font: 500 14px/1 var(--sans); letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font: italic 400 17px/1 var(--serif);
  color: #160e04;
  background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 60%, #b9772c);
  box-shadow: 0 0 22px rgba(244, 178, 92, 0.45);
}
.brand-name { opacity: 0.9; transition: opacity 0.5s var(--ease); }

.nav {
  position: fixed; top: 16px; left: 50%; z-index: 60;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 5px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.55);
  border: 1px solid var(--line-2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  animation: nav-in 1.1s var(--ease) 0.2s both;
}
@keyframes nav-in { from { opacity: 0; transform: translate(-50%, -18px); } }
.nav a {
  position: relative; z-index: 1;
  padding: 9px 16px; border-radius: 999px;
  font: 500 13.5px/1 var(--sans); letter-spacing: -0.005em;
  color: var(--muted);
  transition: color 0.35s var(--ease);
  white-space: nowrap;
}
.nav a:hover { color: var(--text); }
.nav a.is-active { color: #1a1206; }
.nav-pill {
  position: absolute; top: 5px; left: 0; height: calc(100% - 10px); width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  box-shadow: 0 0 24px rgba(244, 178, 92, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.6s var(--ease), width 0.6s var(--ease), opacity 0.4s;
  opacity: 0;
}

/* ---------- Layout ---------- */
main { position: relative; z-index: 1; }
.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
section { position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 400 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.display {
  font: 400 clamp(44px, 7.2vw, 112px)/0.95 var(--serif);
  letter-spacing: -0.025em;
}
.display em, .h2 em { font-style: italic; color: var(--gold-hi); }
.h2 { font: 400 clamp(40px, 5.6vw, 84px)/1 var(--serif); letter-spacing: -0.02em; }
.lede { color: var(--muted); font-size: clamp(16px, 1.25vw, 18px); max-width: 46ch; }

.section-head {
  display: grid; grid-template-columns: 1fr; gap: 22px;
  padding-top: clamp(110px, 16vw, 200px); margin-bottom: clamp(40px, 5vw, 72px);
  max-width: 820px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 140px 0 40px;
}
.hero .display { max-width: 13ch; margin: 26px 0 28px; }
.hero .display .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero .display .line > span { display: inline-block; animation: rise 1.3s var(--ease) both; }
.hero .display .line:nth-child(2) > span { animation-delay: 0.08s; }
.hero .display .line:nth-child(3) > span { animation-delay: 0.16s; }
@keyframes rise { from { transform: translateY(105%); } }
.hero .fade-in { animation: fade-up 1.2s var(--ease) 0.45s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font: 500 14.5px/1 var(--sans);
  border: 1px solid var(--line-2);
  transition: transform 0.5s var(--ease), background 0.4s, border-color 0.4s, box-shadow 0.5s;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.25); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1206; border-color: transparent;
  box-shadow: 0 8px 30px rgba(244, 178, 92, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn-gold:hover { box-shadow: 0 12px 44px rgba(244, 178, 92, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.btn .arrow { transition: transform 0.5s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.index {
  margin-top: clamp(56px, 9vh, 110px);
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.index a {
  display: grid; gap: 10px; padding: 22px 24px 4px 0;
  transition: color 0.4s;
}
.index a + a { padding-left: 24px; border-left: 1px solid var(--line); }
.index .n { font: 400 12px/1 var(--mono); color: var(--gold); letter-spacing: 0.1em; }
.index .t { font: 400 30px/1 var(--serif); }
.index .d { color: var(--muted); font-size: 14px; }
.index a:hover .t { color: var(--gold-hi); }

.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 44px;
  display: flex; align-items: center; gap: 12px;
  font: 400 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim);
  writing-mode: vertical-rl;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 56px;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.2s var(--ease-io) infinite;
  transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Photos ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip {
  height: 36px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted);
  font: 500 13px/1 var(--sans);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.chip sup { font: 400 10.5px/1 var(--mono); color: var(--dim); }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.24); }
.chip.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.is-on sup { color: #6b6a66; }

/* Justified rows: every row fills the width exactly; photos keep their shape (rows built in site.js) */
.place-head {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  overflow: hidden; max-height: 0; opacity: 0; margin-bottom: 0;
  transition: max-height 0.7s var(--ease), opacity 0.6s var(--ease), margin 0.7s var(--ease);
}
.place-head.on { max-height: 160px; opacity: 1; margin-bottom: 28px; }
.place-head h3 { font: 400 clamp(44px, 6vw, 88px)/1 var(--serif); letter-spacing: -0.02em; }
.place-head span { font: 400 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.place-head.on h3 { animation: rise 0.9s var(--ease) both; }

.masonry { display: grid; gap: 10px; transition: opacity 0.25s var(--ease); }
.masonry.out { opacity: 0; }
.row { display: flex; gap: 10px; }
.shot {
  position: relative; display: block; flex: 1 1 0; min-width: 0; height: 100%;
  border-radius: 8px; overflow: hidden; background: var(--surface);
  cursor: zoom-in;
}
.shot.enter { animation: shot-in 0.8s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes shot-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.shot img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), filter 0.8s var(--ease), opacity 0.9s var(--ease);
  opacity: 0;
}
.shot img.loaded { opacity: 1; }
.shot:hover img { transform: scale(1.035); filter: brightness(0.82); }
.shot figcaption {
  position: absolute; left: 14px; bottom: 12px;
  font: 400 11.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; opacity: 0; transform: translateY(6px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.shot:hover figcaption { opacity: 1; transform: none; }

/* Lightbox */
.lb {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(6, 6, 7, 0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.lb.open { opacity: 1; visibility: visible; }
.lb img {
  max-width: min(92vw, 1800px); max-height: 82vh; border-radius: 6px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  transform: scale(0.97); transition: transform 0.6s var(--ease), opacity 0.35s;
}
.lb.open img { transform: none; }
.lb img.swap { opacity: 0; }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: 26px;
  display: flex; justify-content: center; gap: 18px; align-items: center;
  font: 400 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.lb-btn {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); background: rgba(20, 20, 22, 0.6);
  transition: background 0.3s, border-color 0.3s;
}
.lb-btn:hover { background: rgba(40, 40, 44, 0.8); border-color: rgba(255, 255, 255, 0.3); }
.lb-prev { left: 24px; } .lb-next { right: 24px; }
.lb-close { top: 26px; right: 24px; translate: none; width: 44px; height: 44px; }

/* ---------- Play ---------- */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; grid-column: span 2;
  display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  isolation: isolate;
  transition: transform 0.7s var(--ease), border-color 0.5s;
}
.card.wide { grid-column: span 3; }
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(244, 178, 92, 0.13), transparent 45%);
  opacity: 0; transition: opacity 0.5s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(244, 178, 92, 0.32); }
.card:hover::before { opacity: 1; }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), filter 0.8s; filter: saturate(0.92); }
.card:hover .card-media img { transform: scale(1.05); filter: saturate(1.05); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(19, 19, 21, 0.9)); }
.card-body { display: grid; gap: 10px; padding: 20px 22px 22px; flex: 1; align-content: start; }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card h3 { font: 400 32px/1 var(--serif); letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  font: 400 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted);
}
.tag.gold { color: var(--gold); border-color: rgba(244, 178, 92, 0.35); }
.go {
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  transition: background 0.4s, color 0.4s, transform 0.6s var(--ease), border-color 0.4s;
}
.card:hover .go { background: var(--gold); color: #1a1206; border-color: var(--gold); transform: rotate(-45deg); }

/* ---------- About + contact ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: end; padding-bottom: 40px; }
.about .h2 { font-size: clamp(40px, 5vw, 76px); }
.about p { color: var(--muted); font-size: 17px; margin-bottom: 18px; }
.about p strong { color: var(--text); font-weight: 500; }

.contact {
  margin-top: clamp(100px, 14vw, 180px);
  padding: clamp(40px, 6vw, 88px) 0 40px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact .h2 { margin: 22px auto 34px; max-width: 14ch; }
.mail {
  display: inline-flex; align-items: center; gap: 14px;
  font: 400 clamp(26px, 4vw, 56px)/1 var(--serif); font-style: italic;
  color: var(--gold-hi);
  border-bottom: 1px solid rgba(244, 178, 92, 0.35);
  padding-bottom: 8px;
  transition: border-color 0.4s, text-shadow 0.6s;
}
.mail:hover { border-color: var(--gold); text-shadow: 0 0 30px rgba(244, 178, 92, 0.45); }
.copy {
  margin-top: 20px; display: inline-flex; gap: 8px; align-items: center;
  font: 400 11.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim);
  transition: color 0.3s;
}
.copy:hover { color: var(--text); }

footer {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 36px 0 44px;
  font: 400 11.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card, .card.wide { grid-column: span 1; }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 24px; }
  .brand-name { display: none; }
  .nav { top: auto; bottom: 14px; animation-name: nav-in-b; max-width: calc(100vw - 24px); }
  @keyframes nav-in-b { from { opacity: 0; transform: translate(-50%, 18px); } }
  .nav a { padding: 10px 12px; font-size: 13px; }
  .nav a[href="#top"] { display: none; }
  .hero { padding-top: 110px; }
  .index { grid-template-columns: 1fr; }
  .index a + a { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .index a { padding: 18px 0; }
  .scroll-cue { display: none; }
  .cards { grid-template-columns: 1fr; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .masonry, .row { gap: 6px; }
  .shot { border-radius: 5px; }
  .shot figcaption { display: none; }
  .lb-btn.lb-prev, .lb-btn.lb-next { display: none; }
  footer { padding-bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
