/* ===== VARIABLES ===== */
:root {
  --bg:          #F0EBE1;
  --bg-white:    #FFFFFF;
  --text-dark:   #1A1A1A;
  --text-mid:    #555555;
  --text-light:  #888888;
  --accent:      #C9B99A;
  --accent-dark: #8B7355;
  --border:      #E0D9CE;
  --max-w:       1280px;
  --sans:        'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --serif:       'Playfair Display', Georgia, serif;
  --bg-dark:        #111111;
  --bg-nav-scrolled: rgba(240, 235, 225, 0.97);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text-dark); font-family: var(--sans); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ===== CONTAINER ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== SECTION LABEL ===== */
.section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 12px;
}
.section-label::before,
.section-label::after {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 400;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 52px;
  letter-spacing: 1px;
}

/* ===== BTN DISCUSS ===== */
.btn-discuss {
  display: inline-block;
  background: var(--text-dark);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 40px;
  transition: background 0.25s, transform 0.2s;
  white-space: nowrap;
  cursor: pointer;
}
.btn-discuss:hover { background: #333; transform: translateY(-1px); }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.35s, backdrop-filter 0.35s, box-shadow 0.35s;
}
#navbar.scrolled {
  background: var(--bg-nav-scrolled);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
}
/* Nav logo — white transparent over hero, flips dark when scrolled */
.nav-logo img {
  height: 48px;
  width: auto;
  transition: filter 0.35s ease;
  filter: brightness(0) invert(1); /* white artwork on dark nav */
}
#navbar.scrolled .nav-logo img {
  filter: brightness(0); /* dark artwork on cream nav */
}
.nav-links {
  display: flex;
  gap: 32px;
  margin: 0 auto;
}
.nav-links a {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s;
}
#navbar.scrolled .nav-links a { color: var(--text-dark); }
.nav-links a:hover,
.nav-links a.nav-active { color: var(--accent) !important; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.65);
  padding: 2px 0;
  transition: color 0.2s;
  font-family: var(--sans);
}
#navbar.scrolled .lang-btn { color: var(--text-mid); }
.lang-btn.active { color: var(--bg-white); border-bottom: 1px solid var(--bg-white); }
#navbar.scrolled .lang-btn.active { color: var(--text-dark); border-bottom-color: var(--text-dark); }
.lang-sep { color: rgba(255, 255, 255, 0.3); font-size: 11px; }
#navbar.scrolled .lang-sep { color: var(--border); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bg-white);
  border-radius: 2px;
  transition: background 0.2s;
}
#navbar.scrolled .hamburger span { background: var(--text-dark); }

/* ===== HERO ===== */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--bg-dark);
}
#hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 1;
}
.hero-logo-wrap {
  position: absolute;
  top: 88px;
  left: 40px;
  z-index: 2;
  pointer-events: none;
}
.hero-logo-img {
  display: block;
  height: clamp(64px, 8vw, 110px);
  width: auto;
  opacity: 0.9;
  transition: opacity 0.3s;
}
.hero-logo-wrap:hover .hero-logo-img { opacity: 1; }
.hero-credit {
  position: absolute;
  bottom: 72px;
  right: 40px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.hero-credit-sep { color: rgba(255, 255, 255, 0.2); }
.hero-content {
  position: absolute;
  bottom: 64px;
  left: 0;
  right: 0;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  color: var(--bg-white);
  z-index: 2;
}
.hero-content h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 5.5vw, 68px);
  font-weight: 400;
  line-height: 1.12;
  margin-bottom: 20px;
  max-width: 800px;
  letter-spacing: 1px;
  animation: hero-rise 1.4s cubic-bezier(0.22, 0.61, 0.36, 1) 0.5s both;
}
.hero-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  max-width: 460px;
  line-height: 1.75;
  animation: hero-fade 1.2s ease-out 1.8s both;
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes hero-fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@media (prefers-reduced-motion: reduce) {
  .hero-content h1,
  .hero-sub { animation: none; opacity: 1; transform: none; }
}

/* ===== GRADIENT TRANSITION: dark hero → cream grid ===== */
.hero-cream-transition {
  height: 120px;
  background: linear-gradient(to bottom, var(--bg-dark) 0%, var(--bg) 100%);
  display: block;
}

/* ===== PORTFOLIO GRID ===== */
#portfolio {
  background: var(--bg);
  padding: 0 0 96px;
}

/* Rows container */
.pf-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}
.pf-row:last-child { margin-bottom: 0; }

