/* =========================================================================
   PaperBrain · marketing site
   ========================================================================= */

:root {
  /* Paper palette (lifted from the app design system) */
  --paper:           #fbfaf0;
  --paper-warm:      #fdf6e3;
  --paper-soft:      #f5f4ea;
  --paper-edge:      #eae8df;

  --ink:             #1b1c16;
  --ink-soft:        #3e494a;
  --pencil:          #6c757d;

  --primary:         #006067;
  --primary-deep:    #004f54;
  --primary-tint:    #c6e9ec;
  --accent:          #96f1fa;

  --coffee:          #834718;
  --coffee-warm:     #a05f2e;

  --rule:            #bdc9ca;
  --rule-soft:       #d8dcd0;

  --sticky-yellow:   #fff3a8;
  --sticky-pink:     #fde2e4;

  /* Type */
  --serif:    'Newsreader', Georgia, serif;
  --sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --hand:     'Kalam', 'Bradley Hand', cursive;

  /* Shadows — paper sitting on a desk */
  --shadow-soft:   0 1px 2px rgba(27,28,22,0.06), 0 8px 24px rgba(27,28,22,0.06);
  --shadow-lift:   0 2px 4px rgba(27,28,22,0.08), 0 18px 40px rgba(27,28,22,0.10);
  --shadow-press:  0 1px 0 rgba(27,28,22,0.12) inset;
}

/* -------------------------------------------------------------------------
   Reset-ish
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; }

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

/* -------------------------------------------------------------------------
   Page-wide paper background — ruled lines + margin + faint stains
   ------------------------------------------------------------------------- */
.paper-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    /* faint speckle */
    radial-gradient(circle at 20% 30%, rgba(131,71,24,0.04) 0 1px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(131,71,24,0.03) 0 1px, transparent 2px),
    /* paper warmth gradient */
    linear-gradient(180deg, #fbfaf0 0%, #f6f2e2 100%);
  background-size: 240px 240px, 320px 320px, 100% 100%;
}

.paper-ruling {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    rgba(131,71,24,0.10) 31px,
    rgba(131,71,24,0.10) 32px
  );
  opacity: 0.55;
}

.paper-margin {
  position: absolute;
  top: 0; bottom: 0;
  /* Sits ~36–40px to the LEFT of the content's visual edge so the page reads
     like a real notebook (writing starts after the margin, not on it). */
  left: max(20px, calc(50% - 574px));
  width: 1px;
  background: rgba(204, 70, 70, 0.35);
  box-shadow: 2px 0 0 rgba(204, 70, 70, 0.35);
}
@media (max-width: 720px) { .paper-margin { display: none; } }

/* -------------------------------------------------------------------------
   Layout container helper
   ------------------------------------------------------------------------- */
main, .nav, .footer {
  max-width: 1180px;
  margin: 0 auto;
}

/* Nav hugs the edges (tight by design) */
.nav { padding-inline: 14px; }
@media (min-width: 360px) { .nav { padding-inline: 20px; } }
@media (min-width: 480px) { .nav { padding-inline: 28px; } }
@media (min-width: 768px) { .nav { padding-inline: 56px; } }

/* Main + footer breathe more on every form factor */
main, .footer { padding-inline: 20px; }
@media (min-width: 360px) { main, .footer { padding-inline: 28px; } }
@media (min-width: 480px) { main, .footer { padding-inline: 40px; } }
@media (min-width: 768px) { main, .footer { padding-inline: 72px; } }

main > section {
  padding-block: clamp(64px, 10vw, 128px);
  position: relative;
}

