/*
  Yuzuctus - Desert Vivant Base
  Reset, typography, links, focus - the ground we walk on.
  Refined: high contrast ink, wordmark, continuous canvas body.
*/

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  scrollbar-gutter: auto;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--fg);
  background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color var(--dur-slow) var(--ease-swish);
}

@supports (-moz-appearance: none) {
  html,
  body {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  }
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0.62rem;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: none;
  border-radius: var(--radius-full);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active {
  background: var(--scrollbar-thumb-active);
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

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

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

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

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-swish);
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--fg);
}

h1 {
  font-size: var(--text-hero);
  font-weight: var(--weight-black);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
}

h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

h4 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

p {
  max-width: 42rem;
  line-height: var(--leading-relaxed);
}

strong {
  font-weight: var(--weight-semibold);
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-tinted);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

.icon-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-brand {
  fill: currentColor;
  stroke: none;
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-black);
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  letter-spacing: -0.02em;
}

.wordmark-first {
  font-weight: var(--weight-black);
  color: var(--fg);
}

.wordmark-rest {
  font-weight: var(--weight-medium);
  color: var(--accent-strong);
  letter-spacing: 0.01em;
}

[data-theme="night"] .wordmark-first {
  color: var(--fg);
}

[data-theme="night"] .wordmark-rest {
  color: var(--accent-strong);
}
