/* Public release: Selected Work and Contact live; Possibilities blocked. */
html[data-public-landing] .nav-item[data-nav-item="capabilities"],
html[data-public-landing] .landing-discovery,
html[data-public-landing] .nav-screen-previews,
html[data-public-landing] .capabilities-screen {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Public Contact V2: preserve the original organic takeover and ink-nav.
   Resolve into the supplied framed, grainy analogue composition. */
html[data-public-landing] .contact-public-surface {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #121212;
  opacity: 0;
  pointer-events: none;
}
html[data-public-landing] .contact-public-surface::before {
  content: "";
  position: absolute;
  inset: 0 clamp(14px, 1.85vw, 26px) clamp(6px, 1vh, 10px);
  border-radius: clamp(34px, 5.7vw, 84px);
  background-color: #0b0b0b;
  background-image: url("./assets/tannhoff-contact-texture-v1.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
html[data-public-landing] .contact-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(13px, 1.4vw, 20px);
  padding: 0 20px;
  z-index: 2;
}
html[data-public-landing] .contact-public-heading {
  margin: 0;
  padding: 0;
  color: #fbfbf8;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: clamp(48px, 6.15vw, 84px);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.078em;
  white-space: nowrap;
}
html[data-public-landing] .contact-details .contact-typewriter-link {
  display: block;
  width: clamp(208px, 23vw, 330px);
  aspect-ratio: 660 / 682;
  line-height: 0;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 260ms ease, filter 260ms ease;
}
html[data-public-landing] .contact-typewriter-link img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
@media (hover: hover) {
  html[data-public-landing] .contact-typewriter-link:hover {
    transform: scale(1.04);
    filter: brightness(1.08);
  }
}
html[data-public-landing] .contact-typewriter-link:focus-visible {
  outline: 1px solid #fbfbf8;
  outline-offset: 7px;
}
@media (max-width: 600px) {
  html[data-public-landing] .contact-public-heading {
    font-size: clamp(43px, 10vw, 58px);
  }
  html[data-public-landing] .contact-details .contact-typewriter-link {
    width: min(68vw, 300px, 43dvh);
  }
  html[data-public-landing] .contact-public-surface::before {
    border-radius: 38px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-public-landing] .contact-details .contact-typewriter-link {
    transition: none;
  }
}
html[data-public-landing] body[data-site-state="contact"] .page-index {
  display: none !important;
}

/* ===============================================================
   PUBLIC MOBILE V1.2 APPROVED. Work public; Possibilities unpublished.
   Preserve approved mobile ink, typography and Contact geometry.
   =============================================================== */
.public-mobile-wordmark-fallback,.public-mobile-credits{display:none;}
@media(max-width:819px){
  html[data-public-landing] .identity{overflow:visible;}
  /* Both WebGL and fallback occupy the EXACT 2640:1576 source plane,
     transformed by the existing uniform identity scale. Never stretch. */
  html[data-public-landing] .public-mobile-wordmark-fallback{
    position:absolute;
    inset:auto 0 auto 0;
    top:50%;
    width:100%;
    height:auto;
    aspect-ratio:2640/1576;
    transform:translateY(-50%);
    object-fit:contain;
    pointer-events:none;
  }
  html[data-public-landing]:not([data-mobile-wordmark-ready])
    #wordmark{visibility:hidden!important;}
  html[data-public-landing][data-mobile-wordmark-failed]
    #wordmark{visibility:hidden!important;}
  html[data-public-landing][data-mobile-wordmark-failed]
    .public-mobile-wordmark-fallback{
      display:block;
      visibility:visible;
    }
  html[data-public-landing] .landing-est{
    font-size:clamp(11px,2.85vw,13px);
    letter-spacing:-.045em;
    line-height:1;
  }
  html[data-public-landing] body[data-site-state="home"] .descriptor{
    letter-spacing:-.062em;
    line-height:.94;
    text-align:left;
  }
  html[data-public-landing] .landing-film-credits{
    left:max(20px,env(safe-area-inset-left,0px) + 5.15vw);
    right:max(20px,env(safe-area-inset-right,0px) + 5.15vw);
    bottom:max(17px,env(safe-area-inset-bottom,0px) + 12px);
    font-family:"Open Sauce One",Arial,sans-serif;
    font-size:clamp(9px,2.45vw,10.5px);
    font-weight:700;
    line-height:1.075;
    letter-spacing:-.071em;
    text-align:left;
    text-transform:uppercase;
    white-space:normal;
    overflow:visible;
  }
  html[data-public-landing] .landing-film-credits p:not(.public-mobile-credits){
    display:none;
  }
  html[data-public-landing] .landing-film-credits .public-mobile-credits{
    display:block;
    width:100%;
    max-width:none;
    margin:0;
    white-space:normal;
    overflow-wrap:normal;
    hyphens:none;
  }
  /* The original return wordmark remains the ONLY Contact signature.
     Mobile touch ergonomics are increased without duplicating it. */
  html[data-public-landing] body[data-site-state="contact"]
    #wordmark-shell{cursor:pointer;}
  html[data-public-landing] body[data-site-state="contact"]
    #wordmark-shell:focus-visible{
      outline:2px solid #fbfbf8;
      outline-offset:6px;
      border-radius:3px;
    }
  /* Selected Work: no-hover 44px click/tap/keyboard target. */
  html[data-public-landing] body[data-site-state="home"]
    .nav-item[data-nav-item="work"] {
      visibility:visible!important;
      display:block!important;
      position:fixed!important;
      right:auto!important;
      left:var(--public-mobile-nav-left,12vw)!important;
      top:var(--public-mobile-nav-top,58vh)!important;
      width:max-content!important;
      min-height:44px;
      padding:12px 0 10px;
      font-family:"Open Sauce One",sans-serif!important;
      font-size:clamp(13px,3.7vw,16px)!important;
      font-weight:700!important;
      line-height:1.15!important;
      letter-spacing:-.055em!important;
      text-align:left!important;
      text-transform:uppercase!important;
      transform:none!important;
      opacity:1!important;
      pointer-events:auto!important;
      -webkit-mask-image:none!important;
      mask-image:none!important;
      -webkit-text-fill-color:#111!important;
      filter:none;
      z-index:55!important;
      color:#111!important;
      cursor:pointer;
    }
  html[data-public-landing] body[data-site-state="home"]
    .nav-item[data-nav-item="work"]:focus-visible {
      outline:2px solid currentColor;
      outline-offset:4px;
    }
}
@media(max-width:819px) and (prefers-reduced-motion:reduce){
  html[data-public-landing] #wordmark{
    transition:none!important;
  }
  html[data-public-landing] .landing-film-credits,
  html[data-public-landing] body[data-site-state="home"] .nav-item[data-nav-item="work"]{
    filter:none!important;
    transition:none!important;
    animation:none!important;
  }
}

