/* ============ Global ============ */
:root {
  --brand: #ad282c;
  --brand-dark: #8a1f23;
  --brand-soft: #c84a4f;
  --ink: #0c0c0d;
  --cream: #f7f1ee;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
}

.font-serif-display { font-family: 'Cormorant Garamond', serif; letter-spacing: -0.01em; }
.font-script { font-family: 'Dancing Script', cursive; }

/* ============ Header ============ */
.nav-link {
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: var(--brand);
  transition: width 0.35s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.header-scrolled {
  background-color: rgba(12, 12, 13, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* ============ Hero v3 — Cinematic viewfinder (viewport-locked) ============ */
.hero-v3 {
  /* Lock the hero to the visible viewport on every device. */
  position: relative;
  height: 100vh;
  height: 100svh;
  max-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
  color: #fff;
  isolation: isolate;

  /* Header navbar is fixed (~64-80px); reserve safe top space */
  --hero-pad-x: clamp(1rem, 4vw, 4rem);
  --hero-pad-top: clamp(4.5rem, 10vh, 7rem);
  --hero-pad-bot: clamp(0.75rem, 2vh, 1.5rem);
}

/* Rotating background frames */
.hero-frames { position: absolute; inset: 0; z-index: 0; }
.hero-frame {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.6s ease, transform 8s ease-out;
  will-change: opacity, transform;
}
.hero-frame.is-active {
  opacity: 1;
  transform: scale(1);
  animation: heroKenBurns 12s ease-out forwards;
}
@keyframes heroKenBurns {
  from { transform: scale(1.02) translate(0, 0); }
  to   { transform: scale(1.12) translate(-1.5%, -1%); }
}

/* Vignette + grain */
.hero-vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.45) 35%, rgba(0,0,0,0.1) 70%, transparent 100%),
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 30%, rgba(0,0,0,0.45) 60%, rgba(0,0,0,0.88) 100%),
    radial-gradient(ellipse at 30% 55%, transparent 30%, rgba(0,0,0,0.45) 90%);
}
.hero-grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px;
}

/* Viewfinder corner brackets — scale with viewport */
.hero-corner {
  position: absolute;
  width:  clamp(16px, 3vmin, 32px);
  height: clamp(16px, 3vmin, 32px);
  border: 1px solid rgba(255,255,255,0.55);
  z-index: 4;
  pointer-events: none;
}
.hero-corner.tl { top:    clamp(10px, 2vmin, 24px); left:  clamp(10px, 2vmin, 24px); border-right: 0; border-bottom: 0; }
.hero-corner.tr { top:    clamp(10px, 2vmin, 24px); right: clamp(10px, 2vmin, 24px); border-left:  0; border-bottom: 0; }
.hero-corner.bl { bottom: clamp(10px, 2vmin, 24px); left:  clamp(10px, 2vmin, 24px); border-right: 0; border-top:    0; }
.hero-corner.br { bottom: clamp(10px, 2vmin, 24px); right: clamp(10px, 2vmin, 24px); border-left:  0; border-top:    0; }

/* Top EXIF bar — sits in normal flow, fixed height */
.hero-exif {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  padding: var(--hero-pad-top) var(--hero-pad-x) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: clamp(0.55rem, 1.3vmin, 0.7rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  min-width: 0;
}
.hero-exif-left, .hero-exif-right {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  min-width: 0;
}
.hero-exif-right { flex-wrap: nowrap; overflow: hidden; }
.hero-exif .sep { opacity: 0.4; }
.hero-rec {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand-soft);
  white-space: nowrap;
}
.hero-rec .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand);
  animation: heroBlink 1.6s infinite;
}
@keyframes heroBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* Vertical side text */
.hero-side {
  position: absolute;
  left: clamp(20px, 3vmin, 36px);
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  z-index: 5;
  font-size: 0.62rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  pointer-events: none;
}
.hero-side::before {
  content: '';
  display: inline-block;
  width: 30px; height: 1px;
  background: var(--brand-soft);
  vertical-align: middle;
  margin-right: 12px;
}

