/* AlanRodrigues.com, version 2: monochrome layout.
   Black type on warm off-white, photos in black and white that turn to colour
   on hover (or as they scroll into view on phones). */
:root {
  --bg: #efeeeb;        /* page */
  --bg-2: #e4e2dd;      /* hover, dividers on light */
  --ink: #111111;       /* text, buttons */
  --muted: #555350;     /* secondary text on light */
  --line: #d9d7d2;      /* hairlines on light */
  --dark: #121212;      /* dark bands */
  --dark-2: #1a1a1a;    /* cards on dark */
  --dark-line: #2a2a2a; /* hairlines on dark */
  --on-dark: #f2f1ee;   /* text on dark */
  --on-dark-muted: #b9b7b2;
  --gutter: max(16px, 4vw);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.cap { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.sr-only { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; font-size: 1px; }
.rule { display: block; width: 40px; height: 2px; background: currentColor; }
.noscript { padding: 96px 24px; text-align: center; font-size: 18px; line-height: 1.7; }
.noscript a { text-decoration: underline; }

/* ---------- Black and white → colour ---------- */
.bw { filter: grayscale(1) contrast(1.08); transition: filter .5s ease, opacity .5s ease, transform .6s ease; }
@media (hover: hover) { .bw:hover, a:hover .bw, button:hover .bw { filter: none; } }
.bw.in-color { filter: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 24px; border: 1px solid transparent; cursor: pointer;
  font: 600 11px/1 var(--font); letter-spacing: .16em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-sm { padding: 12px 16px; font-size: 10px; }
.btn-dark { background: var(--ink); color: #ffffff; }
.btn-dark:hover { background: #333333; }
.btn-light { background: var(--on-dark); color: var(--ink); }
.btn-light:hover { background: #ffffff; }
.btn-ghost { border-color: var(--on-dark); color: var(--on-dark); background: transparent; }
.btn-ghost:hover { background: var(--on-dark); color: var(--ink); }
.btn-line { display: inline-flex; align-items: center; gap: 10px; padding: 14px 2px; border-bottom: 1px solid var(--ink); font: 600 11px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; }
.btn-line:hover { gap: 14px; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 18px; padding: 0 6px; border-radius: 9px; background: #ffffff; color: var(--ink); font-size: 10px; letter-spacing: .04em; }

/* ---------- Top strip ---------- */
.utility { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 9px var(--gutter); background: #0d0d0d; color: var(--on-dark); font-size: 10px; }
.utility-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.utility a:hover { color: #ffffff; text-decoration: underline; }
.utility-net { padding: 0 10px; background: var(--on-dark); color: var(--ink) !important; }
.utility-net:hover { text-decoration: none !important; background: #ffffff; }

/* ---------- Menu bar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px;
  padding: 18px var(--gutter); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-side { display: flex; flex-wrap: wrap; align-items: center; gap: 10px clamp(12px, 1.4vw, 28px); font-size: clamp(10px, .75vw, 11px); font-weight: 600; letter-spacing: clamp(.1em, .9vw, .16em); text-transform: uppercase; }
.nav-side a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; }
.nav-right { justify-content: flex-end; }
.wordmark { text-align: center; display: flex; flex-direction: column; align-items: center; }
.wordmark-name { font-weight: 900; font-stretch: 125%; font-size: 28px; letter-spacing: .02em; line-height: 1; }
.wordmark-sub { margin-top: 6px; font-size: 9px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; }
.menu-btn { display: none; width: 44px; height: 44px; place-items: center; border: 0; background: none; color: var(--ink); cursor: pointer; }
.mobile-menu { grid-column: 1 / -1; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(88vh, 860px); display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px var(--gutter) 56px;
}
/* black-and-white background video, washed toward the page colour so the type reads */
.hero-media { position: absolute; inset: 0; z-index: -1; background: #8d8b87; }
.hero-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(239, 238, 235, .72) 0%, rgba(239, 238, 235, .28) 38%, rgba(239, 238, 235, .28) 62%, rgba(239, 238, 235, .78) 100%); }
.hero-tagline { font-size: 13px; line-height: 1.7; letter-spacing: .14em; }
.hero .rule { margin-top: 14px; }
.hero-word-wrap { position: relative; margin: 28px 0; }
.hero-word { position: relative; display: flex; flex-direction: column; align-items: center; font-weight: 900; font-size: clamp(110px, 22vw, 330px); line-height: .82; letter-spacing: -.02em; text-align: center; }
/* VEHICLE sits centred above WRAPS, sized so the two words share one width */
.hero-word-top { font-size: .58em; line-height: .9; letter-spacing: .01em; margin-bottom: .06em; }
.hero-side { display: flex; align-items: flex-end; gap: 18px; }
.hero-pause { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.hero-pause:hover { background: var(--ink); color: #ffffff; }
.hero-pause .i-play, .hero-pause.is-paused .i-pause { display: none; }
.hero-pause.is-paused .i-play { display: block; }
.hero-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-badge { text-align: right; font-size: 12px; line-height: 1.8; }
.hero-badge .rule { width: 32px; margin: 10px 0 0 auto; }

/* ---------- What we wrap: dark band ---------- */
.band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--dark); color: var(--on-dark); }
.band-item { display: flex; flex-direction: column; border-right: 1px solid var(--dark-line); border-bottom: 1px solid var(--dark-line); min-width: 0; }
.band-item:nth-child(4n + 1) { border-right: 1px solid var(--dark-line); }
.band-item:nth-child(4n + 1) ~ .band-item:nth-child(4n + 1) { border-right: 1px solid var(--dark-line); }
.band-text { display: flex; gap: 16px; padding: 32px 26px 24px; }
.band-text .icon { flex: none; }
.band-text h3 { margin-bottom: 8px; font-size: 13px; }
.band-text p { margin-bottom: 14px; font-size: 13px; line-height: 1.55; color: var(--on-dark-muted); }
.band-link { font-size: 10px; }
.band-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.band-photo { width: 100%; height: 170px; object-fit: cover; margin-top: auto; opacity: .7; }
@media (hover: hover) { .band-item:hover .band-photo { opacity: 1; filter: none; } }
.band-photo.in-color { opacity: 1; }

/* ---------- Why wrap: story split ---------- */
.story { display: flex; flex-wrap: wrap; align-items: stretch; background: linear-gradient(90deg, #cfcdc8, #a5a39e); }
.story-text { flex: 1 1 440px; min-width: 0; padding: 80px var(--gutter); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.story-text > .cap { margin-bottom: 18px; }
.story-title { margin-bottom: 24px; font-weight: 900; font-size: clamp(44px, 5.4vw, 76px); line-height: .95; letter-spacing: -.01em; text-transform: uppercase; }
.story-text p:not(.cap) { margin-bottom: 16px; max-width: 520px; font-size: 15px; line-height: 1.65; color: #1f1e1c; }
.story-text .btn { margin-top: 12px; }
.story-photo { flex: 1 1 460px; min-height: 480px; position: relative; overflow: hidden; }
.story-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% center;
  /* only a narrow soft edge on the left, so the front of the vehicle stays visible */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%); mask-image: linear-gradient(90deg, transparent, #000 7%); }

/* Artwork panel: black diagonal band, giant outlined word, cut-out vehicle on top */
.story-art { flex: 1 1 520px; min-height: 520px; position: relative; overflow: hidden; display: grid; place-items: center; }
.story-art-band { position: absolute; left: -10%; right: -10%; top: 50%; height: 42%; background: var(--ink); transform: translateY(-50%) rotate(-8deg); }
.story-art-word {
  position: absolute; left: 0; right: 0; top: 9%; text-align: center; white-space: nowrap;
  font-weight: 900; font-size: clamp(40px, 6.2vw, 104px); line-height: .85; letter-spacing: -.01em;
  color: transparent; -webkit-text-stroke: 1.5px var(--ink);
}
.story-art-vehicle { position: relative; z-index: 1; width: 90%; max-width: 900px; margin-top: 12%; }
.story-art-car { position: relative; width: 100%; height: auto; transition: filter .5s ease, transform .6s ease; }
/* soft ground shadow right under the wheels */
.story-art-shadow { position: absolute; left: 6%; right: 6%; bottom: -3%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent); }
@media (hover: hover) { .story-art:hover .story-art-car { filter: none; transform: scale(1.02); } }

/* ---------- Trust row ---------- */
.trust { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 28px var(--gutter); border-bottom: 1px solid var(--line); }
.trust-item { display: flex; gap: 14px; padding: 12px 18px; border-right: 1px solid var(--line); min-width: 0; }
.trust-item:last-child { border-right: 0; }
.trust-item .icon { flex: none; }
.trust-item .cap { font-size: 10px; }
.trust-item p:not(.cap) { margin-top: 4px; font-size: 12px; color: var(--muted); }

/* ---------- About me ---------- */
/* The portrait follows the rest of the site: black and white, colour on hover. */
/* three columns on wide screens: portrait | story | path + industries */
.about-me { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: start; padding: 88px var(--gutter); border-bottom: 1px solid var(--line); }
.about-portrait { position: relative; position: sticky; top: 110px; }
.about-portrait img { width: 100%; height: auto; }
.about-portrait-empty { display: none; }
.about-portrait.is-empty { aspect-ratio: 4 / 5; border: 1px dashed #9a9893; display: grid; place-items: center; background: var(--bg-2); }
.about-portrait.is-empty .about-portrait-empty { display: block; text-align: center; color: var(--muted); line-height: 2; }
.about-portrait-empty span { text-transform: none; letter-spacing: .02em; font-weight: 400; }
.about-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.about-text > .cap { margin-bottom: 18px; }
.about-title { margin-bottom: 24px; font-weight: 900; font-size: clamp(44px, 5.4vw, 76px); line-height: .95; letter-spacing: -.01em; text-transform: uppercase; }
.about-text > p:not(.cap):not(.about-signature) { margin-bottom: 16px; max-width: 560px; font-size: 16px; line-height: 1.7; color: #2b2a28; }
.about-signature { margin: 8px 0 32px; font-weight: 900; font-stretch: 125%; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
.about-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; width: 100%; max-width: 560px; margin: 0 0 32px; border-top: 1px solid var(--ink); }
.about-highlights div { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); }
.about-highlights dt { font-weight: 900; font-size: 28px; line-height: 1; }
.about-highlights dd { margin: 8px 0 0; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.about-aside { min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.about-quote { margin: 0; padding: 28px 0 28px 24px; border-left: 3px solid var(--ink); }
.about-quote p { font-weight: 800; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.35; letter-spacing: -.01em; }
.about-block h3 { font-size: 11px; margin-bottom: 18px; }
.about-journey { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.about-journey li { position: relative; padding: 0 0 22px 34px; counter-increment: step; }
.about-journey li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 1px; font-weight: 900; font-size: 13px; }
.about-journey li::after { content: ""; position: absolute; left: 8px; top: 22px; bottom: 4px; width: 1px; background: var(--line); }
.about-journey li:last-child::after { display: none; }
.about-journey h4 { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.about-journey p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.about-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.about-tags li { padding: 9px 12px; border: 1px solid var(--ink); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Sections ---------- */
.section { padding: 72px var(--gutter); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 26px; }
.section-head h2 { font-size: 20px; letter-spacing: .1em; }
.section-head a { font-size: 10px; }
.section-head a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Services cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--dark-2); color: var(--on-dark); min-width: 0; }
.card-photo { position: relative; overflow: hidden; }
.card-photo img { width: 100%; height: 200px; object-fit: cover; }
@media (hover: hover) { .card:hover .card-photo img { filter: none; transform: scale(1.03); } }
.card-step { position: absolute; top: 0; left: 0; padding: 6px 10px; background: var(--on-dark); color: var(--ink); font-size: 9px; }
.card-body { flex-grow: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 22px 22px 24px; }
.card-body h3 { margin-bottom: 12px; font-size: 14px; }
.card-body p { margin-bottom: 22px; font-size: 13px; line-height: 1.6; color: var(--on-dark-muted); }
.card-body .btn { margin-top: auto; }

/* Recent projects */
.section-work { padding-top: 0; }
.section-work .section-head { border-top: 1px solid var(--line); padding-top: 56px; }
.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.work-item { display: block; width: 100%; padding: 0; border: 0; background: var(--bg-2); cursor: zoom-in; overflow: hidden; }
.work-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (hover: hover) { .work-item:hover img { transform: scale(1.03); } }
.work-more { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- In motion video ---------- */
.video-section { background: var(--dark); color: var(--on-dark); padding: 72px 0 80px; }
.video-head { padding: 0 var(--gutter); margin-bottom: 32px; display: flex; flex-direction: column; gap: 14px; }
.video-title { font-weight: 900; font-size: clamp(30px, 9vw, 104px); line-height: .9; text-transform: uppercase; letter-spacing: -.01em; }
.video-head p:not(.cap) { max-width: 560px; font-size: 15px; line-height: 1.6; color: var(--on-dark-muted); }
.video-frame { position: relative; width: min(1480px, calc(100% - 2 * var(--gutter))); margin: 0 auto; aspect-ratio: 16 / 9; background: #000000; overflow: hidden; }
.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-btn {
  position: absolute; bottom: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; min-width: 44px; padding: 0 12px; border: 0; cursor: pointer;
  background: rgba(17, 17, 17, .75); color: #ffffff; backdrop-filter: blur(6px);
  font: 600 10.5px/1 var(--font); letter-spacing: .16em; text-transform: uppercase;
}
.video-btn:hover { background: rgba(17, 17, 17, .92); }
.video-btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.video-sound { left: 16px; padding: 0 14px 0 12px; }
.video-toggle { right: 16px; }
.video-toggle .i-play, .video-toggle.is-paused .i-pause { display: none; }
.video-toggle.is-paused .i-play { display: block; }
.video-sound .i-sound, .video-sound.is-muted .i-muted { display: block; }
.video-sound .i-muted, .video-sound.is-muted .i-sound { display: none; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; align-items: start; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item[open] { border-top-color: var(--ink); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none; font-size: 16px; font-weight: 700; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { flex: none; transition: transform .3s; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-item p { margin: -6px 0 22px; max-width: 620px; font-size: 14px; line-height: 1.7; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: #0d0d0d; color: var(--on-dark); padding: 88px var(--gutter) 28px; }
/* big contact block: phone and email are the largest type on the page after WRAPS */
.footer-cta { padding-bottom: 64px; margin-bottom: 56px; border-bottom: 1px solid var(--dark-line); }
.footer-cta > .cap { margin-bottom: 18px; color: var(--on-dark-muted); }
.footer-headline { max-width: 14ch; font-weight: 900; font-size: clamp(40px, 6vw, 88px); line-height: .95; letter-spacing: -.01em; text-transform: uppercase; }
.footer-cta-text { margin-top: 20px; max-width: 520px; font-size: 16px; line-height: 1.6; color: var(--on-dark-muted); }
.footer-big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 48px; }
.footer-big-link { display: flex; flex-direction: column; gap: 12px; padding: 24px 0; border-top: 1px solid var(--on-dark); min-width: 0; }
.footer-big-link .cap { color: var(--on-dark-muted); }
.footer-big-value { font-weight: 900; font-stretch: 125%; font-size: clamp(26px, 3.6vw, 54px); line-height: 1.05; transition: opacity .2s; }
/* the email may break after the @, never inside a word */
.footer-big-email { font-stretch: 100%; overflow-wrap: normal; word-break: normal; }
.footer-big-link:hover .footer-big-value { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.footer-cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn-wa-lg { background: #25d366; color: #0d0d0d; }
.btn-wa-lg:hover { background: #3be07a; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-grid > * { min-width: 0; }
.footer-brand .wordmark-sub { margin: 6px 0 18px; }
.footer-brand p:last-child { max-width: 320px; font-size: 13px; line-height: 1.6; color: var(--on-dark-muted); }
.footer-col h2 { margin-bottom: 14px; font-size: 11px; }
.footer-col > a { display: block; width: fit-content; margin-bottom: 8px; font-size: 13px; color: var(--on-dark-muted); }
.footer-col > a:hover { color: #ffffff; }
.footer-col p { font-size: 13px; line-height: 1.8; color: var(--on-dark-muted); }
.footer-copy { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--dark-line); text-align: center; font-size: 9px; color: #8d8b87; }

/* ---------- Back to top + phone bar ---------- */
.to-top {
  position: fixed; z-index: 45; right: calc(24px + env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--ink); background: var(--ink); color: #ffffff; cursor: pointer;
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .35s, transform .35s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--bg); color: var(--ink); }
.mobile-bar { display: none; }

/* ---------- Photo viewer (viewer.js) ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 72px 1fr 72px; align-items: center;
  padding: 56px 8px 40px; background: rgba(13, 13, 13, .96); color: var(--on-dark); opacity: 0; transition: opacity .25s;
}
.viewer[hidden] { display: none; }
.viewer.open { opacity: 1; }
.viewer-stage { grid-column: 2; grid-row: 1; margin: 0; height: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.viewer-stage img { max-width: 100%; max-height: calc(100% - 30px); object-fit: contain; opacity: 0; transform: scale(.97); transition: opacity .35s, transform .45s; }
.viewer.open .viewer-stage img.in { opacity: 1; transform: none; }
.viewer-count { font-size: 10.5px; letter-spacing: .2em; color: var(--on-dark-muted); font-variant-numeric: tabular-nums; }
.viewer-btn { display: grid; place-items: center; width: 48px; height: 48px; justify-self: center; border: 1px solid #3a3a3a; background: transparent; color: var(--on-dark); cursor: pointer; }
.viewer-btn:hover { background: var(--on-dark); color: var(--ink); }
.viewer-close { position: absolute; top: 16px; right: 16px; }
.viewer-prev { grid-column: 1; grid-row: 1; }
.viewer-next { grid-column: 3; grid-row: 1; }
html.viewer-lock { overflow: hidden; }

/* ---------- All projects page (gallery.html) ---------- */
.gallery-head { padding: 56px var(--gutter) 28px; }
.gallery-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 32px; font-size: 10.5px; }
.gallery-back:hover { gap: 12px; }
.gallery-title { font-weight: 900; font-size: clamp(56px, 10vw, 150px); line-height: .85; letter-spacing: -.02em; text-transform: uppercase; }
.gallery-count { margin-top: 18px; font-size: 11px; color: var(--muted); }
.gallery-grid { padding: 0 var(--gutter) 80px; }

/* ---------- NETWORKING page (networking.html) ---------- */
.btn-outline-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline-dark:hover { background: var(--ink); color: #ffffff; }
.net-hero { position: relative; overflow: hidden; isolation: isolate; padding: 56px var(--gutter) 80px; border-bottom: 1px solid var(--line); }
/* large faded New England map behind the top of the page */
.net-map { position: absolute; z-index: -1; right: 2%; top: 3%; height: 94%; width: auto; max-width: none; opacity: .22; pointer-events: none; }
.net-hero > *:not(.net-map) { position: relative; }
.net-title { font-weight: 900; font-size: clamp(40px, 11vw, 180px); line-height: .82; letter-spacing: -.02em; text-transform: uppercase; margin-bottom: 48px; }
.net-hero-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: stretch; }
.net-hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.net-intro { max-width: 600px; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55; }
.net-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 8px 0 0; border-top: 1px solid var(--ink); max-width: 600px; }
.net-facts div { padding: 18px 12px 0 0; }
.net-facts dt { font-weight: 900; font-size: clamp(22px, 2.4vw, 32px); line-height: 1; }
.net-facts dd { margin: 8px 0 0; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.net-offers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.net-offer { background: var(--dark-2); color: var(--on-dark); padding: 32px 26px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.net-offer h3 { font-size: 14px; }
.net-offer p { font-size: 14px; line-height: 1.6; color: var(--on-dark-muted); }
.net-steps { padding: 72px var(--gutter); background: linear-gradient(90deg, #cfcdc8, #a5a39e); }
.net-step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.net-step-list li { border-top: 2px solid var(--ink); padding-top: 18px; min-width: 0; }
.net-step-num { display: block; font-weight: 900; font-size: 56px; line-height: 1; margin-bottom: 14px; }
.net-step-list h3 { font-size: 14px; margin-bottom: 10px; }
.net-step-list p { font-size: 14px; line-height: 1.6; color: #1f1e1c; }
.net-who { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.net-who li { padding: 14px 20px; border: 1px solid var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.net-cta { padding: 24px var(--gutter) 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.net-cta-title { font-weight: 900; font-size: clamp(44px, 7vw, 104px); line-height: .9; letter-spacing: -.01em; text-transform: uppercase; }
.net-cta-text { max-width: 560px; font-size: 17px; line-height: 1.6; color: var(--muted); }

/* ---------- PAYMENTS page (payments.html) ---------- */
.pay-hero { padding: 56px var(--gutter) 56px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; }
.pay-hero .net-title { margin-bottom: 32px; }
.pay-secure { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; font-size: 10.5px; color: var(--muted); }
.pay-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1240px) { .pay-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }
.pay-card { display: flex; flex-direction: column; gap: 14px; padding: 30px 26px; border: 1px solid var(--ink); background: var(--bg); min-width: 0; }
.pay-card h2 { font-size: 14px; }
.pay-card p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.pay-card .pay-detail { color: var(--ink); overflow-wrap: anywhere; }
.pay-action { margin-top: auto; padding-top: 8px; }
.pay-action .btn { width: 100%; }
.pay-notes { padding: 0 var(--gutter) 88px; }
.pay-notes h2 { font-size: 11px; margin-bottom: 14px; }
.pay-notes ul { margin: 0; padding: 0 0 0 18px; max-width: 640px; }
.pay-notes li { margin-bottom: 8px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ---------- Tablet ---------- */
/* laptops: tighten the menu so all links fit on one line */
@media (max-width: 1440px) {
  .site-header { gap: 16px; }
  .wordmark-name { font-size: 22px; }
  .wordmark-sub { font-size: 8px; letter-spacing: .28em; }
  .nav-side { gap: 10px 14px; font-size: 10px; letter-spacing: .1em; }
  .nav-right .btn-sm { padding: 11px 12px; letter-spacing: .1em; }
}
@media (max-width: 1240px) {
  .about-me { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .about-aside { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .nav-side a:not(.btn) { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 1100px) {
  .band, .cards, .work-grid, .net-offers, .net-step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
  .trust-item:nth-child(3) { border-right: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .nav-side a:not(.btn) { display: none; }
  .menu-btn { display: grid; }
  .wordmark-name { font-size: 24px; }
}

/* ---------- Phone ---------- */
@media (max-width: 700px) {
  .utility { justify-content: center; text-align: center; }
  .utility > span:first-child { display: none; }
  .site-header { grid-template-columns: 1fr auto; padding: 12px var(--gutter); }
  .nav-left { display: none; }
  .wordmark { align-items: flex-start; text-align: left; }
  .wordmark-name { font-size: 20px; }
  .wordmark-sub { font-size: 8px; letter-spacing: .26em; }
  .nav-right .btn { display: none; }
  .hero { padding: 36px var(--gutter) 40px; min-height: 0; }
  .hero-word { font-size: 24vw; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-side { flex-direction: row-reverse; }
  .hero-badge { text-align: left; }
  .hero-badge .rule { margin-left: 0; }
  .band { grid-template-columns: 1fr; }
  .band-item { border-right: 0; }
  .band-photo { height: 190px; }
  .about-me { padding: 56px var(--gutter); gap: 32px; grid-template-columns: 1fr; }
  .about-portrait { position: relative; top: 0; max-width: 420px; }
  .about-aside { grid-template-columns: 1fr; }
  .about-highlights dt { font-size: 22px; }
  .story-text { padding: 56px var(--gutter); }
  .story-photo { min-height: 300px; }
  .story-art { min-height: 340px; }
  .story-art-word { top: 6%; }
  .story-photo img { -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%); mask-image: linear-gradient(180deg, transparent, #000 25%); }
  .trust { grid-template-columns: 1fr 1fr; padding: 16px var(--gutter); }
  .trust-item { padding: 12px 8px; border-right: 0; }
  .section { padding: 56px var(--gutter); }
  .cards, .net-offers, .net-step-list { grid-template-columns: 1fr; }
  .net-hero { padding: 36px var(--gutter) 56px; }
  .net-title { margin-bottom: 32px; }
  .net-map { height: auto; width: 110%; right: -45%; top: 40%; opacity: .14; }
  .net-steps { padding: 56px var(--gutter); }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .work-more .btn { width: 100%; }
  .video-section { padding: 56px 0 0; }
  .video-frame { width: 100%; }
  .video-btn { bottom: 10px; height: 40px; min-width: 40px; }
  .video-sound { left: 10px; }
  .video-toggle { right: 10px; }
  .faq-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer { padding-top: 64px; }
  .footer-big { grid-template-columns: 1fr; margin-top: 32px; }
  .footer-cta-buttons .btn { flex: 1 1 100%; }
  .viewer { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; row-gap: 16px; }
  .viewer-stage { grid-column: 1 / -1; }
  .viewer-prev, .viewer-next { grid-row: 2; }
  .viewer-prev { grid-column: 1; }
  .viewer-next { grid-column: 2; }
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 48px; gap: 8px;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
  .mobile-bar .btn { padding: 15px 10px; }
  .btn-wa { display: grid; place-items: center; height: 48px; background: #25d366; color: #ffffff; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .to-top { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bw, .faq-icon, .to-top, .viewer, .viewer-stage img { transition: none; }
}
