
:root {
  --navy: #00007D;          /* Merriweather color */
  --navy-dim: #00007Dcc;
  --muted: #747474;         /* Outfit color */
  --white: #ffffff;
  --bg: #f9f9f9;
  --text: #00007D;
  --line: #e5e5e5;
  --card: #d9d9d9;          /* placeholder image background */
  --form-bg: #f3f3f3;

  --pad-x: 24px;
  --pad-y: 22px;
  --radius: 6px;

  --font-head: 'Merriweather', Georgia, serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
}

@media (min-width: 768px) {
  :root { --pad-x: 32px; }
}
@media (min-width: 1280px) {
  :root { --pad-x: 21px; --pad-y: 22px; }
}

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 300;            /* Outfit Light */
  background: var(--bg);
  color: var(--muted);          /* Outfit text is always #747474 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* -------- Typography -------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--navy);
  margin: 0;
  line-height: 1.15;
}
p { margin: 0; }

.logo {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: 0;
}
.logo span { display: block; }

/* -------- Page chrome (header + footer) -------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--pad-y) var(--pad-x);
  z-index: 50;
  pointer-events: none;
  transition: background-color .35s var(--ease), backdrop-filter .35s var(--ease);
}
.site-header > * { pointer-events: auto; }
.site-header.scrolled {
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
}

.menu-btn,
.menu-close {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: transform .20s var(--ease), opacity .25s var(--ease);
}
.menu-btn:hover { transform: rotate(90deg); }
.menu-close:hover { transform: rotate(90deg); }

/* -------- Site footer -------- */
.site-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 32px var(--pad-x);
  margin-top: 80px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer .copy { font-size: 13px; color: var(--muted); }
.site-footer .socials { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer .socials a {
  position: relative;
  transition: opacity .25s var(--ease);
}
.site-footer .socials a:hover { opacity: .55; }

@media (min-width: 768px) {
  .site-footer {
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
  }
  .site-footer .socials { justify-content: center; }
  .site-footer .right { text-align: right; }
}

/* -------- Menu overlay -------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--navy);
  color: var(--white);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: var(--pad-y) var(--pad-x);
  transform: translateY(-100%);
  transition: transform .50s var(--ease);
  visibility: hidden;
}
.menu-overlay[data-open="true"] {
  transform: translateY(0);
  visibility: visible;
}
.menu-overlay .menu-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.menu-overlay .logo,
.menu-overlay .menu-close { color: var(--white); }
.menu-overlay nav {
  margin-top: auto;
  margin-bottom: auto;
  text-align: right;
  padding-right: 4px;
}
.menu-overlay nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.menu-overlay nav a {
  display: inline-block;
  font-family: var(--font-body);   /* Outfit Light per spec */
  font-weight: 300;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--white);
  position: relative;
  padding: 4px 0;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .5s var(--ease),
    transform .5s var(--ease);
}
.menu-overlay[data-open="true"] nav a {
  opacity: 1;
  transform: translateY(0);
}
.menu-overlay nav li:nth-child(1) a { transition-delay: .15s; }
.menu-overlay nav li:nth-child(2) a { transition-delay: .22s; }
.menu-overlay nav li:nth-child(3) a { transition-delay: .29s; }
.menu-overlay nav li:nth-child(4) a { transition-delay: .36s; }
.menu-overlay nav li:nth-child(5) a { transition-delay: .43s; }

/* Menu hover: opacity only, no movement, no letter-spacing change */
.menu-overlay[data-open="true"] nav a:hover { opacity: .55; }

/* -------- HOME -------- */
/* Home page is locked to a single viewport — wheel input translates the
   strip horizontally instead of scrolling the page vertically.
   The lock is unconditional (mobile + desktop) so the page never scrolls up/down. */
