/* ==========================================================================
   pitch. — Modern CSS Reset
   ==========================================================================
   Purpose:
   - Normalize browser defaults
   - Improve cross-browser consistency
   - Establish predictable box sizing
   - Improve typography rendering
   - Remove unwanted default spacing
   - Preserve accessibility
   - Prepare the project for the pitch. design system

   NOTE:
   This file contains NO project-specific visual styling.
   ========================================================================== */

/* ==========================================================================
   1. BOX SIZING
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ==========================================================================
   2. DOCUMENT
   ========================================================================== */

html {
  margin: 0;
  padding: 0;

  min-width: 320px;

  font-size: 100%;
  line-height: 1.15;

  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;

  -webkit-tap-highlight-color: transparent;

  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

/* ==========================================================================
   3. BODY
   ========================================================================== */

body {
  margin: 0;
  padding: 0;

  min-height: 100vh;
  min-height: 100dvh;

  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

p {
  overflow-wrap: break-word;
}

/* ==========================================================================
   5. LISTS
   ========================================================================== */

ul,
ol,
menu {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

/* ==========================================================================
   6. LINKS
   ========================================================================== */

a {
  color: inherit;
  text-decoration: none;
}

a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */

button,
input,
optgroup,
select,
textarea {
  margin: 0;
  padding: 0;

  font: inherit;
  color: inherit;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  appearance: none;
  -webkit-appearance: none;

  border: 0;
  background: none;

  cursor: pointer;
}

button:disabled,
[type="button"]:disabled,
[type="reset"]:disabled,
[type="submit"]:disabled {
  cursor: not-allowed;
}

/* ==========================================================================
   8. FORM CONTROLS
   ========================================================================== */

input,
textarea,
select {
  border: 0;
  border-radius: 0;

  outline: none;
}

textarea {
  resize: vertical;
}

select {
  cursor: pointer;
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
}

/* ==========================================================================
   9. ACCESSIBILITY — FOCUS
   ========================================================================== */

/*
   Do not remove focus outlines globally.
   The actual visual focus style will be defined
   in the design system.
*/

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ==========================================================================
   10. MEDIA
   ========================================================================== */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

img {
  vertical-align: middle;
}

svg {
  flex-shrink: 0;
}

/* ==========================================================================
   11. FIGURES
   ========================================================================== */

figure,
figcaption {
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   12. TABLES
   ========================================================================== */

table {
  width: 100%;

  border-collapse: collapse;
  border-spacing: 0;

  text-indent: 0;
}

/* ==========================================================================
   13. MEDIA / EMBEDS
   ========================================================================== */

iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

/* ==========================================================================
   14. FIELDSETS
   ========================================================================== */

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;

  border: 0;
}

/* ==========================================================================
   15. BLOCKQUOTES / QUOTES
   ========================================================================== */

blockquote,
q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: "";
}

/* ==========================================================================
   16. CODE
   ========================================================================== */

pre,
code,
kbd,
samp {
  font-family: monospace;
}

pre {
  overflow: auto;
}

/* ==========================================================================
   17. HR
   ========================================================================== */

hr {
  height: 0;
  margin: 0;

  border: 0;
  border-top: 1px solid currentColor;
}

/* ==========================================================================
   18. DETAILS / SUMMARY
   ========================================================================== */

summary {
  cursor: pointer;
}

/* ==========================================================================
   19. HIDDEN
   ========================================================================== */

[hidden] {
  display: none !important;
}

/* ==========================================================================
   20. ABORT DEFAULT DIALOG SPACING
   ========================================================================== */

dialog {
  padding: 0;
}

/* ==========================================================================
   21. REDUCED MOTION
   ========================================================================== */

/*
   Respect users who request reduced motion.
   Components can still override this where necessary,
   but normal animations/transitions should be disabled.
*/

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   22. PRINT
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    box-shadow: none !important;
    color: #000 !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre,
  blockquote {
    border: 1px solid #999;

    page-break-inside: avoid;
  }

  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  img {
    max-width: 100% !important;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
