/* Devanosi: the brand on every host page (concept C "The Strip": blue, milk and a touch of red).
   ONE file for the three looks and Auto. The server writes <html data-look="cotton|evening|silk|auto"> (src/brand.js), so the
   first paint is right. Load it AFTER /app.css (or /rooms/rooms.css): it maps the site's old variables (--wine, --gold*,
   --cloth*, --paper*, --card, --ink*, --line, --on-cloth) onto the new palette, so every rule built on them recolours.
     Indigo #1A2360 the brand · Cotton #F4F0E7 paper · Silk #CEBB9A · Night #0C112A text · Alaari #DD3858 the one red thread
   Alaari: at most a tenth of a layout, never body or small text, never on Silk without Indigo beside it. #334593 is only
   the tone-on-tone weave on Indigo. No wine, no gold.
   Type: Newsreader for headlines (regular and italic), Archivo for everything else. Self-hosted, OFL (fonts/OFL-*.txt).
   Fallbacks (Noto Serif Display, Manrope) carry the precomposed African-language letters (ẹ ọ ṣ ɛ ɔ) the brand faces lack.
   The 21 invitation designs never load this file: each keeps its own look. */

@font-face { font-family: "Newsreader DV"; font-style: normal; font-weight: 300 500; font-display: swap; src: url(/brand/fonts/newsreader-regular.woff) format("woff"); }
@font-face { font-family: "Newsreader DV"; font-style: italic; font-weight: 300 500; font-display: swap; src: url(/brand/fonts/newsreader-italic.woff) format("woff"); }
@font-face { font-family: "Newsreader DV"; font-style: normal; font-weight: 600 800; font-display: swap; src: url(/brand/fonts/newsreader-bold.woff) format("woff"); }
@font-face { font-family: "Archivo DV"; font-style: normal; font-weight: 300 549; font-display: swap; src: url(/brand/fonts/archivo-regular.woff) format("woff"); }
@font-face { font-family: "Archivo DV"; font-style: normal; font-weight: 550 900; font-display: swap; src: url(/brand/fonts/archivo-bold.woff) format("woff"); }

/* ---------- the palette and the default look: Cotton & Ink ---------- */
:root {
  --dv-indigo: #1A2360; --dv-cotton: #F4F0E7; --dv-silk: #CEBB9A; --dv-night: #0C112A; --dv-alaari: #DD3858; --dv-tint: #334593;
  --display: "Newsreader DV", "Noto Serif Display", Georgia, serif;
  --label: "Archivo DV", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Archivo DV", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: light;
  --paper: #F4F0E7; --paper-2: #ECE6D9; --card: #FBF9F4;
  --ink: #0C112A; --ink-2: #555A74; --line: rgba(26, 35, 96, .14); --pline: rgba(26, 35, 96, .14);
  --wine: #1A2360; --on-wine: #F4F0E7; --wine-wash: #E9EAF1;                     /* the action colour (was wine) */
  --cloth: #1A2360; --cloth-2: #222C6C; --cloth-3: #2B3778; --on-cloth: #F4F0E7; /* the dark ground (was wine cloth) */
  --gold: #CEBB9A; --gold-hi: #E4D9C4; --gold-lo: #6E5B3B;                       /* Silk: second ground and quiet accents (was gold) */
  --gold-wash: #E4D9C4;                                                           /* a Silk tint for highlighted cards and notes */
  --foil: #CEBB9A; --foil-hi: #E4D9C4; --on-foil: #1A2360;                        /* the second button */
  --thread: #DD3858;                                                              /* Alaari: dots, the active mark, the tab */
  --ok: #1F6B4F; --bad: #B3243F; --warn: #7A4A00; --on-ok: #F4F0E7; --on-bad: #F4F0E7;
  --shade: 12 17 42;                                                              /* shadows, as "r g b" for rgb(var(--shade) / a) */
  --ink-rgb: 12 17 42; --on-cloth-rgb: 244 240 231; --gold-hi-rgb: 228 217 196; --paper-rgb: 244 240 231; --card-rgb: 251 249 244;
  --weave: url(/brand/weave/cloth.svg);                                           /* tone-on-tone lattice over any cloth */
  --weave-big: url(/brand/weave/cloth-big.svg);
  --weave-paper: url(/brand/weave/paper.svg);
  --stage: #E9E2D3;                                                               /* behind an invitation in the editor and share page */
  --shadow: 0 26px 50px -34px rgb(12 17 42 / .45);
  --tag-on: #1A2360;
}