/* -------------------------------------------------------------------------
   Typography
   ------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.display {
  font-size: clamp(3rem, 7.5vw, 6rem);
  font-style: italic;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.display em {
  font-style: italic;
  color: var(--coffee);
  font-weight: 400;
}

.section-head { margin-bottom: 56px; max-width: 760px; }
.section-head--center { text-align: center; margin-inline: auto; }
.section-head__kicker {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--coffee);
  margin-bottom: 14px;
  padding: 4px 10px;
  border: 1px solid rgba(131,71,24,0.35);
  border-radius: 999px;
  background: rgba(255,243,168,0.4);
}
.section-head__title {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-style: italic;
}
.section-head__title em {
  font-style: italic;
  color: var(--primary);
}

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--coffee);
  margin-bottom: 18px;
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 24px 0 32px;
}

.underline-scribble {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.underline-scribble::after {
  content: '';
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.06em;
  height: 0.24em;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'><path d='M2 8 C 30 2, 60 12, 90 6 S 150 2, 198 8' stroke='%23006067' stroke-width='3' stroke-linecap='round' fill='none'/></svg>")
    no-repeat center / 100% 100%;
  z-index: -1;
  opacity: 0.75;
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--paper-warm);
  color: var(--ink);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  box-shadow: 0 2px 0 var(--ink);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 0 1px 0 var(--ink); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-deep);
  box-shadow: 0 2px 0 var(--primary-deep);
}
.btn--primary:hover { box-shadow: 0 4px 0 var(--primary-deep); }
.btn--primary:active { box-shadow: 0 1px 0 var(--primary-deep); }

.btn--ghost {
  background: transparent;
  border-color: var(--ink-soft);
  color: var(--ink-soft);
  box-shadow: none;
}
.btn--ghost:hover {
  background: var(--paper-warm);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--ink);
}

.btn--lg { padding: 14px 24px; font-size: 15px; }

.link-quiet {
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}
.link-quiet:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* -------------------------------------------------------------------------
   Signup form — inline email capture that hands off to /register.
   Input + button live inside one bordered capsule so they read as a unit.
   ------------------------------------------------------------------------- */
.signup-form {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 480px;
  padding: 4px;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 2px 0 var(--ink);
  transition: box-shadow 120ms ease, transform 120ms ease;
}
.signup-form:focus-within {
  box-shadow: 0 4px 0 var(--ink);
  transform: translate(-1px, -1px);
}
.signup-form:has(.signup-form__input:invalid:not(:placeholder-shown)) {
  border-color: var(--coffee);
  box-shadow: 0 2px 0 var(--coffee);
}

.signup-form__input {
  /* flex-basis: 0 + grow so the input takes whatever's left of the row.
     Avoid putting size in flex-basis — it becomes vertical in column mode. */
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 5px;
  outline: none;
}
.signup-form__input::placeholder { color: var(--pencil); }

.signup-form__submit {
  flex: 0 0 auto;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 5px;
  box-shadow: none;
}
.signup-form__submit:hover,
.signup-form__submit:active {
  transform: none;
  box-shadow: none;
}

.signup-form--stacked { margin: 0 auto; }

@media (max-width: 520px) {
  .signup-form { flex-direction: column; }
  .signup-form__input { flex: 0 0 auto; }
  .signup-form__submit { width: 100%; }
}

