/* ==========================================================================
   joequint.com - site styles
   Rebuilt from the Squarespace site (Nov 2026). Measurements taken from the
   live site at 1440, 1920, 768 and 500px wide.
   ========================================================================== */

:root {
  --orange: #ff9a2e;        /* logo, current nav item, link hover */
  --ink: #000;              /* nav group labels, nav hover */
  --tagline: #1a1414;
  --nav: #767676;           /* nav links (darkened from #808080 to pass contrast, SEO doc) */
  --menu-bg: #f19f48;       /* phone menu overlay */
  --instagram: #e4405f;
  --page: #fff;
  --slide-bg: #000;

  --font: Helvetica, Arial, "Liberation Sans", sans-serif;

  /* desktop geometry */
  --side-x: 38px;
  --main-left: 290px;
  --main-top: 39px;        /* photo top lines up with the top of the name */
  --main-right: max(35px, 2.4vw); /* 35px up to ~1460 wide, then grows */
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  /* no font-smoothing override: the live site uses the browser default, which draws text slightly heavier on a Mac */
  -webkit-text-size-adjust: 100%;
}

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

:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Sidebar ---------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--main-left);
  padding: 35px 44px 30px var(--side-x);
  overflow-y: auto;
  z-index: 10;
}

.logo {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif; /* live: Helvetica Neue Bold */
  font-size: 31px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo a { color: var(--orange); }

.tagline {
  margin: 6px 0 0 2px;
  font-size: 12px;            /* live: 12px, .59px spacing */
  letter-spacing: 0.59px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--tagline);
  white-space: nowrap;
}

.menu-toggle, .menu-close { display: none; }

.nav-primary { margin-top: 61px; }

.nav ul { list-style: none; margin: 0; padding: 0; }

.nav-group + .nav-group { margin-top: 12px; }

.nav-label {
  display: block;
  margin: 0 0 2px;
  font-family: Arial, Helvetica, sans-serif; /* live: section labels use the body font */
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink);
}

.nav a {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.47px;
  color: var(--nav);
  transition: color 0.4s ease;
}

.nav a:hover { color: var(--ink); transition: none; }

.nav a.is-current,
.nav a[aria-current="page"] { color: var(--orange); }

.nav-secondary { margin-top: 14px; margin-left: 2px; }
.nav-secondary a { letter-spacing: 0.14px; font-weight: 500; }

.social { display: block; margin-top: 8px; margin-left: 2px; width: 15px; height: 15px; color: var(--instagram); }
.social svg { display: block; width: 15px; height: 15px; }

/* ---------- Main ---------- */

.main {
  margin-left: var(--main-left);
  padding: var(--main-top) var(--main-right) 0 0;
}

/* ---------- Homepage slideshow ---------- */

.slideshow {
  position: relative;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  background: var(--slide-bg);
}

.slides {
  position: relative;
  width: 100%;
  padding-bottom: 66.667%;
}

.slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.7s ease;
  cursor: pointer;
}

/* Slide 1 fades out faster so it's obvious it's a slideshow */
.slide:first-child { transition: opacity 0.4s ease; }