/* ---------- Evening: Night ground, Cotton ink, Cotton actions ---------- */
:root[data-look="evening"] {
  color-scheme: dark;
  --paper: #0C112A; --paper-2: #11173A; --card: #161D45;
  --ink: #F4F0E7; --ink-2: #ADB0C8; --line: rgba(244, 240, 231, .13); --pline: rgba(244, 240, 231, .13);
  --wine: #F4F0E7; --on-wine: #1A2360; --wine-wash: #222A5C;
  --cloth: #161D45; --cloth-2: #1A2360; --cloth-3: #222A5C; --on-cloth: #F4F0E7;
  --gold: #CEBB9A; --gold-hi: #E4D9C4; --gold-lo: #CEBB9A; --gold-wash: #3A4378;
  --foil: #F4F0E7; --foil-hi: #FFFFFF; --on-foil: #1A2360;
  --thread: #DD3858;
  --ok: #7FD1A5; --bad: #F28CA0; --warn: #F0C27A; --on-ok: #0C112A; --on-bad: #0C112A;
  --shade: 0 0 0;
  --ink-rgb: 244 240 231; --on-cloth-rgb: 244 240 231; --gold-hi-rgb: 34 42 92; --paper-rgb: 12 17 42; --card-rgb: 22 29 69;
  --weave: url(/brand/weave/night.svg);
  --weave-big: url(/brand/weave/night.svg);
  --weave-paper: url(/brand/weave/night.svg);
  --stage: #0A0E24;
  --shadow: 0 26px 50px -30px rgb(0 0 0 / .7);
  --tag-on: #F4F0E7;
}
@media (prefers-color-scheme: dark) {
  :root[data-look="auto"] {
    color-scheme: dark;
    --paper: #0C112A; --paper-2: #11173A; --card: #161D45;
    --ink: #F4F0E7; --ink-2: #ADB0C8; --line: rgba(244, 240, 231, .13); --pline: rgba(244, 240, 231, .13);
    --wine: #F4F0E7; --on-wine: #1A2360; --wine-wash: #222A5C;
    --cloth: #161D45; --cloth-2: #1A2360; --cloth-3: #222A5C; --on-cloth: #F4F0E7;
    --gold: #CEBB9A; --gold-hi: #E4D9C4; --gold-lo: #CEBB9A; --gold-wash: #3A4378;
    --foil: #F4F0E7; --foil-hi: #FFFFFF; --on-foil: #1A2360;
    --thread: #DD3858;
    --ok: #7FD1A5; --bad: #F28CA0; --warn: #F0C27A; --on-ok: #0C112A; --on-bad: #0C112A;
    --shade: 0 0 0;
    --ink-rgb: 244 240 231; --on-cloth-rgb: 244 240 231; --gold-hi-rgb: 34 42 92; --paper-rgb: 12 17 42; --card-rgb: 22 29 69;
    --weave: url(/brand/weave/night.svg);
    --weave-big: url(/brand/weave/night.svg);
    --weave-paper: url(/brand/weave/night.svg);
    --stage: #0A0E24;
    --shadow: 0 26px 50px -30px rgb(0 0 0 / .7);
    --tag-on: #F4F0E7;
  }
}

