/* ============================================================
   ALEX ALLPER PORTFOLIO — GLOBAL STYLES
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --cream: #F5F0E8; --black: #1A1A18; --green: #2D6A4F;
  --green-light: #52B788; --gray: #8A8478; --red: #B03A2E; --nav-height: 72px;
}
html { scroll-behavior: smooth; }
body { background: var(--cream); color: var(--black); font-family: 'DM Sans', sans-serif; font-weight: 300; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
body::after { content: ''; position: fixed; inset: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E"); background-size: 200px 200px; mix-blend-mode: overlay; opacity: 0.04; pointer-events: none; z-index: 9999; }
h1, h2, h3, h4 { font-family: 'Lora', serif; font-weight: 400; line-height: 1.1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: 0 60px; background: var(--cream); border-bottom: 1px solid rgba(45, 106, 79, 0.12); transition: background 0.3s ease; }
.nav--dark { background: var(--black); border-bottom-color: rgba(255, 255, 255, 0.06); }
.nav__logo { display: block; line-height: 0; border: none; outline: none; }
.nav__logo-img { height: 40px; width: auto; display: block; border: none; outline: none; box-shadow: none; line-height: 0; }
.nav__logo-img--dark { display: block; }
.nav__logo-img--light { display: none; }
.nav--dark .nav__logo-img--light { display: block; }
.nav--dark .nav__logo-img--dark { display: none; }
.nav__links { display: flex; gap: 36px; list-style: none; }
.nav__links a { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray); transition: color 0.2s ease; }
.nav__links a:hover, .nav__links a.active { color: var(--green); }
.nav--dark .nav__links a { color: rgba(245, 240, 232, 0.45); }
.nav--dark .nav__links a:hover, .nav--dark .nav__links a.active { color: var(--green-light); }
.nav-offset { padding-top: var(--nav-height); }
.vimeo-wrap iframe { border: none; outline: none; display: block; }

/* BOTTOM LINE */
.bottom-line { padding: 48px 80px; border-top: 1px solid rgba(45, 106, 79, 0.12); display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.bottom-line__text { font-family: 'DM Sans', sans-serif; font-size: 18px; font-weight: 600; color: var(--black); }
.bottom-line__next, .bottom-line__prev { font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--green); white-space: nowrap; transition: color 0.2s ease; text-decoration: none; }
.bottom-line__next:hover, .bottom-line__prev:hover { color: var(--black); }

/* CLIENT HERO */
.client-hero { position: relative; height: 70vh; min-height: 520px; overflow: hidden; background: var(--black); }
.client-hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; transition: transform 6s ease; }
.client-hero:hover .client-hero__image { transform: scale(1.03); }
.client-hero__content { position: absolute; bottom: 60px; left: 80px; right: 80px; z-index: 2; }
.client-hero__stat { font-family: 'Lora', serif; font-size: 22px; font-style: italic; color: rgba(245, 240, 232, 0.8); margin-bottom: 16px; letter-spacing: 0.02em; }
.client-hero__headline { font-family: 'Lora', serif; font-size: 52px; font-weight: 700; color: var(--cream); line-height: 1.05; max-width: 800px; }
.client-opening { padding: 72px 80px 60px; width: 100%; border-bottom: 1px solid rgba(45, 106, 79, 0.15); }
.client-opening p { font-family: 'DM Sans', sans-serif; font-size: 20px; color: var(--black); line-height: 1.6; font-weight: 600; }

/* HERO POSITION OVERRIDES */
.walmart-hero .client-hero__image { object-position: center 5%; }
.rightbrain-hero .client-hero__image { object-position: center 30%; }
.laangels-hero .client-hero__image { object-position: center top; }

/* WORK SECTION */
.work-section { padding: 56px 80px 72px; }
.work-section + .work-section { padding-top: 0; }
.work-section::before { content: ''; display: block; height: 4px; background: var(--green); margin: 0 -80px 56px -80px; }
.work-label { font-family: 'Lora', serif; font-size: 36px; font-weight: 700; color: var(--black); margin-bottom: 32px; line-height: 1.15; }

