/* =============================================================
   ebookix · editorial / literary refined
   ============================================================= */

:root {
  --paper:          #f3ecda;
  --paper-deep:     #e8e0c8;
  --paper-shadow:   #d8cfb6;
  --surface:        #fbf6e6;
  --surface-card:   #ffffff;

  --ink:            #1c1814;
  --ink-soft:       #3b342c;
  --ink-mute:       #7a6f5d;
  --rule:           #c8bfa6;
  --rule-soft:      #ddd3b9;

  --blue:           #1e3a8a;
  --blue-deep:      #16306f;
  --accent:         #a83235;
  --accent-soft:    #c54a44;

  --error:          #a83235;
  --warn-bg:        #f7e9c5;
  --warn-border:    #d8b261;
  --warn-ink:       #6c4e10;

  --field:          #fbf6e6;

  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      14px;

  --shadow-card:    0 1px 0 rgba(28,24,20,0.04), 0 14px 40px -22px rgba(28,24,20,0.18);
  --shadow-pop:     0 24px 48px -16px rgba(28,24,20,0.28);

  --serif:          "Fraunces", "Iowan Old Style", "Apple Garamond", "Baskerville", Georgia, serif;
  --sans:           "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --content-w:      1140px;
  --reading-w:      640px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -200px, #efe6cd 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 600px, #ede4cb 0%, transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 380;
  font-feature-settings: "ss01", "ss02";
}

::selection { background: var(--blue); color: #fbf6e6; }

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus { left: 12px; }

/* =============================================================
   Header
   ============================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 4vw, 48px);
  background: rgba(243, 236, 218, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variation-settings: "SOFT" 30, "opsz" 24;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  font-variation-settings: "SOFT" 60, "opsz" 9;
}

.brand-name { font-style: italic; }

.brand-tld {
  font-style: normal;
  font-weight: 400;
  font-size: 0.78em;
  color: var(--ink-mute);
  letter-spacing: 0.01em;
  margin-left: 1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 2px;
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right 0.25s ease;
}
.site-nav a:not(.nav-cta):hover::after { right: 0; }

.site-nav .nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.site-nav .nav-cta:hover {
  background: var(--blue);
  color: var(--paper);
}

@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* =============================================================
   Section primitives
   ============================================================= */

main {
  display: block;
}

section {
  padding: clamp(64px, 10vw, 130px) clamp(20px, 4vw, 48px);
  max-width: var(--content-w);
  margin: 0 auto;
  position: relative;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  display: inline-block;
}

.display {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(2.6rem, 6.5vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  font-variation-settings: "SOFT" 30, "opsz" 144;
}

.display em {
  font-style: italic;
  color: var(--blue);
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}

.display-sm {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  font-variation-settings: "SOFT" 50, "opsz" 60;
}

.display-sm em {
  font-style: italic;
  color: var(--blue);
  font-variation-settings: "SOFT" 100, "opsz" 60;
}

.lede {
  max-width: 640px;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 28px 0 0;
}

.section-header { margin-bottom: clamp(28px, 4vw, 48px); }

.rule {
  position: absolute;
  top: 0;
  left: clamp(20px, 4vw, 48px);
  right: clamp(20px, 4vw, 48px);
  height: 1px;
  background: var(--rule);
  display: flex;
  align-items: center;
}

.rule span {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 0 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
  font-variation-settings: "SOFT" 100, "opsz" 9;
}

/* =============================================================
   Hero
   ============================================================= */

.hero {
  padding-top: clamp(72px, 12vw, 140px);
  padding-bottom: clamp(72px, 12vw, 140px);
  position: relative;
}

.hero .display {
  margin-top: 0;
}

.hero .display br {
  display: block;
  content: "";
}

.hero-features {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  font-weight: 500;
}

.hero-features li {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.hero-features-mark {
  color: var(--blue);
  font-size: 12px;
  line-height: 1;
}

.hero-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s, color 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -18px rgba(30,58,138,0.6);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

.hero-accent {
  position: relative;
  display: inline-block;
  color: var(--blue);
}

.hero-accent .hero-flourish {
  position: absolute;
  left: -5%;
  bottom: -0.25em;
  width: 110%;
  height: 0.5em;
  opacity: 0.8;
  pointer-events: none;
  display: block;
}

@media (max-width: 880px) {
  .hero-accent .hero-flourish {
    bottom: -0.15em;
  }
}

/* =============================================================
   Why
   ============================================================= */

.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}

.why-text { max-width: 60ch; }
.why-text p {
  margin: 0 0 1.2em;
  font-size: 1.075rem;
  color: var(--ink-soft);
}
.why-text p:last-child { margin-bottom: 0; }

.pull-quote {
  background: var(--surface-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-lg);
  padding: 34px 30px 28px;
  max-width: 320px;
  position: relative;
  box-shadow: var(--shadow-card);
  transform: rotate(1.5deg);
}

.pull-quote .mark {
  position: absolute;
  top: -28px;
  left: 18px;
  font-family: var(--serif);
  font-size: 110px;
  line-height: 1;
  color: var(--blue);
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}

.pull-quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.25;
  font-style: italic;
  color: var(--ink);
  font-variation-settings: "SOFT" 80, "opsz" 36;
}

@media (max-width: 880px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
  .pull-quote { max-width: 100%; transform: none; }
}

/* =============================================================
   Tool shell + tool
   ============================================================= */

.tool-shell {
  padding-bottom: clamp(96px, 12vw, 160px);
}

.tool-header {
  text-align: center;
  margin-bottom: 36px;
}

.tool-header .eyebrow {
  justify-content: center;
}

.tool-sub {
  margin: 14px auto 0;
  max-width: 36ch;
  color: var(--ink-mute);
  font-size: 1rem;
}

.tool {
  background: var(--surface-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 36px);
  box-shadow: var(--shadow-card);
}

.step {
  border-bottom: 1px solid var(--rule-soft);
  padding: 22px 0 26px;
}
.step:first-child { padding-top: 0; }
.step:last-child  { border-bottom: 0; padding-bottom: 0; }

.step-actions { padding-top: 32px; }

.step h3 {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.005em;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  font-variation-settings: "SOFT" 60, "opsz" 9;
}

.optional {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* dropzone (book) */
.dropzone {
  display: block;
  border: 1.5px dashed var(--rule);
  border-radius: var(--radius);
  padding: 38px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--field);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--blue);
  background: #f6f0d6;
}