/* ---------- Silk Studio: Silk ground, Cotton cards, Indigo actions ---------- */
:root[data-look="silk"] {
  color-scheme: light;
  --paper: #CEBB9A; --paper-2: #C4AF8C; --card: #F4F0E7;
  --ink: #0C112A; --ink-2: #45434D; --line: rgba(12, 17, 42, .15); --pline: rgba(12, 17, 42, .15);
  --wine: #1A2360; --on-wine: #F4F0E7; --wine-wash: #E4D9C4;
  --cloth: #1A2360; --cloth-2: #222C6C; --cloth-3: #2B3778; --on-cloth: #F4F0E7;
  --gold: #4A5A9E; --gold-hi: #E4D9C4; --gold-lo: #4A3B22; --gold-wash: #E4D9C4; /* on Silk the quiet accent is an Indigo tint, not a darker Silk */
  --foil: #F4F0E7; --foil-hi: #FFFFFF; --on-foil: #1A2360;
  --thread: #DD3858;
  --ok: #0F4A35; --bad: #7A1A33; --warn: #5E3C00; --on-ok: #F4F0E7; --on-bad: #F4F0E7;
  --shade: 12 17 42;
  --ink-rgb: 12 17 42; --on-cloth-rgb: 244 240 231; --gold-hi-rgb: 228 217 196; --paper-rgb: 206 187 154; --card-rgb: 244 240 231;
  --weave: url(/brand/weave/cloth.svg);
  --weave-big: url(/brand/weave/cloth-big.svg);
  --weave-paper: url(/brand/weave/silk.svg);
  --stage: #C4AF8C;
  --shadow: 0 26px 50px -34px rgb(12 17 42 / .5);
  --tag-on: #1A2360;
}

/* status washes, worked out from each look's own ok / bad / warn and card */
:root { --ok-wash: color-mix(in srgb, var(--ok) 13%, var(--card)); --bad-wash: color-mix(in srgb, var(--bad) 12%, var(--card)); --warn-wash: color-mix(in srgb, var(--warn) 13%, var(--card)); }
:root[data-look] { --ok-wash: color-mix(in srgb, var(--ok) 13%, var(--card)); --bad-wash: color-mix(in srgb, var(--bad) 12%, var(--card)); --warn-wash: color-mix(in srgb, var(--warn) 13%, var(--card)); }

/* ---------- motion: ONE set of durations and curves for every host screen ----------
   Premium is restraint and precision: only transform, opacity, clip-path and filter move; presses squash a little and
   overshoot on release; numbers roll; pills glide; lists stagger in. Reduce Motion: app.css stills every duration. */
:root {
  --dur-1: 120ms;  /* a press, a colour */
  --dur-2: 220ms;  /* a hover, a fade, a tick */
  --dur-3: 380ms;  /* a pill gliding, a sheet settling, a row arriving */
  --dur-4: 620ms;  /* a page arriving, the look changing */
  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);
  --spring-k: cubic-bezier(.34, 1.36, .5, 1); /* keyframe springs (WebKit freezes linear() keyframes) */
  --stagger: 45ms;
}

/* the look changes with a woven wipe (public/brand/look.js): the new look slides in strip by strip, alternately from the
   left and the right, like weft through a warp. The browser's own cross-fade is switched off for it. Reduce Motion: a swap. */
html.dv-swapping::view-transition-old(root), html.dv-swapping::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.dv-swapping::view-transition-group(root) { animation-duration: var(--dur-4); }
html.dv-fade body, html.dv-fade .studio, html.dv-fade .ad, html.dv-fade .app { transition: background-color var(--dur-4) var(--ease-out), color var(--dur-3) var(--ease-out); }

/* presses everywhere in the host app: a small squash, an overshoot on release */
@media (prefers-reduced-motion: no-preference) {
  .btn, .ss-btn, .ad-btn, .b, .sbtn, .ib, .row, .lk__o, .tab, .side__nav, .nt-bell { transition-timing-function: var(--spring-k); }
  .btn:active, .ss-btn:active, .ad-btn:active, .sbtn:active, .row:active { transform: scale(.96); transition-duration: var(--dur-1); }
}

/* ---------- the polish pass (28 Nov): the rest of the ONE motion set ----------
   --spring is the real spring for TRANSITIONS (app.css had it alone; rooms and admin get it here too). Keyframes use --spring-k.
   --press / --press-soft: how far a control squashes under the finger (public/app.js gives every control without a CSS press of
   its own a press on the separate `scale` property, so it never fights a transform the control already has). Segments and tabs
   press softer, because their pill rides behind them. --dv-rise: how far a thing travels as it arrives. */
