/* Feel These Vib3s: the shared look. One file every page loads, so the brand cannot drift.
   Source of truth: Website-Builder/brand/. Copy the whole folder; never edit a copy (README.md).
   Colours: palettes/D_day.json and palettes/N_night.json, both passing palette_check.py.
   --warn, --caution and --ok are the state colours (2026-10-02): words or a filled bar on the ground or a
   card. Never colour alone: a state is always said in words beside it.
   Needs on the page: <html data-theme>, the pre-paint snippet in README.md, and the fonts link. */

:root,
[data-theme="day"] {
  --ground: #F6F2EA;
  --card: #FFFDF8;
  --card-2: #EFE9DE;
  --ink: #15171C;
  --soft: #4E4A43;
  --line: #DDD5C6;
  --brand: #7A4E06;
  --btn: #15171C;
  --btn-ink: #EBB454;
  --focus: #1F6B52;
  --mint: #1F6B52;
  --warn: #A63A2B;
  --caution: #7A4E06;
  --ok: #1F6B52;
  --amber: #EBB454;
  --glow-a: rgba(235, 180, 84, .30);
  --glow-b: rgba(127, 197, 168, .26);
  --veil: rgba(246, 242, 234, .82);
  --shadow: 0 24px 60px -28px rgba(40, 30, 10, .35);
  color-scheme: light;
}
[data-theme="night"] {
  --ground: #0E0F12;
  --card: #171A20;
  --card-2: #1E222A;
  --ink: #F1EEE8;
  --soft: #A9A59C;
  --line: #2C313B;
  --brand: #EBB454;
  --btn: #EBB454;
  --btn-ink: #17130A;
  --focus: #7FC5A8;
  --mint: #7FC5A8;
  --warn: #F2836F;
  --caution: #EBB454;
  --ok: #7FC5A8;
  --amber: #EBB454;
  --glow-a: rgba(235, 180, 84, .16);
  --glow-b: rgba(127, 197, 168, .13);
  --veil: rgba(14, 15, 18, .80);
  --shadow: 0 30px 80px -30px #000;
  color-scheme: dark;
}
:root {
  --display: "Bricolage Grotesque", Georgia, serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
}

* { box-sizing: border-box; }
html { background: var(--ground); scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; overflow-x: hidden; transition: background-color .5s var(--ease), color .5s var(--ease); }
img { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--btn); color: var(--btn-ink); padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Background motion: two ribbons of lines, the drifting 3D logos between them, two slow glows.
   Decoration only: every word sits on the ground colour or a card, and the palettes pass with it off. */
.waves { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .9; }
.logos { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 2.4s var(--ease); filter: blur(.4px); }
.logos.on { opacity: .42; }
[data-theme="day"] .logos.on { opacity: .38; }
/* A logo turning in place (canvas.spin data-model="..."): square, and only shown once it has drawn. */
.spin { display: block; width: 100%; max-width: 240px; aspect-ratio: 1; margin: 18px auto 0; opacity: 0; transition: opacity 1.2s var(--ease); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.spin.on { opacity: 1; }
/* A halo of the ground colour behind text that sits on the bare background, over the motion. */
.halo { text-shadow: 0 0 18px var(--ground), 0 0 4px var(--ground); }
.glow { position: fixed; z-index: 0; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(60px); pointer-events: none; animation: drift 26s ease-in-out infinite alternate; }
.glow-a { background: radial-gradient(circle, var(--glow-a), transparent 65%); top: -22vmax; right: -18vmax; }
.glow-b { background: radial-gradient(circle, var(--glow-b), transparent 65%); bottom: -26vmax; left: -22vmax; animation-duration: 32s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.12); } }
main, .foot, .top { position: relative; z-index: 1; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--veil); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 14px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.mark-img { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 0 8px var(--glow-a)); transition: transform .9s var(--spring); }
.mark:hover .mark-img { transform: rotate(-35deg) scale(1.06); }
.mark-text { display: flex; flex-direction: column; line-height: 1.05; }
.mark-word { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.mark-sub { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--brand); font-weight: 700; }
.nav { display: none; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--brand); }
.call { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; min-width: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.call svg { color: var(--brand); flex: none; }
.call:hover { border-color: var(--brand); }
.call-label { display: none; }
.theme { font: inherit; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.theme-icon { width: 24px; height: 24px; border-radius: 50%; position: relative; background: var(--amber); box-shadow: 0 0 12px var(--glow-a); transition: background .5s var(--ease), box-shadow .5s var(--ease); overflow: hidden; }
.theme-icon::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--card); top: -4px; right: -14px; transition: right .5s var(--spring); }
[data-theme="night"] .theme-icon::after { right: -5px; }
[data-theme="night"] .theme-icon { background: #F1EEE8; box-shadow: 0 0 14px rgba(241, 238, 232, .35); }

/* Type and shared pieces */
section { padding-block: 64px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--mint); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(38px, 9.4vw, 68px); line-height: 1.02; margin: 0 0 18px; }
h1 em { font-style: normal; color: var(--brand); position: relative; white-space: nowrap; }
h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .14em; border-radius: 99px; background: var(--amber); opacity: .55; transform-origin: left; animation: underline 1.2s .5s var(--ease) both; }
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
h2 { font-weight: 800; font-size: clamp(30px, 6.6vw, 46px); line-height: 1.08; margin: 0 0 14px; }
h3 { font-weight: 800; font-size: 21px; line-height: 1.2; margin: 0 0 6px; }
.lede { font-size: 19px; color: var(--soft); max-width: 62ch; margin: 0 0 8px; }
.fine { font-size: 15px; color: var(--soft); margin: 14px 0 0; }
.more { margin: 24px 0 0; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 24px; border-radius: 999px; border: 2px solid var(--btn); background: var(--btn); color: var(--btn-ink); font: inherit; font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer; overflow: hidden; transition: transform .25s var(--spring), box-shadow .25s var(--ease); }
.btn::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -14px var(--amber); }
.btn:hover::before { transform: translateX(120%); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost::before { display: none; }
.band { background: color-mix(in srgb, var(--card) 70%, transparent); border-block: 1px solid var(--line); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; }

/* Forms */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.form input, .form textarea, .form select { font: inherit; font-weight: 400; font-size: 17px; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--ground); color: var(--ink); width: 100%; }
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 25%, transparent); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Reveal on scroll: only when the script is running and motion is allowed */
.js .reveal > * { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in > * { opacity: 1; transform: none; }
.js .reveal.in > *:nth-child(2) { transition-delay: .08s; }
.js .reveal.in > *:nth-child(3) { transition-delay: .16s; }
.js .reveal.in > *:nth-child(4) { transition-delay: .24s; }

/* A phone: the night switch and the call button show their icons only, so the bar fits at 375. */
@media (max-width: 759px) {
  .theme .theme-label { display: none; }
  .theme { padding: 6px; min-width: 40px; justify-content: center; }
  .top-in { gap: 8px; }
  .mark-img { width: 32px; height: 32px; }
  .mark-word { font-size: 18px; }
}
@media (min-width: 760px) {
  .call-label { display: inline; }
  .nav { display: flex; }
  section { padding-block: 88px; }
}

/* Motion off: everything still works, nothing moves. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal > * { opacity: 1; transform: none; }
  .waves, .logos, .spin { display: none; }
}
