/* ═══════════════════════════════════════════════════════════════════
   JOÃO FRÖHLICH — Director of Photography
   style.css
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg:          #080808;
  --bg-section:  #0d0d0d;
  --text:        #e0e0e0;
  --text-muted:  #666666;
  --accent:      #F0C040;
  --accent-dim:  rgba(240, 192, 64, 0.08);
  --card-bg:     #111111;
  --nav-height:  72px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── NAV ─────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: var(--nav-height);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

#nav.scrolled {
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  transition: opacity 0.2s;
  white-space: nowrap;
}
.nav-logo:hover { opacity: 0.75; }

.nav-links { display: flex; gap: 40px; }

.nav-link {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(224,224,224,0.7);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.25s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile Menu ─────────────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(8,8,8,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }

.mobile-link {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s;
}
.mobile-link:hover { color: var(--accent); }

/* ── HERO ────────────────────────────────────────────────────────── */
#hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #0e1520;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(8,8,8,0.85) 0%,
    rgba(8,8,8,0.3)  50%,
    rgba(8,8,8,0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 48px 80px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 10rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--accent);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-name-line {
  display: block;
  opacity: 0;
  transform: translateY(100%);
  animation: slideUp 0.9s var(--ease-out) forwards;
}
.hero-name-line:nth-child(2) { animation-delay: 0.12s; }

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(224,224,224,0.55);
  margin-top: 20px;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 0.5s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

.hero-scroll {
  position: absolute;
  bottom: 40px; right: 48px;
  z-index: 2;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 1s forwards;
}

.hero-scroll-line {
  width: 48px; height: 1px;
  background: var(--accent);
  transform-origin: left;
  animation: expandLine 1.2s var(--ease-out) 1.2s both;
}

@keyframes expandLine {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

.hero-arrow {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.4);
  opacity: 0;
  animation: fadeIn 1s var(--ease) 1.5s forwards;
  transition: color 0.2s;
}
.hero-arrow:hover { color: var(--accent); }
.hero-arrow svg { width: 28px; height: 28px; animation: bounce 2s ease-in-out 2.5s infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ── WORK SECTION ────────────────────────────────────────────────── */
#work {
  padding: 100px 48px 80px;
  background: var(--bg);
}

.filter-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 20px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.filter-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.filter-btn.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }

.section-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 56px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

/* ── Grid ────────────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

/* ── Card ────────────────────────────────────────────────────────── */
.project-card {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
  background: var(--card-bg);
  outline: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.project-card-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
  filter: brightness(0.75) saturate(0.9);
}
.project-card-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0f1520 0%, #1a2030 50%, #0a0f18 100%);
  transition: transform 0.7s var(--ease);
}
.project-card:hover .project-card-thumb { transform: scale(1.04); filter: brightness(0.55) saturate(0.7); }
.project-card:hover .project-card-thumb-placeholder { transform: scale(1.04); }

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,0.9) 0%, rgba(8,8,8,0.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.project-card:hover .project-card-overlay { opacity: 1; transform: translateY(0); }

.project-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}
.project-card-client {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(240,192,64,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  pointer-events: none;
}
.project-card-play svg { width: 16px; height: 16px; fill: var(--accent); margin-left: 3px; }
.project-card:hover .project-card-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.project-card-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(240,192,64,0.15);
  border: 1px solid rgba(240,192,64,0.4);
  color: var(--accent);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.project-card:hover .project-card-badge { opacity: 1; }

/* ── ABOUT ───────────────────────────────────────────────────────── */
#about {
  padding: 120px 48px;
  background: var(--bg);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  max-width: 1100px;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: brightness(0.9) saturate(0.85);
}

.about-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #0f1520 0%, #1c2535 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.12);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.about-text { padding-top: 8px; }
.about-text .section-title { margin-bottom: 32px; color: var(--accent); }

.about-bio {
  color: rgba(224,224,224,0.7);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 20px;
}
.about-bio em { font-style: italic; color: rgba(224,224,224,0.5); }

