/* =============================================================
   Yair Martinez — Commercial
   Editorial film-zine · warm cream paper · high-contrast serif
   ============================================================= */

:root {
  --paper:   #F3EBDC;   /* warm cream */
  --paper-2: #ECE0CC;   /* deeper panel */
  --ink:     #1C1714;   /* warm near-black */
  --ink-60:  #6A6056;   /* muted */
  --accent:  #C2461F;   /* burnt orange */
  --accent-d:#9E3815;
  --line:    rgba(28, 23, 20, 0.16);

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Inter", system-ui, sans-serif;
  --mono:  "Space Mono", ui-monospace, monospace;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1500px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

em { font-style: italic; }

a { color: inherit; text-decoration: none; }

/* ---------- film grain overlay ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-d);
  margin-bottom: 1.4rem;
}

/* ====================== NAV ====================== */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.nav__links {
  display: flex; gap: clamp(0.9rem, 2.4vw, 2.2rem); align-items: center;
  font-family: var(--mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.13em;
}
.nav__links a { transition: color .2s; }
.nav__links a:hover { color: var(--accent); }
.nav__cta {
  border: 1px solid var(--ink);
  padding: 0.5em 0.9em; border-radius: 100px;
  transition: background .25s, color .25s;
}
.nav__cta:hover { background: var(--ink); color: var(--paper); }

/* ====================== HERO ====================== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--pad) clamp(1.5rem, 3vw, 3rem);
  max-width: var(--maxw); margin: 0 auto;
}
.hero__head {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3.4rem, 12vw, 10rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin-bottom: 1.6rem;
}
.hero__head em { font-weight: 400; color: var(--accent); }
.hero__sub {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 30ch; color: var(--ink);
  margin-bottom: 2.2rem;
}
.hero__sub em { color: var(--accent-d); font-weight: 500; }
.hero__img {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.hero__img img { transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.hero__img:hover img { transform: scale(1.04); }
figure figcaption {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero__img figcaption {
  position: absolute; left: 0; bottom: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.5em 0.9em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  background: var(--accent); color: var(--paper);
  padding: 1em 1.6em; border-radius: 100px;
  transition: background .25s, transform .25s;
}
.btn:hover { background: var(--accent-d); transform: translateY(-2px); }

/* ====================== CLIENT TICKER ====================== */
.ticker {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 0.9rem 0;
  margin-top: clamp(1rem, 3vw, 2.5rem);
}
.ticker__track {
  display: flex; align-items: center; gap: clamp(3rem, 7vw, 7rem);
  width: max-content;
  padding-inline: clamp(1.5rem, 3.5vw, 3.5rem);
  animation: marquee 36s linear infinite;
  white-space: nowrap;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__logo {
  display: inline-flex; align-items: center;
  flex: 0 0 auto;
  opacity: 0.5;
  transition: opacity .3s ease, transform .3s ease;
}
.ticker__logo:hover { opacity: 1; transform: translateY(-2px); }
.ticker__logo img {
  width: auto;
  height: clamp(22px, 3vw, 34px);
  object-fit: contain;
}
/* per-brand optical sizing so weights look balanced */
.ticker__logo img[alt="Beachman"], .ticker__logo[aria-label="Beachman"] img { height: clamp(15px, 2vw, 22px); }
.ticker__logo img[alt="Beau's Brewing Co."], .ticker__logo[aria-label="Beau's Brewing Co."] img { height: clamp(13px, 1.7vw, 19px); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ====================== STATEMENT ====================== */
.statement {
  max-width: 1100px; margin: 0 auto;
  padding: clamp(4rem, 10vw, 9rem) var(--pad);
}
.statement p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 4.2vw, 3.2rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
}
.statement__lead { font-weight: 600; }
.statement em { color: var(--accent); font-style: italic; }

/* ====================== WORK SECTIONS ====================== */
.work { padding: clamp(2rem, 5vw, 4rem) var(--pad) clamp(3rem, 7vw, 6rem); max-width: var(--maxw); margin: 0 auto; }
.work__head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "no title" "no blurb";
  column-gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
  border-top: 1px solid var(--ink);
  padding-top: 1.4rem;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}
.work__no {
  grid-area: no;
  font-family: var(--mono); font-size: 0.8rem;
  letter-spacing: 0.1em; color: var(--accent-d);
  padding-top: 0.7rem;
}
.work__title {
  grid-area: title;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 0.92; letter-spacing: -0.03em;
}
.work__blurb {
  grid-area: blurb;
  max-width: 46ch; margin-top: 1.2rem;
  color: var(--ink); font-size: 1.05rem;
  justify-self: end; text-align: left;
}

/* ---------- galleries (editorial grids) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(0.6rem, 1.4vw, 1.1rem);
  grid-auto-flow: dense;
}
.cell {
  position: relative;
  grid-column: span 2;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-2);
}
.cell--wide { grid-column: span 4; aspect-ratio: 16 / 10; }
.cell--tall { grid-column: span 2; aspect-ratio: 3 / 4.6; }
.cell--feature { grid-column: span 4; aspect-ratio: 16 / 11; }

.cell img { transition: transform 1.1s cubic-bezier(.2,.7,.2,1), filter .6s; }
.cell:hover img { transform: scale(1.05); }
.cell figcaption {
  position: absolute; left: 0; bottom: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.45em 0.8em;
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.cell:hover figcaption { transform: translateY(0); }

/* even out a 6-col grid: make some default cells span 3 in ecom rhythm */
.gallery--ecom .cell:nth-child(3),
.gallery--ecom .cell:nth-child(4) { grid-column: span 3; aspect-ratio: 5/4; }
.gallery--life .cell:nth-child(3),
.gallery--life .cell:nth-child(4) { grid-column: span 3; aspect-ratio: 5/4; }
.gallery--life .cell:nth-child(6) { grid-column: span 3; aspect-ratio: 5/4; }
.gallery--brand .cell:nth-child(7),
.gallery--brand .cell:nth-child(8) { grid-column: span 3; aspect-ratio: 5/4; }

/* ====================== ABOUT ====================== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
  border-top: 1px solid var(--line);
}
.about__head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1; letter-spacing: -0.02em;
}
.about__head em { color: var(--accent); }
.about__body p { font-size: 1.15rem; margin-bottom: 1.2rem; max-width: 48ch; }
.about__note { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-60); }
.about__list {
  list-style: none; margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.about__list li {
  display: grid; grid-template-columns: 9rem 1fr; gap: 1rem;
  padding: 0.9rem 0; border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}
.about__list span {
  font-family: var(--mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent-d); padding-top: 0.15em;
}

/* ====================== CONTACT ====================== */
.contact {
  text-align: center;
  padding: clamp(5rem, 12vw, 11rem) var(--pad);
  background: var(--ink); color: var(--paper);
}
.contact__head {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.8rem, 10vw, 8rem);
  line-height: 0.95; letter-spacing: -0.03em;
  margin-bottom: 2.2rem;
}
.contact__head em { color: var(--accent); font-weight: 400; }
.contact__email {
  display: inline-block;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.3rem, 3.5vw, 2.4rem);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.1em;
  transition: color .25s;
}
.contact__email:hover { color: var(--accent); }
.contact__meta {
  font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-top: 2rem; color: color-mix(in srgb, var(--paper) 70%, transparent);
}
.contact__meta a { border-bottom: 1px solid currentColor; }

