/*
 * burrowreading.com (SITE-001). Colors are Burrow Tokens (Figma page 04, collection 211:285),
 * copied from the app's src/theme/tokens.ts; layout and type follow Figma page 05.
 */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/newsreader-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/newsreader-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --background-canvas: #f7f4ee;
  --surface-nook: #efe3cf;
  --text-primary: #242923;
  --text-secondary: #555c53;
  --accent-text: #344b3b;
  --border-hairline: #ddd6c9;
  --border-focus: #344b3b;
  /* web/lamp-glow: off in Light. */
  --lamp-glow: none;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-canvas: #1b1916;
    --surface-nook: #2f2a23;
    --text-primary: #ece5d8;
    --text-secondary: #ada597;
    --accent-text: #a9c4a7;
    --border-hairline: #3a362f;
    --border-focus: #a9c4a7;
    /* web/lamp-glow: on in Dark (Figma 266:336). */
    --lamp-glow: radial-gradient(
      50% 50% at 50% 50%,
      rgba(245, 199, 128, 0.46) 0%,
      rgba(245, 199, 128, 0.16) 50%,
      rgba(245, 199, 128, 0) 100%
    );
  }
}

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

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

body {
  margin: 0;
  background: var(--background-canvas);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:focus-visible {
  outline: 1.5px solid var(--border-focus);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Links inside running text are underlined, so they never rely on color alone. */
.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
}
.skip-link:focus {
  left: 24px;
  z-index: 1;
  background: var(--background-canvas);
  padding: 8px 12px;
}

.wrap {
  width: min(var(--wrap, 1120px), 100% - 48px);
  margin-inline: auto;
}
.wrap--doc {
  --wrap: 1040px;
}

/* Header (all pages) */
.site-header {
  padding-top: 28px;
}
.site-header--doc {
  padding-bottom: 28px;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}
.wordmark {
  margin-right: auto;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 32px;
  color: var(--text-primary);
}
.wordmark:hover {
  text-decoration: none;
}
.nav-link {
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
}

/* Landing hero (Figma 266:174 desktop / 266:206 mobile) */
.hero {
  padding: 72px 0 88px;
  /* The phone art box (420 px) is wider than the column; clip it here so the page never
     scrolls sideways (Codex review). */
  overflow-x: hidden;
  overflow-x: clip;
}
.hero .wrap {
  display: flex;
  align-items: center;
  gap: 72px;
}
.hero-text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 64px;
  line-height: 70px;
  letter-spacing: -0.64px;
}
.hero-lead {
  font-size: 20px;
  line-height: 32px;
  color: var(--text-secondary);
}
.hero-status {
  font-weight: 500;
  font-size: 15px;
  line-height: 22px;
  color: var(--accent-text);
}

.hero-art {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* 580x410 art box: the nook (460x350 at 60,30) plus the dark-only lamp glow behind it. */
.nook-box {
  position: relative;
  width: 580px;
  height: 410px;
}
.nook-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: -10px;
  width: 100%;
  height: 100%;
  background: var(--lamp-glow);
  pointer-events: none;
}
.nook {
  position: absolute;
  left: 60px;
  top: 30px;
  width: 460px;
  height: 350px;
  overflow: hidden;
  background: var(--surface-nook);
  border-radius: 230px 230px 28px 28px;
}
.creature {
  position: absolute;
  left: 36.4px;
  top: 22.2px;
  width: 387.2px;
  height: 316.8px;
}
.creature picture,
.creature img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* Privacy line */
.privacy-line {
  padding-bottom: 64px;
}
.privacy-line .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  font-size: 16px;
  line-height: 24px;
}
.privacy-line p {
  flex: 1 1 0;
  color: var(--text-secondary);
}
.privacy-line a {
  flex: none;
  font-weight: 500;
}

/* Landing footer */
.site-footer {
  padding-bottom: 40px;
  font-size: 14px;
  line-height: 20px;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}
.copyright {
  margin-right: auto;
  color: var(--text-secondary);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  list-style: none;
  padding: 0;
}
/* 28 px tall tap targets (WCAG 2.2 target size) without moving the 20 px text lines. */
.footer-links a {
  display: inline-block;
  padding-block: 4px;
  margin-block: -4px;
}
.footer-links li + li::before {
  content: "·";
  margin-right: 8px;
  color: var(--accent-text);
}

/* Document pages (Figma 265:123 support / 265:235 privacy) */
.doc {
  padding: 40px 0 72px;
}
.doc .wrap {
  --wrap: 720px;
}
.prose {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 18px;
  line-height: 29px;
}
.prose h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -0.24px;
}
.prose .updated {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}
.prose .lead {
  font-size: 19px;
  line-height: 31px;
  color: var(--text-secondary);
}
.prose h2 {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 36px;
}
.prose h3 {
  font-weight: 600;
  font-size: 19px;
  line-height: 28px;
}
.prose ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  padding: 0;
}
.prose li {
  display: flex;
  gap: 0.6em;
}
.prose li::before {
  content: "—";
  flex: none;
}
.prose .details {
  font-size: 17px;
  line-height: 27px;
  color: var(--text-secondary);
}
.prose .callout {
  padding: 24px;
  border-radius: 16px;
  background: var(--surface-nook);
}

.doc-footer {
  padding: 32px 0 48px;
}
.doc-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border-hairline);
  font-size: 15px;
  line-height: 22px;
}
.doc-footer .email {
  font-weight: 500;
}
.doc-footer .copyright {
  font-size: 14px;
  line-height: 20px;
}

/* Between desktop and phone: stack the hero, art first, at the desktop size. */
@media (max-width: 1099px) {
  .hero .wrap {
    flex-direction: column-reverse;
    gap: 32px;
  }
  .hero-text {
    max-width: 720px;
  }
}

/* Phone (Figma 390 frames) */
@media (max-width: 639px) {
  .hero {
    padding: 24px 0 40px;
  }
  .hero .wrap {
    gap: 20px;
  }
  .hero-text {
    gap: 16px;
  }
  .hero-title {
    font-size: 38px;
    line-height: 44px;
    letter-spacing: -0.38px;
  }
  .hero-lead {
    font-size: 17px;
    line-height: 26px;
  }
  /* 420x290 art box, wider than the column: the glow may bleed into the margins. */
  .nook-box {
    width: 420px;
    height: 290px;
    margin-inline: -39px;
  }
  .nook {
    width: 300px;
    height: 230px;
    border-radius: 150px 150px 18px 18px;
  }
  .creature {
    left: 22.4px;
    top: 14.2px;
    width: 255.2px;
    height: 208.8px;
  }
  .privacy-line {
    padding-bottom: 40px;
  }
  .privacy-line .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .doc {
    padding: 16px 0 40px;
  }
  .prose {
    font-size: 17px;
    line-height: 26px;
  }
  .prose h1 {
    font-size: 34px;
    line-height: 40px;
    letter-spacing: -0.17px;
  }
  .prose .lead {
    font-size: 18px;
    line-height: 28px;
  }
  .prose h2 {
    margin-top: 10px;
    font-size: 24px;
    line-height: 30px;
  }
  .prose h3 {
    font-size: 17px;
    line-height: 26px;
  }
}
