/* Home's starting screen: four doors (since 30 November 2026, evening; before that three, with Web Design as a wide
   window onto the hero, where the load intros played: archive/before-brand-door-2026-11-30/).
   First the brand door: the Orsa Creative ring, name and tagline on the dusk gradient, with Get in touch and About.
   Then three equal picture doors: Web Design (this page, opened at its top), Photography and Video Production
   (links to their pages). Wide screens: the four stand side by side and fill the screen, which does not scroll.
   900 px and narrower: they stack and scroll (the last block below).
   States on <html>: doors-up (set in the head of base.njk unless the address names a #section) and doors-out (a
   door was chosen: the others drop away one after another, nearest first, and the chosen one, .is-picked, stands;
   then it lifts off the page, "Doors: drop and lift" in site.css). Markup and script: the foot of the hero in
   src/index.njk. Without scripts there are no doors. */
.doors { display: none; }
/* --door-line: the room kept under a door's name for its sentence, so the names stand level however the lines wrap. */
html { --door-line: 9.3rem; }
html.doors-up body { background: var(--navy); } /* a door to another page fades away with the site's transition: to the dark, not to the page's pale ground */
html:is(.doors-up, .doors-leaving) .doors { position: fixed; inset: 0; z-index: 60; display: flex; }

.door { position: relative; flex: 1 1 0px; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: clamp(20px, 3vw, 44px) clamp(14px, 1.6vw, 28px); overflow: hidden; isolation: isolate; color: var(--white); text-decoration: none; box-shadow: -1px 0 0 rgba(255, 255, 255, 0.16); transition: flex-basis 0.85s var(--ease), flex-grow 0.85s var(--ease), padding 0.85s var(--ease); }
.door:hover { color: var(--white); }
.door:focus-visible { outline-color: var(--white); outline-offset: -6px; }
.door::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(2, 24, 56, 0.7) 0, rgba(2, 30, 68, 0.25) 28%, rgba(2, 24, 56, 0.88) 100%), var(--img) var(--at, center) / cover; transition: transform 1.4s var(--ease); }
.door__name { font: 300 clamp(1.5rem, 2.7vw, 4.2rem)/1 var(--serif); /* sized so "Photography" fits a door a fifth of the screen wide, less what its neighbour takes under the pointer */ letter-spacing: -0.012em; }
.door__line { max-width: 30ch; min-height: var(--door-line); color: var(--on-dark); }
.door > * { transition: opacity 0.3s; }

/* The Web Design door: three of Justin's websites (Old Hickory Lake Soap Co., Beach Waves Salon, Stillhouse Creek Golf
   Club), each a laptop with a phone standing in front of its lower right corner, stacked down the door on the dusk
   gradient, a little to the left and right in turn. --mw is a laptop's width: the three fill the door's height (a pair is about
   0.76 of it tall, the stack about 2.45). The door is
   a size container (cqw, cqh: hundredths of its width and height). Devices drawn as in "Case studies" in site.css. */
.door--web { container-type: size; }
/* Since Justin's note of 30 November 2026 (night) the stack fills the door's height like the other doors' photographs,
   wider than the closed door (so the laptops are cut off at its sides until it opens), a little less saturated, and
   under the same navy shade as Photography and Video (::after here, above the mockups; the name and sentence above it). */
