/* opening.css — Stop 47: the opening screen, the materials (#s-landing; index.html, opening.js).
   Paper, the headline in the heading face, the dark START DESIGNING (the room-type screen's own .rt-start), and
   the row of finishes along the foot of the screen. Only transforms move — the drift (opening.js, one Web
   Animation on the track) and each swatch's bob (below) — so the row stays smooth on an iPad. */
#s-landing { display: none; background: var(--paper); }
#s-landing.active {
  display: flex; flex-direction: column; justify-content: center; position: relative;   /* (the words and the row as one, centred: a tall iPad has no gap between them) */
  min-height: calc(100vh - var(--hdr-h, 64px)); min-height: calc(100dvh - var(--hdr-h, 64px));
  --sw-w: clamp(96px, 10vw, 132px); --sw-h: clamp(190px, 36vh, 340px); --sw-gap: clamp(14px, 1.6vw, 22px);
}
@media (max-width: 520px) { #s-landing.active { --sw-h: clamp(180px, 28vh, 300px); } }   /* a phone: the row's names on the first screen */

.op-intro { display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(24px, 4vh, 48px) 16px 0; }
.op-h1 { margin: 0; max-width: 16em; font-family: var(--f-head); font-weight: 400; font-size: clamp(32px, 4.2vw, 60px); line-height: 1.1; color: var(--t-dark); text-wrap: balance; }
.op-sub { margin: 18px 0 0; max-width: 36em; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; color: var(--t-mid); text-wrap: balance; }
.op-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(20px, 3.5vh, 32px); }
.op-ctas .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
#s-landing .op-ctas .btn { flex: 0 1 auto; }   /* (the room-type screen's .rt-start goes full width below 760 px; here the two keep a pair) */
@media (max-width: 520px) { .op-ctas { align-self: stretch; } #s-landing .op-ctas .btn { flex: 1 1 100%; } }   /* a phone: both full width, one above the other */
.op-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 0 8px; font-size: 13px; color: var(--t-mid);
  text-decoration: underline; text-decoration-color: var(--b-light); text-underline-offset: 3px; }
.op-link[hidden] { display: none; }
.op-link:hover { color: var(--t-dark); text-decoration-color: currentColor; }
.op-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* The row: clipped to the screen (clip, not hidden: nothing scrolls it — opening.js moves it), a horizontal drag
   is the row's (touch-action: a vertical swipe still scrolls the page). Three sets of the swatches, each ending in
   one gap, so the track's −33.3 % is exactly one set; the shift (opening.js) holds it a third in to start. */
.op-row { position: relative; margin-top: clamp(8px, 2vh, 24px); padding: clamp(16px, 3.5vh, 36px) 0 clamp(20px, 4vh, 40px);
  overflow: hidden; overflow: clip; touch-action: pan-y; -webkit-user-select: none; user-select: none; cursor: grab; }
.op-row.is-dragging { cursor: grabbing; }
.op-shift { width: max-content; transform: translateX(-33.3333%); }
.op-track { display: flex; width: max-content; will-change: transform; }
.op-set { display: flex; gap: var(--sw-gap); padding-right: var(--sw-gap); }
.op-sw { flex: none; display: flex; flex-direction: column; gap: 10px; width: var(--sw-w); padding: 0; border: 0; background: none; color: inherit;
  font: inherit; text-align: left; cursor: inherit; -webkit-tap-highlight-color: transparent;
  animation: op-bob var(--bob-d, 6s) ease-in-out var(--bob-at, 0s) infinite alternate; }
@keyframes op-bob { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
.op-row.is-still .op-sw { animation-play-state: paused; }
.op-face { position: relative; display: block; height: var(--sw-h); border-radius: var(--r); overflow: hidden; }
.op-face::after { content: ''; position: absolute; inset: 0; border: 1px solid rgba(20,17,11,0.10); border-radius: inherit; }
.op-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.op-cap { font-size: 12px; line-height: 1.3; color: var(--t-sub); }   /* (a long name takes a second line: no word is cut — the type pass) */
.op-sw:focus-visible { outline: none; }
.op-sw:focus-visible .op-face { outline: 2px solid var(--ink); outline-offset: 3px; }
.op-sw.is-shown .op-face::after { border: 2px solid var(--gold); }

/* A swatch's card: paper held by a hairline and the gold top rule, as the app's asks (no shadow); placed by
   opening.js beside the swatch (above it on a phone). It takes no pointer: a hover or a tap goes through it to what is under it. */
.op-card { position: absolute; left: 0; top: 0; z-index: 3; width: min(300px, calc(100% - 32px)); padding: 14px 16px 16px; text-align: left;
  background: var(--paper); border: 1px solid var(--b-light); border-top: 2px solid var(--gold); border-radius: var(--r3); pointer-events: none; }
.op-card-fam { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-sub); }
.op-card-name { margin-top: 4px; font-family: var(--f-head); font-size: 22px; line-height: 1.2; color: var(--t-dark); }
.op-card-txt { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--t-mid); }
.op-card-suits { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--b-faint); font-size: 13px; line-height: 1.45; color: var(--t-dark); }
.op-card-suits:empty { display: none; }   /* ("Something else?" has no "Suits:") */
.op-card-x { display: none; position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; align-items: center; justify-content: center;
  padding: 0; border: 0; background: none; color: var(--t-mid); cursor: pointer; }
.op-card-x:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
/* At 900 px and below (a phone, an iPad upright) the card is a sheet along the foot of the screen — never over START
   DESIGNING or WATCH THE DEMO — with a close button; it takes presses (the row's cards elsewhere take none). */
@media (max-width: 900px) {
  .op-card { position: fixed; top: auto; left: 16px; right: 16px; bottom: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50;
    width: auto; max-width: 560px; margin: 0 auto; padding-right: 48px; overflow-y: auto; transform: none !important; pointer-events: auto; }
  .op-card-x { display: flex; }
}

/* "Something else?" (material-request.js): the row's last tile — a dashed outline and a question mark, not a sample —
   and its box. */
.op-face-other { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; box-sizing: border-box;
  background: var(--paper); text-align: center; }
.op-face-other::after { border: 1px dashed var(--t-faint); }
.op-q { font-family: var(--f-head); font-size: 44px; line-height: 1; color: var(--gold-text); }
.op-other-t { font-size: 12px; line-height: 1.35; color: var(--t-mid); }
.jr-other { margin-top: 8px; }
.jr-guide .jr-other { margin-top: 12px; }
.jr-guide .jr-mat-other { grid-column: 1 / -1; }   /* (the setup's material cards are two to a row: "Something else?" takes a row of its own) */
.jr-standin, .sg-standin { color: var(--t-mid); }
.sg-standin { margin: 0; font-size: 13px; line-height: 1.45; text-align: center; }
dialog.sab-ask.mr-box { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.mr-form .field-label { margin: 14px 0 6px; }
.mr-form .field-input { font-size: 15px; }
.mr-form textarea.field-input { min-height: 84px; }
.mr-opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--t-sub); }
.mr-error { margin: 10px 0 0; font-size: 13px; color: var(--error); }
.mr-form .field-input[aria-invalid="true"] { border-color: var(--error); }
.mr-form .sab-ask-btns { margin-top: 20px; }

/* Reduced motion: a still row (opening.js holds the drift; it can still be dragged, by the person). */
@media (prefers-reduced-motion: reduce) { .op-sw { animation: none; } }
