/*
 * Direction D, the house: the family kit shared by the hub and every room.
 * Each site sets its own ground, ink, type and character in its own sheet;
 * this file holds what makes them one family: the room colours, the seal,
 * the orange thread (book a call, the way home, focus), the light switch,
 * the preview note and the dock (the little house on every site).
 */

:root {
  color-scheme: light dark;
  /* The orange thread: Laura's own #ed802b. */
  --thread: #ED802B;
  --thread-ink: #172033;
  --seal-ink: #1A1D2B;
  --seal-paper: #FFFDF9;
  /* Every room's walls: the ground of its own site, by day and by night. */
  --wall-organise: light-dark(#EEF2F6, #141C2E);
  --wall-simplify: light-dark(#F6EBB0, #2B2B2E);
  --wall-juggle: light-dark(#E3F0CC, #1E2B14);
  --wall-declutter: light-dark(#DDF0E6, #12291F);
  --wall-stage: light-dark(#D5EBEE, #0F2A30);
  --wall-style: light-dark(#EBD3C9, #1A1F38);
  --wall-celebrate: light-dark(#E6DDF3, #1C1128);
  --wall-design: light-dark(#F9E1EF, #2A0F22);
  --wall-share: light-dark(#F8DAD8, #1E1416);
  /* Every room's own hue, round the colour wheel in ring order. */
  --hue-organise: #ED802B;
  --hue-simplify: #E8B811;
  --hue-juggle: #7DB03A;
  --hue-declutter: #3FA37C;
  --hue-stage: #2E9AA8;
  --hue-style: #3A4FA0;
  --hue-celebrate: #7B4FC0;
  --hue-design: #D13C8E;
  --hue-share: #E0453C;
  --tag-paper: light-dark(#FFFFFF, #FFF6E8);
  --tag-ink: #172033;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.2, .7, .2, 1);
  --step-1: .5rem;
  --step-2: .75rem;
  --step-3: 1rem;
  --step-4: 1.5rem;
  --step-5: 2rem;
  --step-6: 3rem;
  --step-7: 4.5rem;
  --step-8: 7rem;
  --handoff-duration: 460ms;
  --handoff-duration-reduced: 160ms;
  --handoff-easing: cubic-bezier(.65, 0, .35, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

.room-organise { --wall: var(--wall-organise); --hue: var(--hue-organise); }
.room-simplify { --wall: var(--wall-simplify); --hue: var(--hue-simplify); }
.room-juggle { --wall: var(--wall-juggle); --hue: var(--hue-juggle); }
.room-declutter { --wall: var(--wall-declutter); --hue: var(--hue-declutter); }
.room-stage { --wall: var(--wall-stage); --hue: var(--hue-stage); }
.room-style { --wall: var(--wall-style); --hue: var(--hue-style); }
.room-celebrate { --wall: var(--wall-celebrate); --hue: var(--hue-celebrate); }
.room-design { --wall: var(--wall-design); --hue: var(--hue-design); }
.room-share { --wall: var(--wall-share); --hue: var(--hue-share); }
/* A family link hands off in the colour of the room it opens. */
[data-handoff] { --handoff-colour: var(--wall); }
[data-handoff="hub"] { --handoff-colour: var(--ground); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--step-6); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; min-height: 100vh; background: var(--ground); color: var(--ink); font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.55; overflow-x: clip; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: .08em; }
::selection { background: var(--thread); color: var(--thread-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--ink-2) var(--ground); accent-color: var(--thread); caret-color: var(--thread); }
.kit-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--step-3); top: -4rem; z-index: 50; background: var(--tag-paper); color: var(--tag-ink); padding: var(--step-2) var(--step-3); border: 2px solid var(--seal-ink); border-radius: 6px; font-weight: 700; }
.skip:focus { top: var(--step-3); }

a.brand { min-height: 2.75rem; }

/* ---------- the seal: her LT inside a little house, roofed in the site's own pattern ---------- */
.seal { color: var(--seal-ink); width: 2.75rem; height: auto; aspect-ratio: 100 / 116; flex: none; }
.seal-roof, .seal-body, .seal-chimney { stroke: var(--seal-ink); stroke-width: 4; stroke-linejoin: round; }
.seal-body { fill: var(--seal-paper); }
.seal-chimney { fill: #4A5470; }

/* ---------- the orange thread: book a call ---------- */
.call {
  display: inline-flex; align-items: center; gap: .6em; min-height: 3rem; padding: .75rem 1.25rem;
  background: var(--thread); color: var(--thread-ink); border: 2px solid var(--seal-ink); border-radius: 8px;
  font-family: var(--f-body); font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 0 0 rgb(23 32 51 / .0);
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.call .icon { transition: transform 160ms var(--ease-out); }
.call:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgb(23 32 51 / .45); }
.call:hover .icon { transform: translateX(3px); }
.call:active { transform: translateY(0); box-shadow: none; transition-duration: 60ms; }
.call:focus-visible { outline-color: var(--focus); }
.call-small { min-height: 2.75rem; padding: .55rem .95rem; font-size: .9375rem; }

/* ---------- the way home ---------- */
.home-link { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; color: var(--ink); text-decoration: none; min-height: 2.75rem; padding: .25rem 0; }
.home-link .icon { color: var(--thread); }
.home-link span { text-decoration: underline; text-decoration-color: var(--thread); text-decoration-thickness: 2px; text-underline-offset: .3em; transition: text-underline-offset 140ms var(--ease-out); }
.home-link:hover span { text-underline-offset: .45em; }

/* ---------- the light switch (theme) ---------- */
.switch {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; min-width: 2.75rem; padding: .25rem .5rem .25rem .25rem;
  background: none; border: 0; color: var(--ink); font: 600 .9375rem/1 var(--f-hand); cursor: pointer; border-radius: 8px;
}
.switch-plate { width: 1.75rem; height: 2.5rem; border: 2px solid var(--seal-ink); border-radius: 5px; background: var(--tag-paper); display: grid; place-items: center; }
.switch-rocker { width: .7rem; height: 1.4rem; border: 2px solid var(--seal-ink); border-radius: 3px; background: linear-gradient(var(--thread) 0 50%, var(--tag-paper) 50% 100%); transition: transform 220ms var(--ease-out); }
.switch[aria-pressed="true"] .switch-rocker { transform: scaleY(-1); }
.switch:hover .switch-plate { transform: translateY(-1px); }
.switch-plate { transition: transform 140ms var(--ease-out); }

/* ---------- the preview note: a small luggage tag, never a banner ---------- */
.note {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: .15rem .6rem; width: fit-content; max-width: 100%;
  padding: .35rem .8rem .35rem .55rem; background: var(--tag-paper); color: var(--tag-ink);
  border: 1.5px solid var(--seal-ink); border-radius: 4px 12px 12px 4px; font: 600 .875rem/1.3 var(--f-hand);
  transform: rotate(-1.5deg); transform-origin: left center;
}
.note-hole { width: .55rem; height: .55rem; border-radius: 50%; border: 1.5px solid var(--seal-ink); background: var(--ground); flex: none; }
.note-extra { font-weight: 400; }
.note-extra::before { content: "and "; }

/* ---------- the dock: the same little house on every site ---------- */
.dock { display: grid; gap: var(--step-5); grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .dock { grid-template-columns: minmax(16rem, 1fr) minmax(0, 1.5fr); gap: var(--step-7); } }
.dock-intro { display: grid; gap: var(--step-3); max-width: 30rem; }
.dock-title { font-family: var(--f-display); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.05; }
.dock-text { color: var(--ink-2); }
.dock-house { display: grid; grid-template-columns: minmax(0, 3.2fr) minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .6rem; }
.dock-roof { grid-column: 1; display: block; margin: 0 -4% -2px; color: var(--ink); }
.dock-roof svg { width: 100%; height: clamp(2.75rem, 7vw, 4.5rem); }
.dock-roof path { fill: url(#roof); stroke: var(--seal-ink); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dock-roof { transition: transform 180ms var(--ease-out); }
.dock-roof:hover { transform: translateY(-3px); }
.dock-body { grid-column: 1; grid-row: 2; display: grid; gap: 4px; padding: 4px; background: var(--seal-ink); border-radius: 0 0 4px 4px; }
.dock-floor { display: grid; gap: 4px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dock-floor-0 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dock-garden { grid-column: 2; grid-row: 2; display: grid; align-self: end; height: 66%; padding: 4px; background: var(--seal-ink); border-radius: 4px; }
.dock-room {
  position: relative; display: grid; align-content: end; gap: .1rem; min-height: 4.25rem; padding: .45rem .5rem; background: var(--wall);
  color: var(--ink); text-decoration: none; border-radius: 2px; overflow: hidden;
}
.dock-room::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--hue); }
.dock-verb { font: 700 clamp(.85rem, .75rem + .4vw, 1rem)/1.1 var(--f-hand); overflow-wrap: anywhere; }
.dock-state { font-size: .75rem; line-height: 1.2; color: var(--ink-2); }
a.dock-room { transition: transform 160ms var(--ease-out); }
a.dock-room:hover { transform: translateY(-3px); }
a.dock-room:hover .dock-verb { text-decoration: underline; text-decoration-color: var(--hue); text-decoration-thickness: 2px; }
.dock-room.is-here { outline: 3px solid var(--thread); outline-offset: -3px; }
.dock-room.is-here .dock-state { color: var(--ink); font-weight: 700; }
.dock-room.is-closed .dock-verb { font-weight: 400; }
.dock-room.is-closed::before { opacity: .35; }
.dock-garden .dock-room { height: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; }
  .call:hover, a.dock-room:hover, .switch:hover .switch-plate { transform: none; }
}
