/* =========================================================
   Shots by Saria — Editorial photography portfolio
   Refined update: blue-grey gradient, subtle grain,
   consistent 4:5 thumbnail grid, project-gallery view.
   ========================================================= */

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

:root {
  /* Blue-grey editorial palette — stays dark throughout */
  --bg-top:      #1a222c;   /* deep near-black blue-grey */
  --bg-mid:      #232d3a;
  --bg-bottom:   #303c4b;   /* still clearly dark, just slightly lifted */
  --ink:         #f2f4f7;   /* primary text — near white */
  --ink-mute:    #b8c1cd;   /* secondary text, still legible on dark */
  --ink-dark:    #1a2028;   /* text used on rare light surfaces */
  --line:        rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.28);
  --line-dark:   rgba(0, 0, 0, 0.10);
  --accent:      #f2f4f7;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max: 1440px;
  --gutter: clamp(24px, 5vw, 72px);
}

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

html, body { min-height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  /* Full-document dark blue-grey gradient (top -> mid -> bottom, all dark).
     No background-attachment: fixed — that would clip past the viewport
     and paint the rest of the document white. */
  background:
    linear-gradient(180deg,
      var(--bg-top)    0%,
      var(--bg-mid)    55%,
      var(--bg-bottom) 100%),
    var(--bg-mid);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-color: var(--bg-mid);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.55;
  font-weight: 400;
}

/* Subtle film-grain overlay across the whole page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.9  0 0 0 0 0.9  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  mix-blend-mode: overlay;
}

/* Everything above the grain */
header, section, footer, .gallery-view { position: relative; z-index: 2; }

/* =========================================================
   Typography
   ========================================================= */

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(38px, 6.4vw, 78px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; }
h3 { font-size: 22px; line-height: 1.2; }

p  { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 18px;
  font-weight: 500;
}

.lede { font-size: 17px; color: var(--ink-mute); max-width: 60ch; }

a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }

/* =========================================================
   Nav — clear, high-contrast directory
   ========================================================= */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(14, 20, 28, 0.85);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-bottom: 1px solid var(--line-strong);
}

.brand {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--ink);
  font-weight: 500;
}
.brand-dot { opacity: 0.5; margin: 0 4px; }

.nav nav { display: flex; gap: 6px; align-items: center; }
.nav nav a {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
  position: relative;
}
.nav nav a::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  opacity: 0.7;
}
.nav nav a:hover { color: var(--ink); opacity: 1; }
.nav nav a:hover::after { transform: scaleX(1); }

.nav-cta {
  padding: 10px 20px !important;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink) !important;
  margin-left: 12px;
  background: rgba(255, 255, 255, 0.04);
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  background: var(--ink);
  color: var(--ink-dark) !important;
  border-color: var(--ink);
}

.menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 34px; height: 34px; padding: 0;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.menu-btn span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: 0.25s; }
.menu-btn.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; }
.menu-btn.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-block;
  padding: 13px 26px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 999px; cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-dark {
  background: var(--ink); color: var(--ink-dark);
}
.btn-dark:hover { transform: translateY(-1px); background: #fff; opacity: 1; }

.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); opacity: 1; }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(60px, 10vh, 120px) var(--gutter) clamp(80px, 12vh, 140px);
  max-width: var(--max);
  margin: 0 auto;
}
.hero-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.5);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-copy .lede { margin-top: 22px; }
.hero-cta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }

/* =========================================================
   Section heads
   ========================================================= */

section { padding: clamp(60px, 10vh, 120px) var(--gutter); max-width: var(--max); margin: 0 auto; }

.section-head { margin-bottom: 48px; max-width: 780px; }
.section-head h2 { margin-bottom: 18px; }

/* =========================================================
   Work grid — consistent 4:5 thumbnails
   ========================================================= */

.filters {
  display: flex; gap: 4px; margin-top: 28px;
  padding: 5px;
  background: rgba(14, 20, 28, 0.65);
  border: 1px solid var(--line-strong);
  border-radius: 999px; width: max-content;
  backdrop-filter: blur(10px);
}
.filter {
  background: transparent; border: none;
  padding: 9px 22px;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); cursor: pointer; border-radius: 999px;
  transition: all 0.2s;
  opacity: 0.7;
}
.filter:hover { opacity: 1; background: rgba(255,255,255,0.06); }
.filter.is-active {
  background: var(--ink); color: var(--ink-dark);
  opacity: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.2vw, 32px);
}
.card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.card.hidden { display: none; }

.card-frame {
  aspect-ratio: 4 / 5;   /* consistent editorial 4:5 portrait */
  overflow: hidden;
  border-radius: 3px;
  background: rgba(0,0,0,0.2);
  position: relative;
}
.card-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;   /* default — overridden per-project via inline style */
  display: block;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.5s;
  filter: saturate(1.02) contrast(1.02);
}
.card:hover .card-frame img { transform: scale(1.04); }

.tag {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  background: rgba(20, 26, 34, 0.75);
  color: var(--ink);
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  font-weight: 500;
}

.meta {
  padding: 14px 4px 0;
  display: flex; flex-direction: column;
  min-height: 42px;
}
.meta .title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.meta .count {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 4px;
  font-weight: 400;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* =========================================================
   Services
   ========================================================= */

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.service {
  padding: 32px 0 0;
  border-top: 1px solid var(--line);
}
.service-num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.16em;
  margin-bottom: 22px;
}
.service h3 { margin-bottom: 12px; font-size: 20px; color: var(--ink); }
.service p { font-size: 14px; color: var(--ink-mute); line-height: 1.6; }