/* WORK GRID */
.work-grid { display: grid; gap: 3px; }
.work-grid--2 { grid-template-columns: 1fr 1fr; align-items: start; }
.work-grid--3 { grid-template-columns: repeat(3, 1fr); }
.work-grid--4 { grid-template-columns: repeat(4, 1fr); }
.work-grid--video { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; align-items: start; }
.work-grid--video .work-item--vimeo { align-self: start; overflow: visible; background: none !important; line-height: 0; }
.work-grid--2 .work-item--vimeo, .work-grid--2 .work-item { align-self: start; }
.work-grid--video .vimeo-wrap { position: relative; width: 100%; }
.work-grid--video .vimeo-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; }
.work-item--vimeo-wide { grid-column: 1 / -1; overflow: visible; background: none; line-height: 0; }
.work-item--vimeo-wide .vimeo-wrap { position: relative; width: 100%; line-height: 0; }
.work-item--vimeo-wide .vimeo-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; }
.work-item { background: var(--black); position: relative; overflow: hidden; }
.work-item--vimeo, .work-item--vimeo-wide { background: none; overflow: visible; }
.work-item--vimeo { overflow: visible; }
.work-item--vimeo .vimeo-wrap { position: relative; width: 100%; }
.work-item--vimeo .vimeo-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; background: transparent; }
.work-item__image { width: 100%; aspect-ratio: 16/10; object-fit: cover; opacity: 0.9; display: block; }
.work-item--2col { grid-column: span 2; }
.work-item--full { width: 100%; }
.work-item--full .work-item__image { aspect-ratio: 16/7; }

/* PRESS IMAGES */
.work-item__image--press { width: 100%; max-width: 100%; height: auto; aspect-ratio: unset; object-fit: unset; object-position: unset; opacity: 1; display: block; }
.work-item--full .work-item__image--press { max-width: 100%; margin: 0 auto; aspect-ratio: unset !important; object-fit: unset !important; height: auto !important; width: 100% !important; }
.work-item:has(.work-item__image--press) { background: var(--cream); overflow: visible; height: auto; }

/* CALLOUT */
.callout { background: var(--black); padding: 40px 80px; margin: 0 0 72px; text-align: center; }
.callout p { font-family: 'Lora', serif; font-size: 36px; line-height: 1.4; color: var(--cream); font-weight: 700; max-width: 800px; margin: 0 auto; }

/* INSIGHT BLOCK */
.insight-block { padding: 60px 80px; background: var(--black); }
.insight-block p { font-family: 'Lora', serif; font-size: 24px; font-style: italic; color: var(--cream); line-height: 1.5; max-width: 800px; }

/* RESULTS BAR */
.results-bar { padding: 60px 80px; border-top: 2px solid var(--green); border-bottom: 1px solid rgba(45, 106, 79, 0.12); display: flex; gap: 0; align-items: stretch; justify-content: center; background: var(--cream); text-align: center; }
.results-bar__item { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 80px; border-right: 1px solid rgba(45, 106, 79, 0.2); }
.results-bar__item:first-child { border-left: 1px solid rgba(45, 106, 79, 0.2); }
.results-bar__number { font-family: 'Lora', serif; font-size: 64px; font-weight: 700; color: var(--black); line-height: 1; }
.results-bar__prefix { font-family: 'Lora', serif; font-size: 64px; font-weight: 700; color: var(--black); line-height: 1; margin-right: 6px; }
.results-bar__label { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray); }

/* PULL QUOTE */
.pull-quote { padding: 60px 80px; border-top: 1px solid rgba(45, 106, 79, 0.12); border-bottom: 1px solid rgba(45, 106, 79, 0.12); }
.pull-quote p { font-family: 'Lora', serif; font-style: italic; font-size: 28px; color: var(--black); line-height: 1.6; font-weight: 400; text-align: center; }

/* HOMEPAGE HERO */
.home-hero { background: var(--black); padding: calc(var(--nav-height) + 40px) 60px 80px; min-height: 78vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.home-hero__eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; color: var(--green-light); margin-bottom: 24px; }
.home-hero__title { font-family: 'Lora', serif; font-style: italic; font-weight: 900; font-size: clamp(80px, 10vw, 130px); color: var(--cream); line-height: 0.95; margin-bottom: 32px; }
.home-hero__rule { width: 48px; height: 2px; background: var(--green); margin-bottom: 24px; }
.home-hero__subhead { font-family: 'Lora', serif; font-style: italic; font-size: 28px; color: rgba(245, 240, 232, 0.5); max-width: 600px; line-height: 1.4; }

