/* ==========================================================================
   Dactyl Websites — the home page's hero on a wide screen (November 2026)

   Loaded by index.html only, from 820px, after desk.css and qtabs.css. It
   replaces desk.css's hero (the film drawing back into a tall window on
   the right) without touching it, because Features shares desk.css.

   THE LAYOUT
   The picture is the left of the screen, top to bottom, its trailing
   corners a sheet's, so the designer faces the words and the tape sits on
   the lit wall. The copy is on linen on the right, under the menu: the
   headline, a rule, then two columns. Left, the line that finishes the
   headline with "See the five questions" under it; right, who we are with
   "Say hello" under it, so each action sits under its own sentence. The
   label closes the column under a hairline. Below 1180px of hero there is
   no room for two columns beside the picture and the copy is one stack.

   THE MOVE (hero.js, wide)
   The film opens edge to edge. Its right edge then draws back to here and
   the copy comes in behind it, a part at a time. The window is a layer
   with rounded corners and overflow hidden, as wide as the screen and a
   corner more; it is moved by a transform, and the photograph inside it is
   moved back by the same amount and scaled to cover what shows. No clip
   path changes and nothing is laid out again while it plays.

   Colours, faces, radii and buttons are site.css's. Contrast: ink-3 on
   linen 5.7:1 (site.css), white 94% on the photograph's dark top under the
   scrim.
   ========================================================================== */

/* The header runs gutter to gutter on this page: the picture bleeds off
   the screen's left edge, so the tape and the button are anchored to the
   screen's edges too. The tape stands on the picture's wall. */
.nav__in { max-width: none; }

.hero {
  --foot: clamp(1.4rem, 4.2svh, 3rem);
  --gap: clamp(2rem, 4.4cqw, 5rem);
  /* The picture: 44% of the screen at least, more on a squarer one (to
     54%), and never so much that the copy has under 27rem. */
  --pw: min(max(44cqw, min(54cqw, 74svh)), 100cqw - var(--gutter) - 27rem);
  /* The window's layer: the screen and a corner, so at the opening, moved
     right by the difference, its rounded corners are off the screen. */
  --mw: calc(100cqw + var(--sheet-r));
  --col: calc(100cqw - var(--pw) - var(--gap) - var(--gutter));
  /* "Thinking about" is 6.32em wide. */
  --h1-size: min(calc(var(--col) / 6.5), 14svh, 9.5rem);
  --cgap: clamp(1.75rem, 3.4cqw, 3.5rem);
}

/* The hero darkening under the next sheet. desk.css draws it as the
   hero's ::after from a variable on .hero, which restyles everything in
   the hero on every frame of the cover (4.8ms a frame, measured); here it
   is an element of its own (hero.js adds it) whose opacity is set
   directly, which the compositor does alone. */
.hero::after { display: none; }
.hero__sink {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--umber-deep);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* ------------------------------------------------------------- The picture
   At rest the layer's right edge is the picture's (--pw), and the
   photograph sits in its last --pw of it, which puts it at the screen's
   left. hero.js only ever moves these two with transforms. */
.hero__media {
  top: 0;
  bottom: 0;
  left: calc(var(--pw) - var(--mw));
  right: auto;
  width: var(--mw);
  height: auto;
  overflow: hidden;
  border-radius: 0 var(--sheet-r) var(--sheet-r) 0;
  clip-path: none;
  will-change: transform;
}
.hero__media-in {
  left: calc(var(--mw) - var(--pw));
  top: 0;
  width: var(--pw);
  height: 100%;
}
/* The opening, before hero.js takes it over (desk.css, html.hero-wait):
   the photograph the whole screen, corners off it. The photograph is the
   screen's size exactly, so the tapes land where the head script put
   them. */
html.hero-wait .hero__media { left: 0; }
html.hero-wait .hero__media-in { left: 0; width: 100cqw; }

/* ------------------------------------------------------------------ The copy
   From the picture's edge, plus a gap, to the gutter; from under the
   header to the foot. Moved as one piece by hero.js (it rides a little
   way behind the picture's edge), so it is its own layer. */
.hero .hero__copy {
  left: calc(var(--pw) + var(--gap));
  top: var(--nav-h);
  bottom: var(--foot);
  width: var(--col);
  height: auto;
  justify-content: center;
  will-change: transform;
}
.hero .hero__lead { max-width: 33rem; }
.hero .hero__cta { margin-top: clamp(1.35rem, 3.2svh, 2.2rem); }

/* The headline in lines (hero.js: .line for each big line, .line--s for
   the reading-size line that ends the <h1>). Each rises in its own
   window, on its own layer. */
.hero .hero__h1 .line > span { will-change: transform; }
.hero .hero__h1 .line.line--s {
  margin-top: calc(var(--h1-size) * .2);
  white-space: normal;
}
.hero .hero__h1 .hero__h1-s { margin: 0; }

/* The paragraph, a line at a time (hero.js finds the lines and sets each
   in its own span, so each can come up by itself). */
.hero .hero__lead .w { display: inline-block; }
.hero .hero__lead .ln { display: block; white-space: nowrap; will-change: transform, opacity; }

/* The buttons come up one after the other. Moved with the translate and
   scale properties (fed by hero.js), because the button's own transform
   has a transition on it for its press, and a scrubbed move through that
   would trail behind the scroll. */