/* -------------------------------------------------------------------------
   Nav
   ------------------------------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--paper) 60%, rgba(251,250,240,0.0) 100%);
  backdrop-filter: blur(2px);
}
@media (min-width: 880px) {
  .nav {
    gap: 32px;
    padding-top: 24px;
    padding-bottom: 24px;
  }
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  flex-shrink: 0;
}
@media (min-width: 480px) {
  .nav__brand { font-size: 19px; gap: 10px; }
}
@media (min-width: 600px) {
  .nav__brand { font-size: 22px; }
}

.nav__brand-text { display: inline; }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, #007b83 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 2px 6px rgba(0,79,84,0.25);
}
.logo-mark svg {
  width: 16px;
  height: 16px;
}
@media (min-width: 600px) {
  .logo-mark { width: 36px; height: 36px; }
  .logo-mark svg { width: 18px; height: 18px; }
}
.nav__brand--footer .logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.nav__brand--footer .logo-mark svg {
  width: 22px;
  height: 22px;
}

.nav__links {
  display: none;
  margin-left: auto;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav__links a {
  position: relative;
  padding: 4px 2px;
  transition: color 120ms ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 4' preserveAspectRatio='none'><path d='M1 2 Q 25 0, 50 2 T 99 2' stroke='%23834718' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>")
    no-repeat center / 100% 100%;
}

.nav__cta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav__cta .btn {
  padding: 8px 11px;
  font-size: 12px;
}
.nav__cta .link-quiet { font-size: 13px; }
@media (min-width: 360px) {
  .nav__cta .btn { padding: 9px 14px; font-size: 13px; }
}

@media (min-width: 600px) {
  .nav__cta { gap: 16px; }
  .nav__cta .btn { padding: 11px 20px; font-size: 14px; }
  .nav__cta .link-quiet { font-size: 14px; }
}

@media (min-width: 880px) {
  .nav__links { display: flex; }
  .nav__cta { margin-left: 0; }
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  padding-block: clamp(20px, 4vw, 64px) clamp(64px, 10vw, 128px);
}
@media (min-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 72px;
    align-items: center;
  }
}

.hero__copy { max-width: 620px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero__fineprint {
  font-size: 11px;
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

/* Hero right column — wraps the demo video */
.hero__stack {
  position: relative;
  padding: 24px 24px 48px;
  display: flex;
  justify-content: center;
}

.paper-note {
  position: relative;
  background: var(--paper-warm);
  border: 1px solid rgba(27,28,22,0.12);
  border-radius: 4px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-lift);
  font-size: 14px;
}

.paper-note__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.paper-note__tag {
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--sticky-yellow);
  border: 1px solid rgba(131,71,24,0.3);
  font-weight: 600;
  font-size: 10px;
  color: var(--coffee);
}
.paper-note__tag--green { background: #d3f0d3; border-color: rgba(5,150,105,0.3); color: #0a6a3a; }
.paper-note__tag--blue  { background: var(--primary-tint); border-color: rgba(0,96,103,0.3); color: var(--primary-deep); }

.paper-note__title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  margin-bottom: 8px;
}

.paper-note__list {
  margin: 0; padding-left: 18px;
  color: var(--ink-soft);
}
.paper-note__list li { margin-bottom: 4px; }
.strike { text-decoration: line-through; opacity: 0.55; }

.chip-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 14px;
}
.chip {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-soft);
}

/* Note 1 — handwritten, scanning */
.paper-note--scan {
  position: absolute;
  top: 8px; left: 4%;
  width: min(280px, 60%);
  transform: rotate(-4.5deg);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 26px,
      rgba(131,71,24,0.18) 26px 27px
    ),
    var(--paper-warm);
  z-index: 1;
}
.handwriting {
  font-family: var(--hand);
  color: var(--ink);
  font-size: 18px;
  line-height: 27px;
}
.handwriting p { margin: 0; }
.handwriting s { color: var(--coffee); }

.scanline {
  position: absolute;
  left: 0; right: 0; top: 60%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0,96,103,0.6),
    rgba(150,241,250,0.8),
    rgba(0,96,103,0.6),
    transparent
  );
  box-shadow: 0 0 12px rgba(0,96,103,0.35);
  animation: scan 2.6s ease-in-out infinite;
}
@keyframes scan {
  0%   { top: 18%; opacity: 0.2; }
  50%  { top: 82%; opacity: 1; }
  100% { top: 18%; opacity: 0.2; }
}

.paper-clip {
  position: absolute;
  top: -14px; right: 28px;
  width: 18px; height: 44px;
  border: 2.5px solid #8a8d92;
  border-radius: 9px 9px 4px 4px;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  transform: rotate(8deg);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}
.paper-clip::after {
  content: '';
  position: absolute;
  top: 6px; left: 2px; right: 2px;
  height: 26px;
  border: 2px solid #8a8d92;
  border-radius: 6px;
  border-bottom-color: transparent;
}

