/* ==========================================================================
   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));
  /* "website enough?" is 6.74em wide. */
  /* The last term is the height the copy has: the headline gives up size
     so it, the answer, the windows and the buttons all fit between the
     menu and the foot. Its rows can't squeeze it any more (they used to,
     and cut the words off), so this is what keeps it on the screen.
     Measured: the rest of the copy is about 600px with the label, 480 with
     the smaller windows (under 1060px tall) and 360 without the label
     (under 800px); the headline is 2.48 of its size. Set again for those
     heights at the end of this file. */
  --h1-fit: calc(40svh - 18.6rem);
  --h1-size: min(calc(var(--col) / 6.95), 14svh, 9.5rem, var(--h1-fit));
  --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; }
/* Never clipped. Each window clips (overflow: hidden), which lets a grid
   row squeeze it below its text on a short screen, cutting off the bottom
   of the line. min-height keeps every window as tall as its words, and the
   extra room under the line clears the tail of the g (it hangs .07em
   below the line box). */
.hero .hero__h1 .line {
  min-height: max-content;
  padding-bottom: .18em;
  margin-bottom: -.18em;
}
.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: var(--bx, 0px) 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) {
  /* Wireframe A under the headline and its rule: left, the line that
     finishes the headline, the answer under it and the button; right,
     the two cards (a basic website, then ours). */
  .hero .hero__copy.is-set {
    display: grid;
    /* Capped, and packed to the left: on a very wide screen the two
       columns stay together and the space goes to the right. */
    grid-template-columns: minmax(0, 34rem) minmax(0, 27rem);
    /* Row 5 (the answer) takes whatever extra height the windows need. */
    /* Row 4 (the line that finishes the headline) never grows; the extra
       height the windows need all goes to row 5, under the answer, so the
       buttons sit straight under whichever column is longer. */
    /* Rows 1 and 2 are the two big lines. Each line clips (its rise), and
       the subgrid sizes a clipping item's row as if it could shrink to
       nothing, so on a short screen the rows came out shorter than the
       words and cut them off. The floor is one line of the headline. */
    grid-template-rows:
      minmax(calc(var(--h1-size) * .96), auto)
      minmax(calc(var(--h1-size) * .96), auto)
      auto minmax(min-content, 0px) auto auto;
    column-gap: var(--cgap);
    justify-content: start;
    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;
    width: var(--col);
    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: 15em; }
  .hero .is-set .hero__lead { grid-row: 5; grid-column: 1; max-width: 31rem; margin: clamp(.9rem, 2svh, 1.3rem) 0 0; }
  /* The buttons: "See what else we do" under the answer, "Say hello"
     under the cards. */
  .hero .is-set .hero__cta { display: contents; }
  .hero .is-set .hero__cta .btn {
    grid-row: 6;
    justify-self: start;
    align-self: end;
    margin-top: clamp(1.3rem, 3.2svh, 2.2rem);
  }
  .hero .is-set .hero__cta .btn:nth-child(1) { grid-column: 1; }
  .hero .is-set .hero__cta .btn:nth-child(2) { grid-column: 2; }
  .hero .is-set .hero__a {
    display: flex;
    grid-column: 2;
    grid-row: 4 / 6;
    align-self: start;
    margin-top: .2rem;
  }
}

/* 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); }

/* ------------------------------------------------------------- Design A
   A basic website, then ours (incl.css styles the cards). Only in the
   two-column hero, from 1180px of hero; below that the next section
   opens with them. */
.hero .hero__a { display: none; }
@container (min-width: 1180px) {
  .hero .is-set .hero__a { display: flex; }
}

/* Room between the buttons and the hairline over the closing label. */
.hero .hero__copy { padding-bottom: calc(2.6rem + clamp(2.25rem, 5svh, 3.5rem)); }
@media (max-height: 800px) {
  .hero .hero__copy { padding-bottom: 0; }
}

/* A laptop's height: the two windows come down a size so the answer, the
   windows and the buttons all fit between the rule and the label. */
@media (max-height: 940px) {
  .hero .hero__a { gap: 2.3rem; padding-top: 1.4rem; }
  .hero .hero__a .bw__bar { min-height: 2.05rem; }
  .hero .hero__a .bw__in { padding: .8rem 1rem .85rem; }
  .hero .hero__a ul { gap: .4rem; }
  .hero .hero__a li { font-size: .86rem; }
  .hero .hero__a .ha__k { font-size: 1.5rem; }
}

/* Up to 1060px tall the two windows come down a size more (one empty row
   fewer in the basic one, a little closer together, the whole pair at
   84%), so the headline keeps its size. Under 800px the label has gone
   and gives its room back. --h1-fit: see the top of this file. */
@media (max-height: 1060px) {
  .hero { --h1-fit: calc(40svh - 15.4rem); }
  .hero .hero__a { gap: 1.75rem; padding-top: 1.1rem; zoom: .84; }
  .hero .hero__a .ha__blank + .ha__blank { display: none; }
}
@media (max-height: 800px) {
  .hero { --h1-fit: calc(40svh - 12.4rem); }
}