.slide.is-active { opacity: 1; z-index: 1; }

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot:hover { background: rgba(255, 255, 255, 0.7); }
.dot.is-active { background: #fff; }

@media (prefers-reduced-motion: reduce) {
  .slide, .slide:first-child, .nav a, .dot, .sidebar { transition: none; }
  .nav-panel { animation: none !important; }
}

/* ---------- Gallery pages: one photo at a time ----------
   Live gallery box at 1440x900: left 271, top 68, right 18, 3:2 photo.
   Offsets are written against .main so they follow the sidebar width. */

.gallery {
  --gal-left: -19px;                          /* 271px from the window edge on desktop */
  --gal-top: 0px;                             /* photo top lines up with the name, like the homepage (Joe, Nov 24) */
  --gal-right: calc(18px - var(--main-right));
  margin: var(--gal-top) var(--gal-right) 0 var(--gal-left);
}

.gallery {
  --gal-w: calc(100vw - var(--main-left) + 19px - 18px);   /* room for the photo across */
  --gal-v: calc(100vh - var(--main-top) - 40px);           /* room for the photo down */
  --gal-h: max(300px, min(calc(var(--gal-w) * 2 / 3), var(--gal-v)));
}

/* The stage is always the photo's own 3:2 shape, centered, so anything drawn
   on its edges sits on the photo itself. */
.gallery-stage {
  position: relative;
  height: var(--gal-h);
  width: min(100%, calc(var(--gal-h) * 1.5));
  margin: 0 auto;
}

.gallery-item {
  display: none;
  position: absolute;
  inset: 0;
  margin: 0;
}

.gallery-item.is-active,
.gallery-item.is-leaving { display: block; }
.gallery-item.is-active { z-index: 2; animation: gallery-fade 0.4s ease; }
.gallery-item.is-leaving { z-index: 1; }

@keyframes gallery-fade { from { opacity: 0; } to { opacity: 1; } }

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Left half goes back, right half goes forward. */
.gallery-prev,
.gallery-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 50%;
  padding: 0 16px;
  border: 0;
  background: none;
  color: #fff;
  display: flex;
  align-items: center;
}
.gallery-prev { left: 0; cursor: default; justify-content: flex-start; }
.gallery-next { right: 0; cursor: default; justify-content: flex-end; }

.gallery-prev:focus-visible,
.gallery-next:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }

/* Circles (Joe, Nov 24): a small see-through dark circle with a white arrow at
   each edge of the photo, shown on hover. Plain arrow pointer, no hand; each
   whole half of the photo is clickable. */
.gallery-prev svg,
.gallery-next svg {
  display: block;
  width: 40px;
  height: 40px;
  padding: 11px 14px;
  box-sizing: border-box;
  border-radius: 50%;
  background: rgba(0,0,0,.32);
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}
.gallery-prev svg path,
.gallery-next svg path { stroke-width: 3.2; }
.gallery-prev:focus-visible svg,
.gallery-next:focus-visible svg { opacity: 1; }

/* Mouse and trackpad: circles appear when the pointer is over the photo, and
   the one on the side you point at darkens. */
@media (hover: hover) {
  .gallery-stage:hover svg { opacity: 1; }
  .gallery-prev:hover svg,
  .gallery-next:hover svg { background: rgba(0,0,0,.55); }
}

/* iPad and other touch screens have no hover, so the circles stay showing.
   Tap a side or swipe. */
@media (hover: none) {
  .gallery-prev svg,
  .gallery-next svg { opacity: 1; }
}


@media (prefers-reduced-motion: reduce) {
  .gallery-item.is-active { animation: none; }
}

/* ---------- Captioned gallery (It Takes Us) ----------
   Option A (Joe, Nov 25): the same one-photo gallery, with each caption
   under its photo instead of over it. Every slide sits in the same grid
   cell, so the stage is always as tall as the longest caption and the
   text under the gallery never jumps. The photo is the same size as the
   other galleries, with the caption right under it. Caption type is the
   same as the film pages. */

.gallery--captioned {
  --cap-room: 104px; /* fallback; the script sets the exact room the longest caption needs (Joe, Nov 25: caption must show) */
  --gal-h: max(300px, min(calc(var(--gal-w) * 2 / 3), calc(var(--gal-v) - var(--cap-room))));
}
.gallery--captioned .gallery-stage { display: grid; height: auto; }
.gallery--captioned .gallery-item {
  display: block;
  position: relative;
  inset: auto;
  grid-area: 1 / 1;
  visibility: hidden;
  background: var(--page);
}
.gallery--captioned .gallery-item.is-active,
.gallery--captioned .gallery-item.is-leaving { visibility: visible; }
.gallery--captioned .gallery-photo { height: var(--gal-h); }
/* hidden slides keep their caption's height but don't load their photo until needed */
@media screen and (min-width: 768px) and (orientation: landscape), screen and (min-width: 768px) and (pointer: fine), screen and (min-width: 768px) and (pointer: none), screen and (min-width: 1025px) {
  .gallery--captioned .gallery-item:not(.is-active):not(.is-leaving) img { display: none; }
}
.gallery--captioned .gallery-prev,
.gallery--captioned .gallery-next { bottom: auto; height: var(--gal-h); }

