/* ============================================================
   Lukas Vysniauskas — Portfolio
   Clean, editorial style inspired by Adobe Portfolio layouts
   ============================================================ */

:root {
  --color-bg: #ffffff;
  --color-text: #111111;
  --color-muted: #6b6b6b;
  --color-line: #e5e5e5;
  --color-hover: #000000;

  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-nav:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max-width: 1600px;
  --gutter: 28px;
  --gutter-lg: 40px;

  --transition: 0.35s cubic-bezier(.2,.6,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.6; }

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

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--color-line);
  font-family: var(--font-nav);
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px var(--gutter-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
}
.brand:hover { opacity: 1; }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}
.nav-links a.active {
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
}

/* Mobile nav toggle */
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-wrap { padding: 18px 22px; }
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 0.82rem; }
}

/* ============================================================
   Main layout
   ============================================================ */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px var(--gutter-lg) 80px;
}

.page-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px var(--gutter-lg) 100px;
}

/* Top-level page title — large display, lightweight Montserrat */
.page-title {
  font-family: var(--font-sans);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 22px;
  text-align: center;
}
.page-subtitle {
  color: var(--color-muted);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 auto 56px;
  text-align: center;
  max-width: 640px;
}

/* Section anchor-link bar — sits where the subtitle used to be */
.section-nav {
  list-style: none;
  margin: 0 auto 72px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  font-family: var(--font-sans);
}
.section-nav li {
  display: flex;
  align-items: center;
}
.section-nav li + li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-line);
  margin: 0 22px;
}
.section-nav a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), opacity var(--transition);
}
.section-nav a:hover {
  opacity: 1;
  border-bottom-color: var(--color-text);
}
@media (max-width: 720px) {
  .section-nav { margin-bottom: 48px; }
  .section-nav li + li::before { margin: 0 14px; }
  .section-nav a { font-size: 0.72rem; letter-spacing: 0.18em; }
}

/* Anchor jump offset so sticky header doesn't overlap target section */
html { scroll-behavior: smooth; }
.gallery-section { scroll-margin-top: 100px; }

@media (max-width: 720px) {
  .page { padding: 32px 22px 60px; }
  .page-narrow { padding: 48px 22px 72px; }
  .page-title { font-size: 1.6rem; }
}

/* ============================================================
   Homepage hero / intro
   ============================================================ */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px var(--gutter-lg) 60px;
  text-align: left;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  line-height: 1.1;
}
.hero p {
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 620px;
  margin: 0;
}

@media (max-width: 720px) {
  .hero { padding: 48px 22px 32px; }
}

/* ============================================================
   Category grid (homepage) — dense 3-up, Jack Gold style
   ============================================================ */
.category-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px var(--gutter-lg) 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 560px) {
  .category-grid {
    grid-template-columns: 1fr;
    padding: 12px 22px 64px;
    gap: 10px;
  }
}

.tile {
  display: block;
  position: relative;
  overflow: hidden;
  background: #f4f4f4;
  aspect-ratio: 2 / 1;
}
.tile:hover { opacity: 1; }

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(.2,.6,.2,1);
  display: block;
}
.tile:hover img { transform: scale(1.04); }

.tile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity var(--transition);
}
.tile:hover .tile-overlay { opacity: 1; }

.tile-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  color: #fff;
  font-size: clamp(1.3rem, 1.8vw, 1.9rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.tile:hover .tile-caption { opacity: 1; }

/* Static caption below tile (always visible) */
.tile-label {
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.tile-label small {
  display: block;
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 400;
  margin-top: 3px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ============================================================
   About / Contact pages
   ============================================================ */
.prose p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #2a2a2a;
  margin: 0 0 1.2em;
}

.contact-links {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}
.contact-links li {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.contact-links li:first-child { border-top: 1px solid var(--color-line); }
.contact-links .label {
  color: var(--color-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   Gallery (Live Music)
   ============================================================ */
.gallery-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter-lg);
}
.gallery-section + .gallery-section {
  padding-top: 60px;
}
/* Section heading — big label, no accent line */
.gallery-heading {
  margin: 0 auto 48px;
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}
.gallery-meta {
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0 auto 36px;
  text-align: center;
  text-transform: none;
  max-width: 580px;
}

/* Justified gallery — flickr-style flowing rows, free-based */
.masonry {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.masonry-item {
  display: block;
  cursor: zoom-in;
  overflow: hidden;
  background: #f4f4f4;
  flex-grow: 0;
  flex-shrink: 0;
  /* width/height set by JS layout */
}
.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity var(--transition);
}
.masonry-item:hover img { opacity: 0.85; }

@media (max-width: 720px) {
  .gallery-section { padding: 0 22px; }
}

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  user-select: none;
}
.lightbox-btn {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  padding: 14px 22px;
  opacity: 0.7;
  transition: opacity var(--transition);
  font-family: inherit;
}
.lightbox-btn:hover { opacity: 1; }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev  { left: 8px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.85rem;
  opacity: 0.7;
  letter-spacing: 0.05em;
}

/* ============================================================
   House / project card grid — Architectural mini-index
   Distinct from homepage tiles: smaller, denser, with always-visible
   caption + arrow that makes it obvious each card is clickable.
   ============================================================ */
.house-grid {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 var(--gutter-lg);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
}
@media (max-width: 1100px) { .house-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .house-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; padding: 0 22px; } }

.house-card {
  display: block;
  text-decoration: none;
  color: var(--color-text);
}
.house-card:hover { opacity: 1; }

.house-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f4f4f4;
  margin-bottom: 14px;
}
.house-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(.2,.6,.2,1);
}
.house-card:hover .house-thumb img { transform: scale(1.045); }