/* =========================================================
   Clients
   ========================================================= */

.client-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.client-list li {
  padding: 26px 8px;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  transition: color 0.2s;
}
.client-list li:nth-child(4n) { border-right: none; }
.client-list li:hover { color: var(--ink); }

/* =========================================================
   About
   ========================================================= */

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.about-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-copy h2 { margin-bottom: 22px; }
.about-copy p { color: var(--ink-mute); font-size: 16px; margin-bottom: 16px; max-width: 52ch; }
.about-copy .btn { margin-top: 18px; }

/* =========================================================
   Contact
   ========================================================= */

.contact-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.contact-inner h2 { margin-bottom: 18px; }
.contact-inner .lede { margin: 0 auto 34px; }

.contact-form {
  text-align: left;
  display: flex; flex-direction: column; gap: 18px;
  margin: 36px 0;
  padding: 36px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  border-radius: 4px;
  backdrop-filter: blur(6px);
}
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label {
  display: flex; flex-direction: column;
}
.contact-form span {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 8px; font-weight: 500;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body); font-size: 15px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: rgba(255,255,255,0.10);
}
.contact-form textarea { resize: vertical; font-family: var(--font-body); }
.contact-form .btn { align-self: flex-start; margin-top: 6px; }

.contact-alt { margin-top: 28px; color: var(--ink-mute); font-size: 14px; }
.contact-alt a { color: var(--ink); border-bottom: 1px solid var(--line); }
.contact-alt .sep { margin: 0 8px; opacity: 0.4; }
.contact-note { margin-top: 12px; font-size: 13px; opacity: 0.7; }

/* =========================================================
   Footer
   ========================================================= */

.footer {
  padding: 48px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 13px;
  text-align: center;
  max-width: var(--max); margin: 0 auto;
}
.footer p { margin: 6px 0; }
.footer-sub { opacity: 0.7; }
.footer a { border-bottom: 1px solid var(--line); }

/* =========================================================
   Project Gallery View (opens when a thumbnail is clicked)
   Full-screen editorial gallery, ~7 images stacked
   Preserves original aspect ratios.
   ========================================================= */

.gallery-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-bottom) 100%);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  scroll-behavior: smooth;
}
.gallery-view.is-open {
  opacity: 1;
  pointer-events: auto;
}
.gallery-view::before {
  /* Same grain overlay */
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.9  0 0 0 0 0.9  0 0 0 0 0.9  0 0 0 0 0.9  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  mix-blend-mode: overlay;
}

.gallery-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(24px, 5vw, 60px);
  background: rgba(14, 20, 28, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--line-strong);
}
.gallery-back {
  background: none; border: none; cursor: pointer;
  color: var(--ink-mute);
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  transition: color 0.2s;
}
.gallery-back:hover { color: var(--ink); }
.gallery-back svg { width: 14px; height: 14px; }

.gallery-title-wrap {
  text-align: center;
  flex: 1;
}
.gallery-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.005em;
}
.gallery-count {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2px;
}

.gallery-close {
  background: none; border: none; cursor: pointer;
  color: var(--ink-mute);
  font-size: 26px; line-height: 1;
  padding: 0; width: 32px; height: 32px;
  transition: color 0.2s;
}
.gallery-close:hover { color: var(--ink); }

.gallery-stack {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px clamp(24px, 5vw, 60px) 120px;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vh, 80px);
  position: relative;
  z-index: 2;
}
.gallery-stack figure {
  margin: 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.gallery-stack figure.is-in {
  opacity: 1; transform: translateY(0);
}
.gallery-stack img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.55);
  /* aspect ratio comes from the image itself — no forced cropping */
}

/* Gallery video embed */
.gallery-stack .video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.55);
}
.gallery-stack .video-embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.gallery-footer {
  padding: 40px 24px 60px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
  letter-spacing: 0.06em;
  position: relative; z-index: 2;
}
.gallery-footer .btn {
  margin-top: 18px;
}

/* Prevent body scroll when gallery open */
body.gallery-open { overflow: hidden; }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .client-list { grid-template-columns: repeat(2, 1fr); }
  .client-list li:nth-child(4n) { border-right: 1px solid var(--line); }
  .client-list li:nth-child(2n) { border-right: none; }
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .about-inner { grid-template-columns: 1fr; }

  /* Mobile nav: fully opaque so links stay legible over content */
  .nav {
    background: #0e141c;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .menu-btn { display: flex; }
  .nav nav {
    position: fixed;
    inset: 60px 0 0 0;
    background: #0e141c;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    flex-direction: column;
    padding: 40px 28px;
    gap: 10px;
    align-items: flex-start;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
  }
  .nav nav.is-open { transform: translateX(0); }
  .nav nav a { font-size: 15px; padding: 12px 0; }
  .nav nav a::after { display: none; }
  .nav-cta { margin-left: 0 !important; margin-top: 12px; padding: 12px 22px !important; }

  .contact-form .row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }

  .gallery-header { padding: 14px 20px; }
  .gallery-title { font-size: 15px; }
  .gallery-stack { padding: 30px 20px 80px; gap: 32px; }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .service-grid { grid-template-columns: 1fr; }
  .client-list { grid-template-columns: 1fr; }
  .client-list li:nth-child(n) { border-right: none; }
}

/* =========================================================
   Print / reduce motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