/* Note 2 — extracted */
.paper-note--ocr {
  position: absolute;
  top: 130px; right: 4%;
  width: min(310px, 70%);
  transform: rotate(2.5deg);
  background: var(--paper-warm);
  z-index: 2;
}

/* Note 3 — workspace answer */
.paper-note--query {
  position: absolute;
  bottom: 20px; left: 18%;
  width: min(340px, 78%);
  transform: rotate(-1.5deg);
  background:
    linear-gradient(180deg, #ffffff 0%, var(--paper-warm) 100%);
  z-index: 3;
}
.paper-note__prompt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  margin: 0 0 10px;
  color: var(--primary-deep);
}
.prompt-spark { color: var(--primary); margin-right: 4px; }
.paper-note__answer {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  border-top: 1px dashed var(--rule);
  padding-top: 10px;
}

.hero__arrow {
  position: absolute;
  top: 90px;
  left: 30%;
  width: 160px;
  height: auto;
  z-index: 4;
  pointer-events: none;
  display: none;
}
.hero__arrow-label {
  position: absolute;
  top: 78px;
  left: 24%;
  font-family: var(--hand);
  font-size: 16px;
  color: var(--coffee);
  transform: rotate(-6deg);
  display: none;
  pointer-events: none;
  white-space: nowrap;
}
@media (min-width: 1100px) {
  .hero__arrow, .hero__arrow-label { display: block; }
}

/* -------------------------------------------------------------------------
   Strip (after hero)
   ------------------------------------------------------------------------- */
.strip {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 32px !important;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-soft);
}
.strip__item {
  flex: 1 1 220px;
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 8px 16px;
}
.strip__item strong {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
}
.strip__item span {
  font-size: 13px;
  color: var(--ink-soft);
}
.strip__divider {
  width: 1px;
  background: var(--rule);
  align-self: stretch;
}
@media (max-width: 760px) {
  .strip__divider { display: none; }
}

/* -------------------------------------------------------------------------
   How it works
   ------------------------------------------------------------------------- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 28px;
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

.step {
  position: relative;
  background: var(--paper-warm);
  border: 1px solid rgba(27,28,22,0.10);
  border-radius: 4px;
  padding: 28px 26px 24px;
  box-shadow: var(--shadow-soft);
}
.step:nth-child(1) { transform: rotate(-1.2deg); }
.step:nth-child(2) { transform: rotate(0.6deg); }
.step:nth-child(3) { transform: rotate(-0.4deg); }
@media (max-width: 900px) {
  .step { transform: none !important; }
}

.step__num {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  font-weight: 600;
  color: var(--coffee);
  border-bottom: 2px solid var(--coffee);
  padding-bottom: 2px;
  margin-bottom: 16px;
}
.step__title {
  font-style: italic;
  font-size: 26px;
  margin-bottom: 10px;
}
.step__body {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 22px;
}
.step__visual {
  background: var(--paper-soft);
  border: 1px dashed var(--rule);
  border-radius: 4px;
  padding: 18px;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Step 1 — snap frame */