.dropzone-empty, .dropzone-filled {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.dropzone-empty strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "opsz" 24;
}
.dropzone-empty span { color: var(--ink-mute); font-size: 14px; }

.dropzone-filled strong {
  font-size: 15px;
  word-break: break-all;
  text-align: center;
}
.dropzone-filled span { color: var(--ink-mute); font-size: 13px; }

/* meta */
.meta {
  margin-top: 16px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.meta-row { display: flex; gap: 14px; font-size: 14px; }
.meta-label {
  color: var(--ink-mute);
  flex-shrink: 0;
  width: 70px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 2px;
}

.warning {
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: var(--radius);
  font-size: 14px;
}

/* textarea + text input */
textarea, input[type="text"] {
  width: 100%;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--blue-deep);
  background: var(--field);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; }
textarea:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.12);
}

/* tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--paper-deep);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 14px;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.active {
  background: var(--surface-card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* image dropzone */
.image-dropzone {
  display: block;
  border: 1.5px dashed var(--rule);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  cursor: pointer;
  background: var(--field);
  transition: border-color 0.15s, background 0.15s;
}
.image-dropzone:hover, .image-dropzone.dragover {
  border-color: var(--blue);
  background: #f6f0d6;
}
.image-dropzone-empty {
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.image-dropzone-empty strong { font-size: 15px; font-weight: 600; }
.image-dropzone-empty span { color: var(--ink-mute); font-size: 14px; }

.image-dropzone-filled {
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.image-dropzone-filled img { max-width: 100%; max-height: 240px; }
.image-dropzone-info {
  display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.image-dropzone-info strong {
  font-weight: 500; color: var(--ink); word-break: break-all;
}

/* drawpad */
.drawpad-wrap {
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  background: var(--surface-card);
  overflow: hidden;
}
#drawpad {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
  background:
    linear-gradient(0deg, transparent calc(100% - 1px), var(--rule-soft) 100%) 0 75% / 100% 1px no-repeat,
    var(--surface-card);
}
.drawpad-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-mute);
}
.drawpad-controls label {
  display: flex; align-items: center; gap: 8px;
}

/* actions row */
.actions {
  display: flex;
  gap: 10px;
}

.tool-features {
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 4px;
}

.primary, .secondary {
  flex: 1;
  padding: 14px 22px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.primary {
  background: var(--ink);
  color: var(--paper);
}
.primary:hover:not(:disabled) {
  background: var(--blue);
  transform: translateY(-1px);
}
.primary:disabled, .secondary:disabled {
  background: var(--rule-soft);
  color: var(--ink-mute);
  cursor: not-allowed;
  border-color: var(--rule-soft);
}
.secondary {
  flex: 0 0 auto;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.secondary:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
}

.link {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--blue);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.link:hover { color: var(--blue-deep); }

.hint, .error, .status {
  margin: 14px 0 0;
  font-size: 14px;
  text-align: center;
}
.hint { color: var(--ink-mute); }
.error { color: var(--error); }
.status { color: var(--blue); }

/* =============================================================
   How it works
   ============================================================= */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
  counter-reset: numeral;
}

.steps li {
  background: var(--surface-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-card);
}

.steps .numeral {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  color: var(--blue);
  font-variation-settings: "SOFT" 100, "opsz" 36;
  margin-bottom: 18px;
}

.steps h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 60, "opsz" 36;
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.55;
}

@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr; }
}

/* =============================================================
   Privacy
   ============================================================= */

.promises {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.promises li {
  border-top: 1px solid var(--ink);
  padding-top: 22px;
}

.promises h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  font-variation-settings: "SOFT" 60, "opsz" 36;
}

.promises h3::before {
  content: "✦";
  display: inline-block;
  margin-right: 10px;
  color: var(--blue);
  font-size: 0.85em;
  vertical-align: 0.1em;
}

