/* ============================================================
   AboutDigitalCameras.com — Modern CSS Reset
   /css/reset.css
   ============================================================ */

/* Box sizing for all elements */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Set core root defaults */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

/* Core body defaults */
body {
  font-family:      var(--font-body);
  font-size:        var(--text-base);
  line-height:      var(--leading-base);
  background-color: var(--clr-bg);
  color:            var(--clr-text);
  min-height:       100vh;
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration:       0.01ms !important;
    scroll-behavior:           auto !important;
  }
}

/* Focus styles — accessible outline */
:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Anchor base */
a {
  color: var(--clr-link);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--clr-link-hover);
  text-decoration: underline;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family:  var(--font-heading);
  font-weight:  var(--fw-bold);
  line-height:  var(--leading-tight);
  color:        var(--clr-text);
}

h1 { font-size: var(--text-2xl); margin-top: var(--space-8); }
h2 { font-size: var(--text-xl);  margin-top: var(--space-10); }
h3 { font-size: var(--text-lg);  margin-top: var(--space-6); }
h4 { font-size: var(--text-md);  margin-top: var(--space-4); }

/* Paragraph and list base */
p  { line-height: var(--leading-base); }
li { line-height: var(--leading-base); margin-bottom: var(--space-1); }
ul, ol { margin: var(--space-4) 0; padding-left: var(--space-6); }

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin: var(--space-8) 0;
}

/* Inline code */
code {
  font-family:      var(--font-mono);
  font-size:        0.9em;
  background:       var(--clr-bg-muted);
  padding:          0.1em 0.4em;
  border-radius:    var(--radius-sm);
}

/* Code block */
pre {
  font-family:   var(--font-mono);
  background:    var(--clr-bg-muted);
  border:        1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding:       var(--space-4) var(--space-6);
  overflow-x:    auto;
  font-size:     var(--text-sm);
  line-height:   1.7;
}

pre code {
  background: transparent;
  padding:    0;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--clr-primary);
  padding:     var(--space-3) var(--space-6);
  margin:      var(--space-6) 0;
  color:       var(--clr-text-muted);
  font-style:  italic;
  background:  var(--clr-primary-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Table base */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: var(--text-sm);
}

th, td {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--clr-border);
  text-align: left;
}

th {
  background:  var(--clr-bg-muted);
  font-weight: var(--fw-bold);
  color:       var(--clr-text);
}

/* Inline elements */
strong { font-weight: var(--fw-bold); }
em     { font-style: italic; }
small  { font-size: var(--text-sm); }
abbr   { text-decoration: underline dotted; cursor: help; }
mark   { background: #fef08a; padding: 0 0.2em; border-radius: 2px; }

/* Skip to content link (accessibility) */
.skip-link {
  position:   absolute;
  top:        -100%;
  left:       var(--space-4);
  background: var(--clr-primary);
  color:      #fff;
  padding:    var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight:   var(--fw-bold);
  z-index:    var(--z-toast);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}
