/* =========================================================================
   TIM IMAGES — Stylesheet
   Black / white / grey, editorial and quiet. Edit the variables in :root
   to retune the palette; almost everything below references them.
   ========================================================================= */

:root {
  --black: #0a0a0b;
  --near-black: #121213;
  --charcoal: #1c1c1e;
  --dark-grey: #2e2e30;
  --mid-grey: #6f6f72;
  --line-grey: #d8d8d6;
  --light-grey: #ececea;
  --off-white: #f6f5f3;
  --white: #ffffff;

  --ink: var(--near-black);
  --paper: var(--off-white);

  --font-display: "Playfair Display", "Georgia", serif;
  --font-body: "Jost", "Helvetica Neue", Arial, sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 84px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mid-grey);
  margin-bottom: 18px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; }

.section-title {
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: 20px;
}

.section-lede {
  max-width: 560px;
  color: var(--mid-grey);
  font-size: 17px;
  line-height: 1.7;
}

.section {
  padding: clamp(72px, 11vw, 140px) 0;
}
.section--tight { padding: clamp(56px, 8vw, 96px) 0; }

.divider {
  width: 48px;
  height: 1px;
  background: var(--ink);
  margin: 0 0 26px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 34px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}
.btn--dark { color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn--dark:hover { background: var(--white); color: var(--black); }
.btn--light { color: var(--ink); border-color: var(--ink); }
.btn--light:hover { background: var(--ink); color: var(--white); }
.btn svg { width: 14px; height: 14px; flex: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), height .35s var(--ease);
}
.nav.is-solid {
  background: rgba(10,10,11,0.92);
  backdrop-filter: blur(10px);
  height: 72px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.nav__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo img { height: 30px; width: auto; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav__links a {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.86);
  position: relative;
  padding: 6px 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--white);
  transition: right .35s var(--ease);
}
.nav__links a:hover::after { right: 0; }
.nav__cta { display: flex; align-items: center; gap: 22px; }
.nav__insta {
  width: 20px; height: 20px;
  color: rgba(255,255,255,0.86);
  transition: color .3s;
}
.nav__insta:hover { color: var(--white); }

.nav__toggle {
  display: none;
  width: 26px; height: 20px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
}
.nav__toggle span {
  height: 1px; width: 100%;
  background: var(--white);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Mobile nav panel ---------- */
.nav__mobile {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
}
.nav__mobile.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__mobile a {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--white);
}
.nav__mobile .nav__insta { width: 24px; height: 24px; margin-top: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--black);
}
.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8,8,9,0.55) 0%, rgba(8,8,9,0.32) 38%, rgba(8,8,9,0.72) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__mark { height: 46px; width: auto; margin-bottom: 30px; opacity: 0.96; }
.hero__title {
  font-size: clamp(38px, 7vw, 84px);
  letter-spacing: 0.02em;
  color: var(--white);
}
.hero__title em { font-style: italic; color: rgba(255,255,255,0.78); }
.hero__tagline {
  margin-top: 22px;
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}
.hero__sub {
  margin-top: 6px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.hero__cta { margin-top: 44px; }
.hero__scroll {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.65);
}
.hero__scroll span {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.hero__scroll-line {
  width: 1px; height: 36px;
  background: rgba(255,255,255,0.4);
  overflow: hidden;
  position: relative;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -100%; left: 0; right: 0; height: 100%;
  background: var(--white);
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* ---------- Marquee strip ---------- */
.marquee {
  background: var(--ink);
  color: var(--off-white);
  overflow: hidden;
  white-space: nowrap;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.marquee__track {
  display: inline-flex;
  animation: marquee 32s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0.04em;
  padding: 0 28px;
  color: rgba(246,245,243,0.75);
  display: inline-flex;
  align-items: center;
  gap: 28px;
}
.marquee__track span::after { content: "—"; opacity: 0.4; font-style: normal; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- About ---------- */
.about {
  background: var(--paper);
}
.about__grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.about__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__media::after {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid rgba(0,0,0,0.08);
  pointer-events: none;
}
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: clamp(20px, 4vw, 48px);
  margin-top: 40px;
}
.about__stat-num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  color: var(--ink);
}
.about__stat-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid-grey);
  margin-top: 6px;
}
.about__body p + p { margin-top: 18px; }
.about__body p { color: #4b4b4d; line-height: 1.85; font-size: 16px; }

/* ---------- Services ---------- */
.services { background: var(--light-grey); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(10,10,11,0.1);
  margin-top: 56px;
  border: 1px solid rgba(10,10,11,0.1);
}
.service-card {
  background: var(--light-grey);
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 230px;
  transition: background-color .35s var(--ease), color .35s var(--ease);
  text-align: left;
}
.service-card:hover {
  background: var(--ink);
  color: var(--off-white);
}
.service-card:hover .service-card__icon { color: var(--white); }
.service-card:hover .service-card__num { color: rgba(255,255,255,0.4); }
.service-card__num {
  font-family: var(--font-display);
  font-size: 13px;
  color: rgba(10,10,11,0.35);
}
.service-card__icon { width: 30px; height: 30px; color: var(--ink); }
.service-card__title { font-family: var(--font-display); font-size: 21px; }
.service-card__blurb { font-size: 14px; line-height: 1.6; opacity: 0.75; }

/* ---------- Portfolio / Gallery ---------- */
.portfolio { background: var(--paper); }
.portfolio__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-btn {
  padding: 10px 20px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(10,10,11,0.22);
  color: var(--mid-grey);
  transition: all .3s var(--ease);
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--charcoal);
  aspect-ratio: 4 / 3;
}
.gallery-item--tall { grid-row: span 2; aspect-ratio: 4 / 6.4; }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 20px;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent);
  color: var(--white);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.gallery-item:hover .gallery-item__meta { opacity: 1; transform: translateY(0); }
