:root {
  /* Brand palette */
  --surface: #DDE7E4;
  --foreground: #1A3D3F;
  /* Landing page tokens */
  --bg: #DDE7E4;
  --ink: #1A3D3F;
  --ink-mid: rgba(26, 61, 63, 0.55);
  --ink-faint: rgba(26, 61, 63, 0.35);
  --accent: #1A3D3F;
  /* Doc-page aliases */
  --background: #DDE7E4;
  --text: #1A3D3F;
  --muted: rgba(26, 61, 63, 0.6);
  --faint: rgba(26, 61, 63, 0.3);
  --rule: rgba(26, 61, 63, 0.14);
}

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

html {
  background: var(--background);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, "Times New Roman", serif;
}

/* Overflow-lock the viewport on the home page only */
html:has(body.home) {
  overflow: hidden;
  height: 100%;
}

body {
  min-height: 100vh;
  background: var(--background);
}

a {
  color: inherit;
  text-decoration-color: rgba(26, 61, 63, 0.45);
  text-underline-offset: 0.18em;
}

/* ===== Home page ===== */

body.home {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: max(32px, env(safe-area-inset-top)) 40px max(32px, env(safe-area-inset-bottom));
  overflow: hidden;
}

/* ===== Ambient washes ===== */

.field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  will-change: transform;
  opacity: 0.55;
}

.blob-1 {
  width: 740px;
  height: 740px;
  background: radial-gradient(circle, rgba(100, 175, 170, 0.55) 0%, rgba(100, 175, 170, 0) 65%);
  top: -20%;
  left: -15%;
  animation: drift-a 36s ease-in-out infinite;
}

.blob-2 {
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(80, 155, 150, 0.45) 0%, rgba(80, 155, 150, 0) 65%);
  bottom: -25%;
  right: -10%;
  animation: drift-b 42s ease-in-out infinite;
}

.blob-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(120, 190, 185, 0.55) 0%, rgba(120, 190, 185, 0) 65%);
  top: 30%;
  left: 50%;
  animation: drift-c 48s ease-in-out infinite;
}

.blob-4 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(90, 165, 160, 0.45) 0%, rgba(90, 165, 160, 0) 65%);
  bottom: 20%;
  left: 20%;
  animation: drift-d 54s ease-in-out infinite;
}

/* ===== Vignette ===== */

.vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 55%,
    rgba(26, 61, 63, 0.04) 95%,
    rgba(26, 61, 63, 0.08) 100%
  );
}

/* ===== Grain (paper texture) ===== */

.grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* ===== Foreground content ===== */

.wordmark,
.definitions {
  position: relative;
  z-index: 5;
}

.wordmark {
  text-align: center;
  transform: translateY(-2vh);
}

.wordmark-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: clamp(38px, 5.2vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--foreground);
  font-variation-settings: "opsz" 14, "SOFT" 30;
  text-transform: lowercase;
  text-shadow: 0 0 28px rgba(26, 61, 63, 0.10);
  text-decoration: none;
  display: inline-block;
  will-change: transform;
  transition: text-shadow 0.6s ease, transform 0.6s ease;
}

.wordmark-title:hover {
  text-shadow: 0 0 38px rgba(26, 61, 63, 0.28);
  transform: scale(1.015);
}

.wordmark-pron {
  margin-top: 14px;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mid);
  letter-spacing: 0.06em;
}

.definitions {
  width: 100%;
  max-width: 580px;
  font-family: 'EB Garamond', serif;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  opacity: 0.34;
  transition: opacity 1.2s ease;
}

.definitions:hover {
  opacity: 0.88;
}

.def-entry {
  margin-bottom: 14px;
  padding-left: 22px;
  position: relative;
}

.def-entry:last-child {
  margin-bottom: 0;
}

.def-num {
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--ink-mid);
  font-size: 14px;
}

.def-pos {
  font-style: italic;
  color: var(--ink-mid);
  margin-right: 6px;
}

.accent {
  color: var(--accent);
}

.def-example {
  display: block;
  font-style: italic;
  color: var(--ink-mid);
  margin-top: 2px;
  font-size: 14.5px;
}

/* ===== Doc pages (privacy, terms, delete-account) ===== */

.page {
  min-height: 100vh;
  padding: 44px 20px 72px;
}

.doc {
  width: min(720px, 100%);
  margin: 0 auto;
}

.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.doc-wordmark {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}


.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}

.doc h1 {
  margin: 34px 0 8px;
  font-size: clamp(36px, 8vw, 64px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.95;
}

.doc h2 {
  margin: 34px 0 10px;
  font-size: 24px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.doc p,
.doc li {
  color: rgba(26, 61, 63, 0.82);
  font-size: 17px;
  line-height: 1.65;
}

.doc p {
  margin: 12px 0;
}

.doc ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.effective {
  color: var(--muted);
  font-size: 16px;
  font-style: italic;
}

.callout {
  margin: 28px 0;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

/* ===== Stitch mark ===== */

.stitch-mark {
  position: fixed;
  top: 24px;
  left: 24px;
  color: var(--foreground);
  z-index: 10;
  line-height: 0;
}

/* ===== Keyframes ===== */

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33%       { transform: translate(18vw, 22vh) scale(1.15) rotate(60deg); }
  66%       { transform: translate(32vw, 4vh) scale(0.92) rotate(120deg); }
}

@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50%       { transform: translate(-22vw, -18vh) scale(1.22) rotate(90deg); }
}

@keyframes drift-c {
  0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  25%       { transform: translate(-28%, -72%) scale(1.12) rotate(45deg); }
  50%       { transform: translate(-72%, -52%) scale(0.93) rotate(90deg); }
  75%       { transform: translate(-50%, -28%) scale(1.06) rotate(135deg); }
}

@keyframes drift-d {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(20vw, -15vh) scale(1.18); }
  80%       { transform: translate(-10vw, 10vh) scale(0.95); }
}

/* ===== Responsive ===== */

@media (prefers-reduced-motion: reduce) {
  .blob {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .stitch-mark {
    top: 16px;
    left: 16px;
  }

  .stage {
    padding: max(28px, env(safe-area-inset-top)) 26px max(28px, env(safe-area-inset-bottom));
  }

  .wordmark-title {
    font-size: 50px;
  }

  .wordmark-pron {
    font-size: 12px;
    margin-top: 12px;
  }

  .definitions {
    font-size: 15.5px;
    opacity: 0.5;
  }

  .def-example {
    font-size: 14px;
  }
}

@media (max-height: 600px) {
  .wordmark {
    transform: translateY(0);
  }

  .wordmark-title {
    font-size: 36px;
  }
}

@media (max-width: 560px) {
  .doc-header {
    display: grid;
  }

  .doc-nav {
    gap: 10px;
  }
}

/* Approved Purl artwork; preserve the existing landing-page composition. */
.purl-wordmark {
  display: block;
  width: 2.4em;
  height: auto;
}
.stitch-mark img { display: block; }
