/*
 * base.css — v1.0 (2026-09-16, Phase 2). Reset, document defaults, typography
 * base, layout utilities, animation keyframes and the accessibility floor.
 *
 * ⚠ Box-model (ARCHITECTURE.md R1): this reset is border-box; the exports are
 * content-box. Every width / max-width / flex-basis / min-height / height copied
 * from a design div or anchor must have that element's padding + border added
 * back, or the layout renders narrow/short (44 CBD failures). `.icc-container`
 * stays content-box so the 1180 px max-width matches the export 1:1.
 */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--icc-bg);
  color: var(--icc-body);
  font-family: var(--icc-font-body);
  font-size: 16px;
  line-height: var(--icc-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The hero-wash radial gradient sits on the top-of-page wrapper (#top in the
   exports) — the theme paints it on <body> so every page carries it. */
.icc-page {
  min-width: 320px;
  background: var(--icc-hero-wash);
  background-repeat: no-repeat;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--icc-primary);
  transition: color var(--icc-ease);
}

a:hover {
  color: var(--icc-accent);
}

::selection {
  background: var(--icc-primary);
  color: #fff;
}

input::placeholder,
textarea::placeholder {
  color: var(--icc-placeholder);
}

h1, h2, h3, h4 {
  font-family: var(--icc-font-head);
  color: var(--icc-navy);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ---- Layout utilities ---- */
.icc-container {
  box-sizing: content-box; /* design max-width is content-box; gutters are extra */
  max-width: var(--icc-container);
  margin-inline: auto;
  padding-inline: var(--icc-gutter);
}

.icc-section {
  padding-block: var(--icc-section-y);
}

/* Skip link + screen-reader-only text */
.icc-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: #fff;
  color: var(--icc-navy);
  padding: 12px 20px;
  border-radius: 0 0 var(--icc-r-input) 0;
  font-weight: 600;
  text-decoration: none;
}
.icc-skip-link:focus {
  left: 0;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

/* ---- Accessibility floor (CLAUDE.md): visible focus on every control ---- */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--icc-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Animation keyframes (Konzept B: fadeUpB, floatB(2), dashB, growB) ---- */
@keyframes fadeUpB {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-11px); }
}
@keyframes floatB2 {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50%      { transform: translateY(-9px) rotate(2deg); }
}
@keyframes dashB {
  from { stroke-dashoffset: 2400; }
  to   { stroke-dashoffset: 0; }
}
@keyframes growB {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/*
 * Reduced-motion kill switch (CLAUDE.md accessibility floor, CBD R16). Disables
 * the four Konzept B animations (fadeUpB, growB, dashB, floatB/floatB2) and any
 * transition/animation, so users who ask for less motion get a static page.
 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [style*="animation"],
  .icc-float,
  .icc-hero__float,
  .icc-hero__scene *,
  .icc-hero__scene svg path,
  .icc-chart svg path {
    animation: none !important;
  }
}