.promises p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  max-width: 36ch;
}

@media (max-width: 720px) {
  .promises { grid-template-columns: 1fr; }
}

/* =============================================================
   Story
   ============================================================= */

.story-card {
  background: var(--surface-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 60px);
  box-shadow: var(--shadow-card);
}

.story-header { margin-bottom: 32px; }

.story-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.author-card {
  margin: 0;
  text-align: left;
  position: sticky;
  top: 110px;
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--blue), #2c52a8 60%, var(--blue-deep));
  display: grid;
  place-items: center;
  color: var(--paper);
  border: 5px solid var(--surface-card);
  box-shadow:
    0 16px 40px -16px rgba(30,58,138,0.45),
    0 0 0 1px var(--rule);
  margin-bottom: 18px;
  overflow: hidden;
}

.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.avatar-initials {
  font-family: var(--serif);
  font-size: 84px;
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  line-height: 1;
}

.author-card figcaption {
  font-size: 15px;
}

.author-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0 0 6px;
  font-weight: 500;
  letter-spacing: -0.005em;
  font-variation-settings: "SOFT" 50, "opsz" 36;
}

.author-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.author-links a {
  font-size: 14px;
  color: var(--blue);
  text-decoration-color: var(--rule);
}
.author-links a:hover { color: var(--blue-deep); }

.story-text {
  max-width: 60ch;
  font-size: 1.075rem;
  line-height: 1.62;
  color: var(--ink-soft);
}
.story-text p { margin: 0 0 1.15em; }
.story-text p:last-child { margin-bottom: 0; }

.dropcap {
  float: left;
  font-family: var(--serif);
  font-style: italic;
  font-size: 5.6em;
  line-height: 0.85;
  margin: 0.05em 0.12em -0.1em 0;
  color: var(--blue);
  font-variation-settings: "SOFT" 100, "opsz" 144;
}

@media (max-width: 880px) {
  .story-body { grid-template-columns: 1fr; }
  .author-card { position: static; }
  .avatar { width: 140px; height: 140px; }
  .avatar-initials { font-size: 64px; }
}

/* =============================================================
   Footer
   ============================================================= */

.site-footer {
  border-top: 1px solid var(--rule-soft);
  margin-top: 48px;
  background: var(--paper-deep);
}

.footer-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) clamp(20px, 4vw, 48px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  font-variation-settings: "SOFT" 50, "opsz" 24;
}
.footer-brand .brand-mark { width: 26px; height: 26px; font-size: 16px; }

.footer-tag {
  margin: 0;
  text-align: center;
  color: var(--ink-mute);
  font-style: italic;
  font-family: var(--serif);
  font-size: 15px;
  font-variation-settings: "SOFT" 100, "opsz" 24;
}

.footer-nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
}
.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }

.footer-fine {
  grid-column: 1 / -1;
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--ink-mute);
  text-align: center;
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .footer-tag { order: -1; }
  .footer-nav { flex-wrap: wrap; justify-content: center; }
}

/* =============================================================
   Modal (preview)
   ============================================================= */

.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(28, 24, 20, 0.55);
  cursor: pointer;
  backdrop-filter: blur(2px);
}
.modal-window {
  position: relative;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--serif);
  font-size: 18px;
  font-variation-settings: "SOFT" 50, "opsz" 24;
}
.modal-close {
  border: none; background: transparent;
  font-size: 26px; line-height: 1;
  color: var(--ink-mute); cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover { color: var(--ink); }
.modal-body {
  flex: 1; padding: 0; display: flex;
  background: var(--paper); overflow: hidden;
}
#preview-frame {
  flex: 1; width: 100%; height: 70vh; border: 0; background: #fff;
}

/* =============================================================
   Reveal-on-scroll
   ============================================================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* hero stagger on initial load */
.hero .eyebrow,
.hero .display,
.hero .lede,
.hero .hero-cta,
.hero .hero-marks {
  animation: hero-rise 0.8s cubic-bezier(.2,.7,.2,1) both;
}
.hero .display     { animation-delay: 0.08s; }
.hero .lede        { animation-delay: 0.16s; }
.hero .hero-cta    { animation-delay: 0.24s; }
.hero .hero-marks  { animation-delay: 0.5s; animation-duration: 1.4s; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  html { scroll-behavior: auto; }
}

/* =============================================================
   Standalone PWA
   ============================================================= */

.pwa-footer {
  display: none;
  text-align: center;
  font-size: 14px;
  color: var(--ink-mute);
}

.pwa-footer a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.pwa-footer a:hover {
  color: var(--blue-deep);
}

@media (display-mode: standalone) {
  .skip-link,
  .site-header,
  .hero,
  .why,
  .how,
  .privacy,
  .story,
  .site-footer,
  .tool-shell .rule,
  .tool-header {
    display: none !important;
  }

  body {
    background: var(--paper);
  }

  .tool-shell {
    padding: clamp(24px, 4vw, 48px) clamp(20px, 4vw, 48px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .tool {
    margin-bottom: auto;
  }

  .pwa-footer {
    display: block;
    margin-top: 32px;
  }
}