.gallery-item__meta span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.gallery-empty {
  padding: 60px 0;
  text-align: center;
  color: var(--mid-grey);
  font-size: 14px;
  grid-column: 1 / -1;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6,6,7,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
  padding: 40px;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img { max-width: 88vw; max-height: 82vh; object-fit: contain; }
.lightbox__caption {
  position: absolute;
  bottom: 34px; left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.lightbox__close, .lightbox__nav {
  position: absolute;
  color: var(--white);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  transition: background-color .3s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,0.12); }
.lightbox__close { top: 28px; right: 28px; }
.lightbox__nav svg, .lightbox__close svg { width: 16px; height: 16px; }
.lightbox__prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Contact / Instagram band ---------- */
.contact {
  background: var(--ink);
  color: var(--off-white);
  text-align: center;
}
.contact .eyebrow { color: rgba(246,245,243,0.55); }
.contact__title {
  font-size: clamp(30px, 5vw, 54px);
  color: var(--white);
  max-width: 760px;
  margin: 0 auto;
}
.contact__lede {
  max-width: 520px;
  margin: 22px auto 0;
  color: rgba(246,245,243,0.68);
  font-size: 16px;
  line-height: 1.7;
}
.contact__actions {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}
.contact__handle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: rgba(246,245,243,0.55);
}
.contact__handle svg { width: 16px; height: 16px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--black);
  color: rgba(246,245,243,0.55);
  padding: 40px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.footer__mark { height: 22px; width: auto; opacity: 0.7; }
.footer__links { display: flex; gap: 24px; }
.footer__links a { font-size: 12px; letter-spacing: 0.08em; }
.footer__links a:hover { color: var(--white); }
.footer small { font-size: 12px; }
.footer__back-top {
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.footer__back-top svg { width: 14px; height: 14px; }
.footer__back-top:hover { border-color: rgba(255,255,255,0.5); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 460px; }
}

@media (max-width: 760px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__toggle { display: flex; }
  .services__grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--tall { grid-row: span 1; }
  .about__stats { grid-template-columns: repeat(3, auto); gap: 18px; }
  .portfolio__header { flex-direction: column; align-items: flex-start; }
  .footer__inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .services__grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item--tall { grid-row: span 1; }
}