.door--web::before { content: none; }
.door--web::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(rgba(2, 24, 56, 0.7) 0, rgba(2, 30, 68, 0.25) 28%, rgba(2, 24, 56, 0.88) 100%); pointer-events: none; }
.door--web > .door__name, .door--web > .door__line { position: relative; z-index: 1; }
.mocks { --bezel: #0c1522; --mw: calc((100cqh - 40px) / 2.45); position: absolute; top: 50%; left: 50%; width: var(--mw); translate: -50% -50%; display: flex; flex-direction: column; gap: calc(var(--mw) * 0.1); filter: saturate(0.8); transition: scale 1.4s var(--ease); }
.mock { position: relative; display: block; padding-bottom: calc(var(--mw) * 0.12); }
.mock:nth-child(odd) { translate: -6% 0; }
.mock:nth-child(even) { translate: 6% 0; }
.mock__laptop, .mock__screen, .mock__base { display: block; }
.mock__screen { margin-inline: 7%; padding: calc(var(--mw) * 0.025) calc(var(--mw) * 0.025) calc(var(--mw) * 0.035); border-radius: calc(var(--mw) * 0.045) calc(var(--mw) * 0.045) 0 0; background: var(--bezel); }
.mock__screen img { display: block; width: 100%; height: auto; border-radius: 2px; }
.mock__base { height: calc(var(--mw) * 0.045); border-radius: 2px 2px 14px 14px / 2px 2px 100% 100%; background: linear-gradient(to bottom, #4a5462 0%, #222c3a 45%, var(--bezel) 100%); box-shadow: 0 24px 40px -24px rgba(2, 16, 38, 0.7); }
.mock__phone { position: absolute; right: 3%; bottom: 0; display: block; width: 20%; padding: calc(var(--mw) * 0.01); border-radius: calc(var(--mw) * 0.04); background: var(--bezel); box-shadow: 0 20px 34px -16px rgba(2, 16, 38, 0.6); }
.mock__phone img { display: block; width: 100%; height: auto; border-radius: calc(var(--mw) * 0.032); }

/* The brand door: the brand guide's dusk panel (.dusk in site.css). (Its "ring crop", a large ring in the corner,
   was removed at Justin's request on 30 November 2026.) On it, the name on one line beside the
   ring, as in the header (the ring, medium cut, is 1em: no taller than the letters, Justin's rule), then the
   tagline and two buttons. The door is a size container: the lockup and its margins are in cqi (hundredths of the
   door's width), so the name always fits on its one line as the door narrows and widens. */
.door--brand { flex: 2 1 0px; container-type: inline-size; justify-content: center; align-items: flex-start; gap: 0; padding-block: clamp(28px, 4vw, 72px); box-shadow: none; } /* the same side padding as the other doors, so the flex weights give exact shares */
.door--brand::before { content: none; }
.door__inner { width: 80cqi; margin-left: 10cqi; }
.door__lockup { display: flex; align-items: center; gap: 0.5em; margin: 0; font: 300 7.4cqi/1 var(--serif); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.door__lockup img { display: block; width: 1em; height: 1em; }
.door__lockup span { padding-top: 0.06em; } /* capitals sit a little high in the line; this centres them on the ring */
.door__tagline { max-width: 34ch; margin: clamp(18px, 1.8vw, 28px) 0 0; font-size: clamp(1rem, 1.15vw, 1.1875rem); line-height: 1.55; color: var(--on-dark); }
.door__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 2.6vw, 40px); }

/* A door is chosen (since 30 November 2026, night; before that the Web Design door grew to fill the screen and the other
   two faded to navy: archive/before-door-drop-lift-2026-11-30/). The other doors drop off the foot of the screen
   one after another, the nearest first (--i, set by the script, is a door's place in that order), leaving the
   chosen one standing on navy with its picture untouched. The script holds each door's width meanwhile, so a
   pointer moving off the chosen door does not shift them. With a #link and no door chosen (Get in touch, About),
   all four drop, left to right. What follows, the door lifting off the page, is in site.css. */
html.doors-out .door { transition: transform 0.32s cubic-bezier(0.5, 0, 0.85, 0.4) calc(var(--i, 0) * 45ms); }
html.doors-out .door:not(.is-picked) { transform: translateY(101%); }
html.doors-out .door.is-picked .door__line { opacity: 0; translate: 0; transition: opacity 0.15s; }
/* Back by the brand (since 2026-12-01; "Doors: reverse" in site.css): the page's door stands in its place (data-db, its
   place among the four) and the others come back up from below, farthest first (--i, set by the script). */
html.db-in[data-db="2"] .door:not(:nth-child(2)), html.db-in[data-db="3"] .door:not(:nth-child(3)), html.db-in[data-db="4"] .door:not(:nth-child(4)) { transform: translateY(101%); transition: none; }
html:is(.db-in, .db-go) .door { will-change: transform; } /* drawn ahead as their own layers, so the rise does not stall */
html.db-go .door { transition: transform 0.36s cubic-bezier(0.15, 0.6, 0.5, 1) calc(var(--i, 0) * 45ms); }
@media (max-width: 900px) {
  html.db-in[data-db="2"] .door:not(:nth-child(2)), html.db-in[data-db="3"] .door:not(:nth-child(3)), html.db-in[data-db="4"] .door:not(:nth-child(4)) { transform: translateX(-101%); }
}
@media (hover: hover) {
  .door--pic:not(.door--web):hover::before { transform: scale(1.05); }
  .door--web:hover .mocks { scale: 1.05; } /* as the photographs do */
  /* A door chosen while its picture is still zooming finishes the zoom quickly, before the next page copies it, so
     the picture does not jump in size at the handover (2026-12-01). */
  html.doors-out .door--pic.is-picked:hover::before, html.doors-out .door--web.is-picked:hover .mocks { transition-duration: 0.3s; }
  /* As in the Triptych concept, the picture door under the pointer opens wide (from a fifth of the screen to about
     two fifths) and the brand door gives up most of the room (from two fifths to about a quarter); the other two
     narrow a little. The weights: brand 2, each picture door 1; with a picture door hovered, it 2.2 and the brand 1.3. */
  html.doors-up .door--pic:is(:hover, :focus-within) { flex-grow: 2.2; }
  html.doors-up .doors:has(.door--pic:is(:hover, :focus-within)) .door--brand { flex-grow: 1.3; }
  .door--pic .door__line { opacity: 0; translate: 0 10px; transition: opacity 0.5s, translate 0.7s var(--ease); }
  .door--pic:is(:hover, :focus-within) .door__line { opacity: 1; translate: 0; }
}

@media (min-width: 901px) {
  html.doors-up { overflow: hidden; }
  html.doors-up .doors { background: var(--navy); } /* what the doors that drop away leave behind */
  /* The doors cover the page; its header waits under them, out of the way of the keyboard too. */
  html.doors-up .site-header { visibility: hidden; }
}
@media (max-width: 999px) { .door__line { display: none; } } /* too narrow a door for a sentence */

/* 900 px and narrower: the doors stack and scroll, under the site's own header (its Menu stays; its name steps
   aside, as the brand door says it). The brand door is as tall as its words; the three picture doors follow, each
   the same height (72% of the screen, at least 660 px), with its name and sentence. The rest of Home (and the footer) waits until a door or a #link
   is chosen; scrolling does not open the page at these widths (the script in src/index.njk). */
@media (max-width: 900px) {
  html.doors-up .doors { position: static; flex-direction: column; }
  html.doors-out .door:not(.is-picked) { transform: translateX(-101%); } /* stacked, they leave to the side */
  html.doors-up .site-header .brand { visibility: hidden; }
  html.doors-up main > :not(.doors):not(script), html.doors-up .site-footer { display: none; }
  .door { flex: 0 0 auto; box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.16); }
  .door--brand { padding: 40px 20px 48px; }
  .door__inner { width: 100cqi; margin-left: 0; }
  .door__lockup { font-size: 7.8cqi; }
  .door--pic { min-height: max(72svh, 660px); padding: 28px 20px 36px; } /* tall enough for the Web Design door's mockups above its name; the three stay equal */
  .door--web { container-type: inline-size; } /* a stacked door's height comes from min-height, which a size container does not report (cqh is 0), so the mockups use the same figure directly */
  .mocks { --mw: min(84cqw, calc((max(72svh, 660px) - 40px) / 2.45)); }
  .door__name { font-size: min(2.75rem, 11vw); }
  .door__line { display: block; min-height: 0; opacity: 1; translate: none; }
}
