/* ==========================================================================
   Base resets and element defaults.
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

/* Set by app.js when this page is running inside an iframe. Scrollbars are
   chrome for a window, and this is not one: in the case study's phone preview
   they eat 15 of 390px and draw a grey rail down the artwork. Scrolling itself
   is untouched — only the indicator goes. */
.is-embedded,
.is-embedded * { scrollbar-width: none; }
.is-embedded ::-webkit-scrollbar,
.is-embedded::-webkit-scrollbar { width: 0; height: 0; }

body {
  margin: 0;
  font: var(--type-body);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
}

h1 { font: var(--type-hero); color: var(--text-primary); }
h2 { font: var(--type-section); }
h3 { font: var(--type-card-title); color: var(--text-primary); }

p { margin: 0; }
/* The UA gives this `margin: 1em 40px`, which indents quoted text away from
   everything beside it. */
blockquote { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--ease-standard);
}
a:hover { opacity: 0.85; }

button { font: inherit; color: inherit; }
img, svg { display: block; }
::placeholder { color: var(--text-placeholder); }

/* Keyboard focus only — the design has no visible focus ring, so supply one
   that reads in both themes without disturbing the mouse-driven visuals. */
:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The inlined <symbol> sprite must not occupy layout. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  flex-shrink: 0;
  width: var(--icon-size, 24px);
  height: var(--icon-size, 24px);
  fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
