/* Base: font, layout shell, skip link, focus, screen-reader */
@font-face {
  font-family: "StoryScript";
  src: url("../StoryScript-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--t-bg);
  color: var(--t-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 1 0%;
}

.hero-section {
  min-height: 28rem;
}

html,
body {
  background: var(--t-bg);
  color: var(--t-text);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(201, 168, 106, 0.14), transparent 60%),
    radial-gradient(1000px 700px at 90% 0%, rgba(110, 231, 183, 0.07), transparent 55%),
    linear-gradient(180deg, #0b0d10, #07080a 70%);
}

html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] input:focus-visible,
html[data-theme="dark"] select:focus-visible,
html[data-theme="dark"] textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--t-focus);
}

/* Headings in main content */
main h1,
main h2,
main h3 {
  font-family: "StoryScript", system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.08;
}

main h1 {
  font-size: clamp(1.875rem, 1.5rem + 1.2vw, 2.5rem);
}
main h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
}
main h3 {
  color: var(--t-muted);
  font-weight: 400;
  font-size: clamp(1.125rem, 1rem + 0.35vw, 1.35rem);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: #1a1d21;
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: top var(--t) var(--ease);
}

.skip-link:focus {
  top: 0.5rem;
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

html[data-theme="dark"] .skip-link:focus {
  outline-color: var(--gold);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
