@layer base {
  :root {
    --color-ivory: #f4f0e8;
    --color-ivory-deep: #e9e2d6;
    --color-graphite: #252a29;
    --color-petrol: #123f46;
    --color-petrol-hover: #0d3137;
    --color-petrol-light: #d6e3e1;
    --color-amber: #b98235;
    --color-amber-hover: #986a2a;
    --color-steel: #a9b0ad;
    --color-ceramic: #d8d2c8;
    --color-smoked-glass: #465252;
    --color-wood: #8a6246;
    --color-white: #fffdf8;
    --color-line: #d3cdc2;

    --font-heading: Manrope, ui-sans-serif, system-ui, sans-serif;
    --font-body: Inter, ui-sans-serif, system-ui, sans-serif;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    --radius-md: 0.375rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;

    --shadow-floating: 0 8px 24px rgb(37 42 41 / 0.08);
    --focus-ring: 0 0 0 2px var(--color-amber);
    --focus-offset: 0 0 0 4px var(--color-ivory);
  }

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

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

  body {
    min-width: 0;
    margin: 0;
    overflow-x: clip;
    background: var(--color-ivory);
    color: var(--color-graphite);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  img,
  picture,
  svg,
  video,
  canvas {
    display: block;
    max-width: 100%;
  }

  img {
    height: auto;
  }

  button,
  input,
  select,
  textarea {
    margin: 0;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
  }

  button,
  select {
    text-transform: none;
  }

  button,
  [type="button"],
  [type="reset"],
  [type="submit"] {
    cursor: pointer;
  }

  button:disabled,
  [type="button"]:disabled,
  [type="reset"]:disabled,
  [type="submit"]:disabled {
    cursor: not-allowed;
  }

  textarea {
    min-height: 6rem;
    resize: vertical;
  }

  input,
  select,
  textarea {
    border-radius: var(--radius-md);
  }

  input::placeholder,
  textarea::placeholder {
    color: color-mix(in srgb, var(--color-graphite) 58%, transparent);
    opacity: 1;
  }

  [type="search"] {
    appearance: none;
    -webkit-appearance: none;
  }

  [type="search"]::-webkit-search-decoration,
  [type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
  }

  [type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
  }

  [type="number"]::-webkit-inner-spin-button,
  [type="number"]::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }

  :where(a) {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
  }

  :where(a[href]) {
    text-decoration-skip-ink: auto;
  }

  :where(h1, h2, h3, h4, h5, h6) {
    margin: 0;
    color: var(--color-graphite);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    text-wrap: balance;
  }

  h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1;
  }

  h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
  }

  h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
  }

  :where(p, ul, ol, dl, figure, blockquote) {
    margin: 0;
  }

  :where(ul, ol) {
    padding-left: 1.25rem;
  }

  :where(li)::marker {
    color: var(--color-petrol);
  }

  :where(hr) {
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--color-line);
  }

  :where(table) {
    width: 100%;
    border-collapse: collapse;
    border-color: var(--color-line);
  }

  :where(th) {
    font-family: var(--font-heading);
    font-weight: 700;
    text-align: left;
  }

  :where(th, td) {
    padding: var(--space-3) var(--space-4);
    border-color: var(--color-line);
    vertical-align: top;
  }

  :where(summary) {
    cursor: pointer;
  }

  :where(label) {
    font-weight: 600;
  }

  :where(fieldset) {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  :where(legend) {
    padding: 0;
    font-family: var(--font-heading);
    font-weight: 700;
  }

  :where(:focus-visible) {
    outline: 2px solid var(--color-amber);
    outline-offset: 2px;
  }

  :where(input, select, textarea):focus-visible {
    border-color: var(--color-petrol);
    box-shadow: var(--focus-ring), var(--focus-offset);
    outline: 0;
  }

  :where([aria-invalid="true"]) {
    border-color: #a83f36;
  }

  :where([hidden]) {
    display: none !important;
  }

  ::selection {
    background: var(--color-petrol-light);
    color: var(--color-graphite);
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }

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