/**
 * Stupina Popoviciu — Base reset, typography, elements
 */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sp-font-body);
  font-size: var(--sp-fs-base);
  font-weight: var(--sp-fw-regular);
  line-height: var(--sp-lh-body);
  color: var(--sp-text);
  background-color: var(--sp-bg);
  background-image: var(--sp-texture-cream);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.sp-nav-open,
body.sp-drawer-open,
body.sp-modal-open {
  overflow: hidden;
}

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

img {
  border-style: none;
}

svg:not([fill]) {
  fill: none;
}

iframe {
  border: 0;
  max-width: 100%;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: var(--sp-deep-honey);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--sp-duration-fast) var(--sp-ease);
}

a:hover {
  color: var(--sp-brown);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid var(--sp-honey);
  outline-offset: 2px;
  box-shadow: var(--sp-shadow-focus);
}

:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--sp-space-4);
  font-family: var(--sp-font-display);
  font-weight: var(--sp-fw-semibold);
  line-height: var(--sp-lh-tight);
  letter-spacing: var(--sp-tracking-tight);
  color: var(--sp-charcoal);
  text-wrap: balance;
}

h1 {
  font-size: var(--sp-fs-5xl);
  font-weight: var(--sp-fw-bold);
}

h2 {
  font-size: var(--sp-fs-4xl);
}

h3 {
  font-size: var(--sp-fs-3xl);
}

h4 {
  font-size: var(--sp-fs-2xl);
}

h5 {
  font-size: var(--sp-fs-xl);
  font-family: var(--sp-font-body);
  font-weight: var(--sp-fw-semibold);
  letter-spacing: 0;
}

h6 {
  font-size: var(--sp-fs-sm);
  font-family: var(--sp-font-body);
  font-weight: var(--sp-fw-semibold);
  letter-spacing: var(--sp-tracking-wide);
  text-transform: uppercase;
  color: var(--sp-text-muted);
}

p {
  margin: 0 0 var(--sp-space-4);
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 var(--sp-space-4);
  padding-left: 1.25rem;
}

li {
  margin-bottom: var(--sp-space-1);
}

li::marker {
  color: var(--sp-premium-gold);
}

blockquote {
  margin: 0 0 var(--sp-space-6);
  padding: var(--sp-space-5) var(--sp-space-6);
  border-left: 3px solid var(--sp-honey);
  background: var(--sp-honey-soft);
  border-radius: 0 var(--sp-radius-md) var(--sp-radius-md) 0;
  font-family: var(--sp-font-display);
  font-size: var(--sp-fs-xl);
  font-style: italic;
  line-height: var(--sp-lh-snug);
  color: var(--sp-brown);
}

hr {
  border: 0;
  height: 1px;
  margin: var(--sp-space-8) 0;
  background: var(--sp-border);
}

strong,
b {
  font-weight: var(--sp-fw-semibold);
}

small {
  font-size: var(--sp-fs-sm);
}

code,
kbd,
samp {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--sp-surface-muted);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

pre {
  overflow-x: auto;
  padding: var(--sp-space-5);
  background: var(--sp-charcoal);
  color: var(--sp-cream);
  border-radius: var(--sp-radius-md);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-space-6);
}

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

th {
  font-weight: var(--sp-fw-semibold);
  color: var(--sp-brown);
  font-size: var(--sp-fs-sm);
}

figure {
  margin: 0 0 var(--sp-space-6);
}

figcaption {
  margin-top: var(--sp-space-2);
  font-size: var(--sp-fs-sm);
  color: var(--sp-text-muted);
}

::selection {
  background: var(--sp-honey-mid);
  color: var(--sp-charcoal);
}

.sp-skip-link {
  position: absolute;
  left: var(--sp-gutter);
  top: -100%;
  z-index: calc(var(--sp-z-cookie) + 1);
  padding: var(--sp-space-3) var(--sp-space-5);
  background: var(--sp-charcoal);
  color: var(--sp-cream);
  border-radius: var(--sp-radius-sm);
  text-decoration: none;
  font-weight: var(--sp-fw-semibold);
}

.sp-skip-link:focus {
  top: var(--sp-space-3);
  color: var(--sp-cream);
}

.screen-reader-text,
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.alignleft {
  float: left;
  margin: 0 var(--sp-space-5) var(--sp-space-4) 0;
}

.alignright {
  float: right;
  margin: 0 0 var(--sp-space-4) var(--sp-space-5);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignwide {
  max-width: var(--sp-container-wide);
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: var(--sp-fs-sm);
  color: var(--sp-text-muted);
}

.has-drop-cap:not(:focus)::first-letter {
  float: left;
  font-family: var(--sp-font-display);
  font-size: 3.4em;
  line-height: 0.85;
  font-weight: var(--sp-fw-bold);
  margin: 0.08em 0.12em 0 0;
  color: var(--sp-deep-honey);
}
