@font-face { font-family: "Jost"; src: url("../fonts/jost.woff2") format("woff2");
             font-weight: 100 900; font-style: normal; font-display: block; }
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html, body { background: #ffffff; color: #000000; }
body { font-family: "Fraunces", Georgia, "Times New Roman", serif; }

header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: #ffffff; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 28px 19px 24px;
         font-family: "Fraunces", Georgia, "Times New Roman", serif;
         font-size: clamp(22px, 7.9vw, 64px); line-height: 1; }
.site-name { font-size: 0.75em; font-weight: 200; letter-spacing: 0.095em; margin-right: -0.095em; white-space: nowrap; color: #0d0d0d; text-decoration: none; }

/* Icon height = cap height of the name, so the top bar meets the tops of the capitals and the bottom bar sits on the baseline */
.menu-btn { --h: 0.717em; flex: none; font: inherit; line-height: 1; background: none; border: 0; cursor: pointer;
            font-size: 0.75em; padding: 12px 10px; margin: -12px -10px; color: #0d0d0d; }   /* sized to the logo (0.75em) */
@supports (height: 1cap) { .menu-btn { --h: 1cap; } }
.menu-btn .bars { --t: 2px; position: relative; display: inline-block; vertical-align: baseline;
                  height: var(--h); width: calc(var(--h) * 1.3); }
.menu-btn .bars span { position: absolute; left: 0; right: 0; height: var(--t); background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.menu-btn .bars span:nth-child(1) { top: 0; }
.menu-btn .bars span:nth-child(2) { top: calc(50% - var(--t) / 2); }
.menu-btn .bars span:nth-child(3) { bottom: 0; }
.menu-btn[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(calc(var(--h) / 2 - var(--t) / 2)) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(calc(var(--t) / 2 - var(--h) / 2)) rotate(-45deg); }
.menu-btn:focus-visible, nav a:focus-visible, .site-name:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

nav { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-size: 14px; line-height: normal; position: absolute; top: 100%; right: 19px; z-index: 10; background: rgba(255, 255, 255, 0.9); min-width: 200px;
      opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
nav.open { opacity: 1; transform: none; pointer-events: auto; }
nav a { display: block; padding: 16px 20px; font-size: 14px; font-weight: 300; letter-spacing: 0.1em; color: #0d0d0d; text-decoration: none; }
nav a + a { border-top: 1px solid #e5e5e5; }
nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
nav a:hover { background: #f4f4f4; }

/* Page titles match the labels under the homepage rectangles: Jost Light, 0.1em tracking, same size at every screen width */
.page-title { padding: 0 19px 19px; font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 300;
              font-size: clamp(8px, 1.375vw, 10px); line-height: 1.2; letter-spacing: 0.1em; color: #0d0d0d; }
@media (min-width: 900px) { .page-title { font-size: clamp(8px, 0.7vw, 10px); } }
.page[hidden] { display: none; }
.gallery.emails { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; align-items: start; }
.emails figure { cursor: zoom-in; }
/* email thumbnails show at full height (see .is-masonry) */
.emails figure:focus-visible { outline: 2px solid #0d0d0d; outline-offset: 3px; }
.emails img[data-anim] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch;
            padding: calc(env(safe-area-inset-top, 0px) + 80px) 19px calc(env(safe-area-inset-bottom, 0px) + 19px);
            opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { display: block; width: 100%; max-width: 641px; height: auto; margin: 0 auto; }
.lightbox-close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 18px); right: 9px; width: 44px; height: 44px;
                  border: 0; background: none; cursor: pointer; }
.lightbox-close::before, .lightbox-close::after { content: ""; position: absolute; left: 10px; right: 10px; top: 21px; height: 2px;
                  background: #0d0d0d; }
.lightbox-close::before { transform: rotate(45deg); }
.lightbox-close::after { transform: rotate(-45deg); }
.lightbox-close:focus-visible { outline: 2px solid #0d0d0d; outline-offset: 2px; }
/* Photo viewer: near full-screen image on a 75% black backdrop, X in the image's top-left corner, arrows at the screen edges */
.lb-frame { position: relative; }
.lb-frame-close { display: none; }
.lightbox.photo-mode { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
                       background: rgba(0, 0, 0, 0.75); padding: 16px; }
.lightbox.photo-mode .lightbox-close { display: none; }
.lightbox.photo-mode .lb-frame { display: inline-block; line-height: 0; }
.lightbox.photo-mode img { max-width: none; margin: 0; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35); }
.lightbox.photo-mode .lb-frame-close, .lightbox.email-mode .lb-frame-close { display: block; position: absolute; top: 8px; left: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%;
                                       background: rgba(0, 0, 0, 0.35); cursor: pointer; transition: background-color .2s ease; }
.lightbox.photo-mode .lb-frame-close:hover, .lightbox.email-mode .lb-frame-close:hover { background: rgba(0, 0, 0, 0.6); }
.lb-frame-close::before, .lb-frame-close::after { content: ""; position: absolute; left: 10px; right: 10px; top: 17px; height: 2px; background: #fff; }
.lb-frame-close::before { transform: rotate(45deg); }
.lb-frame-close::after { transform: rotate(-45deg); }
.lb-frame-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* arrows sit at the left and right edges of the screen, vertically centered */
.lightbox-nav { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.lightbox-nav[hidden] { display: none; }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%;
             background: rgba(0, 0, 0, 0.35); cursor: pointer; pointer-events: auto; opacity: 0.7; transition: opacity .2s ease, background-color .2s ease; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-arrow:hover { background: rgba(0, 0, 0, 0.6); }
.lb-arrow:hover, .lb-arrow:focus-visible { opacity: 1; }
.lb-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-arrow::before { content: ""; position: absolute; top: 50%; left: 50%; width: 11px; height: 11px;
                    border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; }
.lb-prev::before { transform: translate(-30%, -50%) rotate(45deg); }
.lb-next::before { transform: translate(-70%, -50%) rotate(-135deg); }
/* Email viewer: same as the photo viewer — centered on the 75% backdrop, shrunk to fit the screen when it's taller (never enlarged past its 641px design width) */
.lightbox.email-mode { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
                       background: rgba(0, 0, 0, 0.75); padding: 16px; }
.lightbox.email-mode .lightbox-close { display: none; }
.lightbox.email-mode .lb-frame { display: inline-block; line-height: 0; }
.lightbox.email-mode img { max-width: none; margin: 0; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35); }
body.no-scroll { overflow: hidden; }
.page-title.ads-title { text-align: left; padding: 20px 19px 39px; }

.gallery { display: flex; flex-direction: column; gap: 19px; padding: 0 19px 19px; }
figure { width: 100%; }
figure img { width: 100%; height: auto; display: block; }
.ph { width: 100%; background: #eeeeee; }
.ph.land { aspect-ratio: 3 / 2; }
.ph.port { aspect-ratio: 2 / 3; }
.ph.ad { aspect-ratio: 1280 / 418; }
/* square (300x250) ads: two across, sized so each is as tall as a 1280x418 wide banner
   (banner height = 418/1280 of the page width; squares are ~1.2:1, so width = that height x 1.2),
   with the leftover width shared evenly between and beside them; 40px above and below */
.ad-pair { display: flex; justify-content: space-evenly; align-items: flex-start; padding: 21px 0; }
.ad-pair > figure { flex: 0 0 calc(100% * 418 / 1280 * 1.2); }
.ph.video { aspect-ratio: 16 / 9; }
/* Design page: two across, each piece shown whole at its own shape; tap to view large */
.gallery.design-grid { display: grid; grid-template-columns: repeat(2, 1fr); align-items: start; }
.page-title.ads-title.has-intro { padding-bottom: 12px; }
.page-intro { max-width: 638px; margin: 0; padding: 0 19px 39px; text-align: left;
              font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 300;
              font-size: 16px; line-height: 1.6; color: #0d0d0d; }
.gallery.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px; align-items: start; }
/* photo thumbnails show at full height (see .is-masonry) */
@media (min-width: 900px) { .gallery.photo-grid { grid-template-columns: repeat(3, 1fr); } }
/* Homepage link rectangles: picture box with the label underneath */
.gallery.tiles { row-gap: 28px; }
.tile { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: #0d0d0d; text-align: center;
        font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 300;
        font-size: clamp(9px, 2.75vw, 20px); letter-spacing: 0.06em; line-height: 1.2; }
.tile-box { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: #eeeeee; transition: background-color .2s ease; }
.tile-label { margin-right: -0.06em; transform: skewX(-8deg); transition: font-weight .25s ease; }   /* same slant as the Project details link */
.tile:hover .tile-box { background-color: #e4e4e4; }
.tile:hover .tile-label, .tile:focus-visible .tile-label { font-weight: 310; }
.tile:focus-visible { outline: 2px solid #0d0d0d; outline-offset: 3px; }
.tile-box.has-bg::before { content: ""; position: absolute; inset: 0; background-position: center; background-size: cover; background-repeat: no-repeat; }
.tile-box.has-bg::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity .25s ease; }
.tile:hover .tile-box.has-bg::after, .tile:focus-visible .tile-box.has-bg::after { opacity: 0.5; }
/* Design rectangle: logo image at full width, centered */
.tile-box.tile-design::before { background-image: url("../images/tiles/design-lockdown.jpg"); background-size: 100% auto; background-position: center calc(50% + 15px); }
/* Photos rectangle: stage photo, fills the rectangle, centered */
.tile-box.tile-photos::before { background-image: url("../images/tiles/photos-stage.jpg"); background-size: cover; background-position: center; }
/* ESPN rectangle: looping ad video, full width, centered top to bottom */
.tile-video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
/* Email rectangle: animated GIF at full width, shifted so the three grills sit in the middle (grills center at 54% of the GIF's height) */
.tile-box.tile-email::before { background-image: url("../images/emails/labor-day-mystery-offer-2018.gif"); background-size: 100% auto; background-position: center calc(60% - 20px); }
/* Full width: three tiles per row, left-aligned, using the whole browser width (edges match the header: 24px left, 28px right) */
@media (min-width: 900px) { .gallery.tiles { display: grid; grid-template-columns: repeat(6, 1fr); width: 100vw; margin-left: calc(50% - 50vw); padding-left: 24px; padding-right: 28px; } .tile { grid-column: span 2; font-size: clamp(8px, 0.95vw, 13.5px); }
}
/* Tablet down to phone size: two tiles per row, left-aligned */
@media (min-width: 700px) and (max-width: 899px) { .gallery.tiles { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 19px; }
  .tile { grid-column: span 2; } }
figure video { width: 100%; height: auto; display: block; background: #eeeeee; }
.ad-video { position: relative; cursor: pointer; }
.ad-play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border: 0; border-radius: 50%;
           background: rgba(13, 13, 13, 0.6); cursor: pointer; transition: opacity .2s ease; }
.ad-play::before { content: ""; position: absolute; left: 22px; top: 17px; border-style: solid; border-width: 11px 0 11px 17px;
                   border-color: transparent transparent transparent #fff; }
.ad-video.playing .ad-play { opacity: 0; pointer-events: none; }
.ad-play:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* About page: photo on the left, bio to its right (stacked on narrow phones) */
.about { max-width: 980px; margin: 0 auto; padding: 20px 19px 40px; display: flex; align-items: flex-start; gap: 36px; }
.about-photo { flex: 0 0 300px; width: 300px; height: auto; display: block; }
.about-text { flex: 1 1 auto; min-width: 0; }
@media (max-width: 699px) {
  .about { flex-direction: column; align-items: center; gap: 24px; }
  .about-photo { flex: none; width: 50%; }
  .about-text { width: 100%; }
}
.about .about-copy { padding: 0; max-width: none; margin: 0 0 16px; }
.about .about-copy a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.about-copy { padding: 0 19px 40px; max-width: 640px; font-family: "Fraunces", Georgia, "Times New Roman", serif;
              font-weight: 300; font-size: 18px; line-height: 1.6; color: #0d0d0d; }
.chat { padding: 0 19px 40px; max-width: 560px; }
.chat-intro { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 300;
              font-size: 18px; line-height: 1.5; color: #0d0d0d; margin-bottom: 20px; }
.chat-form { display: grid; gap: 10px; }
.chat-form textarea { width: 100%; resize: vertical; min-height: 120px; padding: 12px 14px; border: 1px solid #d9d9d9; border-radius: 0;
                      background: #fff; color: #0d0d0d; font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 300; font-size: 16px; line-height: 1.5; }
.chat-form textarea:focus { outline: none; border-color: #0d0d0d; }
.chat-send { display: block; text-align: center; padding: 14px 20px; background: #0d0d0d; color: #fff; text-decoration: none;
             font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 300; font-size: 14px; letter-spacing: 0.1em; }
.chat-send:focus-visible { outline: 2px solid #0d0d0d; outline-offset: 3px; }
.chat-status { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 300; font-size: 14px; color: #0d0d0d; min-height: 1.4em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Desktop: page content sits in a centered 1200px-wide container; the header stays full width and sticks to the top (the photo/email viewer still uses the full screen) */
main { max-width: 1200px; margin-left: auto; margin-right: auto; }
/* white strip behind the phone status bar so scrolled content doesn't show through above the sticky header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: #ffffff; }
/* Digital Ads header: 1920x1080 (16:9) black box, full screen width at every size */
html, body { overflow-x: clip; }
.ads-hero { position: relative; width: 100vw; margin-left: calc(50% - 50vw); aspect-ratio: 1920 / 1080; background: #000; }
.ads-hero > img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Banner video sits exactly over the ad in the 1920x1080 photo: x 532, y 178, 845x277 */
.ads-hero-banner { position: absolute; left: 27.7083%; top: 16.4815%; width: 44.0104%; height: 25.6481%; object-fit: fill; }
/* Process copy: small and light */
.page-intro.ads-process { font-size: 13px; font-weight: 300; line-height: 1.7; max-width: 680px; padding-bottom: 0; margin-left: auto; margin-right: auto; }   /* block centered under the title, text left-aligned */
/* Project details: underlined, slightly slanted serif caps link 25px under the paragraph; its panel slides open smoothly */
.project-details { max-width: 680px; margin: 0 auto; padding: 25px 19px 39px; }   /* lines up with the paragraph above, 25px below it */
.pd-toggle { display: block; transform: skewX(-8deg); transform-origin: 0 100%; padding: 0; border: 0; background: none; color: #0d0d0d; cursor: pointer;
             font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 500; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
             text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pd-toggle:focus-visible { outline: 2px solid #0d0d0d; outline-offset: 4px; }
.pd-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s cubic-bezier(.2, .7, .2, 1); }
.pd-wrap.open { grid-template-rows: 1fr; }
.pd-inner { min-height: 0; overflow: hidden; }
.pd-body { margin-top: 18px; padding: 30px; background: #f5f5f3; opacity: 0; transition: opacity .4s ease;
           font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 300; font-size: 15px; line-height: 1.2; color: #0d0d0d; }
.pd-wrap.open .pd-body { opacity: 1; }
.pd-body p { margin: 0; }
.pd-body ul { margin: 1.2em 0; padding-left: 1.2em; }
/* Photos, Email Design, Design: full-height thumbnails stacked in fixed-width columns (js/masonry.js sets each item's row span; 1px rows) */
.gallery.is-masonry { grid-auto-rows: 1px; row-gap: 0; align-items: start; }
/* Page titles on every page: centered, half the size of the LAHAYE CREATIVE logo (logo = 0.75 x the header's clamp(22px, 7.9vw, 64px)) */
.page .page-title { font-size: calc(0.375 * clamp(22px, 7.9vw, 64px)); text-align: center;
                   text-transform: capitalize; transform: skewX(-8deg); letter-spacing: 0.06em; }   /* Title Case, 8° slant and 0.06em tracking, matching the Project details link (the logo is not affected) */
/* Digital Ads: twice the white space above (40px) and below (24px) the page title */
.page[data-page="animated-ads"] .page-title.ads-title.has-intro { padding-top: 40px; padding-bottom: 24px; }
/* Email Design intro copy: same look as the Digital Ads paragraph, block centered under the title, text left-aligned */
/* About page at full width: content centered in the screen below the header (95px tall at these widths) */
@media (min-width: 900px) { .page[data-page="about"]:not([hidden]) { min-height: calc(100vh - 95px); display: flex; align-items: center; justify-content: center; }
  .page[data-page="about"] .about { width: 100%; padding-top: 40px; } }   /* even space above and below the content */
/* Digital Ads: space between the two paragraphs */
.page-intro.ads-process + .page-intro.ads-process { margin-top: 1em; }
/* Client logo: centered under the Project details link (and under its panel when open) */
.client-logo { display: block; width: 220px; max-width: 60%; height: auto; margin: 40px auto 0; }

/* Project details link hidden for now: remove "hidden" from the button and panel in index.html to bring it back */
.project-details [hidden] { display: none; }


/* Cheerwine: logo centered above its square ad, with extra space below the last GNG ad; the ad is 25% larger than the other square ads */
.ad-pair-logo { flex-direction: column; align-items: center; gap: 30px; padding-top: 80px; }
.ad-pair-logo > .pair-logo { display: block; width: min(200px, 50%); height: auto; }
.ad-pair-logo > figure { width: calc(100% * 418 / 1280 * 1.2 * 1.25); flex: none; }

/* Rosati's: logo centered above its wide ad, spaced from the Cheerwine ad like the Cheerwine logo is from the GNG ads */
.ad-logo-group { display: flex; flex-direction: column; align-items: center; gap: 30px; padding-top: 59px; }
.ad-logo-group > .pair-logo { display: block; width: min(200px, 50%); height: auto; }
.ad-logo-group > figure { width: 100%; }

/* Home: 30px more space between the LAHAYE CREATIVE header and the tiles */
.gallery.tiles { padding-top: 30px; }