/* Row 1: 2 equal columns, aspect-ratio 3/2 */
.pf-row--2 { grid-template-columns: 1fr 1fr; }

/* Row 2: 3 equal columns, aspect-ratio 4/3 */
.pf-row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* Row 3: single full-width, aspect-ratio 16/6 */
.pf-row--1 { grid-template-columns: 1fr; }

/* Image wrapper — clips hover scale overflow, images natural size */
.pf-img-wrap {
  overflow: hidden;
  width: 100%;
}

/* Image — full width, natural height, no cropping */
.pf-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hover: subtle scale on image */
.pf-item:hover .pf-img-wrap img {
  transform: scale(1.025);
}

/* Project label below each image */
.pf-label {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-light);
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, color 0.3s;
}
.pf-item:hover .pf-label {
  border-bottom-color: var(--accent);
  color: var(--text-dark);
}

/* ===== FOOTER (identical to main website) ===== */
footer { background: var(--bg-white); }
.footer-main { padding: 64px 0; border-top: 1px solid var(--border); }
.footer-grid {
  display: grid;
  grid-template-columns: 100px 1fr 180px 180px;
  gap: 48px;
  align-items: start;
}
.footer-logo img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.footer-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 16px;
}
.footer-contacts p {
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 7px;
  line-height: 1.6;
}
.footer-contacts a { color: var(--text-dark); transition: color 0.2s; }
.footer-contacts a:hover { color: var(--accent); }
.footer-menu ul,
.footer-social ul { display: flex; flex-direction: column; gap: 11px; }
.footer-menu a,
.footer-social a {
  font-size: 13px;
  color: var(--text-mid);
  transition: color 0.2s;
}
.footer-menu a:hover,
.footer-social a:hover { color: var(--text-dark); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  font-size: 12px;
  color: var(--text-light);
}

/* ===== RESPONSIVE ===== */

/* ── Tablet wide ≤1100px ── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 120px 1fr 160px 160px; gap: 32px; }
}

/* ── Tablet ≤900px ── */
@media (max-width: 900px) {
  /* Portfolio: Row 2 → 2 col, 3rd item spans full width */
  .pf-row--3 { grid-template-columns: 1fr 1fr; }
  .pf-row--3 .pf-item:last-child { grid-column: 1 / -1; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-logo { grid-column: 1 / -1; }
}

/* ── Mobile ≤768px ── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 20px; gap: 12px; }

  /* Hamburger visible, CTA hidden */
  .hamburger { display: flex; }
  .nav-right .btn-discuss { display: none; }
  .nav-right { gap: 12px; }

  /* Mobile nav dropdown */
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    display: block;
    padding: 14px 20px;
    color: var(--text-dark) !important;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child a { border-bottom: none; }

  /* Hero video — show full cinematic frame on mobile, dark bg acts as letterbox */
  #hero video { object-fit: contain; object-position: center center; }

  /* Hero logo — smaller, safe distance from hamburger and lang switcher */
  .hero-logo-wrap { top: 88px; left: 20px; }
  .hero-logo-img { height: clamp(48px, 12vw, 76px); }

  /* Hero credit — move to top-right to avoid collision with hero content */
  .hero-credit { bottom: auto; top: 88px; right: 20px; font-size: 9px; }

  /* Hero content — smaller text, never hidden */
  .hero-content { bottom: 36px; padding: 0 20px; }
  .hero-content h1 { font-size: clamp(22px, 7vw, 34px); margin-bottom: 14px; }
  .hero-sub { font-size: 12px; max-width: 100%; }

  /* Gradient transition shorter on mobile */
  .hero-cream-transition { height: 80px; }

  /* Portfolio section padding */
  #portfolio { padding: 0 0 64px; }

  /* Footer */
  .footer-main { padding: 40px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-logo { grid-column: auto; }
}

/* ── Mobile small ≤640px ── */
@media (max-width: 640px) {
  /* All project rows → single column */
  .pf-row--2,
  .pf-row--3 { grid-template-columns: 1fr; }
  .pf-row--3 .pf-item:last-child { grid-column: auto; }

  /* Hero logo at smallest breakpoint */
  .hero-logo-img { height: clamp(40px, 13vw, 60px); }

  /* Section title */
  .section-title { font-size: 22px; margin-bottom: 36px; }
}

/* ── Very small ≤400px ── */
@media (max-width: 400px) {
  .hero-content h1 { font-size: 20px; }
  .hero-sub { font-size: 11px; }
}
