/*  ==========================================================
    BASELINE STYLING
    ========================================================== */

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

html,
body {
  overflow-x: hidden; /* Fallback */
  overflow-x: clip;
}

#noscript-warning {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: #b00020;
    color: #ffffff;
    text-align: center;
    font-weight: 600;
    font-size: 2rem;
    z-index: 9999;
}

body {
  max-inline-size: 100dvi;
  min-block-size: 100dvb;
  text-rendering: optimizeSpeed;
  color: hsl(var(--color-dark));
  font-family: var(--main-font);
  font-optical-sizing: auto;
  font-size: var(--step-0);
  font-weight: var(--fw-medium);
  line-height: var(--base-line-height);
  letter-spacing: var(--tracking);
  text-wrap: pretty;
  word-break: auto-phrase;
}

h1,
h2,
h3 {
  max-inline-size: var(--heading-length);
  line-height: var(--heading-line-height);
  letter-spacing: var(--tracking-s);
  font-family: var(--accent-font);
  text-wrap: balance;
}

h4,
h5,
h6 {
  max-inline-size: var(--text-length);
  line-height: var(--base-line-height);
  letter-spacing: var(--tracking-s);
}

h2,
h3 {
  color: hsl(var(--color-primary));
}

h1 {
  font-size: var(--step-5);
}

h2 {
  font-size: var(--step-4);
}

h3 {
  font-size: var(--step-3);
}

h4 {
  font-size: var(--step-2);
}

h5 {
  font-size: var(--step-1);
}

h6 {
  font-size: var(--step-0);
}

a {
  text-decoration: none;
  color: hsl(var(--color-primary));
}

a:not([class]) {
  text-decoration: underline;
}

p,
li,
a {
  max-inline-size: var(--text-length);
}

ul,
ol {
  list-style: none;
}

/** Text importance */
strong,
b {
  font-family: var(--accent-font);
}

mark {
  padding-inline: 0.25em;
  background-color: hsl(var(--color-primary));
  color: hsl(var(--color-light));
}

address {
  font-style: normal;
}

figure {
  overflow: hidden;
}

figcaption {
  font-style: italic;
}

/** Accessibility */
:focus-visible {
  outline: 2px solid hsl(var(--color-primary));
  outline-offset: 0.5ch;
  border-radius: var(--border-radius);
}

:target {
  margin-block-start: var(--space-xl, 5rem);
}

/* Screen readers can read it */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

input {
  accent-color: hsl(var(--color-primary));
}

input,
textarea {
  inline-size: 100%;
  padding: var(--space-s) var(--space-2xs);
  border: 1px solid hsl(var(--color-primary));
  border-radius: var(--border-radius);
  color: hsl(var(--color-dark));
}

input[type="checkbox"] {
  margin-inline-end: var(--space-xs);
  inline-size: var(--space-s);
  block-size: var(--space-s);
  cursor: pointer;
}

button {
  appearance: none;
  border: none;
}

/* Remove white padding under Google Maps */
iframe {
  display: block !important;
}