html.is-home,
body[data-page="home"] {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
body[data-page="home"] {
  display: flex;
  flex-direction: column;
}
body[data-page="home"] main.home {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body[data-page="home"] .site-footer { margin-top: 0; }

.home {
  padding-top: calc(var(--pad-y) + 56px);
}

.home-intro {
  max-width: 380px;
  font-size: 18px;
  color: var(--muted);          /* Outfit gray */
  line-height: 1.55;
  margin: 12px var(--pad-x) 0;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp .8s var(--ease) .1s forwards;
}

/* ----- Cards ----- */
.client-card { display: block; }
.client-card .thumb {
  background: var(--card);
  aspect-ratio: 16 / 6;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  transition: transform .6s var(--ease), filter .6s var(--ease);
}
.client-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.client-card:hover .thumb { transform: translateY(-3px); filter: brightness(1.02); }
.client-card h3 {
  font-size: 18px;
  margin-top: 16px;
  color: var(--navy);            /* Merriweather navy */
}
.client-card p {
  font-size: 10px;
  color: var(--muted);            /* Outfit gray */
  margin-top: 8px;
  line-height: 1.55;
  max-width: 32ch;
}

/* ----- Horizontal-scroll projects strip ----- */
/* Desktop: page is locked at 100vh; wheel input translates the strip horizontally.
   Mobile: section collapses to natural height, strip becomes a regular touch-scroll row. */
.home-projects {
  position: relative;
  margin-top: 56px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.home-projects-pin {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.home-projects-strip {
  display: flex;
  gap: 24px;
  padding: 0 var(--pad-x);
  will-change: transform;
  transform: translate3d(0,0,0);
}
.home-projects-strip .client-card {
  flex: 0 0 auto;
  /* 16:6 is wide — let the card width track the viewport */
  width: clamp(440px, 56vw, 880px);
}
.home-projects-strip .client-card .thumb {
  aspect-ratio: 16 / 6;
  width: 100%;
  height: auto;
}
@media (min-width: 1280px) {
  .home-projects-strip .client-card { width: clamp(640px, 50vw, 980px); }
  .home-projects-strip { gap: 32px; }
}

}
.scroll-hint svg {
  animation: nudge 1.6s var(--ease) infinite;
}
.home-projects.is-scrolling .scroll-hint { opacity: 0; transform: translateY(8px); }

@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

/* Mobile: keep page locked, use horizontal finger swipe inside the strip */
@media (max-width: 767px) {
  .home-projects-pin {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--pad-x);
    scrollbar-width: none;
  }
  .home-projects-pin::-webkit-scrollbar { display: none; }
  .home-projects-strip {
    transform: none !important;
    will-change: auto;
    gap: 8px;
  }
  .home-projects-strip .client-card {
    width: 70vw;
    scroll-snap-align: start;
  }
  .home-projects-strip .client-card .thumb {
    aspect-ratio: 16 / 11;
    width: 100%;
    height: auto;
  }
  .scroll-hint { display: none; }
}

/* Reduced motion — honor user preference */
@media (prefers-reduced-motion: reduce) {
  .home-projects { height: auto; }
  .home-projects-pin {
    position: static;
    height: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 24px;
  }
  .home-projects-strip { transform: none !important; }
  .home-projects-strip .client-card { scroll-snap-align: start; }
  .scroll-hint svg { animation: none; }
}

/* -------- WORK GRID (masonry-like) -------- */
.work {
  padding: calc(var(--pad-y) + 56px) var(--pad-x) 0;
}
.work .lead {
  max-width: 380px;
  font-size: 14px;
  color: var(--muted);             /* Outfit gray */
  margin-bottom: 40px;
  line-height: 1.6;
}
.work .lead .booking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--navy);              /* Merriweather navy */
  margin-bottom: 14px;
  transition: opacity .3s var(--ease);
}
.work .lead .booking:hover { opacity: .65; }

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .work-grid { gap: 32px; }
}
.tile {
  background: var(--card);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  /* 16:6 wide rectangle — same proportion as the home cards */
  aspect-ratio: 16 / 6;
  transition: transform .6s var(--ease);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile:hover img { transform: scale(1.03); }
.tile:hover { transform: translateY(-4px); }

/* The old wide/narrow split is no longer needed — every tile uses 16:6. */
.tile.t-wide,
.tile.t-narrow { grid-column: 1 / -1; }

/* -------- PROJECT DETAIL -------- */
.project {
  padding-top: 0;
}
.project-hero {
  width: 100%;
  height: 80vh;
  min-height: 480px;
  background: var(--card);
  display: flex;
  align-items: flex-end;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.project-hero img { width: 100%; height: 100%; object-fit: cover; }
.project-hero .hero-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0 var(--pad-x) 32px;
  color: var(--white);
  background: linear-gradient(to top, rgba(0,0,0,.35), transparent 70%);
}

.project-section {
  padding: 56px var(--pad-x);
  max-width: 1728px;
  margin: 0 auto;
}
.project-section h2 {
  font-size: clamp(18px, 3vw, 25px);
  color: var(--navy);              /* Merriweather navy */
  margin-bottom: 16px;
}
.project-section p {
  font-size: 16px;
  color: var(--muted);              /* Outfit gray */
  max-width: 70ch;
  line-height: 1.7;
  margin-bottom: 12px;
}
.project-section .meta {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.project-image {
  width: calc(100% - var(--pad-x) * 2);
  margin: 24px var(--pad-x);
  background: var(--card);
  aspect-ratio: 1673/832;
  border-radius: 2px;
  overflow: hidden;
}
.project-image img { width: 100%; height: 100%; object-fit: cover; }

/* -------- CONTACT -------- */
.contact {
  padding: calc(var(--pad-y) + 80px) var(--pad-x) 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.contact h1 {
  font-size: clamp(22px, 3vw, 32px);
  max-width: 22ch;
  margin: 0 auto 16px;
  color: var(--navy);              /* Merriweather navy */
}
.contact .sub {
  max-width: 46ch;
  font-size: 14px;
  color: var(--muted);              /* Outfit gray */
  margin: 0 auto 56px;
  line-height: 1.6;
}
.contact form {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.contact label {
  font-size: 12px;
  color: var(--muted);             /* Outfit gray */
  margin-bottom: 4px;
}
.contact input,
.contact textarea {
  font: 300 14px/1.5 var(--font-body);     /* Outfit Light */
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.contact input::placeholder,
.contact textarea::placeholder { color: var(--muted); opacity: .7; }
.contact input:focus,
.contact textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0,0,125,.08);
}
.contact textarea { resize: vertical; min-height: 110px; }
.contact button[type="submit"] {
  background: var(--form-bg);
  color: var(--navy);              /* Merriweather navy on the CTA */
  font-family: var(--font-head);
  padding: 14px;
  border-radius: 4px;
  margin-top: 16px;
  font-weight: 400;
  letter-spacing: .02em;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.contact button[type="submit"]:hover {
  background: var(--navy);
  color: var(--white);
}
.contact .booking {
  margin-top: 80px;
  margin-bottom: 60px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 18px;
  color: var(--navy);              /* Merriweather navy */
  transition: opacity .3s var(--ease);
}
.contact .booking:hover { opacity: .65; }

.form-status {
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
  min-height: 1.4em;
}
.form-status.success { color: #1d7a3a; }
.form-status.error   { color: #b3261e; }

/* -------- Animations -------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* -------- SERVICES -------- */
.services {
  padding: calc(var(--header-h, 40px) + 40px) var(--pad-x) 40px;
}
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}
.service-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.service-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--card);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 18px;
  transition: transform .6s var(--ease);
}
.service-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.service-card:hover .service-thumb { transform: translateY(-4px); }
.service-card:hover .service-thumb img { transform: scale(1.03); }
.service-card--dark .service-thumb { background: #0a0a0a; }
.service-card h3 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 22px;
  color: var(--navy);
  margin: 0;
  letter-spacing: 0;
}

/* -------- Helpers -------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: #5757ff;
  pointer-events: none;
  z-index: 9999;
  margin: -4px 0 0 -4px;
  transition: opacity .2s ease, transform .05s linear;
  will-change: transform;
}
@media (max-width: 767px), (pointer: coarse) {
  .cursor-dot { display: none; }
}
@media (min-width: 768px) and (pointer: fine) {

  /* Home page horizontal cards */
  .home-projects-strip .client-card .thumb img {
    filter: grayscale(100%);
    transition: filter .5s var(--ease), transform .8s var(--ease);
  }
  .home-projects-strip .client-card:hover .thumb img {
    filter: grayscale(0%);
  }

  /* Work page tiles */
  .tile img {
    filter: grayscale(100%);
    transition: filter .5s var(--ease), transform .8s var(--ease);
  }
  .tile:hover img {
    filter: grayscale(0%);
  }
}