/* Center content — takes remaining space, never overflows */
.hero-content {
  position: relative;
  z-index: 6;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: clamp(0.75rem, 2vh, 2rem) var(--hero-pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.5rem, 1.5vh, 1.25rem);
  overflow: hidden;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(0.55rem, 1.3vmin, 0.72rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  margin: 0;
}
.hero-kicker-line {
  width: clamp(32px, 5vmin, 64px);
  height: 1px;
  background: var(--brand-soft);
}

.hero-headline {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 0;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0,0,0,0.4);
  max-width: 18ch;
}
.hero-headline-pre,
.hero-headline-main,
.hero-headline-post {
  display: block;
}
.hero-headline-pre {
  font-size: clamp(1.15rem, min(4vw, 5.5vh), 2.6rem);
  font-weight: 300;
  letter-spacing: 0.015em;
  opacity: 0.88;
}
.hero-headline-main {
  font-size: clamp(2.6rem, min(10.5vw, 13vh), 7rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--brand-soft);
  line-height: 0.92;
  margin: clamp(0.05rem, 0.4vh, 0.35rem) 0;
}
.hero-headline-post {
  font-size: clamp(1.15rem, min(4vw, 5.5vh), 2.6rem);
  font-weight: 300;
  letter-spacing: 0.015em;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.6vw, 1.25rem);
  padding-left: clamp(0.3rem, 3vw, 2.25rem);
}
.hero-headline-rule {
  display: inline-block;
  width: clamp(28px, 5vw, 72px);
  height: 1px;
  background: var(--brand);
  flex-shrink: 0;
  transform-origin: left;
  animation: heroRuleIn 1.2s 0.5s ease-out both;
}
.hero-headline-dot { color: var(--brand-soft); }
@keyframes heroRuleIn {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.hero-sub {
  font-size: clamp(0.85rem, 1.7vmin, 1.05rem);
  line-height: 1.55;
  color: rgba(255,255,255,0.8);
  max-width: 32rem;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 1.5vmin, 0.85rem);
  margin-top: clamp(0.25rem, 1vh, 0.5rem);
}
/* Compact CTA padding inside hero so they always fit on tiny screens */
.hero-actions .btn-brand,
.hero-actions .btn-outline-light {
  padding: clamp(0.65rem, 1.5vh, 1rem) clamp(1rem, 2.5vw, 2rem) !important;
  font-size: clamp(0.625rem, 1.4vmin, 0.8rem) !important;
}

/* Bottom tray with thumbnails — fixed footer, never grows */
.hero-tray {
  position: relative;
  z-index: 6;
  flex: 0 0 auto;
  padding: clamp(0.6rem, 1.5vh, 1.25rem) var(--hero-pad-x) var(--hero-pad-bot);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7) 40%);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: clamp(0.75rem, 2vw, 2rem);
  align-items: center;
  min-width: 0;
}

.hero-tray-info {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.5vw, 1.25rem);
  min-width: 0;
}
.hero-tray-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 3.5vmin, 2.3rem);
  font-weight: 300;
  color: var(--brand-soft);
  line-height: 1;
  flex-shrink: 0;
}
.hero-tray-sep { color: rgba(255,255,255,0.3); }
.hero-tray-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.hero-tray-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.95rem, 2.2vmin, 1.4rem);
  font-style: italic;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-tray-loc {
  font-size: clamp(0.55rem, 1.2vmin, 0.65rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-tray-progress {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  font-size: clamp(0.55rem, 1.2vmin, 0.65rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}
.hero-tray-progress .bar {
  width: clamp(60px, 10vw, 120px);
  height: 1px;
  background: rgba(255,255,255,0.18);
  position: relative;
  overflow: hidden;
}
.hero-tray-progress .fill {
  position: absolute;
  inset: 0;
  background: var(--brand-soft);
  transform-origin: left;
  transform: scaleX(0);
  animation: heroFill 6s linear forwards;
}
@keyframes heroFill {
  to { transform: scaleX(1); }
}

.hero-tray-thumbs {
  display: flex;
  gap: clamp(0.3rem, 0.8vw, 0.6rem);
  flex-shrink: 0;
}
.hero-thumb {
  width: clamp(36px, 6vmin, 56px);
  height: clamp(36px, 6vmin, 56px);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  padding: 0;
  background: none;
  flex-shrink: 0;
}
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-thumb:hover { opacity: 0.85; transform: translateY(-2px); }
.hero-thumb.is-active {
  opacity: 1;
  border-color: var(--brand-soft);
  box-shadow: 0 0 0 2px rgba(200,74,79,0.25);
}

/* Mobile reshuffles */
@media (max-width: 768px) {
  .hero-side { display: none; }
  .hero-exif .hide-sm { display: none; }
  .hero-exif-right span:nth-child(2),
  .hero-exif-right span:nth-child(3) { display: none; }

  /* Headline: bolder hierarchy, no awkward indent on small screens */
  .hero-headline { max-width: none; }
  .hero-headline-pre { font-size: clamp(1.05rem, 4.5vw, 1.6rem); }
  .hero-headline-main { font-size: clamp(3.2rem, 13vw, 5rem); line-height: 0.9; }
  .hero-headline-post {
    font-size: clamp(1.05rem, 4.5vw, 1.6rem);
    padding-left: 0;
    gap: 0.6rem;
  }
  .hero-headline-rule { width: clamp(20px, 7vw, 40px); }

  .hero-sub { font-size: 0.92rem; line-height: 1.55; }

  /* Tray: stack into two clean rows so meta has full width */
  .hero-tray {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding-inline: 1.1rem;
  }
  .hero-tray-info { order: 1; }
  .hero-tray-thumbs { order: 2; gap: 0.4rem; }
  .hero-tray-progress {
    order: 3;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .hero-tray-progress .bar { flex: 1; max-width: 180px; }
  .hero-tray-title,
  .hero-tray-loc { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* Phones — extra refinements */
@media (max-width: 480px) {
  .hero-exif { font-size: 0.55rem; letter-spacing: 0.22em; }
  .hero-exif-left span:nth-child(3) { display: none; }
  .hero-corner { opacity: 0.6; }
  .hero-headline-pre,
  .hero-headline-post { letter-spacing: 0.04em; opacity: 0.85; }
  .hero-thumb { width: 38px; height: 38px; }
}

/* Very short heights (landscape phones) — hide non-essentials */
@media (max-height: 520px) {
  .hero-corner { display: none; }
  .hero-side   { display: none; }
  .hero-sub    { display: none; }
  .hero-headline { max-width: 22ch; }
  .hero-tray { padding-block: 0.5rem; }
}

@media (max-height: 420px) {
  .hero-kicker { display: none; }
  .hero-tray-loc { display: none; }
  .hero-headline-pre,
  .hero-headline-post { display: none; }
}

/* ============ Buttons ============ */
.btn-brand {
  background-color: var(--brand);
  color: #fff;
  transition: all 0.3s ease;
}
.btn-brand:hover {
  background-color: var(--brand-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(173, 40, 44, 0.35);
}
.btn-outline-light {
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  background: transparent;
  transition: all 0.3s ease;
}
.btn-outline-light:hover {
  background-color: #fff;
  color: #111;
  border-color: #fff;
}

/* ============ Service cards ============ */
.service-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}
.service-card img {
  transition: transform 0.8s cubic-bezier(0.2,0.8,0.2,1);
}
.service-card:hover img { transform: scale(1.08); }
.service-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0) 100%);
}

/* ============ Portfolio gallery ============ */
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img {
  transition: transform 0.6s ease, filter 0.6s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.7);
}
.gallery-item .caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), rgba(0,0,0,0) 50%);
  color: #fff;
}
.gallery-item:hover .caption { opacity: 1; }

