/*
 * Direction B, "The sentence": the family layer every preview site shares.
 * Each site's own site.css sets the tokens (ground, ink, display face) and
 * its own character; this file holds only what makes the four one family:
 * spacing scale, focus, the call button, the theme switch, the preview note,
 * the family sentence and the door that carries a visitor between sites.
 */

:root {
  color-scheme: light dark;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem; --s10: 8rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 66ch;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.2, .7, .2, 1);
  /* Her orange, the one thread through every site: the call and the way home. */
  --thread: #ED802B;
  --thread-ink: #17161D;
  --thread-edge: light-dark(#9A4200, #ED802B);
  --body: "Instrument Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  /* The verbs' own colours, shared so every site can name every other. */
  --c-organise: light-dark(#B34A0B, #F59A55);
  --c-simplify: light-dark(#866500, #EBC63A);
  --c-juggle: light-dark(#3A7114, #93D35A);
  --c-declutter: light-dark(#0E7254, #5ED2A6);
  --c-stage: light-dark(#0A6B7C, #58CBDD);
  --c-style: light-dark(#3048B0, #9DB0FF);
  --c-celebrate: light-dark(#7A33C4, #CDA6FF);
  --c-design: light-dark(#A61D78, #FF8DD1);
  --c-share: light-dark(#BE1E3A, #FF8B9A);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--ground);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: lining-nums;
  background: var(--ground);
  color: var(--ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, picture, :not(svg) > svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: .08em; }
p, h1, h2, h3, h4, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--thread); color: var(--thread-ink); }
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
html { scrollbar-color: var(--muted) var(--ground); }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute; left: var(--s4); top: -4rem; z-index: 50;
  padding: var(--s3) var(--s4);
  background: var(--ink); color: var(--ground);
  font-weight: 600; text-decoration: none;
  transition: transform .15s var(--ease-out);
}
.skip:focus { transform: translateY(5rem); }

.wrap { width: 100%; max-width: 88rem; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
}
.bar .wrap {
  display: flex; align-items: center; gap: var(--s4);
  min-height: 4.25rem;
}
.brand {
  display: flex; align-items: center; gap: var(--s3);
  text-decoration: none; margin-right: auto;
  min-height: 44px;
}
.brand .seal-mini { width: 2.6rem; height: 2.6rem; flex: none; }
.brand-name { display: grid; line-height: 1.1; }
.brand-name b { font-weight: 650; font-size: 1rem; }
.brand-name span { font-size: .8125rem; color: var(--muted); }
.bar-links { display: none; gap: var(--s5); }
.bar-links a {
  text-decoration: none; font-weight: 550; font-size: .9375rem;
  padding-block: var(--s3); position: relative;
}
.bar-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .45rem; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease-out);
}
.bar-links a:hover::after, .bar-links a:focus-visible::after { transform: scaleX(1); }
@media (min-width: 60rem) { .bar-links { display: flex; } }

/* The call: her orange, her offer, in the same place on every site. */
.call {
  --pad: .8rem 1.25rem;
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 44px; padding: var(--pad);
  background: var(--thread); color: var(--thread-ink);
  border: 2px solid var(--thread-edge);
  border-radius: 999px;
  font-weight: 650; font-size: 1rem; line-height: 1.15;
  text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease-out), box-shadow .2s var(--ease-out);
}
.call svg { width: 1.05em; height: 1.05em; flex: none; transition: transform .2s var(--ease-out); }
.call:hover { transform: translateY(-2px); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--thread) 70%, transparent); }
.call:hover svg { transform: translateX(3px); }
.call:active { transform: translateY(0); }
.call.call-sm { --pad: .55rem .95rem; font-size: .9375rem; }
.bar .call .long { display: none; }
@media (min-width: 30rem) { .bar .call .long { display: inline; } }

.text-link {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 44px; font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: .3em;
}
.text-link:hover { text-decoration-thickness: 3px; }

/* ---------- Theme switch ---------- */
.theme {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; min-width: 44px; padding: .4rem .7rem;
  background: transparent; color: inherit;
  border: 1.5px solid color-mix(in srgb, var(--ink) 55%, transparent);
  border-radius: 999px; cursor: pointer;
  font: 600 .875rem/1 var(--body);
  transition: background-color .2s var(--ease-out);
}
.theme:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.theme svg { width: 1.15rem; height: 1.15rem; transition: transform .4s var(--ease-out); }
.theme:active svg { transform: rotate(-30deg); }
.theme .t-dark, .theme[aria-pressed="true"] .t-light { display: none; }
.theme[aria-pressed="true"] .t-dark { display: inline; }
.theme .t-label { display: none; }
@media (min-width: 40rem) { .theme .t-label { display: inline; } }

/* ---------- The preview note: small, designed, never over content ---------- */
.note {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .3rem .65rem .3rem .4rem;
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: 3px;
  font: 600 .75rem/1.2 var(--body); letter-spacing: .02em;
  color: var(--muted);
}
.note::before {
  content: ""; width: .7rem; height: .7rem; flex: none;
  border-radius: 50%; background: var(--thread);
}

/* ---------- The family sentence: every site's way to every other ---------- */
.family { padding-block: var(--s9) var(--s7); }
.family-label { font-weight: 600; font-size: .9375rem; color: var(--muted); margin-bottom: var(--s4); }
.family-sentence {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.6vw, 3.25rem);
  line-height: 1.18;
  letter-spacing: -.015em;
  max-width: 30ch;
}
.family-sentence a, .family-sentence .later {
  white-space: nowrap;
}
.family-sentence a { padding: .3em .06em; }
.family-sentence a {
  text-decoration-thickness: .06em;
  text-underline-offset: .14em;
  transition: color .2s var(--ease-out), text-decoration-thickness .2s var(--ease-out);
}
.family-sentence a:hover { text-decoration-thickness: .12em; }
.family-sentence .later { color: var(--muted); }
.family-sentence a[aria-current="page"] {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 92% / 100% .14em no-repeat;
}
.family-sentence .f-organise { color: var(--c-organise); }
.family-sentence .f-style { color: var(--c-style); }
.family-sentence .f-celebrate { color: var(--c-celebrate); }
.family-key { margin-top: var(--s5); color: var(--muted); font-size: .9375rem; max-width: var(--measure); }

.foot {
  padding-block: var(--s7) var(--s8);
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  font-size: .9375rem;
}
.foot .wrap { display: flex; flex-wrap: wrap; gap: var(--s5) var(--s7); align-items: center; }
.foot-seal { width: 4.5rem; height: 4.5rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.foot-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
.foot .note { margin-left: auto; }

/* ---------- Doors: where each link leads, so the door wears its colour ---------- */
.door-hub { --door-ground: light-dark(#EEF0F3, #15141B); --door-ink: light-dark(#17161D, #ECEBF2); }
.door-organise { --door-ground: light-dark(#F5F5F2, #151311); --door-ink: light-dark(#B34A0B, #F59A55); }
.door-style { --door-ground: light-dark(#EBD9D3, #171A2A); --door-ink: light-dark(#2C3F98, #A9B8FF); }
.door-celebrate { --door-ground: light-dark(#F4ECF7, #1E0F26); --door-ink: light-dark(#6E2BB8, #CFA8FF); }

.door-layer {
  position: fixed; inset: 0; z-index: 2147483646;
  pointer-events: none; transform-origin: 0 0;
}
.door-word {
  position: fixed; z-index: 2147483647; margin: 0;
  pointer-events: none; transform-origin: 50% 50%;
  white-space: nowrap; line-height: 1;
}
.door-layer[hidden], .door-word[hidden] { display: none; }

/* ---------- Shared arrival for content below the fold (arrive.js) ---------- */
[data-arrive] { --arrive-distance: 1.25rem; --arrive-duration: 650ms; --arrive-easing: var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