/* Mobile V1: typewriter graphic is unframed and keeps paper blank. */
html[data-public-landing] .contact-typewriter-link{
  flex:0 1 auto;
  max-width:calc(100vw - 48px);
  max-height:min(50dvh,430px);
  outline-offset:7px;
}
html[data-public-landing] .contact-typewriter-link img{
  display:block;
  width:100%;
  height:100%;
  max-height:min(50dvh,430px);
  object-fit:contain;
}
@media(max-width:819px){
  html[data-public-landing] .contact-details{
    gap:clamp(17px,2.4dvh,26px);
    padding-inline:max(20px,env(safe-area-inset-left,0px),env(safe-area-inset-right,0px));
  }
  html[data-public-landing] .contact-details .contact-typewriter-link{
    width:min(68vw,300px,43dvh);
    max-height:43dvh;
  }
  html[data-public-landing] .contact-typewriter-link img{max-height:43dvh;}
  html[data-public-landing] .contact-typewriter-link:focus-visible{
    outline:2px solid #fbfbf8;
    outline-offset:8px;
  }
}
@media(max-height:530px) and (orientation:landscape){
  html[data-public-landing] .contact-details .contact-typewriter-link{
    width:min(36vw,46dvh);
  }
}

/* ================================================================
   PUBLIC MOBILE SELECTED WORK V1.1
   Changes ONLY the committed mobile Work route. Landing, desktop,
   Contact, original WebGL morphology and fixed credits are protected.
   ================================================================ */
