/* KRS Payals: the "Burnished" look (data-look="emil-redo"). Classic stays the default.
   Gunmetal and chrome: the whole page is metal-toned, never paper-white or near-black.
   Light = brushed steel: a clearly grey page, lighter steel cards, near-black text,
           a mirror-chrome WhatsApp button and gunmetal "picked" states.
   Dark  = gunmetal: a blue-grey page well above black, a step-lighter card,
           bright silver text and mirror-chrome accents.
   Beyond colour, the small things are tightened:
   - one quiet label style (small caps, steel) for every little heading, instead of gold
   - clearer button order: WhatsApp first, Call second, the catalogue as a soft link
   - softer, consistent corners (12px buttons, 14px cards, round chips, 18px sheets)
   - fixes: readable "Sample" badge in dark mode, focus rings not cut off in the chip row,
     dimmer pictures at night, no grey flash when tapping on phones
   Every text colour is at least WCAG AA on the grey it sits on (lowest 5.1:1, the count on a
   picked chrome chip at night; body text 6.4:1 or more).
   Motion added here only uses scale / translate, and is switched off for reduced motion.
   Everything here only applies when <html data-look="emil-redo">. */

/* ---------- Colours ---------- */

:root[data-look="emil-redo"] {
  --paper: #D0D5DA;          /* brushed steel */
  --card: #E3E7EB;           /* lighter steel */
  --oxide: #15191D;          /* main text: 12:1 on the page */
  --oxide-soft: #3C444C;     /* secondary text: 6.7:1 on the page */
  --kumkum: #7A1F2B;         /* 6.9:1 */
  --brass: #414C57;          /* small labels: steel blue-grey, not gold (5.9:1) */
  --silver-pale: #EEF1F4;    /* text on gunmetal chips */
  --silver-mid: #AEB6BE;
  --rule: 1px solid rgba(21, 25, 29, .16);
  --hair: rgba(21, 25, 29, .16);
  --hair-strong: rgba(21, 25, 29, .3);
  --chain: #5F6973;          /* the chain dividers: dark steel links */
  --tint: rgba(255, 255, 255, .28);
  --ghost-fill: rgba(255, 255, 255, .16);
  --sheen: rgba(255, 255, 255, .6);
  --brush: rgba(255, 255, 255, .05);
  --chrome: linear-gradient(180deg, #FBFCFD 0%, #E3E7EB 46%, #C1C8CF 54%, #E8EBEE 100%);
  --chrome-text: #15191D;    /* 9.7:1 on the darkest chrome stop */
  --btn-face: var(--chrome);
  --btn-text: var(--chrome-text);
  --btn-edge: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(21, 25, 29, .1), 0 0 0 1px rgba(21, 25, 29, .3), 0 1px 2px rgba(21, 25, 29, .16), 0 12px 22px -14px rgba(21, 25, 29, .65);
  --picked-bg: #2B3138;      /* gunmetal: chosen range, size, sound */
  --picked-text: #EEF1F4;    /* 11.6:1 */
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(21, 25, 29, .08), 0 12px 22px -18px rgba(21, 25, 29, .45);
  --badge-bg: rgba(246, 248, 250, .9);
  --sheet-bg: #DCE0E4;       /* raised: a touch lighter than the page */
  --img-dim: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
:root[data-look="emil-redo"][data-theme="dark"] {
  --paper: #2A3037;          /* gunmetal */
  --card: #343B43;
  --oxide: #EEF1F4;          /* bright silver: 11.8:1 on the page, 10:1 on cards */
  --oxide-soft: #BCC4CC;     /* 7.5:1 on the page, 6.4:1 on cards */
  --kumkum: #F4B3BC;         /* 7.6:1 */
  --brass: #C9D3DC;          /* small labels: 8.8:1 */
  --silver-pale: #15191D;    /* text on chrome */
  --silver-mid: #4A535D;
  --rule: 1px solid rgba(238, 241, 244, .13);
  --hair: rgba(238, 241, 244, .13);
  --hair-strong: rgba(238, 241, 244, .28);
  --chain: #9AA5B0;
  --tint: rgba(238, 241, 244, .07);
  --ghost-fill: rgba(238, 241, 244, .04);
  --sheen: rgba(190, 210, 230, .12);
  --brush: rgba(255, 255, 255, .018);
  --chrome: linear-gradient(180deg, #FFFFFF 0%, #E2E6EA 46%, #BCC4CC 54%, #E6EAED 100%);
  --btn-edge: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(21, 25, 29, .12), 0 1px 2px rgba(0, 0, 0, .45), 0 12px 26px -14px rgba(0, 0, 0, .8);
  --picked-bg: var(--chrome);  /* mirror chrome */
  --picked-text: #15191D;
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 2px rgba(0, 0, 0, .3), 0 12px 24px -18px rgba(0, 0, 0, .6);
  --badge-bg: rgba(232, 236, 240, .92);
  --sheet-bg: var(--card);   /* raised surfaces get lighter at night */
  --img-dim: brightness(.93);  /* the pale drawings glare less on a darker page */
}

/* ---------- Page: brushed metal, a soft light behind the chain ---------- */

[data-look="emil-redo"] body {
  font-kerning: normal;
  background:
    repeating-linear-gradient(0deg, var(--brush) 0 1px, transparent 1px 3px),
    var(--paper);
}
[data-look="emil-redo"] .stage::before {
  content: "";
  position: absolute;
  inset: -4% -8% 4%;         /* stays inside the screen: wider would make the page scroll sideways */
  background: radial-gradient(closest-side, var(--sheen), transparent);
  z-index: -1;
  pointer-events: none;
}
[data-look="emil-redo"] ::selection { background: rgba(95, 105, 115, .32); color: var(--oxide); }
[data-look="emil-redo"] h1,
[data-look="emil-redo"] h2,
[data-look="emil-redo"] .mark { text-wrap: balance; }
[data-look="emil-redo"] p,
[data-look="emil-redo"] li { text-wrap: pretty; }
[data-look="emil-redo"] :focus-visible { outline: 2px solid var(--kumkum); outline-offset: 3px; }

/* ---------- Brand line and corner buttons ---------- */

[data-look="emil-redo"] .mark { font-size: 1.14rem; letter-spacing: -.012em; margin-bottom: 1rem; }
[data-look="emil-redo"] .mark small {
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-top: .3rem;
}
[data-look="emil-redo"] .theme-btn,
[data-look="emil-redo"] .settings-btn {
  border-color: var(--hair-strong);
  background: var(--ghost-fill);
  color: var(--oxide);
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
/* 48px finger target around the 40px circle */
[data-look="emil-redo"] .theme-btn::after,
[data-look="emil-redo"] .settings-btn::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }

/* ---------- Hero ---------- */

/* The drawing has empty room under the chain; pull the caption up so it reads as the chain's caption */
[data-look="emil-redo"] .stage { max-width: 300px; margin-bottom: 0; }
[data-look="emil-redo"] .hint {
  position: relative;
  margin: -1.85rem 0 1.7rem;
  font-size: .74rem;
  letter-spacing: .03em;
  pointer-events: none;
}
[data-look="emil-redo"] .sound {
  top: -.15rem;
  right: -.15rem;
  padding: .28rem .7rem;
  border: 1px solid var(--hair-strong);
  background: var(--card);
  color: var(--oxide-soft);
  font-size: .7rem;
  letter-spacing: .02em;
  transition: scale 160ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
[data-look="emil-redo"] .sound::after { content: ""; position: absolute; inset: -8px -4px; }
[data-look="emil-redo"] .sound:active { scale: .96; }
[data-look="emil-redo"] .sound[aria-pressed="true"] { background: var(--picked-bg); color: var(--picked-text); border-color: transparent; }

[data-look="emil-redo"] .hero h1 {
  font-size: clamp(2.15rem, 9vw, 3.1rem);
  letter-spacing: -.028em;
  line-height: 1.04;
  margin-bottom: .8rem;
}
[data-look="emil-redo"] .hero .sub { font-size: 1rem; line-height: 1.55; max-width: 32ch; }

/* ---------- Buttons ---------- */

[data-look="emil-redo"] .actions { gap: .6rem; max-width: 340px; margin-top: 1.8rem; }
[data-look="emil-redo"] .btn {
  min-height: 52px;
  border-radius: 12px;
  padding: .85rem 1.2rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .005em;
  touch-action: manipulation;
}
[data-look="emil-redo"] .btn:not(.ghost):not(.danger) {
  background: var(--btn-face);
  color: var(--btn-text);
  box-shadow: var(--btn-edge);
}
[data-look="emil-redo"] .btn.ghost { background: var(--ghost-fill); color: var(--oxide); border: 1px solid var(--hair-strong); }

/* Press feedback. `scale` stacks with the page-open rise animation instead of fighting it. */
[data-look="emil-redo"] .actions .btn,
[data-look="emil-redo"] .settings-inner .btn { transition: scale 160ms var(--ease-out), background-color 150ms ease, color 150ms ease; }
[data-look="emil-redo"] .actions .btn:active,
[data-look="emil-redo"] .settings-inner .btn:active { scale: .97; }

/* Call gets a phone icon to match the WhatsApp one */
[data-look="emil-redo"] .actions .btn[href^="tel:"]::before {
  content: "";
  flex: none;
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* "See the catalogue" steps back to a quiet link with a down chevron: two buttons, one link */
[data-look="emil-redo"] .actions .btn.ghost[href="#catalogue"] {
  min-height: 44px;
  border-color: transparent;
  background: none;
  color: var(--oxide-soft);
  gap: .55rem;
}
[data-look="emil-redo"] .actions .btn.ghost[href="#catalogue"]::after {
  content: "";
  flex: none;
  width: .42rem;
  height: .42rem;
  margin-top: -.22rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: translate 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  [data-look="emil-redo"] .btn.ghost:hover,
  [data-look="emil-redo"] .theme-btn:hover,
  [data-look="emil-redo"] .settings-btn:hover { background: var(--tint); }
  [data-look="emil-redo"] .actions .btn.ghost[href="#catalogue"]:hover { background: none; color: var(--oxide); }
  [data-look="emil-redo"] .actions .btn.ghost[href="#catalogue"]:hover::after { translate: 0 2px; }
  [data-look="emil-redo"] .cat-chip:not([aria-pressed="true"]):hover { background: var(--tint); }
}

/* ---------- Sections ---------- */

[data-look="emil-redo"] .band { margin-top: 3rem; border-top: var(--rule); padding-top: 1.75rem; }
[data-look="emil-redo"] .band.has-chain { border-top: 0; padding-top: 0; }
[data-look="emil-redo"] .chain-rule { margin-bottom: 1.6rem; }
[data-look="emil-redo"] .chain-defs { color: var(--chain) !important; }
[data-look="emil-redo"] .band h2 { font-size: 1.5rem; letter-spacing: -.018em; line-height: 1.15; margin-bottom: .55rem; }

/* One label style for every small heading: groups, terms, design facts */
[data-look="emil-redo"] .group h3,
[data-look="emil-redo"] .terms b,
[data-look="emil-redo"] .cat-sheet .facts b {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass);
}
[data-look="emil-redo"] .group h3 { margin-bottom: .2rem; }

[data-look="emil-redo"] .range { gap: 1.7rem; margin-top: 1.2rem; }
[data-look="emil-redo"] .group li { padding: .62rem 0; border-bottom: 1px solid var(--hair); font-size: 1rem; }
[data-look="emil-redo"] .group li:last-child { border-bottom: 0; }
[data-look="emil-redo"] .group li span { font-size: .8rem; margin-top: .08rem; }
@media (min-width: 520px) {
  [data-look="emil-redo"] .range { display: grid; grid-template-columns: 1fr 1fr; gap: 1.7rem 2.2rem; }
}

[data-look="emil-redo"] .terms li { border-bottom: 1px solid var(--hair); padding: .9rem 0; font-size: .95rem; }
[data-look="emil-redo"] .terms li:last-child { border-bottom: 0; }
[data-look="emil-redo"] .terms b { width: 7rem; }

/* About opens with a serif lead line */
[data-look="emil-redo"] .about p { font-size: .96rem; line-height: 1.65; }
[data-look="emil-redo"] .about p:first-of-type {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.55;
  letter-spacing: -.006em;
  color: var(--oxide);
}

[data-look="emil-redo"] .addr { font-size: .95rem; }
[data-look="emil-redo"] .gst { font-size: .76rem; letter-spacing: .03em; font-variant-numeric: tabular-nums; }

[data-look="emil-redo"] footer {
  border-top: 1px solid var(--hair);
  margin-top: 3rem;
  padding: 1.6rem 1.5rem calc(2.2rem + env(safe-area-inset-bottom));
  font-size: .62rem;
  font-weight: 500;
  line-height: 2;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---------- Catalogue ---------- */

[data-look="emil-redo"] .cat-note { font-size: .92rem; margin-bottom: 1.1rem; }
[data-look="emil-redo"] .cat-sample-note {
  font-size: .8rem;
  line-height: 1.5;
  color: var(--kumkum);
  background: color-mix(in srgb, var(--kumkum) 5%, var(--card));   /* a steel plate with a faint rose */
  border: 1px solid color-mix(in srgb, var(--kumkum) 28%, transparent);
  border-radius: 10px;
  padding: .6rem .8rem;
  margin-bottom: 1.1rem;
}

/* Range buttons. Extra room above and below so the focus ring isn't clipped by the scroller;
   the row fades out at the right edge to say "there's more this way". */
[data-look="emil-redo"] .cat-chips {
  gap: .4rem;
  margin: -.4rem -1.5rem .75rem;
  padding: .4rem 1.5rem .45rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 2.25rem), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 2.25rem), transparent);
}
[data-look="emil-redo"] .cat-chip {
  min-height: 40px;
  padding: .4rem .95rem;
  border: 1px solid var(--hair-strong);
  background: var(--ghost-fill);
  font-size: .88rem;
  touch-action: manipulation;
}
[data-look="emil-redo"] .cat-chip span { font-size: .74rem; margin-left: .35rem; font-variant-numeric: tabular-nums; }
[data-look="emil-redo"] .cat-chip[aria-pressed="true"] { background: var(--picked-bg); color: var(--picked-text); border-color: transparent; }
[data-look="emil-redo"] .cat-chip[aria-pressed="true"] span { color: inherit; opacity: .72; }

/* Design cards */
[data-look="emil-redo"] .cat-grid { gap: .8rem; }
[data-look="emil-redo"] .cat-card {
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--card-shadow);
  touch-action: manipulation;
}
[data-look="emil-redo"] .cat-card img,
[data-look="emil-redo"] .cat-card .cat-noimg { filter: var(--img-dim); }
[data-look="emil-redo"] .cat-card .body { padding: .7rem .8rem .85rem; border-top: 1px solid var(--hair); }
[data-look="emil-redo"] .cat-card .name { font-size: 1rem; letter-spacing: -.01em; }
[data-look="emil-redo"] .cat-card .meta { font-size: .74rem; letter-spacing: .01em; margin-top: .22rem; font-variant-numeric: tabular-nums; }

/* "Sample": always on the light picture, so it keeps its own light colours in both modes */
[data-look="emil-redo"] .cat-badge {
  z-index: 1;                /* stays above the picture, which gets its own layer from the night dimming */
  top: .5rem;
  left: .5rem;
  padding: .16rem .5rem;
  font-size: .62rem;
  letter-spacing: .12em;
  border: 0;
  border-radius: 999px;
  background: var(--badge-bg);
  color: #7A1F2B;            /* 8.6:1 on the badge */
  box-shadow: 0 0 0 1px rgba(122, 31, 43, .2), 0 1px 2px rgba(21, 25, 29, .1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ---------- Sheets: design details and Settings ---------- */

[data-look="emil-redo"] dialog.cat-sheet,
[data-look="emil-redo"] dialog.settings-sheet {
  border-radius: 18px 18px 0 0;
  background: var(--sheet-bg);
  box-shadow: 0 -1px 0 var(--hair), 0 -20px 40px -28px rgba(0, 0, 0, .45);
}
[data-look="emil-redo"] .cat-sheet .grab,
[data-look="emil-redo"] .settings-sheet .grab { width: 36px; background: var(--hair-strong); }
[data-look="emil-redo"] .cat-sheet img { border: 1px solid var(--hair); border-radius: 12px; filter: var(--img-dim); }
[data-look="emil-redo"] .cat-sheet h2 { font-size: 1.55rem; letter-spacing: -.02em; }
[data-look="emil-redo"] .cat-sheet .code { font-variant-numeric: tabular-nums; }
[data-look="emil-redo"] .cat-sheet .facts li { align-items: baseline; border-bottom: 1px solid var(--hair); }
[data-look="emil-redo"] .cat-sheet .facts li:last-child { border-bottom: 0; }
[data-look="emil-redo"] .size-chip { border: 1px solid var(--hair-strong); border-radius: 10px; touch-action: manipulation; }
[data-look="emil-redo"] .size-chip[aria-pressed="true"] { background: var(--picked-bg); color: var(--picked-text); border-color: transparent; }
[data-look="emil-redo"] .look-choices button,
[data-look="emil-redo"] .mode-choices button { border-color: var(--hair-strong); }
[data-look="emil-redo"] .look-choices button { border-radius: 12px; }
[data-look="emil-redo"] .mode-choices button { border-radius: 10px; }
[data-look="emil-redo"] .mode-choices button[aria-checked="true"] { background: var(--picked-bg); color: var(--picked-text); border-color: transparent; }

/* ---------- Reduced motion: no added movement ---------- */

@media (prefers-reduced-motion: reduce) {
  [data-look="emil-redo"] .actions .btn:active,
  [data-look="emil-redo"] .settings-inner .btn:active,
  [data-look="emil-redo"] .sound:active { scale: none; }
  [data-look="emil-redo"] .actions .btn.ghost[href="#catalogue"]::after { transition: none; translate: none !important; }
}
