/* =================================================================
   MERO — STYLE SYSTEM
   Built directly from the Mero Brand Identity Guidelines v1.0.
   Color, type and spacing values below are brand constants —
   change them here once and the whole site updates.
================================================================= */

:root {
  /* --- Brand palette ------------------------------------------------ */
  --near-black: #1E1E1E;
  --warm-off-white: #E4E2DD;
  --white: #FFFFFF;
  --mid-grey: #6B6B6B;
  --golden-hour: #A67C3D;

  /* --- Type ----------------------------------------------------------
     Helvetica Neue is the structural voice. Instrument Serif carries
     warmth/emotion. Mea Culpa is reserved for the signature mark only. */
  --font-display: "Helvetica Neue", "Inter", Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-script: "Mea Culpa", cursive;

  /* --- Scale ----------------------------------------------------------- */
  --hero-size: clamp(3rem, 9vw, 6.5rem);
  --headline-size: clamp(2rem, 5vw, 3rem);
  --section-title-size: clamp(1.35rem, 2.4vw, 2rem);
  --label-size: 0.8rem;

  --max-width: 1240px;
  --gutter: clamp(24px, 6vw, 64px);
  --section-space: clamp(88px, 12vw, 160px);
}

/* --- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--warm-off-white);
  color: var(--near-black);
  font-family: var(--font-display);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); }

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

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--golden-hour);
  outline-offset: 3px;
}

.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;
}

/* --- Type utility classes ------------------------------------------ */
.eyebrow {
  font-size: var(--label-size);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--mid-grey);
}

.display {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.98;
}

.serif-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* =================================================================
   NAV
================================================================= */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: env(safe-area-inset-top, 0px) 0 0 0;
  background: linear-gradient(to bottom, rgba(228,226,221,0.92), rgba(228,226,221,0));
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}

.logotype {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--near-black);
}

.logotype__img {
  display: block;
  height: 22px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  list-style: none;
  margin: 0; padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--near-black);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.nav-links a:hover { opacity: 1; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--near-black);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--warm-off-white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    transform: translateY(-100%);
    transition: transform 0.35s ease;
  }
  .nav-links a { font-size: 1.1rem; }
  .nav-links.is-open { transform: translateY(0); }
  .nav-toggle { display: block; z-index: 101; }
}

/* =================================================================
   HERO
================================================================= */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  padding-top: calc(120px + env(safe-area-inset-top, 0px));
  padding-bottom: clamp(48px, 8vh, 96px);
  overflow: hidden;
}

/* On wide screens, .container's max-width + auto margins center the
   whole content block, leaving a big empty gutter on the left even
   though the text inside is left-aligned. The hero should anchor to
   the actual left edge of the viewport instead. */
.hero > .container {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  /* Rule of thirds: anchor the text block roughly a third of the way
     across the viewport instead of hugging the left edge. */
  padding-left: clamp(24px, 30vw, 460px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 78% 18%, rgba(166,124,61,0.12), transparent 70%);
  z-index: -1;
}

/* Background photo sits beneath the warm gradient wash above, at very
   low opacity so it reads as texture rather than a competing image —
   the warm-off-white base color still shows through underneath it. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--warm-off-white);
  overflow: hidden;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.15;
}


.hero__kicker {
  opacity: 0;
  animation: reveal-up 0.7s ease forwards;
  animation-delay: 0.1s;
}

.hero__title {
  font-size: var(--hero-size);
  color: var(--near-black);
  margin-top: 18px;
  opacity: 0;
  animation: reveal-up 0.8s ease forwards;
  animation-delay: 0.25s;
}

.hero__statement {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  max-width: 16ch;
  margin-top: 32px;
  color: var(--near-black);
  opacity: 0;
  animation: reveal-up 0.8s ease forwards;
  animation-delay: 0.4s;
}

.hero__support {
  margin-top: 20px;
  max-width: 46ch;
  color: var(--mid-grey);
  font-size: 1.02rem;
  opacity: 0;
  animation: reveal-up 0.8s ease forwards;
  animation-delay: 0.5s;
}

.hero__ctas {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  opacity: 0;
  animation: reveal-up 0.8s ease forwards;
  animation-delay: 0.6s;
}

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--near-black);
  border-radius: 2px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
  cursor: pointer;
  background: none;
  font-family: var(--font-display);
}

.btn--primary {
  background: var(--near-black);
  color: var(--warm-off-white);
  border-color: var(--near-black);
}
.btn--primary:hover { opacity: 0.8; }

.btn--ghost {
  color: var(--near-black);
}
.btn--ghost:hover {
  border-color: var(--golden-hour);
  color: var(--golden-hour);
}

/* =================================================================
   SECTION SCAFFOLDING
================================================================= */
section { padding: var(--section-space) 0; position: relative; }