/* ============ Stats ============ */
.stat-divider {
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.25), transparent);
}

/* ============ Animations ============ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.fade-up.in-view { opacity: 1; transform: none; }

/* ============ Filter Pills ============ */
.filter-pill {
  padding: 0.5rem 1.25rem;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s ease;
  background: #fff;
  color: #555;
}
.filter-pill:hover { border-color: var(--brand); color: var(--brand-dark); }
.filter-pill.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ============ Footer ============ */
.footer-link {
  color: rgba(255,255,255,0.65);
  transition: color 0.3s ease;
}
.footer-link:hover { color: var(--brand-soft); }

/* ============ Misc ============ */
.section-heading::before {
  content: '';
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--brand);
  vertical-align: middle;
  margin-right: 12px;
}
.section-heading::after {
  content: '';
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--brand);
  vertical-align: middle;
  margin-left: 12px;
}

.testimonial-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.08);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-dark); }

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateX(0); }

/* Page hero (non-home) */
.page-hero {
  background-size: cover;
  background-position: center;
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.4));
}

/* ============================================================
   Responsive Tuning — mobile-first overrides
   ============================================================ */

@media (max-width: 1023px) {
  .hero,
  .bg-fixed { background-attachment: scroll !important; }
}

@media (max-width: 767px) {
  .py-24 { padding-top: 4rem; padding-bottom: 4rem; }
  .py-20 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .py-16 { padding-top: 3rem; padding-bottom: 3rem; }

  .page-hero.pt-44 { padding-top: 7rem; padding-bottom: 4rem; }

  h1.font-serif { font-size: clamp(2.5rem, 10vw, 4rem) !important; line-height: 1.05; }

  .section-heading::before,
  .section-heading::after { width: 18px; }

  [data-counter] { font-size: clamp(2.25rem, 12vw, 4rem) !important; }

  header .btn-brand { padding: 0.5rem 0.9rem; font-size: 0.65rem; }
}

@media (max-width: 380px) {
  .max-w-7xl, .max-w-6xl, .max-w-5xl, .max-w-4xl { padding-left: 1rem !important; padding-right: 1rem !important; }
  .px-6 { padding-left: 1rem; padding-right: 1rem; }
  h1.font-serif { font-size: 2.25rem !important; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero h1 { font-size: 4.5rem; }
}

@media (max-width: 640px) {
  form input,
  form select,
  form textarea { font-size: 16px; }

  .btn-brand, .btn-outline-light { white-space: nowrap; }
}

img { max-width: 100%; height: auto; }
html, body { overflow-x: hidden; }

@media (max-width: 420px) {
  .columns-1 { column-count: 1 !important; }
}

@media (max-width: 360px) {
  .mobile-menu { width: 100%; }
}

@media (max-width: 767px) {
  footer .grid > div { text-align: left; }
}

@media (max-height: 640px) {
  .hero .absolute.bottom-10 { display: none; }
}
