@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,350;0,600;1,350;1,600&family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&display=swap");

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

ul,
ol,
dl {
  margin: 0;
  padding: 0;
  list-style: inside;
  ul,
  ol,
  dl {
    padding-inline-start: 2ch;
  }
}

img {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
  border-style: none;
}

input,
select,
textarea,
button {
  font: inherit;
}
label {
  display: block;
}
input:not(
    :where(
        [type="submit"],
        [type="checkbox"],
        [type="radio"],
        [type="button"],
        [type="reset"]
      )
  ) {
  inline-size: 100%;
}

textarea {
  field-sizing: content;
  min-block-size: 5lh;
  inline-size: 100%;
  max-inline-size: 100%;
  resize: vertical;
}

[aria-disabled="true" i],
[disabled] {
  cursor: not-allowed;
}
[hidden] {
  display: none !important;
}
[disabled],
label:has(input[disabled]) {
  opacity: 0.5;

  [disabled] {
    opacity: 1;
  }
}

.visually-hidden:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
:focus-visible {
  outline-offset: 2px;
}

/* global styles */
html {
  font-size: clamp(0.9rem, 0.9rem + 0.35dvw, 1.25rem);
  word-break: break-word;
  scroll-behavior: smooth;
}

:root {
  --faux-white: #fdfcfc;
  --tinted-white: #eae9ec;
  --faux-black: #0b0506;
  --licorice: #1b0e10;
  --lavander-blush: #e9d8e1;
  --timberwolf: #e8dcd8;

  --font-sans: "Jost", sans-serif;
  --font-serif: "Playfair Display", serif;
  --weight-sans-normal: 350;
  --weight-sans-bold: 600;
  --weight-serif-normal: 400;
  --weight-serif-bold: 500;
}

body {
  --border-size: 1px;
  --border: var(--border-size) solid var(--timberwolf);

  color: var(--faux-black);
  background: var(--faux-white);
  font-family: var(--font-sans);
  font-weight: var(--weight-sans-normal);
}

::selection {
  color: var(--licorice);
  background: var(--timberwolf);
}

:is(h1, h2, h3, h4) {
  font-family: var(--font-serif);
  font-weight: var(--weight-serif-bold);
  text-wrap: balance;
  line-height: 1.1;
}

p {
  line-height: 1.5;
}

strong,
b {
  font-weight: var(--weight-sans-bold);
}

a:not([class]) {
  color: inherit;
}

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

a:not([class]):focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

/* layout styles */
.site-nav {
  padding-block: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;

  & > div {
    margin-inline-start: auto;
    display: flex;
    gap: inherit;
  }

  [aria-current="page"] {
    text-decoration: none;
  }
}

.site-footer {
  padding-block: 3rem;
  color: var(--faux-white);
  background: var(--licorice);

  & > * + * {
    margin-block-start: 0.5rem;
    display: block;
  }

  strong {
    font-family: var(--font-serif);
    font-weight: var(--weight-serif-bold);
    font-size: 2rem;
  }

  em {
    font-style: normal;
  }
}

.site-header {
  text-align: center;
  padding-block: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-family: var(--font-serif);
  font-weight: var(--weight-serif-normal);
}

/* 
three-rows root layout

.layout
  nav.site-nav
  ...       <-- add markup here
  footer.site-footer
*/
.layout {
  border-inline: var(--border);
  max-inline-size: 60rem;
  margin-inline: auto;
  min-block-size: 100svb;
  display: flex;
  flex-direction: column;

  & > * {
    padding-inline: 1rem;
  }

  & > footer.site-footer {
    margin-block-start: auto;
  }

  & > * + * {
    border-block-start: var(--border);
  }
}

.switcher {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap, 0rem);
  align-items: var(--alignment, start);
}

.switcher > * {
  flex-grow: 1;
  flex-basis: calc((var(--switch-width, 40rem) - 100%) * 999);
}

.flow > * + * {
  margin-block-start: var(--gap-y, 0.5rem);
}

.region {
  padding-block: var(--space-y, 1rem);
}

/* useful classes */
.message {
  --_color: #ffb900;
  font-weight: var(--weight-sans-bold);
  inline-size: 100%;
  max-inline-size: 40ch;
  margin-inline: auto;
  padding: 1rem 0.5rem;
  border-inline-start: 5px solid var(--_color);
  background: oklch(from var(--_color) l c h / 0.1);

  &.success {
    --_color: #00bc7d;
  }

  &.error {
    --_color: #fb2c36;
  }
}

cookie-banner {
  --color--text: var(--licorice);
  --color--surface: var(--faux-white);
  --color-shadow: oklch(from var(--licorice) l c h / 0.5);
}