.hero .hero__cta .btn {
  translate: 0 var(--by, 0px);
  scale: var(--bs, 1);
  transform-origin: 0 50%;
}

/* The rule under the headline (hero.js adds it). Drawn out from the
   right, after the picture's edge. Only in the two-column layout. */
.hero__rule {
  display: none;
  height: 1px;
  background: var(--hair-2);
  transform-origin: 100% 50%;
  will-change: transform;
}

/* "Websites for local businesses · Western Sydney" closes the column,
   under a hairline, in the mono labels' voice and the secondary ink. */
.hero .hero__eyebrow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding-top: 1rem;
  font-size: max(11.5px, .75rem);
  letter-spacing: .1em;
  text-wrap: balance;
  color: var(--ink-3);
}
.hero .hero__eyebrow::before {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 1px;
  margin: 0;
  background: var(--hair-2);
  transform: scaleX(var(--draw, 1));
  transform-origin: 100% 50%;
  vertical-align: baseline;
}

/* ---------------------------------------------------------- Two columns
   From 1180px of hero, once hero.js has set the headline in lines
   (.is-set; without script the copy is the one stack). The <h1> stays one
   heading and lays its lines into the column's rows (subgrid), so the
   reading line can share a row with the paragraph. */
@container (min-width: 1180px) {
  .hero .hero__copy.is-set {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
    grid-template-rows: repeat(5, auto);
    column-gap: var(--cgap);
    align-content: center;
  }
  .hero .is-set .hero__title { display: contents; }
  .hero .is-set .hero__h1:not(.hero__h1--over) {
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    grid-column: 1 / -1;
    grid-row: 1 / 5;
  }
  .hero .is-set .hero__h1 .line { grid-column: 1 / -1; }
  .hero .is-set .hero__h1 .line:nth-child(1) { grid-row: 1; }
  .hero .is-set .hero__h1 .line:nth-child(2) { grid-row: 2; }
  .hero .is-set .hero__rule {
    display: block;
    grid-column: 1 / -1;
    grid-row: 3;
    margin: calc(var(--h1-size) * .3) 0 calc(var(--h1-size) * .26);
  }
  .hero .is-set .hero__h1 .line.line--s { grid-row: 4; grid-column: 1; margin-top: 0; }
  .hero .is-set .hero__h1 .hero__h1-s { max-width: none; }
  .hero .is-set .hero__lead { grid-row: 4; grid-column: 2; max-width: none; margin: .28rem 0 0; }
  .hero .is-set .hero__cta { display: contents; }
  .hero .is-set .hero__cta .btn {
    grid-row: 5;
    justify-self: start;
    align-self: end;
    margin-top: clamp(1.5rem, 3.6svh, 2.4rem);
  }
  .hero .is-set .hero__cta .btn:nth-child(1) { grid-column: 1; }
  .hero .is-set .hero__cta .btn:nth-child(2) { grid-column: 2; }
}

/* A laptop's 700px or so: the closing label gives its room to the copy. */
@media (max-height: 800px) {
  .hero .hero__eyebrow { display: none; }
  .hero .hero__lead { font-size: .95rem; line-height: 1.52; }
}

/* ------------------------------------------------------------------ Menu
   While the hero is on screen (.h2-top, hero.js) each link takes its tone
   from what is under it: light on the picture, ink on the linen. The
   picture's edge passes them one at a time as it draws back, and each
   rolls over as it is uncovered, the way the buttons' labels roll when
   pointed at: two copies of the word in one clipped box (.nl), the light
   one leaving upward, the ink one coming up from below. Past the hero the
   ink copy is the only one showing and takes the header's own colour
   (ui.js). */
.nav__links .nl {
  display: inline-grid;
  overflow: hidden;
  vertical-align: top;
  padding: .55em .4em;
  margin: -.55em -.4em;
}
.nav__links .nl > span {
  grid-area: 1 / 1;
  transition: transform .75s var(--glide);
}
.nav__links .nl__b { transform: translateY(190%); }
.nav__links a.is-ink .nl__a { transform: translateY(-190%); }
.nav__links a.is-ink .nl__b { transform: none; }
/* A link the picture's resting edge falls across (a narrow window, a
   foldable opened): both copies in place, each cut at the edge (--cut,
   from the word's left; hero.js). */
.nav__links a.is-split .nl > span { transform: none; transition: none; }
.nav__links a.is-split .nl__a { clip-path: inset(-1em calc(100% - var(--cut, 0px)) -1em -1em); }
.nav__links a.is-split .nl__b { clip-path: inset(-1em -1em -1em var(--cut, 0px)); }

.nav.h2-top .nav__links a { color: var(--ink-3); text-shadow: none; }
.nav.h2-top .nav__links a:hover { color: var(--ink); }
.nav.h2-top .nav__links .nl__a {
  color: rgba(255, 255, 255, .94);
  text-shadow: 0 1px 2px rgba(12, 9, 6, .45), 0 2px 16px rgba(12, 9, 6, .4);
}
.nav.h2-top .nav__cta { background: var(--navy); color: #fff; }
.nav.h2-top .nav__cta::before { background: var(--navy-rise); }
.nav.h2-top .nav__cta.on-photo { background: var(--paper); color: var(--navy); }
.nav.h2-top .nav__cta.on-photo::before { background: var(--sand); }
.nav .nav__cta { transition: transform .4s var(--glide), background-color .5s var(--ease), color .5s var(--ease); }