/* HOMEPAGE GRID */
.home-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; background: #2A2A28; }
.grid-box { position: relative; overflow: hidden; cursor: pointer; background: #1E2420; min-height: 280px; display: flex; flex-direction: column; justify-content: flex-end; padding: 36px 32px; text-decoration: none; }
.grid-box--feature { grid-column: span 2; min-height: 360px; }
.grid-box--full { grid-column: 1 / -1; min-height: 480px; }
.grid-box::before { content: ''; position: absolute; inset: 0; background: rgba(26, 26, 24, 0.52); transition: background 0.4s ease; z-index: 1; pointer-events: none; }
.grid-box:hover::before { background: rgba(26, 26, 24, 0.12); }
.grid-box__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; z-index: 0; pointer-events: none; }
.grid-box:hover .grid-box__bg { transform: scale(1.06); }
.grid-box video.grid-box__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.grid-box__content { position: relative; z-index: 3; pointer-events: none; }
.grid-box__client { font-size: 19px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--green-light); margin-bottom: 12px; }
.grid-box__stat { font-family: 'Lora', serif; font-size: 22px; font-weight: 700; color: var(--cream); line-height: 1.2; margin-bottom: 12px; }
.grid-box--feature .grid-box__stat { font-size: 26px; }
.grid-box__headline { font-family: 'Lora', serif; font-size: 17px; font-style: italic; font-weight: 400; color: rgba(245, 240, 232, 0.5); line-height: 1.4; transition: color 0.2s ease; }
.grid-box:hover .grid-box__headline { color: rgba(245, 240, 232, 0.75); }
.grid-box__line { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--green-light); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; z-index: 3; pointer-events: none; }
.grid-box:hover .grid-box__line { transform: scaleX(1); }

/* MORE WINS */
.mw-editorial { padding: 40px 80px 0; max-width: 860px; }
.mw-headline { font-family: 'Lora', serif; font-size: 32px; font-weight: 700; color: var(--black); line-height: 1.2; margin-bottom: 16px; }
.mw-copy { font-family: 'DM Sans', sans-serif; font-size: 17px; font-weight: 300; color: var(--gray); line-height: 1.7; }

/* ABOUT PAGE */
.about-hero { background: var(--black); padding: calc(var(--nav-height) + 80px) 80px 100px; }
.about-hero__eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--green-light); margin-bottom: 20px; }
.about-hero__title { font-family: 'Lora', serif; font-style: italic; font-weight: 900; font-size: clamp(60px, 8vw, 100px); color: var(--cream); line-height: 0.95; }
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding: 80px; align-items: start; }
.about-copy p { font-size: 16px; line-height: 1.8; color: var(--black); font-weight: 300; margin-bottom: 24px; }
.about-copy p:last-child { margin-bottom: 0; }
.about-image { position: sticky; top: calc(var(--nav-height) + 40px); }
.about-image img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

/* CONTACT PAGE */
.contact-hero { background: var(--black); padding: calc(var(--nav-height) + 80px) 80px 100px; min-height: 60vh; display: flex; flex-direction: column; justify-content: flex-end; }
.contact-hero__title { font-family: 'Lora', serif; font-style: italic; font-weight: 900; font-size: clamp(40px, 6vw, 80px); color: var(--cream); line-height: 1; margin-bottom: 32px; }
.contact-hero__subhead { font-family: 'Lora', serif; font-style: italic; font-size: 20px; color: rgba(245, 240, 232, 0.5); margin-bottom: 48px; max-width: 480px; }
.contact-links { display: flex; flex-direction: column; gap: 16px; }
.contact-link { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; color: var(--cream); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; transition: color 0.2s ease; }
.contact-link:hover { color: var(--green-light); }
.contact-link::before { content: ''; width: 24px; height: 1px; background: currentColor; transition: width 0.2s ease; }
.contact-link:hover::before { width: 40px; }

/* 404 PAGE */
.not-found { min-height: 78vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px; background: var(--black); }
.not-found__title { font-family: 'Lora', serif; font-style: italic; font-weight: 900; font-size: clamp(80px, 15vw, 180px); color: rgba(245, 240, 232, 0.08); line-height: 1; margin-bottom: 32px; }
.not-found__message { font-family: 'Lora', serif; font-style: italic; font-size: 24px; color: var(--cream); margin-bottom: 40px; max-width: 500px; line-height: 1.4; }
.not-found__link { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green-light); text-decoration: none; transition: color 0.2s ease; }
.not-found__link:hover { color: var(--cream); }

/* ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { opacity: 0; animation: fadeUp 0.7s ease forwards; }
.fade-up--delay-1 { animation-delay: 0.1s; }
.fade-up--delay-2 { animation-delay: 0.2s; }
.fade-up--delay-3 { animation-delay: 0.35s; }

/* SITE FOOTER */
.site-footer { padding: 32px 60px; border-top: 1px solid rgba(45, 106, 79, 0.12); display: flex; align-items: center; justify-content: space-between; background: var(--cream); }
.site-footer__logo { font-family: 'Lora', serif; font-style: italic; font-size: 17px; color: var(--gray); }
.site-footer__copy { font-size: 11px; color: rgba(138, 132, 120, 0.5); font-weight: 300; }
.site-footer__links { display: flex; gap: 24px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray); }
.site-footer__links a:hover { color: var(--green); }

/* ============================================================
   MOBILE — max-width 768px
   ============================================================ */
@media (max-width: 768px) {

  /* NAV */
  .nav { padding: 0 24px; }
  .nav__links { gap: 20px; }
  .nav__links a { font-size: 10px; }
  .nav__logo-img { height: 32px; }

  /* HOME HERO */
  .home-hero { padding: calc(var(--nav-height) + 32px) 24px 48px; min-height: 60vh; }
  .home-hero__title { font-size: clamp(52px, 14vw, 80px); }
  .home-hero__subhead { font-size: 20px; }

  /* HOME GRID */
  .home-grid { grid-template-columns: 1fr; }
  .grid-box--full { min-height: 320px; }
  .grid-box { min-height: 260px; padding: 24px; }
  .grid-box__client { font-size: 14px; }
  .grid-box__stat { font-size: 18px; }
  .grid-box__headline { font-size: 14px; }

  /* CLIENT HERO */
  .client-hero { height: 50vh; min-height: 320px; }
  .client-hero__content { bottom: 32px; left: 24px; right: 24px; }
  .client-hero__stat { font-size: 16px; }
  .client-hero__headline { font-size: 32px; }

  /* CLIENT OPENING */
  .client-opening { padding: 40px 24px 32px; }
  .client-opening p { font-size: 17px; }

  /* WORK SECTIONS */
  .work-section { padding: 40px 24px 48px; }
  .work-section::before { margin: 0 -24px 40px -24px; }
  .work-label { font-size: 26px; margin-bottom: 24px; }

  /* WORK GRIDS */
  .work-grid--2, .work-grid--3, .work-grid--4, .work-grid--video { grid-template-columns: 1fr; }
  .work-item--vimeo-wide { grid-column: 1; }

  /* 9:16 PORTRAIT VIDEO ROWS */
  div[style*="display:flex"] { flex-direction: column; align-items: center; }
  .work-item--vimeo[style*="width:360px"] { width: 100% !important; }

  /* CALLOUT */
  .callout { padding: 32px 24px; margin: 0 0 48px; }
  .callout p { font-size: 24px; }

  /* INSIGHT BLOCK */
  .insight-block { padding: 40px 24px; }
  .insight-block p { font-size: 18px; }

  /* RESULTS BAR */
  .results-bar { flex-direction: column; padding: 40px 24px; align-items: center; gap: 32px; }
  .results-bar__item { border-right: none; border-left: none !important; border-bottom: 1px solid rgba(45, 106, 79, 0.2); padding: 0 0 32px 0; width: 100%; }
  .results-bar__item:last-child { border-bottom: none; padding-bottom: 0; }
  .results-bar__number { font-size: 48px; }

  /* PULL QUOTE */
  .pull-quote { padding: 40px 24px; }
  .pull-quote p { font-size: 22px; }

  /* BOTTOM LINE */
  .bottom-line { padding: 32px 24px; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
  .bottom-line__prev { order: 1; }
  .bottom-line__next { order: 2; }
  .bottom-line__text { order: 3; flex: 0 0 100%; width: 100%; font-size: 15px; text-align: center !important; margin-top: 8px; }

  /* MORE WINS */
  .mw-editorial { padding: 24px 24px 0; }
  .mw-headline { font-size: 24px; }

  /* ABOUT */
  .about-hero { padding: calc(var(--nav-height) + 40px) 24px 48px; }
  .about-hero__title { font-size: clamp(48px, 12vw, 80px); }
  .about-content { grid-template-columns: 1fr; gap: 40px; padding: 40px 24px; }
  .about-image { position: static; }

  /* CONTACT */
  .contact-hero { padding: calc(var(--nav-height) + 40px) 24px 48px; }
  .contact-hero__title { font-size: clamp(32px, 10vw, 60px); }

  /* SITE FOOTER */
  .site-footer { flex-direction: column; gap: 16px; padding: 32px 24px; text-align: center; }

}
