/* Shared experience refinements. Load last, after page-specific stylesheets. */
:root {
  --experience-header-height: 104px;
  --experience-red: #cd1f14;
  --experience-ink: #1b1b19;
  --experience-paper: #f6f4ef;
  scroll-padding-top: calc(var(--experience-header-height) + 24px);
}
body { --muted: #64615b; }

/* A clear keyboard path, including on photography and dark surfaces. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--experience-red);
  outline-offset: 5px;
}
.skip-link { min-height: 48px; padding: 12px 18px; font-size: 16px; z-index: 100; }
.skip-link:focus { top: 12px; }
.button,
.text-link { min-height: 48px; }
.button { font-size: 12px; }
.text-link { font-size: 12px; letter-spacing: 1.1px; }

/* Keep orientation available without changing the homepage's full image. */
body.subpage .site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  height: var(--experience-header-height);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
body.subpage .site-header .header-inner { border-bottom: 0; }
body.page-home .site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 70;
  transition: background-color .18s ease, color .18s ease;
}
body.page-home .site-header.is-scrolled {
  background: #fff;
  color: var(--experience-ink);
  border-bottom: 1px solid var(--line);
}
body.page-home .site-header.is-scrolled .header-inner { border-bottom-color: transparent; }
body.page-home .site-header.is-scrolled .menu-toggle,
body.page-home .site-header.is-scrolled .phone-link { color: var(--experience-ink); }
body.page-home .site-header :is(a, button):focus-visible { outline-color: #fff; }
body.page-home .site-header.is-scrolled :is(a, button):focus-visible { outline-color: var(--experience-red); }
.site-header .main-nav { gap: clamp(20px, 2.25vw, 34px); font-size: 13px; letter-spacing: 1.05px; }
.site-header .header-inner { height: 100%; min-height: 0; }
.site-header .main-nav > a { display: inline-flex; align-items: center; min-height: 46px; padding-block: 13px; }
.site-header .main-nav > a[aria-current="page"] { color: var(--experience-red); }
.site-header .header-actions .button { min-height: 48px; font-size: 11px; letter-spacing: 1.1px; }

/* Captions remain secondary while becoming comfortable to read. */
body.page-home .hero-copy .eyebrow { font-size: 11px; letter-spacing: 1.8px; }
body.page-home .hero-bottom > span { font-size: 10px; letter-spacing: 1.05px; }
body.page-home .hero-scroll { min-height: 44px; font-size: 11px; letter-spacing: 1.2px; }
body.page-home .hero-after > span { font-size: 11px; letter-spacing: 1.1px; }
:is(body.page-home, body.subpage) :is(.art-caption, .project-meta) {
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .9px;
}
.folio { font-size: 11px; letter-spacing: 1.45px; }
body.subpage .project-note { font-size: 13px; line-height: 1.75; }
.site-footer .footer-contact { font-size: 14px; line-height: 1.85; }
.site-footer .footer-note .eyebrow { font-size: 10px; letter-spacing: 1.4px; }
.site-footer .footer-bottom { font-size: 12px; line-height: 1.7; }
.site-footer .footer-links { gap: 22px; }
.site-footer .footer-links a,
.site-footer .footer-bottom > a,
.site-footer .footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer .footer-links a[aria-current="page"] { color: var(--experience-red); }
.site-footer a:hover { text-underline-offset: 5px; }

@media (hover: hover) {
  .site-header .main-nav > a:hover { color: var(--experience-red); }
}

@media (max-width: 900px) {
  :root { --experience-header-height: 96px; }
  body.subpage .site-header,
  body.page-home .site-header { height: var(--experience-header-height); }
  .site-header .main-nav:not(.open) { display: none; }
  .site-header .header-actions { gap: 6px; }
  .site-header .header-actions > .phone-link,
  .site-header .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }
  .site-header .header-actions > .phone-link svg { width: 20px; height: 20px; }
  .site-header .menu-toggle svg { width: 23px; height: 23px; }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header,
  body.page-home.nav-open .site-header {
    color: var(--experience-ink);
    background: var(--experience-paper);
    border-bottom: 1px solid var(--line);
  }
  body.nav-open .site-header .header-inner { border-bottom-color: transparent; }
  body.nav-open .site-header .menu-toggle,
  body.nav-open .site-header .phone-link { color: var(--experience-ink); }
  body.nav-open .site-header :is(a, button):focus-visible { outline-color: var(--experience-red); }
  body.nav-open #mobile-bar { visibility: hidden; }
  .site-header .main-nav.open,
  body.page-home .site-header .main-nav.open {
    position: fixed;
    inset: var(--experience-header-height) 0 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: start;
    gap: 0;
    margin: 0;
    padding: 20px 28px max(26px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--experience-paper);
    color: var(--experience-ink);
    border: 0;
    counter-reset: menu-page;
  }
  .site-header .main-nav.open > a {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    min-height: 75px;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
    font-size: clamp(30px, 5vw, 42px);
    line-height: 1.15;
    text-transform: none;
    letter-spacing: -.025em;
    counter-increment: menu-page;
  }
  .site-header .main-nav.open > a::after {
    position: static;
    display: block;
    width: auto;
    height: auto;
    background: none;
    content: "0" counter(menu-page);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 1px;
  }
  .site-header .main-nav.open > a[aria-current="page"] { color: var(--experience-red); }
  .site-header .main-nav.open > a[aria-current="page"]::after { color: var(--experience-red); }
  .site-header .main-nav.open > a:focus-visible { outline-offset: -3px; }
  .mobile-menu-contact {
    display: grid;
    gap: 7px;
    margin-top: auto;
    padding-top: 34px;
    color: var(--experience-ink);
    text-transform: none;
    letter-spacing: 0;
  }
  .mobile-menu-contact > :is(span, p) {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: .7px;
  }
  .mobile-menu-contact a {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 12px;
    min-height: 44px;
    font-size: 28px;
    letter-spacing: -.02em;
    line-height: 1.2;
  }
  .mobile-menu-contact a svg { width: 21px; height: 21px; }
  .mobile-menu-footer {
    margin-top: 20px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
    text-transform: none;
    letter-spacing: .15px;
  }
  .main-nav:not(.open) :is(.mobile-menu-contact, .mobile-menu-footer) { display: none; }
  .site-footer .footer-contact { font-size: 13px; }
}

