/* THE HOUSE WARDROBE — wardrobe.css (~/Bastion/Design/wardrobe). Load it before wardrobe.js, in <head>.
   What the page wears is written by wardrobe.js as the house tokens on <html> (a chosen outfit or light, or the light of the day; Zenith writes nothing);
   this file wears the cloth and the faces, and dresses the one quiet door and its sheet. Radius follows the outfit
   (--wd-radius, 0 for every Haute Lumière outfit). No shadow: the sheet sits on a hairline. Gold is never painted here;
   it is the reward, and the reward is Komorebi's. */

html[data-wd-worn="1"] body {
  background-color: var(--paper, #FAF8F3);
  background-image: var(--wd-texture, none);
  color: var(--ink, #0C1E16);
  font-family: var(--wd-body-face, var(--font-serif, "Cormorant Garamond", Georgia, serif));
}
html[data-wd-worn="light"] body { background-color: var(--paper, #FAF8F3); color: var(--ink, #0C1E16); }
html[data-wd-worn="1"] :is(h1, h2, h3, .hl-display, .hl-headline) {
  font-family: var(--wd-display, var(--font-serif-display, "Cormorant Garamond", Georgia, serif));
  font-weight: var(--wd-display-weight, 300);
  font-style: var(--wd-display-style, normal);
  text-transform: var(--wd-display-caps, none);
  letter-spacing: var(--wd-display-tracking, normal);
}

/* the door */
.wd-door {
  position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 2147482000;
  min-height: 44px; min-width: 44px; padding: 0 16px; margin: 0;
  font: italic 400 17px/1 var(--font-serif, "Cormorant Garamond", Georgia, serif); letter-spacing: .01em;
  color: var(--ink, #0C1E16); background: var(--paper, #FAF8F3);
  border: 1px solid var(--rule, #E1E7E2); border-radius: var(--wd-radius, 0);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color 200ms cubic-bezier(.165,.84,.44,1), opacity 200ms cubic-bezier(.165,.84,.44,1);
}
.wd-door--in { position: static; }
.wd-door:hover { border-color: var(--ink-soft, #334A3F); }
.wd-door:focus-visible, .wd-sheet button:focus-visible { outline: 1px solid var(--ink, #0C1E16); outline-offset: 3px; }

/* the sheet: one group at a time */
.wd-sheet {
  position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 54px); z-index: 2147482001;
  width: min(460px, calc(100% - 28px)); max-height: min(78vh, 760px);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  color: var(--ink, #0C1E16); background: var(--paper, #FAF8F3);
  border: 1px solid var(--rule, #E1E7E2); border-radius: var(--wd-radius, 0);
  opacity: 0; transform: translateY(8px);
  transition: opacity 400ms cubic-bezier(.165,.84,.44,1), transform 400ms cubic-bezier(.165,.84,.44,1);
}
.wd-sheet[data-open] { opacity: 1; transform: none; }
html[data-wd-door="in"] .wd-sheet { top: 64px; bottom: auto; transform: translateY(-8px); }
html[data-wd-door="in"] .wd-sheet[data-open] { transform: none; }
.wd-sheet[hidden] { display: none; }
.wd-head { padding: 20px 22px 0; }
.wd-kicker, .wd-no, .wd-tab, .wd-link, .wd-pair-faces, .wd-colour-family, .wd-light-hour {
  font-family: var(--font-sans, "Manrope", system-ui, sans-serif);
}
.wd-kicker { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted, #5C7065); }
.wd-name { margin: 8px 0 0; font: 300 26px/1.12 var(--font-serif-display, "Cormorant Garamond", Georgia, serif); text-wrap: balance; }
.wd-no { margin: 6px 0 0; font-size: 12px; color: var(--text-muted, #5C7065); }
.wd-tabs { display: flex; gap: 2px; margin: 16px -6px 0; border-bottom: 1px solid var(--rule, #E1E7E2); }
.wd-tab {
  all: unset; box-sizing: border-box; font-family: var(--font-sans, "Manrope", system-ui, sans-serif); min-height: 44px; padding: 0 10px; cursor: pointer;
  font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted, #5C7065);
  border-bottom: 1px solid transparent; margin-bottom: -1px;
  transition: color 200ms cubic-bezier(.165,.84,.44,1), border-color 200ms cubic-bezier(.165,.84,.44,1);
}
.wd-tab[aria-selected="true"] { color: var(--ink, #0C1E16); border-bottom-color: var(--ink, #0C1E16); }
.wd-grid {
  overflow: auto; overscroll-behavior: contain; padding: 16px 22px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; align-content: start;
}
.wd-grid[data-group="typeface"] { grid-template-columns: 1fr; }
.wd-tile {
  all: unset; box-sizing: border-box; position: relative; cursor: pointer; min-height: 88px; padding: 12px 14px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  color: var(--ink, #0C1E16); background-color: var(--paper-2, #EFE8D8);
  border: 1px solid var(--rule, #E1E7E2); border-radius: var(--wd-radius, 0);
  transition: border-color 200ms cubic-bezier(.165,.84,.44,1), transform 200ms cubic-bezier(.165,.84,.44,1);
}
.wd-tile:hover { transform: translateY(-1px); }
.wd-tile[aria-pressed="true"] { outline: 1px solid currentColor; outline-offset: -5px; }
.wd-tile--pair { min-height: 76px; justify-content: center; background-color: var(--paper, #FAF8F3); }
.wd-pair-name { font-size: 25px; line-height: 1.1; }
.wd-pair-faces { font-size: 11px; letter-spacing: .06em; color: var(--text-muted, #5C7065); }
.wd-colour-name { font: 400 17px/1.15 var(--font-serif, "Cormorant Garamond", Georgia, serif); }
.wd-colour-mark { width: 26px; height: 2px; }
.wd-colour-family { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.wd-cloth-name, .wd-light-name { font: 400 17px/1.15 var(--font-serif, "Cormorant Garamond", Georgia, serif); }
.wd-tile--cloth { background-size: 220px 220px; }
.wd-tile--light { min-height: 104px; border-color: transparent; }
.wd-light-hour { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .78; }
.wd-foot { display: flex; justify-content: space-between; padding: 8px 14px 12px; border-top: 1px solid var(--rule, #E1E7E2); }
.wd-link {
  all: unset; box-sizing: border-box; font-family: var(--font-sans, "Manrope", system-ui, sans-serif); min-height: 44px; padding: 0 8px; cursor: pointer; display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--ink-soft, #334A3F);
}
.wd-link:hover { color: var(--ink, #0C1E16); }

@media (max-width: 560px) {
  .wd-sheet { left: 0; right: 0; bottom: 0; width: auto; max-height: 82vh; border-left: 0; border-right: 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom); }
  .wd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 16px; }
  .wd-head { padding: 18px 16px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wd-door, .wd-sheet, .wd-tab, .wd-tile { transition: none; }
  .wd-sheet { transform: none; }
  .wd-tile:hover { transform: none; }
}

/* THE DAY TURNS (2 Dec 2026). While data-wd-turning is on <html> (760 ms, set by wardrobe.js only after the page has been
   shown), every colour crosses in the house's 700 ms on the house curve, never a cut. Only colour moves, and only during
   the turn; Komorebi's light and its wheel keep their own motion. */
html[data-wd-turning],
html[data-wd-turning] *:not(.kmr):not(.kmr *):not(.kmw):not(.kmw *),
html[data-wd-turning] *:not(.kmr *):not(.kmw *)::before,
html[data-wd-turning] *:not(.kmr *):not(.kmw *)::after {
  transition-property: background-color, color, border-color, outline-color, text-decoration-color, fill, stroke, box-shadow !important;
  transition-duration: 700ms !important;
  transition-timing-function: cubic-bezier(.165,.84,.44,1) !important;
  transition-delay: 0s !important;
}