/* ── CONTACT ─────────────────────────────────────────────────────── */
#contact {
  padding: 120px 48px 100px;
  background: var(--bg-section);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-photo-wrap {
  width: 100%;
}

.contact-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: brightness(0.9) saturate(0.85);
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 52px;
}
.contact-heading span { color: var(--accent); }

.contact-email {
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text);
  border-bottom: 1px solid rgba(240,192,64,0.3);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: 40px;
}
.contact-email:hover { color: var(--accent); border-color: var(--accent); }

.contact-whatsapp {
  display: block;
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(240,192,64,0.6);
  margin-top: -28px;
  margin-bottom: 40px;
  transition: color 0.2s;
}
.contact-whatsapp:hover { color: var(--accent); }

.contact-social { display: flex; gap: 32px; margin-bottom: 32px; }

.social-link {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.social-link:hover { color: var(--accent); }

.contact-location {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.18);
}

/* ── MODAL ───────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
  cursor: pointer;
}

.modal-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
  animation: modalIn 0.4s var(--ease-out) both;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.modal-content::-webkit-scrollbar { width: 4px; }
.modal-content::-webkit-scrollbar-thumb { background: #333; }

.modal-credits {
  padding: 20px 0 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 16px;
}
.credit-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.credit-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.credit-value {
  font-size: 0.88rem;
  color: var(--text);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  background: rgba(8,8,8,0.95);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.modal-close {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(224,224,224,0.7);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.modal-close:hover { color: var(--accent); border-color: var(--accent); }

.modal-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
}
.modal-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.modal-video-wrap iframe[hidden] { display: none; }

/* ── Multi-spot Selector ─────────────────────────────────────────── */
.modal-selector { width: 100%; max-width: 900px; padding: 8px 0 16px; }
.modal-selector[hidden] { display: none; }

.selector-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.selector-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.selector-item {
  background: none;
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: border-color 0.2s;
  outline: none;
}
.selector-item:hover, .selector-item:focus-visible, .selector-item.active { border-color: var(--accent); }
.selector-item.active .selector-label { color: var(--accent); }

.selector-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #111;
}
.selector-thumb-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.3s;
  filter: brightness(0.7);
}
.selector-item:hover .selector-thumb-wrap img { transform: scale(1.05); filter: brightness(0.5); }

.selector-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}
.selector-play svg { width: 36px; height: 36px; fill: var(--accent); }
.selector-item:hover .selector-play { opacity: 1; }

.selector-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(224,224,224,0.6);
  padding: 10px 12px;
  transition: color 0.2s;
}
.selector-item:hover .selector-label { color: var(--accent); }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  #nav { padding: 0 32px; }
  .hero-content { padding: 0 32px 72px; }
  .hero-scroll { right: 32px; }
  #work { padding: 80px 32px 64px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  #contact { padding: 100px 32px 80px; }
  .contact-inner { gap: 48px; }
}

@media (max-width: 768px) {
  #nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero-content { padding: 0 16px 60px; }
  .hero-scroll { right: 20px; bottom: 28px; }
  .hero-name { letter-spacing: -0.02em; }
  #work { padding: 48px 0 32px; }
  .filter-bar { padding: 0 12px; margin-bottom: 24px; }
  .projects-grid { grid-template-columns: 1fr; gap: 2px; }
  .project-card-overlay { opacity: 1; transform: none; background: linear-gradient(to top, rgba(8,8,8,0.85) 0%, transparent 60%); }
  .project-card-play { display: none; }
  #contact { padding: 60px 20px 48px; }
  .contact-inner { grid-template-columns: 1fr; gap: 32px; }
  .contact-photo { aspect-ratio: 4/3; }
  .contact-social { gap: 20px; }
  .modal { padding: 8px; }
}

@media (max-width: 480px) {
  .hero-name { font-size: clamp(3rem, 15vw, 4.5rem); }
  .projects-grid { gap: 1px; }
}
