/* feature.css — the studio frame around a feature demo. Not a skin: this is a lab surface, like
   anything in tools/, and it is deliberately unlike the wedding site inside it so a visitor is
   never in doubt about which is which. Loaded AFTER the chosen skin.css (shell.js inserts the
   skin before this file), so a tie goes to the frame. Everything inside .fx-mount belongs to the
   skin and is not touched here. */

:root { --fx-ink: #14120f; --fx-panel: #1e1b17; --fx-line: #35302a; --fx-pale: #f2ece3;
        --fx-dim: #a99d8c; --fx-hot: #c06b7a; --fx-ui: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }

html body.fx {
  /* padding 0: a skin may pad its body for its own page rail (hanakenji's 15rem), never the frame's */
  margin: 0; padding: 0; background: var(--fx-ink); color: var(--fx-pale);
  font: 15px/1.6 var(--fx-ui);
  -webkit-text-size-adjust: 100%;
}
body.fx * { box-sizing: border-box; }

.fx-skip {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--fx-pale); color: var(--fx-ink); padding: .8em 1.2em; text-decoration: none;
}
.fx-skip:focus { left: 0; }

/* ---------- bar ---------- */
.fx-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; align-items: center;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: var(--fx-panel); border-bottom: 1px solid var(--fx-line);
}
.fx-studio { display: grid; gap: .15rem; margin-right: auto; }
.fx-studio b { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; }
.fx-studio span { font-size: .78rem; letter-spacing: .1em; color: var(--fx-dim); text-transform: uppercase; }
.fx-ctl { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.fx-phase { font-size: .82rem; color: var(--fx-dim); letter-spacing: .04em; }
body.fx .demo-btn, .fx-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: .5em 1em;
  background: #2a2621; color: var(--fx-pale);
  border: 1px solid var(--fx-line); border-radius: 3px;
  font: 600 .78rem/1 var(--fx-ui); letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
}
body.fx .demo-btn:hover, .fx-btn:hover { background: #383129; }
body.fx .demo-note {
  width: 100%; margin: 0; font-size: .82rem; color: var(--fx-hot);
}
/* An unbuilt skin loads no site.js, so chrome.js never mounts and these controls would be live
   to look at and inert to press. The shell sets data-unbuilt on <body>; they come out entirely. */
body.fx[data-unbuilt] .fx-ctl { display: none; }

/* ---------- head ---------- */
.fx-head {
  display: grid; gap: 1.1rem;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2.5rem) clamp(1.4rem, 3vw, 2rem);
  max-width: 62rem;
}
body.fx .fx-head h1 {
  margin: 0; font: 400 clamp(2rem, 1.3rem + 3vw, 3.4rem)/1.05 var(--fx-ui);
  letter-spacing: -.02em; color: var(--fx-pale);
}
.fx-kicker { font: 600 .78rem/1 var(--fx-ui); letter-spacing: .24em; text-transform: uppercase; color: var(--fx-hot); }
body.fx .fx-lede { margin: 0; max-width: 42em; font-size: 1.05rem; color: #d6cec2; text-wrap: pretty; }
.fx-study {
  max-width: 42em; margin: 0; padding: .85em 1.1em;
  background: #221d19; border-left: 3px solid var(--fx-hot);
  font-size: .88rem; color: #d6cec2;
}
.fx-study b { color: var(--fx-pale); }

/* ---------- switcher ---------- */
.fx-switchwrap { padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(1.6rem, 4vw, 2.4rem); }
.fx-switch-label {
  display: block; margin-bottom: .7rem;
  font: 600 .78rem/1 var(--fx-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--fx-dim);
}
.fx-switch { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); }
.fx-skin {
  display: flex; gap: .8rem; align-items: flex-start;
  min-height: 44px; padding: .8rem .9rem;
  background: #1a1714; border: 1px solid var(--fx-line); border-radius: 3px;
  color: var(--fx-pale); text-decoration: none;
}
.fx-skin:hover { background: #241f1a; border-color: #4a423a; }
.fx-skin[aria-current="true"] { background: #2c2119; border-color: var(--fx-hot); }
.fx-skin[data-unbuilt] { opacity: .72; }
.fx-skin-no {
  flex: none; width: 1.7rem; height: 1.7rem; display: grid; place-items: center;
  border: 1px solid var(--fx-line); border-radius: 50%;
  font-size: .78rem; color: var(--fx-dim);
}
.fx-skin[aria-current="true"] .fx-skin-no { border-color: var(--fx-hot); color: var(--fx-pale); }
.fx-skin-body { display: grid; gap: .2rem; }
.fx-skin-couple { font-size: .92rem; font-weight: 600; letter-spacing: .01em; }
.fx-skin-look { font-size: .8rem; color: var(--fx-dim); text-wrap: pretty; }
.fx-skin-tag {
  justify-self: start; margin-top: .25rem; padding: .2em .55em;
  border: 1px solid var(--fx-line); border-radius: 2px;
  font: 600 .78rem/1.4 var(--fx-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--fx-dim);
}

/* ---------- the mount: from here down, the skin owns everything ---------- */
.fx-mountwrap { padding: 0 clamp(0rem, 2vw, 1.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.fx-mount {
  background: var(--bg, #fff); color: var(--ink, #111);
  font: var(--step-0, 1rem)/1.65 var(--body, Georgia, serif);
  border: 1px solid var(--fx-line);
  /* clip, never hidden: overflow:hidden would make the mount a scroll container, and the craft
     layer's view() timelines would then measure against a box that never scrolls — every
     .a-reveal / .a-unveil would stay in its start state. `clip` clips without that. */
  overflow: clip;
}
.fx-frame-note {
  display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline;
  padding: .55rem clamp(.8rem, 3vw, 1.4rem);
  background: #1a1714; border-bottom: 1px solid var(--fx-line);
  font: .78rem/1.5 var(--fx-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--fx-dim);
}
.fx-frame-note b { color: var(--fx-pale); letter-spacing: .06em; }

.fx-notice {
  margin: 0 clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3rem);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  background: #1a1714; border: 1px dashed #4a423a; border-radius: 3px;
  max-width: 48rem;
}
body.fx .fx-notice h2 { margin: 0 0 .6rem; font: 600 1.1rem/1.3 var(--fx-ui); color: var(--fx-pale); }
body.fx .fx-notice p { margin: 0 0 .7rem; color: #cdc4b7; font-size: .92rem; }
.fx-notice p:last-child { margin-bottom: 0; }
.fx-notice b { color: var(--fx-pale); }

/* ---------- foot ---------- */
.fx-foot {
  display: grid; gap: .8rem;
  padding: clamp(1.8rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem) clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--fx-line);
  max-width: 62rem;
}
body.fx .fx-foot h2 { margin: 0; font: 600 .78rem/1 var(--fx-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--fx-dim); }
body.fx .fx-foot p { margin: 0; max-width: 44em; font-size: .9rem; color: #cdc4b7; text-wrap: pretty; }
.fx-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }

body.fx a:focus-visible, body.fx button:focus-visible {
  outline: 2px solid var(--fx-hot); outline-offset: 2px;
}

/* A skin whose markup block carries the music dock puts a fixed control over the bottom of the
   page, exactly as it does on the wedding site. There the .foot reserves its height; here the
   studio footer has to. Only when the dock is actually in the page — most blocks have none. */
body:has(.music-dock) .fx-foot { padding-bottom: calc(2.5rem + var(--dock-h, 5rem)); }

/* ---------- the wall: a guest's phone beside the reception screen (WALL-PLAN.md §1) ----------
   The frame draws the phone and the screen's box; what is inside each (.wf, .ws) is the skin's.
   The screen is a size container, so the skin sizes everything in cq units: scaled to fit here,
   the whole viewport on ?view=screen and in full screen, any aspect ratio, never a cropped card. */
.fx-wall {
  display: grid; gap: clamp(1.6rem, 4vw, 2.6rem); align-items: start;
  padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3rem);
}
@media (min-width: 64em) {
  .fx-wall { grid-template-columns: 25rem minmax(0, 1fr); }
  /* the head goes two-up so the phone and the screen start inside a laptop's first screen */
  .fx--wall .fx-head {
    max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
    column-gap: 3rem; row-gap: .8rem; align-items: end; padding-block: 2rem 1.4rem;
  }
  .fx--wall .fx-head > :not(.fx-study) { grid-column: 1; }
  .fx--wall .fx-study { grid-column: 2; grid-row: 1 / span 3; align-self: end; }
  .fx--wall .fx-switchwrap { padding-bottom: 1.6rem; }
  /* the screen stays in view while the phone is used */
  .fx-part--screen { position: sticky; top: 5.5rem; }
}
.fx-part { display: grid; gap: .8rem; min-width: 0; }
body.fx .fx-part-h {
  margin: 0; font: 600 .78rem/1.3 var(--fx-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--fx-dim);
}
.fx-part-ctl { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
body.fx .fx-btn--quiet { background: transparent; }
body.fx .fx-btn[aria-pressed="true"] { border-color: var(--fx-hot); color: var(--fx-pale); }
.fx-btn[hidden] { display: none; }

/* the phone: a real 375-wide screen at a laptop; on a phone the form simply is the page */
.fx-phone-screen {
  background: var(--bg, #fff); color: var(--ink, #111);
  font: var(--step-0, 1rem)/1.6 var(--body, Georgia, serif);
}
@media (min-width: 64em) {
  .fx-phone {
    width: calc(375px + 1.4rem); padding: .7rem; justify-self: start;
    background: #0d0c0a; border: 1px solid #3a342d; border-radius: 2.6rem;
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .45);
  }
  .fx-phone-screen {
    width: 375px; height: min(760px, calc(100vh - 9rem)); min-height: 34rem;
    overflow-y: auto; overscroll-behavior: contain; border-radius: 2rem;
  }
}
@media (max-width: 63.99em) {
  .fx-phone-screen { margin-inline: calc(-1 * clamp(1rem, 4vw, 2.5rem)); }
}

.fx-screen {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  container-type: size; overflow: hidden;
  background: #000; border: 1px solid var(--fx-line);
}
.fx-screen:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border: 0; }
.fx-screen:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; border: 0; }
.fx-moderation { border-top: 1px solid var(--fx-line); }
body.fx .fx-moderation h2 { color: var(--fx-pale); }

/* ?view=screen: the projector. Nothing of the studio frame at all */
html[data-view="screen"] body.fx > :not(main):not(template):not(script):not(.fx-head),
html[data-view="screen"] .fx-part--guest,
html[data-view="screen"] .fx-part-h,
html[data-view="screen"] .fx-part-ctl { display: none; }
/* Sized down the tree, never position: fixed: a skin may make an ancestor a containment box (a size
   container), and a fixed box inside one is clipped to it, which drew the projector view blank. */
html[data-view="screen"], html[data-view="screen"] body.fx { margin: 0; background: #000; overflow: hidden; }
html[data-view="screen"] .fx-wall,
html[data-view="screen"] .fx-part--screen { display: block; padding: 0; height: 100vh; height: 100dvh; }
html[data-view="screen"] .fx-screen { width: 100%; height: 100%; aspect-ratio: auto; border: 0; }

/* on its own, a part keeps the page's h1 for a screen reader, out of sight */
html[data-view] .fx-head {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ?view=guest: the form as a guest's phone gets it, full width, no bezel */
html[data-view="guest"] body.fx > :not(main):not(template):not(script):not(.fx-head),
html[data-view="guest"] .fx-part--screen,
html[data-view="guest"] .fx-part-h,
html[data-view="guest"] .fx-part-ctl { display: none; }
html[data-view="guest"] body.fx { background: var(--bg, #fff); }
html[data-view="guest"] .fx-wall { display: block; padding: 0; }
html[data-view="guest"] .fx-phone { width: auto; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
html[data-view="guest"] .fx-phone-screen {
  width: auto; height: auto; min-height: 100vh; min-height: 100dvh; margin: 0; overflow: visible; border-radius: 0;
}

/* ---------- the Forever door (2026-10-13, FOREVER-PLAN.md §1): two sites, the morning after ---------- */
.fx-door {
  display: grid; gap: clamp(.8rem, 2vw, 1.4rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3.5rem); max-width: 72rem;
}
.fx-door-card {
  display: grid; align-content: start; overflow: hidden;
  background: var(--fx-panel); border: 1px solid var(--fx-line); border-radius: 10px;
  color: var(--fx-pale); text-decoration: none;
  transition: border-color 200ms ease, transform 200ms ease;
}
.fx-door-card:hover { border-color: var(--fx-hot); transform: translateY(-2px); }
.fx-door-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.fx-door-say { display: grid; gap: .45rem; padding: 1.1rem 1.2rem 1.3rem; }
.fx-door-no { font: 600 .74rem/1 var(--fx-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--fx-hot); }
.fx-door-name { font-size: 1.2rem; line-height: 1.25; font-weight: 600; text-wrap: balance; }
.fx-door-look { font-size: .9rem; color: var(--fx-dim); text-wrap: pretty; }
@media (prefers-reduced-motion: reduce) { .fx-door-card { transition: none; } .fx-door-card:hover { transform: none; } }