:root {
  --spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --press: .95;
  --press-soft: .97;
  --dv-rise: 14px; /* named apart from redeem.css's own --rise */
}
@keyframes dvRise { from { opacity: 0; transform: translateY(var(--dv-rise)); } }
@keyframes dvPop { from { opacity: 0; transform: scale(.92); } }
@keyframes dvFade { from { opacity: 0; } }
@keyframes dvDrop { from { opacity: 0; transform: translateY(-10px) scale(.7) rotate(-8deg); } }

/* sheets that used to vanish on close now fall away: the delete / log out / receipt / forgot-password sheets (app.css .dsheet),
   the New invitation sheet (shell.css .nsheet) and the guest book's send queue and broadcast (guests.css .gb-q). Only where the
   browser can keep a closing dialog on the top layer (overlay); elsewhere they close at once, as before. */
@supports (overlay: auto) {
  @media (prefers-reduced-motion: no-preference) {
    .dsheet, .nsheet, .gb-q { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--ease-out), overlay var(--dur-3) allow-discrete, display var(--dur-3) allow-discrete; }
    .dsheet:not([open]), .nsheet:not([open]), .gb-q:not([open]) { opacity: 0; translate: 0 24px; }
    .dsheet::backdrop, .nsheet::backdrop, .gb-q::backdrop { transition: opacity var(--dur-3) var(--ease-out), overlay var(--dur-3) allow-discrete, display var(--dur-3) allow-discrete; }
    .dsheet:not([open])::backdrop, .nsheet:not([open])::backdrop, .gb-q:not([open])::backdrop { opacity: 0; }
  }
}

/* Lite (Save-Data, a phone with little memory or two cores, or ?lite=1; public/app.js sets html.is-lite, the home page's
   ribbon.js sets its own): the decorative loops rest, the working ones (spinners, the live dot) keep going. */