.snap-frame {
  position: relative;
  width: 100%;
  max-width: 220px;
  height: 130px;
  border: 1.5px dashed var(--coffee);
  border-radius: 2px;
}
.snap-corner {
  position: absolute;
  width: 16px; height: 16px;
  border: 2.5px solid var(--ink);
}
.snap-corner--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.snap-corner--tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.snap-corner--bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.snap-corner--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.snap-page {
  position: absolute;
  inset: 16px;
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.snap-line {
  height: 6px;
  background: var(--rule);
  border-radius: 2px;
}
.snap-line--short { width: 60%; }

/* Step 2 — terminal-ish */
.terminal {
  width: 100%;
  background: #1b1c16;
  color: #d6d2bc;
  border-radius: 4px;
  padding: 14px 16px;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, monospace;
  font-size: 12px;
  line-height: 1.7;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.terminal__row {
  display: flex; gap: 6px; margin-bottom: 8px;
}
.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #555;
}
.dot--red { background: #ff6e6e; }
.dot--yellow { background: #f5c163; }
.dot--green { background: #6ad29e; }
.terminal__line { white-space: nowrap; overflow: hidden; }
.terminal__line em {
  color: var(--accent);
  font-style: normal;
}
.terminal__line--ok { color: #6ad29e; }

/* Step 3 — ask bar */
.step__visual--ask {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.ask-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--rule);
  border-bottom: 2px solid var(--primary);
  border-radius: 4px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  font-size: 15px;
}
.ask-bar__spark { color: var(--primary); font-size: 18px; }
.ask-bar__text { flex: 1; }
.ask-bar__caret {
  width: 1px; height: 16px;
  background: var(--ink);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.ask-cite {
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.ask-cite em {
  color: var(--coffee);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

/* -------------------------------------------------------------------------
   Features
   ------------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 720px)  { .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; } }
@media (min-width: 1100px) { .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

.feature {
  background: var(--paper-warm);
  border: 1px solid rgba(27,28,22,0.10);
  border-radius: 4px;
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-soft);
  position: relative;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.feature--rotate-l { transform: rotate(-0.8deg); }
.feature--rotate-r { transform: rotate(0.8deg); }
.feature:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--primary-tint);
  color: var(--primary-deep);
  border: 1px solid rgba(0,96,103,0.3);
  border-radius: 4px;
  margin-bottom: 16px;
}
.feature__icon--coffee {
  background: rgba(255,243,168,0.6);
  color: var(--coffee);
  border-color: rgba(131,71,24,0.35);
}

.feature h3 {
  font-style: italic;
  font-size: 22px;
  margin-bottom: 8px;
}
.feature p {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0;
}

/* -------------------------------------------------------------------------
   Use cases
   ------------------------------------------------------------------------- */
.cases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 900px) {
  .cases__grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
}

.case {
  background: var(--paper-warm);
  border: 1px solid rgba(27,28,22,0.10);
  border-radius: 4px;
  padding: 28px 26px 26px;
  box-shadow: var(--shadow-soft);
  transform: rotate(-1deg);
}
.case--mid {
  transform: rotate(1.2deg) translateY(28px);
  background: #fff;
}
.case:nth-child(3) { transform: rotate(-0.6deg); }
@media (max-width: 900px) {
  .case { transform: none !important; }
}

.case__chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: var(--sticky-yellow);
  border: 1px solid rgba(131,71,24,0.35);
  border-radius: 999px;
  color: var(--coffee);
  margin-bottom: 16px;
}
.case__chip--coffee {
  background: rgba(131,71,24,0.12);
  color: var(--coffee);
}
.case__chip--blue {
  background: var(--primary-tint);
  border-color: rgba(0,96,103,0.4);
  color: var(--primary-deep);
}
.case p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.4;
}

/* -------------------------------------------------------------------------
   Quote / testimonial
   ------------------------------------------------------------------------- */
.quote {
  text-align: center;
}
.quote blockquote {
  position: relative;
  margin: 0 auto;
  max-width: 740px;
  padding: 32px 24px;
}
.quote__mark {
  position: absolute;
  top: -42px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-size: 140px;
  line-height: 1;
  color: var(--coffee);
  opacity: 0.35;
}
.quote blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 20px;
}
.quote blockquote footer {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------------------
   FAQ
   ------------------------------------------------------------------------- */
.faq__list {
  max-width: 780px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px dashed var(--rule);
  padding: 18px 0;
}
.faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  color: var(--ink);
  position: relative;
  padding-right: 28px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  font-family: var(--sans);
  font-style: normal;
  font-size: 24px;
  color: var(--coffee);
  transition: transform 180ms ease;
}
.faq__item[open] summary::after { content: '–'; }
.faq__item p {
  color: var(--ink-soft);
  font-size: 15.5px;
  margin: 12px 0 4px;
  max-width: 62ch;
}

/* -------------------------------------------------------------------------
   CTA
   ------------------------------------------------------------------------- */
.cta {
  display: flex;
  justify-content: center;
}
.cta__card {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--paper-warm);
  border: 1px solid rgba(27,28,22,0.12);
  border-radius: 6px;
  padding: 56px 36px 44px;
  text-align: center;
  box-shadow: var(--shadow-lift);
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0 32px,
      rgba(131,71,24,0.10) 32px 33px
    );
}
.cta__sticker {
  position: absolute;
  top: -28px; right: -28px;
  width: 104px; height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--accent);
  color: var(--primary-deep);
  font-family: var(--serif);
  font-style: italic;
  border: 2px solid var(--primary-deep);
  border-radius: 50%;
  transform: rotate(12deg);
  box-shadow: 0 4px 0 rgba(0,79,84,0.4);
  line-height: 1;
}
.cta__sticker-amt {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cta__sticker-unit {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
@media (max-width: 600px) {
  .cta__sticker {
    width: 76px; height: 76px;
    top: -18px; right: -14px;
  }
  .cta__sticker-amt { font-size: 19px; }
  .cta__sticker-unit { font-size: 11px; }
}
.cta__card h2 {
  font-style: italic;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 14px;
}
.cta__lede {
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0 auto 24px;
  font-size: 16px;
}

.cta__includes {
  list-style: none;
  margin: 0 auto 28px;
  padding: 18px 22px;
  max-width: 580px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 28px;
  text-align: left;
  background: rgba(255,255,255,0.55);
  border: 1px dashed var(--rule);
  border-radius: 4px;
}
@media (min-width: 640px) {
  .cta__includes { grid-template-columns: 1fr 1fr; }
}
.cta__includes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.cta__includes strong {
  color: var(--ink);
  font-weight: 600;
}
.cta__check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary-deep);
  border: 1px solid rgba(0,96,103,0.25);
}
.cta__check svg { width: 12px; height: 12px; }