.gallery-caption {
  margin: 14px 0 0;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 14.85px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: #333;
}
.gallery-caption .cap-name { display: block; margin-bottom: 3px; font-weight: 500; color: #111; }


/* ---------- Narrow laptop windows (801-991px): same type, sidebar sits further in ---------- */

/* ---------- Film pages ----------
   Matches the live film pages: video and caption centred top to bottom
   (live: min-height 100vh, 8vh padding below), video 2px in from the
   sidebar edge and 32px from the right, caption 17px under the video.
   Caption type copied from the live code block: Helvetica Light 1.1em of
   13.5px, line-height 1.3, #333, bold phrases at 500, plus the site-wide
   .04em letter-spacing. */

.page-film .main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 58px 32px 8vh 2px;
}

.film-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.film-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.film-caption {
  margin: 17px 0 0;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 14.85px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: #333;
}

.film-caption .cap-strong { font-weight: 500; }

/* ---------- Text pages: Who I Am, What I Do, Contact ----------
   Measured from the live pages at 1440 and 1920 wide: text starts 487px
   from the left edge at every width (live: page margin 450px + 2px + block
   padding), headline cap tops at 157px. Type copied from the live code
   blocks: base 13px with .04em (0.52px) letter-spacing, headline 1.8em bold
   at -0.03em, body 1.1em with 1.3 line-height, #111. */

.page-text .main {
  padding: 149px 35px 40px 197px;
}

.copy {
  font-family: Helvetica, Arial, sans-serif;
  color: #111;
  letter-spacing: 0.52px;
}