/* ====================== FOOTER ====================== */
.footer {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between;
  padding: 1.6rem var(--pad);
  font-family: var(--mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-60);
}
.footer a:hover { color: var(--accent); }

/* ====================== REVEAL ANIMATION ====================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero__img { aspect-ratio: 3/4; max-height: 70vh; }
  .about { grid-template-columns: 1fr; }
  .work__head {
    grid-template-columns: 1fr;
    grid-template-areas: "no" "title" "blurb";
  }
  .work__no { padding-top: 0; }
  .work__blurb { justify-self: start; margin-top: 0.8rem; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cell, .cell--wide, .cell--tall, .cell--feature,
  .gallery--ecom .cell:nth-child(n), .gallery--life .cell:nth-child(n),
  .gallery--brand .cell:nth-child(n) { grid-column: span 1; aspect-ratio: 4/5; }
  /* any odd-positioned final cell spans the full row so it never sits orphaned */
  .gallery .cell:last-child:nth-child(odd) { grid-column: span 2; aspect-ratio: 16/10; }
  .cell figcaption { transform: translateY(0); font-size: 0.62rem; }
  .nav__links { gap: 0.8rem; }
  .nav__links a:not(.nav__cta) { display: none; }
  /* logos a touch smaller / faster strip on phones */
  .ticker__track { gap: clamp(2.2rem, 9vw, 3.5rem); animation-duration: 24s; }
  .ticker__logo { opacity: 0.6; }
}