.cta__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 auto 14px;
}

.cta__fineprint {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}
.cta__fineprint-note {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.8;
}
.cta__fineprint-note sup {
  font-style: normal;
  margin-right: 1px;
}

.faq__note {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-soft);
  opacity: 0.75;
}

.pwa-install {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px dashed var(--ruled-line);
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.55);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pwa-install[hidden] { display: none; }
.pwa-install__copy { display: block; }
.pwa-install__title {
  display: block;
  font-size: 14px;
  color: var(--ink-blue);
}
.pwa-install__body {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 62ch;
}
.pwa-install__body kbd {
  font-family: inherit;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--paper-shade, rgba(0, 0, 0, 0.06));
  font-size: 12.5px;
}
.pwa-install__btn { align-self: flex-start; }
.pwa-install__btn[hidden] { display: none; }

/* -------------------------------------------------------------------------
   PWA top banner (mobile only) — surfaces install prompt above the FAQ.
   ------------------------------------------------------------------------- */
.pwa-banner {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 8px 16px 0;
  border: 1px solid var(--paper-edge);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf4 0%, var(--paper-warm) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 2px 8px rgba(58, 45, 12, 0.06);
  position: relative;
  z-index: 40;
}
.pwa-banner[hidden] { display: none; }
@media (max-width: 720px) {
  .pwa-banner:not([hidden]) { display: flex; }
}

.pwa-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--primary-tint);
  color: var(--primary-deep);
}
.pwa-banner__icon svg { width: 18px; height: 18px; }

.pwa-banner__text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}
.pwa-banner__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.pwa-banner__sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-soft);
  opacity: 0.85;
}

.pwa-banner__cta {
  flex-shrink: 0;
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  letter-spacing: 0.01em;
  transition: background 120ms ease, transform 120ms ease;
}
.pwa-banner__cta:hover { background: var(--primary-deep); }
.pwa-banner__cta:active { transform: translateY(1px); }
.pwa-banner__cta[hidden] { display: none; }