.copy a { color: #f19f48; }
.copy a:hover { color: #ff9a2e; }

.copy-head {
  margin: 0 0 9px;
  font-size: 23.4px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.03em;
}

.copy-body { font-size: 14.3px; line-height: 1.3; }
.copy-body p { margin: 0 0 1.3em; }
.copy-body > :last-child { margin-bottom: 0; }

.copy-social {
  margin: 11px 0 0;
  font-size: 13.65px;
  line-height: 1.3;
}

/* Who I Am: 9 of 12 grid columns, as live */
.page-about .copy { max-width: calc((100% - 36px) * 0.75); }

/* What I Do: live text box is 680px less 40px padding */
.page-services .copy { max-width: 640px; }
.page-services .copy-body > p:first-child { margin-bottom: 0; }
.svc-head { margin: 1em 0 0 2em; font-size: 1em; font-weight: 700; line-height: 1.3; }
.svc-list { margin: 0 0 1em; padding: 0 0 0 2em; list-style: none; }
.svc-after { margin-top: 0; }
.copy a.go-here { color: #ff9a2e; }
.page-services .copy-social { margin-top: 55.8px; }

/* Contact: form is 7 of 12 grid columns (501px at 1440), fields and button
   colours sampled from the live page */
.page-contact .copy-head { margin-bottom: 0; }

.contact-form {
  max-width: calc((100% - 36px) * 7 / 12);
  margin-top: 33px;
  letter-spacing: normal;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { margin-top: 26px; }
.field-row .field { margin-top: 0; }
.field-select { margin-top: 46px; }

.field label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 16px;
  color: #000;
}
.field-row label { margin-bottom: 1px; }
.field .req { margin-left: 3px; font-size: 11px; color: #555; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  display: block;
  width: 100%;
  height: 37px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #a9a9a9;
  border-radius: 0;
  background: #fafafa;
  color: #000;
  font: 14px Helvetica, Arial, sans-serif;
  -webkit-appearance: none;
  appearance: none;
}
/* Active field turns white instead of getting an outline (Joe, Nov 25) */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { outline: none; background: #fff; }
.contact-form textarea { height: 100px; padding: 10px 12px; resize: vertical; }
.contact-form select { padding-right: 44px; cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 11px;
  width: 18px;
  height: 11px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 11'%3E%3Cpath d='M1 1l8 8.5L17 1' fill='none' stroke='%23333' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat center / contain;
}

.contact-send {
  display: block;
  width: 100%;
  height: 47px;
  margin-top: 27px;
  border: 0;
  border-radius: 0;
  background: #ff9900;
  color: #fff;
  font: 700 14px Helvetica, Arial, sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
}
.contact-send:hover { opacity: 0.85; }
.contact-send[disabled] { opacity: 0.6; cursor: default; }

.form-error { margin: 10px 0 0; font-size: 13px; color: #c00; }
.form-thanks { margin-top: 33px; font-size: 14.3px; line-height: 1.3; }
.form-thanks p { margin: 0 0 1.3em; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-foot {
  margin-top: 86px;
  font-size: 13px;
  line-height: 1.3;
  color: #999;
}
.contact-foot p { margin: 0; }
.contact-foot a,
.copy .contact-social a { color: #ff9a2e; }
.copy .contact-social { margin-top: 26px; font-size: 13px; }

/* iPad: the live 450px text margin leaves too narrow a column, so text
   pages start next to the sidebar and run wider. */
@media screen and (max-width: 991px), screen and (max-width: 1194px) and (pointer: coarse) {
  .page-text .main { padding-left: 2px; }
  .page-about .copy, .page-services .copy { max-width: 680px; }
  .contact-form { max-width: 520px; }
}

@media screen and (min-width: 801px) and (max-width: 991px) {
  :root { --side-x: 48px; }
  .sidebar { padding-right: 34px; }
}

/* ---------- iPad portrait (768-800px) ---------- */

@media screen and (max-width: 800px) {
  :root {
    --side-x: 23px;
    --main-left: 275px;
    --main-top: 37px;
    --main-right: 20px;
  }
  .sidebar { padding-top: 34px; }
  .logo { font-size: 23px; }
  .tagline { font-size: 11px; margin-top: 5px; }
  .nav-primary { margin-top: 54px; }
}

/* Where the browser can trim the space above capital letters, line the
   top of the name up exactly with the top of the photo. */
@supports (text-box: trim-both cap alphabetic) {
  .logo { text-box: trim-both cap alphabetic; }
  @media screen and (min-width: 768px) and (orientation: landscape), screen and (min-width: 768px) and (pointer: fine), screen and (min-width: 768px) and (pointer: none), screen and (min-width: 1025px) {
    .sidebar { padding-top: var(--main-top); }
    .tagline { margin-top: 10.5px; }
  }
  @media screen and (min-width: 768px) and (max-width: 800px) and (orientation: landscape), screen and (min-width: 768px) and (max-width: 800px) and (pointer: fine), screen and (min-width: 768px) and (max-width: 800px) and (pointer: none) {
    .tagline { margin-top: 8.5px; }
  }
}

/* iPad sideways (touch screen, landscape): menu about one and a half lines
   closer to the name (Joe, Nov 25). Desktop keeps 61px as approved. */
@media screen and (min-width: 768px) and (orientation: landscape) and (pointer: coarse) {
  .nav-primary { margin-top: 34px; }
}

/* ---------- Phone (767px and below), and iPad held upright (Joe, Nov 25: no empty half screen).
   The iPad part needs a touch screen held upright, so desktop and iPad sideways never get it. ---------- */

@media screen and (max-width: 767px), screen and (max-width: 1024px) and (orientation: portrait) and (pointer: coarse) {
  /* Every phone page fills the screen; the footer sits at the bottom even
     when a page is short, so nothing ends in a blank half screen. */
  body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
  .main { flex: 1 0 auto; }

  /* Header: name and tagline on the left, Menu on the right, kept at the top
     while you scroll. It slides away when you scroll down through photos
     and comes back as soon as you scroll up. */
  .sidebar {
    position: sticky;
    top: 0;
    width: auto;
    bottom: auto;
    min-height: var(--hdr-h);
    padding: calc(16px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 14px max(20px, env(safe-area-inset-left, 0px));
    overflow: visible;
    background: var(--page);
    z-index: 40;
    transition: transform 0.25s ease;
  }
  :root { --hdr-h: 72px; }
  body.hdr-hidden:not(.menu-open) .sidebar { transform: translateY(-100%); }

  .logo { font-size: 24px; }
  .tagline { font-size: 11px; margin: 7px 0 0 1px; letter-spacing: 0.08em; }

  /* Menu / Close: one button in the same spot, a full 44px tap target */
  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    position: absolute;
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: max(8px, calc(env(safe-area-inset-right, 0px) - 12px));
    min-width: 44px;
    height: 48px;
    padding: 0 12px;
    background: none;
    border: 0;
    font: 500 13px/1 var(--font);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
  }
  .menu-toggle::after {
    content: "";
    width: 20px;
    height: 12px;
    background:
      linear-gradient(currentColor, currentColor) top / 100% 2px no-repeat,
      linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
      linear-gradient(currentColor, currentColor) bottom / 100% 2px no-repeat;
  }
  body.menu-open .menu-toggle::after {
    background:
      linear-gradient(45deg, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px)),
      linear-gradient(-45deg, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px));
    height: 16px;
    width: 16px;
    margin: 0 2px;
  }
  .menu-close { display: none !important; }
  .social-mobile { display: none; }

  /* The menu opens under the header, white, with clear groups:
     small grey group names, larger black project names on their own rows
     with a thin line between them, the current page marked in orange,
     then the about pages and Instagram set apart at the bottom. */
  .nav-panel { display: none; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav-panel {
    display: block;
    position: fixed;
    top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--page);
    border-top: 1px solid #e6e6e6;
    padding: 6px max(24px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
    animation: menu-in 0.18s ease;
  }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

  .nav-panel .nav-primary { margin-top: 0; }
  .nav-panel .nav-group + .nav-group { margin-top: 0; }
  .nav-panel .nav-label {
    margin: 26px 0 2px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.14em;
    color: #6b6b6b;
  }
  .nav-panel .nav li { border-bottom: 1px solid #ececec; }
  .nav-panel .nav a {
    position: relative;
    padding: 12px 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0;
    color: #111;
    transition: none;
  }
  .nav-panel .nav a:hover,
  .nav-panel .nav a:active { color: #000; }
  .nav-panel .nav a.is-current { color: #111; }
  .nav-panel .nav a[aria-current="page"] { font-weight: 700; }
  .nav-panel .nav a[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 12px;
    bottom: 12px;
    width: 4px;
    background: var(--orange);
  }
  .nav-panel .nav-secondary { margin: 34px 0 0; border-top: 2px solid #111; }
  .nav-panel .nav-secondary a { font-size: 18px; font-weight: 700; letter-spacing: 0; }
  .nav-panel .nav-secondary a[aria-current="page"] { color: #111; }
  .nav-panel .social {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
    height: 44px;
    margin: 18px 0 0;
    color: #111;
    font-size: 15px;
  }
  .nav-panel .social svg { width: 20px; height: 20px; color: var(--instagram); }
  .nav-panel .social .visually-hidden {
    position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; white-space: normal;
  }

  .main {
    margin: 0;
    padding: 24px max(20px, env(safe-area-inset-right, 0px)) 24px max(20px, env(safe-area-inset-left, 0px));
  }

  /* Gallery pages: every photo stacked, full width (same as the live site) */
  .gallery { margin: 0; }
  .gallery-stage { height: auto; min-height: 0; }
  .gallery-item,
  .gallery-item.is-active,
  .gallery-item.is-leaving { display: block; position: static; animation: none; margin: 0 0 20px; }
  .gallery-item img { height: auto; }
  .gallery-prev, .gallery-next { display: none; }
  .gallery-stage { width: auto; }

  /* Film pages: video full width at the top, caption under it */
  .page-film .main { display: block; min-height: 0; padding: 24px max(20px, env(safe-area-inset-right, 0px)) 24px max(20px, env(safe-area-inset-left, 0px)); }

  /* Text pages: full width; 16px form text so iPhone doesn't zoom in */
  .page-text .main { padding: 24px max(20px, env(safe-area-inset-right, 0px)) 40px max(20px, env(safe-area-inset-left, 0px)); }
  .page-about .copy, .page-services .copy { max-width: none; }
  .contact-form { max-width: none; margin-top: 24px; }
  .contact-form input, .contact-form select, .contact-form textarea { font-size: 16px; }
  .contact-foot { margin-top: 48px; }

  .slideshow { max-height: 70vh; }
  .dots { bottom: 6px; gap: 0; }
  /* dots stay small but each has a full tap area around it */
  .dot { width: 30px; height: 30px; background: none; position: relative; }
  .dot::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
  .dot.is-active::after { background: #fff; }

  /* Homepage on phones (Joe picked option 4, Nov 25): the six slideshow
     photos stacked, uncropped, lined up with the name, then the footer.
     No slideshow, no dots. Tapping a photo opens its project. */
  .home .main { padding: 4px 0 8px; }
  .home .slideshow {
    width: auto;          /* width:100% plus the side margins pushed photos 20px off the right edge */
    max-height: none;
    overflow: visible;
    background: none;
    margin: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  }
  .home .slides { padding-bottom: 0; display: flex; flex-direction: column; gap: 20px; }
  .home .slide, .home .slide:first-child { position: static; opacity: 1; transition: none; }
  .home .slide img { position: static; width: 100%; height: auto; object-fit: contain; }
  .home .dots { display: none; }
}

@media screen and (max-width: 767px), screen and (max-width: 1024px) and (orientation: portrait) and (pointer: coarse) {
  /* Easier reading on a phone: body text up from 14px to 16px */
  .copy-body { font-size: 16px; line-height: 1.45; }
  .copy-head { font-size: 24px; line-height: 1.25; margin-bottom: 14px; }
  .film-caption, .gallery-caption { font-size: 15.5px; line-height: 1.4; }
}

/* Footer: phones only (the sidebar does this job on bigger screens) */
.site-footer { display: none; }
@media screen and (max-width: 767px), screen and (max-width: 1024px) and (orientation: portrait) and (pointer: coarse) {
  .site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 22px;
    margin-top: 32px;
    padding: 18px max(20px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
    border-top: 1px solid #ececec;
    font-size: 13px;
    color: #6b6b6b;
  }
  .site-footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #111; }
  .site-footer svg { width: 18px; height: 18px; color: var(--instagram); }
  .site-footer p { margin: 0 0 0 auto; }
}

@media screen and (min-width: 768px) and (orientation: landscape), screen and (min-width: 768px) and (pointer: fine), screen and (min-width: 768px) and (pointer: none), screen and (min-width: 1025px) {
  .social-mobile { display: none; }
}

/* Captioned gallery on phones: photos stacked like every gallery, each caption under its photo */
@media screen and (max-width: 767px), screen and (max-width: 1024px) and (orientation: portrait) and (pointer: coarse) {
  .gallery--captioned .gallery-stage { display: block; }
  .gallery--captioned .gallery-item,
  .gallery--captioned .gallery-item.is-active,
  .gallery--captioned .gallery-item.is-leaving { visibility: visible; margin: 0 0 36px; }
  .gallery--captioned .gallery-photo { height: auto; }
  .gallery-caption { margin-top: 10px; }
}

/* iPad held upright only: text pages and the contact form a little narrower,
   moved in on both sides (Joe, Nov 25). iPhone keeps 20px. */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) and (pointer: coarse) {
  .page-text .main { padding-left: 48px; padding-right: 48px; }
}
