/* dotybooks.com — one stylesheet. Dark theme, system fonts, no framework.
   Mobile-first: the phone view is the design; desktop is the adaptation. */

:root {
  --bg: #0d0f12;
  --surface: #15181d;
  --text: #e8e6e3;
  --muted: #9aa0a8;
  --accent: #e0553f;
  --accent-text: #ffffff;
  --rule: #262b32;
  --measure: 34rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--text);
  text-decoration-color: var(--muted);
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  text-decoration-color: var(--accent);
}

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

/* Layout ------------------------------------------------------------------ */

.site-header,
main,
.site-footer {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

main {
  flex: 1 0 auto;
  padding-block: 1rem 3rem;
}

.site-header {
  padding-block: 1.5rem 0.5rem;
}

.wordmark {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9375rem;
  text-transform: uppercase;
}

.wordmark:hover {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.5rem 2.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

/* Type -------------------------------------------------------------------- */

h1 {
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.5rem 0 0.75rem;
}

p {
  max-width: var(--measure);
}

.lede {
  font-size: 1.1875rem;
  color: var(--text);
  margin-top: 0;
}

.placeholder {
  color: var(--muted);
}

.prose p + p {
  margin-top: 1rem;
}

.hero {
  padding-block: 2rem 1rem;
}

.home-links {
  margin-top: 2.5rem;
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

/* Buttons ----------------------------------------------------------------- */

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.875rem 1.5rem;
  border-radius: 0.375rem;
  min-height: 44px;
}

.button:hover,
.button:focus-visible {
  filter: brightness(1.1);
}

/* Desktop adaptation ------------------------------------------------------ */

@media (min-width: 48rem) {
  body {
    font-size: 1.125rem;
  }

  .hero {
    padding-block: 3.5rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