.pwa-banner__close {
  flex-shrink: 0;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--ink-soft);
  opacity: 0.55;
  transition: opacity 120ms ease, background 120ms ease;
}
.pwa-banner__close:hover { opacity: 1; background: rgba(0,0,0,0.04); }
.pwa-banner__close svg { width: 14px; height: 14px; }

/* -------------------------------------------------------------------------
   Hero demo video — preview muted in the stack, fullscreens on tap
   ------------------------------------------------------------------------- */
.hero-demo {
  /* Reset native <button> styles */
  appearance: none;
  display: block;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  position: relative;
  padding: 12px;
  background: var(--paper-warm);
  border: 1px solid rgba(27,28,22,0.08);
  border-radius: 4px;
  box-shadow: var(--shadow-lift);
  transform: rotate(-1.2deg);
  transition: transform 250ms ease, box-shadow 250ms ease;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
@media (min-width: 1000px) {
  .hero-demo { max-width: 300px; }
}
.hero-demo:hover,
.hero-demo:focus-visible {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 4px 8px rgba(27,28,22,0.1), 0 24px 56px rgba(27,28,22,0.14);
  outline: none;
}
.hero-demo:focus-visible {
  box-shadow: 0 0 0 3px rgba(0,96,103,0.35), 0 24px 56px rgba(27,28,22,0.14);
}

.hero-demo__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 2px;
  background: #000;
  pointer-events: none; /* clicks fall through to the parent <button> */
}

.paper-clip--demo {
  top: -16px;
  right: 36px;
  transform: rotate(-10deg);
}

.hero-demo__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 250ms ease, opacity 250ms ease;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.35));
}
.hero-demo__play svg {
  width: 64px;
  height: 64px;
}
.hero-demo:hover .hero-demo__play,
.hero-demo:focus-visible .hero-demo__play {
  transform: scale(1.05);
}

.hero-demo__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -32px;
  text-align: center;
  font-family: var(--hand);
  font-size: 16px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

/* When the video is in fullscreen, drop the paper frame entirely */
.hero-demo__video:fullscreen,
.hero-demo__video:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
  border-radius: 0;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-block: 64px 80px;
  border-top: 1px solid var(--rule);
  margin-top: 32px;
}
@media (min-width: 720px) {
  .footer { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 {
  font-family: var(--sans);
  font-style: normal;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--coffee);
  margin-bottom: 6px;
  font-weight: 700;
}
.footer__col a {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 120ms ease;
}
.footer__col a:hover { color: var(--ink); }
.footer__tag {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  margin: 6px 0 0;
}
.nav__brand--footer { font-size: 20px; }

.footer__col--end { justify-content: flex-end; }
.footer__signoff {
  font-family: var(--hand);
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* -------------------------------------------------------------------------
   Trust line (sits directly under the strip)
   ------------------------------------------------------------------------- */
.trust-line {
  margin: 18px auto 0;
  padding: 0 24px;
  max-width: 720px;
  text-align: center;
  font-family: var(--hand);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--coffee);
  opacity: 0.85;
}

/* -------------------------------------------------------------------------
   Founder note (replaces customer testimonial)
   ------------------------------------------------------------------------- */
.founder-note {
  text-align: center;
}
.founder-note__card {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: 26px 28px 22px;
  background: var(--paper-soft);
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  box-shadow: 0 10px 24px -18px rgba(27, 28, 22, 0.4);
  transform: rotate(-0.5deg);
}
.founder-note__kicker {
  display: inline-block;
  font-family: var(--hand);
  color: var(--coffee);
  font-size: 14px;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.founder-note__body {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.1vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 18px;
  text-align: left;
}
.founder-note__sig {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}
.founder-note__photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--rule);
  flex-shrink: 0;
}
.founder-note__name {
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-soft);
}
.founder-note__name strong {
  display: block;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.founder-note__name em {
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
}

/* -------------------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
