/* ============================================================
   Follow Philou — re-model
   Dark, photo-first design with soft, classy motion.
   ============================================================ */

:root {
  --bg: #0e0e10;
  --bg-raise: #16161a;
  --text: #ece8e1;
  --text-muted: #a29c91;
  --accent: #d4a24e;
  --accent-soft: rgba(212, 162, 78, 0.16);
  --line: rgba(236, 232, 225, 0.12);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #141210; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 clamp(1rem, 4vw, 3rem);
  transition: background 0.45s ease, box-shadow 0.45s ease, height 0.45s ease;
}

.site-header.scrolled {
  height: 58px;
  background: rgba(14, 14, 16, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.9;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.site-nav { display: flex; gap: 1.6rem; }

.nav-link {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}

.nav-link:hover { opacity: 1; }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.lang-sep { color: var(--text-muted); }

.lang-btn {
  background: none;
  border: 0;
  padding: 0.3rem 0.45rem;
  color: var(--text-muted);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  border-radius: 3px;
  transition: color 0.3s ease, background 0.3s ease;
}

.lang-btn:hover { color: var(--text); }
.lang-btn.is-active { color: var(--accent); background: var(--accent-soft); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: -12% 0 0 0;   /* bleed for parallax travel */
  z-index: -2;
  will-change: transform;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: ken-burns 26s var(--ease-out) infinite alternate;
}

@keyframes ken-burns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(14,14,16,0.45) 0%, rgba(14,14,16,0.15) 35%, rgba(14,14,16,0.55) 78%, var(--bg) 100%);
}

.hero-content {
  text-align: center;
  padding: 0 1.5rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}

.hero-kicker {
  margin: 0 0 1.1rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(236, 232, 225, 0.85);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 9vw, 6.5rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.hero-tagline {
  margin: 1.2rem auto 2.2rem;
  max-width: 34rem;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: rgba(236, 232, 225, 0.88);
}

.hero-cta {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  border: 1px solid rgba(236, 232, 225, 0.55);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.4s var(--ease-out);
}

.hero-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #141210;
  transform: translateY(-2px);
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem;
}

.scroll-cue-line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--text));
  overflow: hidden;
  position: relative;
}

.scroll-cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  animation: cue-drop 2.2s var(--ease-out) infinite;
}

@keyframes cue-drop {
  0%   { transform: translateY(-100%); }
  55%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* Hero entrance choreography */
.hero .reveal {
  opacity: 0;
  transform: translateY(26px);
  animation: hero-in 1.2s var(--ease-out) forwards;
}
.hero .reveal:nth-child(1) { animation-delay: 0.15s; }
.hero .reveal:nth-child(2) { animation-delay: 0.35s; }
.hero .reveal:nth-child(3) { animation-delay: 0.55s; }
.hero .reveal:nth-child(4) { animation-delay: 0.75s; }

@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(4.5rem, 10vw, 8rem) 0; }

.section-inner {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.section-inner.narrow { width: min(760px, 92vw); }

.section-title {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.15;
}

.section-sub {
  margin: -0.6rem 0 2.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Scroll reveal (JS adds .is-visible) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Intro ---------- */

.intro { background: var(--bg); }

.intro-text {
  margin: 0;
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  color: rgba(236, 232, 225, 0.86);
}

.intro-text::first-letter {
  font-family: var(--font-display);
  font-size: 1.35em;
  color: var(--accent);
}

/* ---------- Gallery ---------- */

.gallery-section { background: var(--bg-raise); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2.4rem;
}

.chip {
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease-out);
}

.chip:hover { color: var(--text); border-color: rgba(236, 232, 225, 0.4); transform: translateY(-1px); }

.chip.is-active {
  color: #141210;
  background: var(--accent);
  border-color: var(--accent);
}

.masonry {
  columns: 3;
  column-gap: 1.1rem;
}

@media (max-width: 900px) { .masonry { columns: 2; } }
@media (max-width: 560px) { .masonry { columns: 1; } }

.tile {
  position: relative;
  margin: 0 0 1.1rem;
  break-inside: avoid;
  overflow: hidden;
  border-radius: 6px;
  cursor: zoom-in;
  background: #1c1c21;
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.tile.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tile img {
  width: 100%;
  height: auto;
  transition: transform 0.9s var(--ease-out), filter 0.9s ease;
}

.tile:hover img,
.tile:focus-visible img {
  transform: scale(1.045);
  filter: brightness(1.05);
}

.tile-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.2rem 1rem 0.85rem;
  background: linear-gradient(to top, rgba(10, 10, 12, 0.82), transparent);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(236, 232, 225, 0.95);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s var(--ease-out);
  pointer-events: none;
}

.tile-caption .tile-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-muted);
}

.tile:hover .tile-caption,
.tile:focus-visible .tile-caption {
  opacity: 1;
  transform: translateY(0);
}

.gallery-sentinel {
  display: grid;
  place-items: center;
  min-height: 90px;
}

.loader {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loader.is-loading { opacity: 1; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- About ---------- */

.about { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-media {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.about-media img {
  width: 100%;
  height: 100%;
  max-height: 640px;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.about-media:hover img { transform: scale(1.03); }

.about-text {
  margin: 0 0 1.6rem;
  color: rgba(236, 232, 225, 0.86);
}

.about-sign {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--accent);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.6rem 1.5rem 2.2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.site-footer p { margin: 0.2rem 0; }
.footer-note { opacity: 0.65; font-size: 0.76rem; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox-stage {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 92vw;
  text-align: center;
  pointer-events: none;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.85);
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out);
}

.lightbox-img.is-swapping {
  opacity: 0;
  transform: scale(0.985);
}

.lightbox-caption {
  margin-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 232, 225, 0.85);
}

.lightbox-counter {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.lightbox-btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(236, 232, 225, 0.22);
  border-radius: 50%;
  background: rgba(20, 20, 24, 0.45);
  color: var(--text);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.lightbox-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #141210;
}

.lightbox-close { top: 1.3rem; right: 1.3rem; width: 44px; height: 44px; }
.lightbox-prev  { left: 1.3rem;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.3rem; top: 50%; transform: translateY(-50%); }

.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

@media (max-width: 640px) {
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-btn { width: 44px; height: 44px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .hero .reveal, .reveal, .tile { opacity: 1; transform: none; }
  .hero-bg img { animation: none; }
}