.house-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.house-info .house-name {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin: 0;
}
.house-info .house-arrow {
  font-size: 1rem;
  line-height: 1;
  margin-top: 3px;
  transition: transform var(--transition);
  flex-shrink: 0;
}
.house-card:hover .house-info .house-arrow { transform: translateX(4px); }

.house-card .house-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 4px;
}

/* ============================================================
   Section sub-heading (used inside Photography > Real Estate, etc.)
   ============================================================ */
/* Sub-section (e.g. each property under Real Estate, "Food Films" within Food) */
.subsection-heading {
  margin: 48px auto 18px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--color-text);
  text-align: center;
  padding: 0 0 14px;
  border-bottom: none;
  position: relative;
}
.subsection-heading::after {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-line);
  margin: 14px auto 0;
}
.gallery-section + .gallery-section .subsection-heading:first-child,
.gallery-section .subsection-heading:first-of-type { margin-top: 36px; }

/* ============================================================
   Inline video in masonry gallery (matches still images)
   ============================================================ */
.masonry-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.masonry-item .video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  pointer-events: none;
}
.masonry-item { position: relative; }

/* ============================================================
   Vertical-video strip (TN testimonials, social-style reels)
   ============================================================ */
.vertical-strip {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.vertical-strip video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
  display: block;
}
.vertical-strip video:fullscreen,
.vertical-strip video:-webkit-full-screen {
  object-fit: contain;
  background: #000;
}
@media (max-width: 720px) {
  .vertical-strip { padding: 0 16px; grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ============================================================
   Section divider between major sections of a page
   ============================================================ */
.section-divider {
  max-width: var(--max-width);
  margin: 80px auto 0;
  padding: 0 var(--gutter-lg);
  text-align: center;
}
.section-divider hr {
  border: 0;
  border-top: 1px solid var(--color-line);
  margin: 0;
}

/* ============================================================
   Video pages — responsive 16:9 stack
   ============================================================ */
.video-stack {
  max-width: 640px;
  margin: 0 auto;
  padding: 10px var(--gutter-lg) 100px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
@media (max-width: 720px) {
  .video-stack { padding: 0 16px 60px; gap: 24px; }
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================================
   Video feature — video on one side, title/description on the other
   ============================================================ */
.video-feature {
  max-width: 1240px;
  margin: 0 auto 60px;
  padding: 0 var(--gutter-lg);
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 56px;
  align-items: center;
}
.video-feature .vf-video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.video-feature .vf-video video,
.video-feature .vf-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* Reverse orientation: text on left, video on right (for visual rhythm) */
.video-feature.reverse {
  grid-template-columns: 1fr 1.7fr;  /* swap column widths so video stays wide */
}
.video-feature.reverse .vf-video { order: 2; }
.video-feature.reverse .vf-meta  { order: 1; text-align: right; }
@media (max-width: 900px) {
  .video-feature.reverse {
    grid-template-columns: 1fr;
  }
  .video-feature.reverse .vf-video { order: 1; }
  .video-feature.reverse .vf-meta  { order: 2; text-align: center; }
}
.video-feature .vf-meta h3 {
  font-family: var(--font-sans);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--color-text);
}
.video-feature .vf-meta p {
  font-size: 0.95rem;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  margin: 0;
}
@media (max-width: 900px) {
  .video-feature {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 0 22px;
  }
  .video-feature .vf-meta {
    text-align: center;
  }
}

/* ============================================================
   Coming Soon (blank category pages)
   ============================================================ */
.coming-soon {
  text-align: center;
  padding: 120px 22px 160px;
  color: var(--color-muted);
}
.coming-soon h2 {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 10px;
}
.coming-soon p { margin: 0; font-size: 1rem; }
.coming-soon .back {
  display: inline-block;
  margin-top: 30px;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--color-line);
  padding: 36px var(--gutter-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  color: var(--color-muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.site-footer a { color: var(--color-muted); }
.site-footer .social {
  display: flex;
  gap: 22px;
}

@media (max-width: 640px) {
  .site-footer {
    flex-direction: column;
    gap: 14px;
    padding: 30px 22px;
    text-align: center;
  }
}