html[data-public-landing]{
  --public-mobile-safe-left:env(safe-area-inset-left,0px);
  --public-mobile-safe-top:env(safe-area-inset-top,0px);
}
@media(max-width:819px){
  /* The original Selected Work DOM link is always legible on its own
     committed route, even before Safari uploads the grain-mask atlas. */
  html[data-public-landing] body[data-site-state="work"] .nav-work{
    visibility:visible!important;
    opacity:1!important;
    color:#111!important;
    -webkit-text-fill-color:#111!important;
    -webkit-mask-image:none!important;
    mask-image:none!important;
    pointer-events:auto!important;
    z-index:56!important;
  }
  html[data-public-landing] body[data-site-state="work"] .nav-work:focus-visible{
    outline:2px solid #111;
    outline-offset:4px;
  }
  html[data-public-landing] body[data-site-state="work"] .work-content{
    left:var(--public-work-preview-left,24px);
    top:var(--work-content-top,224px);
    width:calc(100vw - var(--public-work-preview-left,24px) - 20px);
    max-width:none;
  }
  html[data-public-landing] body[data-site-state="work"] .work-screen{
    overflow-x:hidden;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain;
    touch-action:pan-y;
    scroll-padding-bottom:32px;
  }
  /* Absolutely positioned live preview participates in the scroll extent
     through this spacer. Work ends above the stationary film-credit footer. */
  html[data-public-landing] body[data-site-state="work"] .work-screen::after{
    height:calc(var(--v6-mobile-preview-top,325px) +
      var(--public-work-preview-height,485px) + 44px);
  }
  html[data-public-landing] body[data-site-state="work"] .project-preview-stage{
    min-height:calc(var(--v6-mobile-preview-top,325px) +
      var(--public-work-preview-height,485px) + 24px);
    overflow:visible;
  }
  html[data-public-landing] body[data-site-state="work"] .project-preview-browser{
    left:var(--public-work-preview-left,24px);
    right:auto;
    top:var(--v6-mobile-preview-top,325px);
    width:var(--public-work-preview-width,min(70vw,302px));
    height:var(--public-work-preview-height,485px);
    aspect-ratio:9/16;
    max-width:none;
    overflow:hidden;
    box-shadow:none;
    border:0;
    background:#fff;
    opacity:1;
    pointer-events:auto;
    touch-action:auto;
  }
  html[data-public-landing] body[data-site-state="work"] .project-preview-browser-bar{
    height:23px;
    padding:0 9px;
    font-size:9px;
    line-height:23px;
  }
  /* A real phone-width (~390 CSS px) browsing context, uniformly scaled
     into the portrait viewport. Never a distorted desktop-width crop. */
  html[data-public-landing] body[data-site-state="work"] .project-preview-browser iframe{
    display:block;
    border:0;
    width:var(--public-work-iframe-width,390px);
    height:var(--public-work-iframe-height,695px);
    max-width:none;
    max-height:none;
    transform:scale(var(--public-work-iframe-scale,.7));
    transform-origin:0 0;
    filter:none;
    pointer-events:auto;
    touch-action:auto;
  }
}
/* One-time first-load ink-adjacent typographic arrival. No geometry changes
   and no replay after the initial document intro flag is cleared. */
@keyframes publicDescriptorArrival{
  from{opacity:0}
  to{opacity:1}
}
@keyframes publicSelectedWorkArrival{
  from{opacity:0}
  to{opacity:1}
}
@keyframes publicSelectedWorkMobileArrival{
  from{filter:opacity(0)}
  to{filter:opacity(1)}
}
@media(prefers-reduced-motion:no-preference){
  html[data-public-landing][data-public-intro]
    body[data-site-state="home"] .descriptor{
    animation:publicDescriptorArrival 2.25s cubic-bezier(.26,0,.22,1) .45s both;
  }
  html[data-public-landing][data-public-intro]
    body[data-site-state="home"] .nav-work{
    animation:publicSelectedWorkArrival 2s cubic-bezier(.26,0,.22,1) 2.25s both;
  }
}
@media(max-width:819px) and (prefers-reduced-motion:no-preference){
  /* The mobile Home nav is opacity-pinned for atlas fallback safety.
     Filter opacity fades its ink without ever relying on atlas readiness. */
  html[data-public-landing][data-public-intro]
    body[data-site-state="home"] .nav-work{
    animation:publicSelectedWorkMobileArrival 2s cubic-bezier(.26,0,.22,1) 2.25s both;
  }
}