.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 72px);
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: var(--headline-size);
  color: var(--near-black);
}

.section-head p {
  max-width: 42ch;
  color: var(--mid-grey);
  margin: 0;
}



/* =================================================================
   WORK — a grid of equally-sized project cards, each fading in on
   scroll (see .reveal below)
================================================================= */
.work-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 56px);
}

@media (max-width: 760px) {
  .work-list { grid-template-columns: 1fr; }
}

.work-item {
  display: flex;
  flex-direction: column;
}

.work-item__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background:
    repeating-linear-gradient(135deg, rgba(228,226,221,0.06) 0 2px, transparent 2px 22px),
    #262523;
  border: 1px solid rgba(30,30,30,0.14);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  order: 1;
}

.work-item__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.work-item__frame:hover::after,
.work-item__frame:focus-visible::after { opacity: 1; }

.work-item__frame:hover img,
.work-item__frame:focus-visible img { transform: scale(1.02); }

.work-item__frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s ease;
}

.work-item__placeholder-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(228,226,221,0.35);
  text-align: center;
  padding: 12px;
}

.work-item__original-badge {
  position: absolute;
  top: 14px; left: 14px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  background: var(--golden-hour);
  color: var(--near-black);
  font-weight: 600;
  z-index: 1;
}

.work-item__head {
  order: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 18px;
  text-align: left;
}

.work-item__title {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--near-black);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  text-align: left;
}

.work-item__title:hover { color: var(--golden-hour); }

.work-item__category {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid-grey);
  white-space: nowrap;
}

.work-item__foot {
  order: 3;
  margin: 8px 0 0;
  padding: 0;
  max-width: none;
  text-align: left;
  color: var(--mid-grey);
  font-size: 0.95rem;
}

/* --- scroll reveal --------------------------------------------------
   Elements fade + lift into place as they enter the viewport. Off by
   default for prefers-reduced-motion (see the reset rules up top). */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =================================================================
   PROJECT PANEL (slide-in detail view)
================================================================= */
.project-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
}

.project-panel[aria-hidden="false"] { visibility: visible; }

.project-panel__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15,15,14,0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-panel[aria-hidden="false"] .project-panel__scrim { opacity: 1; }

.project-panel__sheet {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(720px, 100%);
  background: var(--near-black);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.16,.84,.44,1);
  padding: calc(32px + env(safe-area-inset-top, 0px)) clamp(24px, 5vw, 56px) 64px;
}

.project-panel[aria-hidden="false"] .project-panel__sheet { transform: translateX(0); }

.project-panel__close {
  background: none;
  border: 1px solid rgba(228,226,221,0.3);
  color: var(--warm-off-white);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 32px;
}
.project-panel__close:hover { border-color: var(--golden-hour); color: var(--golden-hour); }

.project-panel__meta-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.project-panel__meta-row span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid-grey);
}

.project-panel__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.project-panel__video {
  aspect-ratio: 16/9;
  background: #262523;
  border: 1px solid rgba(228,226,221,0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 32px;
  color: rgba(228,226,221,0.35);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
}
.project-panel__video iframe { width: 100%; height: 100%; border: 0; }

/* Portrait videos (Reels/Shorts style) get a tall, centered box instead
   of being squeezed into a wide 16:9 frame. */
.project-panel__video--portrait {
  aspect-ratio: 9 / 16;
  width: min(100%, 420px);
  max-height: 78vh;
  margin-left: auto;
  margin-right: auto;
}

.project-panel__story h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--golden-hour);
  margin-bottom: 8px;
  margin-top: 28px;
}
.project-panel__story h4:first-child { margin-top: 0; }

.project-panel__story p {
  color: var(--warm-off-white);
  line-height: 1.7;
  margin: 0;
}