html.is-lite .cv__fx, html.is-lite .cv__fx2, html.is-lite .cv__n, html.is-lite .ss-btn--foil, html.is-lite .tf-tile__plus,
html.is-lite .hero h1 em, html.is-lite .bgr-tag, html.is-lite .zn-mer, html.is-lite .vn-pin__pu, html.is-lite .rd.is-idle .env,
html.is-lite .gchip--attn .gchip__p::before, html.is-lite .gh-attn::after, html.is-lite .dr-idle__qr, html.is-lite .thl__hint,
html.is-lite .gb-bc__on, html.is-lite .gb-bc__tap, html.is-lite .tcoach__f i, html.is-lite .bgr-ring { animation: none !important; }
html.is-lite .ss-rays { animation: ssRays 1.1s var(--ease-out) .4s both !important; }
html.is-lite .top__glass, html.is-lite .tabs, html.is-lite .lk-menu { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.is-lite .tabs { background: var(--card); }

/* ---------- the marks ---------- */
.dv-wm { display: block; height: .72em; width: auto; overflow: visible; color: inherit; }
.dv-sym { display: block; width: 24px; height: 24px; }
.dv-tab { display: block; width: 14px; height: auto; }
/* the header and footer brand: DEVANOSI in the solid cut, the Alaari tab hanging above the D */
.brand { position: relative; color: var(--ink); }
.brand .dv-wm { height: 15px; }
.brand__tab { position: absolute; left: 0; top: calc(50% - 19px); width: 5px; height: 9px; background: var(--thread); transform-origin: 50% 0; transition: transform .5s cubic-bezier(.34, 1.36, .5, 1); }
.brand:hover .brand__tab { transform: scaleY(1.35); }
.foot .brand .dv-wm { height: 13px; }
.foot .brand { color: var(--on-cloth); } /* the footer sits on the cloth (Indigo, or Night in Evening): the wordmark wears the cloth's own ink, not the page's */
/* the toast is cloth too: a fine light rim (Cotton, so it shows on Indigo and on Night) and a shadow keep it a separate layer over the cloth footer */
.toast { box-shadow: 0 0 0 1px rgb(var(--on-cloth-rgb) / .24), 0 18px 40px -12px rgb(var(--shade) / .6); }

/* ---------- the look switch (You page row, editor quick switch) ---------- */
.lk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 4px 14px 14px; }
.lk__o { position: relative; display: grid; justify-items: center; gap: 7px; min-width: 0; min-height: 44px; padding: 8px 4px 9px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-2); cursor: pointer; font: 500 .7rem/1.2 var(--label); letter-spacing: .02em; text-align: center; transition: color .25s, background .25s, transform .45s cubic-bezier(.34, 1.36, .5, 1); }
.lk__o:active { transform: scale(.95); }
.lk__o[aria-checked="true"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.lk__o:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.lk__sw { position: relative; display: block; width: 100%; max-width: 74px; aspect-ratio: 4 / 3; border-radius: 11px; overflow: hidden; background: var(--a); box-shadow: inset 0 0 0 1px rgb(var(--ink-rgb) / .14), 0 8px 16px -12px rgb(var(--shade) / .6); transition: box-shadow .3s, transform .5s cubic-bezier(.34, 1.36, .5, 1); }
.lk__sw::before { content: ""; position: absolute; left: 14%; right: 14%; top: 26%; height: 52%; border-radius: 6px; background: var(--b); box-shadow: 0 6px 12px -8px rgb(0 0 0 / .4); }
.lk__sw::after { content: ""; position: absolute; left: 24%; top: 40%; width: 34%; height: 9%; border-radius: 3px; background: var(--c); box-shadow: 0 7px 0 -1px color-mix(in srgb, var(--c) 45%, transparent); }
.lk__sw i { position: absolute; right: 16%; top: 0; width: 9%; height: 22%; background: #DD3858; transform: scaleY(0); transform-origin: 50% 0; transition: transform .5s cubic-bezier(.34, 1.36, .5, 1); }
.lk__sw--auto { background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); }
.lk__sw--auto::before { background: linear-gradient(135deg, #FBF9F4 50%, #161D45 50%); }
.lk__o[aria-checked="true"] .lk__sw { box-shadow: inset 0 0 0 1px rgb(var(--ink-rgb) / .14), 0 0 0 2px var(--paper), 0 0 0 4px var(--wine); transform: translateY(-2px); }
.lk__o[aria-checked="true"] .lk__sw i { transform: scaleY(1); }
.lk__o b { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .lk__o, .lk__sw, .lk__sw i, .brand__tab { transition: none; } }

/* the editor's top-bar swatch and its small menu */
.sbar__look { position: relative; flex: none; }
.sbar__look .lk-dot { display: block; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, var(--paper) 50%, var(--wine) 50%); box-shadow: inset 0 0 0 1.5px currentColor; }
.lk-menu { position: fixed; z-index: 90; width: min(320px, calc(100vw - 24px)); padding: 12px 0 2px; border-radius: 20px; background: color-mix(in srgb, var(--card) 92%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgb(var(--shade) / .6); color: var(--ink); transform-origin: var(--ox, 100%) 0; animation: lkIn .42s cubic-bezier(.34, 1.36, .5, 1) both; }
.lk-menu[hidden] { display: none; }
.lk-menu__h { margin: 0 16px 6px; font: 600 .62rem/1.3 var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.lk-menu .lk { padding: 2px 8px 10px; }
@keyframes lkIn { from { opacity: 0; transform: translateY(-6px) scale(.94); } }
@media (prefers-reduced-motion: reduce) { .lk-menu { animation: none; } }

/* the wordmark in the app's sidebar and the admin's sidebar (both on the cloth) */
.side__brand, .ad-side__brand { position: relative; }
.side__brand .dv-wm { height: 16px; color: var(--on-cloth); }
.ad-side__brand { align-items: center; }
.ad-side__brand .dv-wm { height: 15px; color: var(--on-cloth); }
.ad-side__brand .brand__tab, .side__brand .brand__tab { left: 10px; }
.side__brand .brand__tab { left: 0; }


/* a narrow phone's editor bar fits one of the two small buttons: the editing-style button, whose sheet carries the look switch too */
@media (max-width: 429px) { .sbar .sbar__look { display: none; } }
.emo__look { display: grid; gap: 6px; margin-top: 4px; padding-top: 12px; box-shadow: inset 0 1px 0 var(--line); }
.emo__look .lk { padding: 0; }
@media (min-width: 430px) { .emo__look { display: none; } }
