/* chrome.css: shared styles for the near-black "chrome mark" pages (index.html, audit.html).
 * Page layout is inline in the markup (ported from the approved designs); this file holds
 * what inline styles cannot: the font, resets, the chrome button, focus and motion rules.
 * Figtree is licensed under the SIL Open Font License 1.1. */

@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(./fonts/figtree-latin-ext-var-bf7828e2.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(./fonts/figtree-latin-var-4ba7d3d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: #0D0E11; color: #E8E6E1; font-family: 'Figtree', system-ui, sans-serif; }
button, input { font: inherit; }
a { color: #A3A09A; }
a:hover { color: #E8E6E1; }
img, svg, canvas { max-width: 100%; }

/* Black chrome button: dark glossy body, chrome rim with purple and teal bands. */
.chrome-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.10) 48%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.28) 100%) padding-box,
    linear-gradient(115deg, #0B0B0F 0%, #1B1B22 14%, #3A3358 26%, #0E0E12 38%, #17323A 52%, #07070A 64%, #2A2342 78%, #101015 100%) padding-box,
    linear-gradient(115deg, #FAF9F7 0%, #8F8D87 18%, #B7A2FF 34%, #ECEAE6 50%, #7FE3F5 66%, #8F8D87 82%, #FAF9F7 100%) border-box;
  background-size: 100% 100%, 260% 100%, 260% 100% !important;
  border: 1.5px solid transparent;
  color: #FFFFFF;
  text-shadow: 0 1px 0 rgba(0,0,0,0.95), 0 0 14px rgba(183,162,255,0.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -3px 5px rgba(0,0,0,0.65), 0 2px 0 rgba(0,0,0,0.6), 0 12px 26px rgba(0,0,0,0.55), 0 0 28px rgba(157,140,255,0.24);
  animation: chromeflow 9s ease-in-out infinite alternate;
  transition: transform .15s ease, filter .15s ease;
}
.chrome-btn:hover { color: #FFFFFF; filter: brightness(1.12); transform: translateY(-1px); animation-duration: 3.5s; }
.chrome-btn:active { transform: translateY(1px); filter: brightness(0.96); }
.chrome-btn:disabled { cursor: progress; filter: brightness(0.85); }
@keyframes chromeflow {
  from { background-position: 0 0, 0% 50%, 0% 50%; }
  to { background-position: 0 0, 100% 50%, 100% 50%; }
}

summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] .faq-plus { transform: rotate(45deg); }

/* Keyboard focus, visible on the near-black page. */
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid #9D8CFF;
  outline-offset: 3px;
}
input:focus-visible { border-color: #9D8CFF !important; }
input[aria-invalid="true"] { border-color: #F2B84B !important; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; margin: 0; padding: 10px 16px; clip: auto; z-index: 10; border-radius: 999px; background: #E8E6E1; color: #0D0E11; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chrome-btn { animation: none; transition: none; }
  .chrome-btn:hover, .chrome-btn:active { transform: none; }
}

/* Toasts (app.js showToast) */
.toast-container { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { max-width: 440px; box-sizing: border-box; padding: 12px 18px; border-radius: 14px; border: 1px solid #282C34; background: #101216; color: #E8E6E1; font-size: 14.5px; line-height: 1.4; box-shadow: 0 12px 32px rgba(0,0,0,0.5); transition: opacity .2s ease, transform .2s ease; }
.toast--error { border-color: rgba(242,184,75,0.5); }
.toast--success { border-color: rgba(46,230,166,0.5); }
.toast--hiding { opacity: 0; transform: translateY(6px); }

[hidden] { display: none !important; }