/* =================================================================
   BEFORE / AFTER — FROM RAW TO FINAL
================================================================= */
.rawfinal {
  position: relative;
  aspect-ratio: 16/9;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(30,30,30,0.15);
  touch-action: pan-y;
  user-select: none;
}

/* The Promotional Video case study is shot portrait — give the
   before/after slider a tall frame instead of a wide 16:9 one. */
.rawfinal--portrait {
  aspect-ratio: 9 / 16;
  max-width: 420px;
}

.rawfinal__pane {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rawfinal__pane--final {
  background: repeating-linear-gradient(135deg, rgba(228,226,221,0.07) 0 2px, transparent 2px 22px), #2a2925;
  color: rgba(228,226,221,0.4);
}

.rawfinal__pane--raw {
  background: repeating-linear-gradient(135deg, rgba(0,0,0,0.25) 0 2px, transparent 2px 22px), #171614;
  color: rgba(228,226,221,0.3);
  clip-path: inset(0 50% 0 0);
}

.rawfinal__pane img { width: 100%; height: 100%; object-fit: cover; }

.rawfinal__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--golden-hour);
  transform: translateX(-50%);
  pointer-events: none;
}

.rawfinal__grip {
  position: absolute;
  top: 50%; left: 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--golden-hour);
  color: var(--near-black);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  pointer-events: none;
}

.rawfinal__slider {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.rawfinal__labels {
  display: flex;
  justify-content: space-between;
  max-width: 900px;
  margin: 14px auto 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid-grey);
}

.rawfinal__caption {
  text-align: left;
  max-width: 900px;
  margin: 24px auto 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--near-black);
}

/* =================================================================
   ABOUT
================================================================= */
.about {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
}

.about__portrait {
  aspect-ratio: 4/5;
  background: repeating-linear-gradient(135deg, rgba(30,30,30,0.05) 0 2px, transparent 2px 22px), #d8d5cd;
  border: 1px solid rgba(30,30,30,0.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(30,30,30,0.35);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
  overflow: hidden;
}

.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about__body p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 0 0 20px;
}

.about__body p:first-of-type {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.5;
}

/* =================================================================
   SERVICES
================================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(30,30,30,0.12);
  border: 1px solid rgba(30,30,30,0.12);
}

@media (max-width: 820px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--near-black);
  padding: clamp(28px, 4vw, 40px);
}

.service-card h3 {
  font-size: 1.15rem;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 18px;
}

.service-card ul {
  list-style: none;
  margin: 0; padding: 0;
  color: var(--mid-grey);
  font-size: 0.95rem;
}

.service-card li {
  padding: 9px 0;
  border-top: 1px solid rgba(228,226,221,0.1);
}
.service-card li:first-child { border-top: none; }

.service-card__note {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--golden-hour);
  font-size: 1.05rem;
}

/* =================================================================
   CONTACT
================================================================= */
.contact {
  text-align: center;
}

.contact__statement {
  font-size: clamp(2rem, 6vw, 3.4rem);
  color: var(--near-black);
  text-transform: none;
  font-weight: 800;
  max-width: 18ch;
  margin: 0 auto;
}

.contact__cta {
  margin-top: 28px;
}

.contact__socials {
  margin-top: 56px;
  display: flex;
  gap: clamp(18px, 4vw, 40px);
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}

.contact__socials a {
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(30,30,30,0.7);
  border-bottom: 1px solid rgba(30,30,30,0.25);
  padding-bottom: 3px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact__socials a:hover { color: var(--golden-hour); border-color: var(--golden-hour); }

.contact__email-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.email-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(30,30,30,0.25);
  border-radius: 999px;
  padding: 4px 10px 4px 8px;
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(30,30,30,0.55);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.email-copy-btn:hover { color: var(--golden-hour); border-color: var(--golden-hour); }

.email-copy-btn.is-copied {
  color: var(--golden-hour);
  border-color: var(--golden-hour);
}

/* =================================================================
   FOOTER
================================================================= */
.site-footer {
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(30,30,30,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(30,30,30,0.55);
}

.site-footer a { text-decoration: none; color: inherit; }

/* =================================================================
   PLACEHOLDER FLAG — visible reminder on every stand-in asset
================================================================= */
.placeholder-flag {
  border: 1px dashed rgba(30,30,30,0.3);
}