@media (min-width: 901px) {
  .main-nav :is(.mobile-menu-contact, .mobile-menu-footer) { display: none; }
}

@media (max-width: 640px) {
  :root {
    --experience-header-height: calc(88px + env(safe-area-inset-top, 0px));
    --experience-bottom-bar-height: 60px;
    scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  body { padding-bottom: calc(var(--experience-bottom-bar-height) + env(safe-area-inset-bottom, 0px)); }
  body.subpage .site-header,
  body.page-home .site-header {
    height: var(--experience-header-height);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .site-header .header-inner { gap: 12px; }
  .site-header .brand { flex-shrink: 1; min-width: 0; max-width: calc(100% - 102px); }
  .site-header .brand-logo-window { height: auto; aspect-ratio: 170 / 39; }
  .site-header .header-actions { gap: 2px; }
  .site-header .main-nav.open,
  body.page-home .site-header .main-nav.open { padding-inline: 24px; padding-top: 15px; }
  .site-header .main-nav.open > a { min-height: 70px; padding-block: 16px; font-size: 32px; }
  .mobile-menu-contact { padding-top: 30px; }
  body.page-home .hero-copy .eyebrow { font-size: 10px; letter-spacing: 1.2px; }
  body.page-home .hero-bottom > span { font-size: 10px; letter-spacing: .75px; }
  body.page-home .hero-scroll { font-size: 11px; letter-spacing: 1px; }
  :is(body.page-home, body.subpage) :is(.art-caption, .project-meta) { font-size: 10px; letter-spacing: .6px; }
  .site-footer .footer-contact { gap: 25px; font-size: 13px; }
  .site-footer .footer-links { flex-wrap: wrap; gap: 4px 23px; font-size: 13px; }
  .site-footer .footer-links a { min-width: 44px; padding-inline: 8px; justify-content: center; }
  .site-footer .footer-bottom { gap: 13px 20px; font-size: 12px; }
  body.page-home .site-footer,
  body.subpage .site-footer { padding-bottom: 32px; }
  #mobile-bar { padding-bottom: env(safe-area-inset-bottom, 0px); }
  #mobile-bar a { min-height: var(--experience-bottom-bar-height); font-size: 13px; gap: 11px; }
  #mobile-bar svg { width: 17px; height: 17px; }
  body.page-home .hero-copy { bottom: calc(166px + env(safe-area-inset-bottom, 0px)); }
  body.page-home .hero-bottom { bottom: calc(85px + env(safe-area-inset-bottom, 0px)); }
}

/* Short landscape screens keep the introduction and contact actions in view. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 900px) {
  :root {
    --experience-header-height: calc(72px + env(safe-area-inset-top, 0px));
    --experience-bottom-bar-height: 52px;
    scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  body { padding-bottom: calc(var(--experience-bottom-bar-height) + env(safe-area-inset-bottom, 0px)); }
  body.subpage .site-header,
  body.page-home .site-header {
    height: var(--experience-header-height);
    padding-top: env(safe-area-inset-top, 0px);
  }
  body:is(.page-home, .subpage) .site-header .header-inner {
    width: auto;
    margin-left: max(24px, env(safe-area-inset-left, 0px));
    margin-right: max(24px, env(safe-area-inset-right, 0px));
  }
  .site-header .brand { width: 188px; padding: 8px 9px; }
  .site-header .brand-logo-window { height: auto; aspect-ratio: 170 / 39; }
  body.page-home .hero-scene { height: 100svh; min-height: 360px; max-height: none; }
  body.page-home .hero-copy {
    left: max(28px, env(safe-area-inset-left, 0px));
    right: max(28px, env(safe-area-inset-right, 0px));
    bottom: calc(116px + env(safe-area-inset-bottom, 0px));
  }
  body.page-home .hero h1 { font-size: clamp(38px, 6.5vw, 56px); line-height: 1.04; }
  body.page-home .hero-copy .eyebrow { font-size: 10px; margin-bottom: 18px; }
  body.page-home .hero-bottom {
    left: max(28px, env(safe-area-inset-left, 0px));
    right: max(28px, env(safe-area-inset-right, 0px));
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  body.page-home .hero-bottom > span { font-size: 10px; }
  .site-header .main-nav.open,
  body.page-home .site-header .main-nav.open {
    padding-left: max(28px, env(safe-area-inset-left, 0px));
    padding-right: max(28px, env(safe-area-inset-right, 0px));
  }
  #mobile-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    background: var(--experience-paper);
    border-top: 1px solid var(--line);
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  }
  #mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: var(--experience-bottom-bar-height); padding: 12px; font-size: 13px; }
  #mobile-bar svg { width: 17px; height: 17px; }
  body.page-home .site-footer,
  body.subpage .site-footer { padding-bottom: 32px; }
  .site-footer .footer-links a { min-width: 44px; padding-inline: 8px; justify-content: center; }
}

@media (max-width: 360px) {
  body.page-home .hero h1 { font-size: clamp(36px, 11.7vw, 42px); }
  body.page-home .atelier-heading h2 { font-size: 52px; }
}

@media (max-height: 700px) and (max-width: 900px) {
  .site-header .main-nav.open > a { min-height: 60px; padding-block: 12px; font-size: 29px; }
  .mobile-menu-contact { padding-top: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .site-header,
  .site-header *,
  .button,
  .button svg,
  .text-link,
  .text-link svg,
  .project-image img,
  .discipline-photo img {
    transition: none !important;
    animation: none !important;
  }
}