/* Public mobile Work V1.2 correction: three original projects and a
   genuinely filled portrait website viewport. No desktop or Home changes. */
@media(max-width:819px){
  html[data-public-landing] body[data-site-state="work"] .work-projects{
    gap:clamp(10px,1.6svh,16px);
  }
  html[data-public-landing] body[data-site-state="work"] .work-project strong,
  html[data-public-landing] body[data-site-state="work"]
    .work-project[data-project="maxmostley"] strong,
  html[data-public-landing] body[data-site-state="work"]
    .work-project[data-project="wavesofher"] strong,
  html[data-public-landing] body[data-site-state="work"]
    .work-project[data-project="francesca"] strong{
    font-size:clamp(21px,5.8vw,29px);
    line-height:1.08;
  }
  /* Only the original DOM heading is used. Its settled ink is not
     dependent on an alpha-atlas being uploaded by Safari. */
  html[data-public-landing] body[data-site-state="work"]
    .site-nav .nav-work,
  html[data-public-landing] body[data-site-state="work"]
    .site-nav .nav-work.public-work-original-text{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    color:#111!important;
    -webkit-text-fill-color:#111!important;
    -webkit-mask:none!important;
    mask:none!important;
    pointer-events:auto!important;
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-browser{
    width:var(--public-work-preview-width,min(67vw,280px))!important;
    height:var(--public-work-preview-height,475px)!important;
    aspect-ratio:9/17!important;
    box-shadow:none!important;
    border:0!important;
    background:transparent;
    overflow:hidden!important;
  }
  /* The project title already identifies the website. Removing the
     duplicated white browser bar lets the site occupy the whole card. */
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-browser-bar{display:none!important}
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-browser iframe{
    width:var(--public-work-iframe-width,320px)!important;
    height:var(--public-work-iframe-height,568px)!important;
    transform:translate3d(0,var(--public-work-iframe-shift,0px),0)
      scale(var(--public-work-iframe-scale,.8))!important;
    transform-origin:0 0!important;
    max-width:none!important;
    max-height:none!important;
    border:0!important;
    filter:none!important;
    -webkit-overflow-scrolling:touch;
  }
  html[data-public-landing] body[data-site-state="work"]
    .work-project:focus-visible{
    outline:1px solid #111;
    outline-offset:5px;
  }
}

/* ================================================================
   MOBILE SELECTED WORK — THREE LIVE SHEETS
   The same original three iframe articles overlap like a small folio.
   Only the exposed corners of the sheets behind the front card show.
   Purely public MOBILE Work; no Landing, desktop, Contact or ink rules.
   ================================================================ */
@media (max-width:819px){
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck] .project-preview{
    position:absolute!important;
    inset:auto!important;
    left:var(--public-work-preview-left,24px)!important;
    top:var(--v6-mobile-preview-top,325px)!important;
    width:var(--public-work-preview-width,min(67vw,280px))!important;
    height:var(--public-work-preview-height,475px)!important;
    min-width:0!important;
    max-width:var(--public-work-preview-width,min(67vw,280px))!important;
    max-height:var(--public-work-preview-height,475px)!important;
    box-sizing:border-box!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    /* Clip the entire iframe compositor layer to its OWN sheet, not
       just to the internal browser div. This prevents wide white
       backing-page layers escaping in mobile Safari. */
    overflow:hidden!important;
    -webkit-clip-path:inset(0);
    clip-path:inset(0);
    isolation:isolate;
    background:#fbfbf8;
    border:1px solid rgba(18,18,18,.18);
    box-shadow:0 2px 9px rgba(0,0,0,.07);
    transform:translate3d(
      var(--mobile-sheet-x,0px),var(--mobile-sheet-y,0px),0
    )!important;
    transition:transform 640ms cubic-bezier(.22,.61,.36,1);
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview[data-mobile-sheet-depth="0"]{
    --mobile-sheet-x:0px;
    --mobile-sheet-y:0px;
    z-index:30;
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview[data-mobile-sheet-depth="1"]{
    --mobile-sheet-x:clamp(27px,8.5vw,38px);
    --mobile-sheet-y:clamp(42px,6.0svh,56px);
    z-index:29;
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview[data-mobile-sheet-depth="2"]{
    --mobile-sheet-x:clamp(54px,17vw,76px);
    --mobile-sheet-y:clamp(84px,12svh,112px);
    z-index:28;
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview .project-preview-browser{
    position:absolute!important;
    top:0!important;
    left:0!important;
    right:auto!important;
    bottom:auto!important;
    width:var(--public-work-preview-width,min(67vw,280px))!important;
    height:var(--public-work-preview-height,475px)!important;
    max-width:none!important;
    max-height:none!important;
    box-sizing:border-box!important;
    border:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
    pointer-events:auto!important;
  }
  /* An underlying iframe cannot swallow a tap intended to bring its
     exposed sheet to the front. The front iframe remains fully usable. */
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview:not(.is-active) iframe{
    pointer-events:none!important;
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview.is-active iframe{
    pointer-events:auto!important;
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview:not(.is-active){
    cursor:pointer;
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview:focus-visible{
    outline:2px solid #111;
    outline-offset:3px;
  }
  /* Both lower sheets protrude below the front card. Include their
     overhang in the scroll extent above the fixed film-credit footer. */
  html[data-public-landing] body[data-site-state="work"] .work-screen::after{
    height:calc(var(--v6-mobile-preview-top,325px) +
      var(--public-work-preview-height,485px) + 175px);
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage{
    min-height:calc(var(--v6-mobile-preview-top,325px) +
      var(--public-work-preview-height,485px) + 149px);
  }
}
@media (max-width:819px) and (prefers-reduced-motion:reduce){
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck] .project-preview{
    transition:none;
  }
}

/* Public mobile Work is one vertical reading surface. The project index and
   live sheets scroll inside .work-screen. The identity, EST, heading and
   original return target are in separate fixed planes, so apply precisely
   the same native scroll displacement to them. Their existing transforms,
   WebGL geometry and reversible route choreography remain owned by V6. */
@media(max-width:819px){
  html[data-public-landing] body[data-site-state="work"] .identity,
  html[data-public-landing] body[data-site-state="work"] .landing-est,
  html[data-public-landing] body[data-site-state="work"] .site-nav .nav-work,
  html[data-public-landing] body[data-site-state="work"] .work-home-hit-target{
    translate:0 calc(0px - var(--public-work-scroll-y,0px));
  }
  /* Use the available width to show the actual backing websites.
     A restrained vertical identifier labels each exposed sheet edge. */
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview:not(.is-active)::after{
    position:absolute;
    content:"";
    top:14px;
    right:5px;
    writing-mode:vertical-rl;
    text-orientation:mixed;
    padding:7px 5px;
    font:600 10px/1 "Open Sauce One",Arial,sans-serif;
    letter-spacing:.035em;
    color:#111;
    background:rgba(251,251,248,.84);
    border:1px solid rgba(0,0,0,.08);
    pointer-events:none;
    z-index:2;
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview[data-project-preview="maxmostley"]:not(.is-active)::after{
    content:"MAX MOSTLEY";
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview[data-project-preview="wavesofher"]:not(.is-active)::after{
    content:"WAVES OF HER";
  }
  html[data-public-landing] body[data-site-state="work"]
    .project-preview-stage[data-mobile-sheet-deck]
    .project-preview[data-project-preview="francesca"]:not(.is-active)::after{
    content:"FRANCESCA BAS";
  }
}
