/* Landing page: "paper and fjord". Fjord palette (style.css), an editorial serif for display type,
   fjord contour lines and paper grain. Everything is same-origin to satisfy the strict CSP. */

.landing {
  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", "Book Antiqua", "Noto Serif", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --mint: #8FE0CF;
  --clay: #9A4F3A;
  --spruce-deep: #1F3F3B;
  --wrap: 1180px;
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--bg); color: var(--ink);
}
@media (prefers-color-scheme: dark) { .landing { --clay: #F0B39F; --spruce-deep: #0F2422; } }

/* Paper grain over everything, very faint. */
.landing::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.12 0 0 0 0 0.11 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.contours { position: absolute; inset: 0 0 auto; width: 100%; height: 900px; z-index: -1; color: var(--primary); opacity: .16; pointer-events: none; }

/* When the landing page is shown, the app chrome steps aside. */
body.landing-mode #app-bar, body.landing-mode #main { display: none; }

/* --- Top bar ------------------------------------------------------------------------------- */
.l-bar { max-width: var(--wrap); margin: 0 auto; padding: 22px 28px; display: flex; align-items: center; gap: 24px; }
.l-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 600 21px/1 var(--serif); letter-spacing: -.2px; }
.l-brand:hover { text-decoration: none; }
.landing .l-links { margin-left: auto; width: auto; display: flex; align-items: center; gap: 6px; }
.l-links a { color: var(--ink-2); padding: 10px 14px; border-radius: 999px; font-size: 15px; }
.l-links a:hover { text-decoration: none; color: var(--ink); background: color-mix(in srgb, var(--high) 70%, transparent); }
.l-links .l-signin { color: var(--on-primary); background: var(--primary); padding: 10px 20px; margin-left: 6px; font-weight: 500; }
.l-links .l-signin:hover { background: color-mix(in srgb, var(--primary) 88%, var(--ink)); color: var(--on-primary); }

/* --- Hero ---------------------------------------------------------------------------------- */
.hero {
  max-width: var(--wrap); margin: 0 auto; padding: 56px 28px 96px;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: center;
}
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin: 0 0 22px; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }
.eyebrow.light { color: var(--mint); }
.display {
  font: 400 clamp(46px, 7.2vw, 92px)/.98 var(--serif); letter-spacing: -.025em; margin: 0 0 28px; color: var(--ink);
  text-wrap: balance;
}
.display em, .section-title em { font-style: italic; color: var(--primary); }
.display.closing-title { font-size: clamp(38px, 5.4vw, 64px); margin: 0 0 32px; }
.lede { font-size: 19px; line-height: 30px; color: var(--ink-2); max-width: 34em; margin: 0 0 36px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.l-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-size: 16px; font-weight: 500; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.l-btn:hover { text-decoration: none; }
.l-btn.primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--primary) 80%, transparent); }
.l-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--primary) 90%, transparent); }
.l-btn.primary span { transition: transform .2s ease; }
.l-btn.primary:hover span { transform: translateX(3px); }
.l-btn.quiet { color: var(--ink); background: color-mix(in srgb, var(--high) 80%, transparent); }
.l-btn.quiet:hover { background: var(--high); }

.facts { list-style: none; padding: 28px 0 0; margin: 40px 0 0; border-top: 1px solid var(--line); display: flex; gap: 32px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.facts li { max-width: 10.5em; }
.facts strong { display: block; font: 400 22px/28px var(--serif); color: var(--ink); margin-bottom: 2px; }

/* --- Hero stage: phone + the PDF and fields it produces -------------------------------------- */
.stage { position: relative; height: 600px; }
.phone {
  position: absolute; left: 50%; top: 0; width: 290px; height: 590px; transform: translateX(-58%) rotate(-3deg);
  background: #0E100F; border-radius: 44px; padding: 14px;
  box-shadow: 0 0 0 1.5px #2a2e2c inset, 0 50px 80px -40px rgba(20, 30, 28, .55), 0 18px 40px -20px rgba(20, 30, 28, .4);
  display: flex; flex-direction: column; animation: phone-in 1s cubic-bezier(.2, .8, .2, 1) .15s both;
}
.phone-top { height: 52px; display: grid; place-items: center; }
.pill {
  font-size: 12px; font-weight: 600; color: #0E100F; background: var(--mint); padding: 6px 12px; border-radius: 999px;
  opacity: 0; animation: fade-in .4s ease 2.1s forwards;
}
.viewfinder {
  position: relative; flex: 1; border-radius: 22px; overflow: hidden; display: grid; place-items: start center; padding-top: 34px;
  background: radial-gradient(120% 90% at 30% 20%, #5b5348 0%, #3a352f 45%, #24211d 100%);
}
.target { position: relative; transform: rotate(4deg); }
.receipt {
  width: 172px; padding: 18px 16px 22px; background: #FBFAF6; color: #2b2a27;
  font: 10.5px/1.55 var(--mono); display: flex; flex-direction: column; text-align: center;
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .6);
  clip-path: polygon(0 0, 100% 0, 100% 97%, 94% 100%, 88% 97%, 82% 100%, 76% 97%, 70% 100%, 64% 97%, 58% 100%, 52% 97%, 46% 100%, 40% 97%, 34% 100%, 28% 97%, 22% 100%, 16% 97%, 10% 100%, 4% 97%, 0 100%);
}
.receipt b { font-size: 12.5px; letter-spacing: .08em; }
.receipt hr { border: 0; border-top: 1px dashed #9c978c; margin: 8px 0; width: 100%; }
.receipt .ln { display: flex; justify-content: space-between; text-align: left; }
.receipt .ln i { font-style: normal; }
.receipt .total { font-weight: 700; }
.receipt .thanks { margin-top: 10px; }

/* Mint corner brackets lock onto the receipt, then a scan line passes once. */
.corner { position: absolute; width: 28px; height: 28px; border: 3px solid var(--mint); filter: drop-shadow(0 0 6px rgba(143, 224, 207, .55)); }
.corner.tl { top: -12px; left: -12px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; animation: lock-tl 1.1s cubic-bezier(.3, 1.4, .5, 1) .8s both; }
.corner.tr { top: -12px; right: -12px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; animation: lock-tr 1.1s cubic-bezier(.3, 1.4, .5, 1) .8s both; }
.corner.bl { bottom: -12px; left: -12px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; animation: lock-bl 1.1s cubic-bezier(.3, 1.4, .5, 1) .8s both; }
.corner.br { bottom: -12px; right: -12px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; animation: lock-br 1.1s cubic-bezier(.3, 1.4, .5, 1) .8s both; }
.scanline {
  position: absolute; left: 10%; right: 10%; height: 2px; top: 20%; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--mint), transparent); box-shadow: 0 0 18px 4px rgba(143, 224, 207, .45);
  animation: scan 1.3s ease-in-out 1.7s both, scan-idle 6s ease-in-out 4s infinite;
}
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: flash .5s ease-out 3s both; pointer-events: none; }
.phone-bottom { height: 92px; display: grid; place-items: center; }
.shutter { width: 58px; height: 58px; border-radius: 50%; border: 4px solid #fff; box-shadow: inset 0 0 0 4px #0E100F, inset 0 0 0 30px #fff; animation: press .3s ease 2.9s both; }

/* Results cards */
.l-card {
  position: absolute; background: var(--white); color: var(--ink); border-radius: 20px;
  box-shadow: 0 24px 50px -24px rgba(25, 35, 32, .45), 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent);
}
.l-card.pdf { right: -14px; top: 356px; width: 288px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; animation: card-in .8s cubic-bezier(.2, .8, .2, 1) 3.2s both, float 7s ease-in-out 4.2s infinite; }
.doc-ico { width: 36px; height: 46px; flex: none; border-radius: 6px; background: var(--primary-soft); position: relative; }
.doc-ico::after { content: "PDF"; position: absolute; inset: auto 0 6px; text-align: center; font: 700 9px/1 var(--mono); color: var(--on-primary-soft); }
.card-body { display: flex; flex-direction: column; min-width: 0; font-size: 14px; line-height: 19px; white-space: nowrap; }
.card-body small { color: var(--ink-2); font-size: 12.5px; }
.tick { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--on-good-soft); background: var(--good-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.l-card.fields { left: -8px; bottom: 0; width: 236px; margin: 0; padding: 16px 18px; display: grid; gap: 10px; animation: card-in .8s cubic-bezier(.2, .8, .2, 1) 3.5s both, float 8s ease-in-out 4.6s infinite reverse; }
.l-card.fields div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.l-card.fields div + div { border-top: 1px solid var(--line); padding-top: 10px; }
.l-card.fields dt { color: var(--ink-2); }
.l-card.fields dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- How it works ---------------------------------------------------------------------------- */
.how, .features, .closing { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.how { padding-top: 40px; padding-bottom: 100px; }
.section-title { font: 400 clamp(34px, 4.4vw, 54px)/1.05 var(--serif); letter-spacing: -.02em; margin: 0 0 56px; text-wrap: balance; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.steps li { padding: 28px 32px 8px 0; }
.steps li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.num { font: italic 400 15px/1 var(--serif); color: var(--primary); }
.steps h3 { font: 400 34px/1.1 var(--serif); margin: 18px 0 12px; letter-spacing: -.01em; }
.steps p { color: var(--ink-2); margin: 0; font-size: 16px; line-height: 26px; }

/* --- Feature bento --------------------------------------------------------------------------- */
.features { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; padding-bottom: 110px; }
.feat { background: var(--low); border-radius: 28px; padding: 32px; }
.feat.wide { grid-row: span 2; display: flex; flex-direction: column; }
.feat.band { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 40px; align-items: baseline; }
.feat.band h3 { margin: 0; }
.feat h3 { font: 400 26px/1.2 var(--serif); margin: 0 0 12px; letter-spacing: -.01em; }
.feat p { color: var(--ink-2); margin: 0; font-size: 16px; line-height: 26px; }
.meter { margin-top: auto; padding-top: 40px; display: grid; gap: 8px; }
.meter small { font-size: 13px; color: var(--ink-2); }
.meter .m-bar { display: block; height: 14px; border-radius: 999px; transform-origin: left; margin-bottom: 10px; }
.meter .bar-a { background: color-mix(in srgb, var(--clay) 75%, var(--low)); width: 100%; }
.meter .bar-b { background: var(--primary); width: 22%; }
.feat.in .meter .m-bar { animation: grow 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.feat.in .meter .bar-b { animation-delay: .25s; }
.search-demo { margin-top: 22px !important; display: flex; flex-direction: column; gap: 8px; }
.search-demo .q { align-self: flex-start; background: var(--white); color: var(--ink); border-radius: 999px; padding: 8px 18px 8px 38px; position: relative; font-size: 15px; box-shadow: 0 0 0 1px var(--line); }
.search-demo .q::before { content: ""; position: absolute; left: 15px; top: 50%; width: 10px; height: 10px; border: 2px solid var(--ink-2); border-radius: 50%; transform: translateY(-62%); }
.search-demo .q::after { content: ""; position: absolute; left: 25px; top: 58%; width: 6px; height: 2px; background: var(--ink-2); transform: rotate(45deg); }
.search-demo .hit { align-self: flex-start; font-size: 14px; color: var(--on-primary-soft); background: var(--primary-soft); padding: 6px 14px; border-radius: 10px; }

/* --- Privacy band ---------------------------------------------------------------------------- */
.privacy { background: var(--spruce-deep); color: #E9EEEA; position: relative; overflow: hidden; }
.privacy::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(143, 224, 207, .18); box-shadow: 0 0 0 60px rgba(143, 224, 207, .04), 0 0 0 120px rgba(143, 224, 207, .03);
}
.privacy-inner { max-width: var(--wrap); margin: 0 auto; padding: 110px 28px; position: relative; z-index: 1; }
.privacy .section-title { color: #F4F6F2; }
.privacy .section-title em { color: var(--mint); }
.vows { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.vows li { font-size: 16px; line-height: 26px; color: #C4D0CA; border-top: 1px solid rgba(143, 224, 207, .35); padding-top: 22px; }
.vows b { display: block; font: 400 24px/1.25 var(--serif); color: #F4F6F2; margin-bottom: 10px; }

/* --- Closing & footer ------------------------------------------------------------------------ */
.closing { text-align: center; padding-top: 130px; padding-bottom: 120px; }
.l-foot { max-width: var(--wrap); margin: 0 auto; padding: 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; }
.l-foot span { display: flex; align-items: center; gap: 8px; }

/* --- Motion ---------------------------------------------------------------------------------- */
.rise { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; } .d3 { animation-delay: .27s; } .d4 { animation-delay: .4s; } .d5 { animation-delay: .52s; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.d2 { transition-delay: .12s; } .reveal.d3 { transition-delay: .24s; }
.reveal.in { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes phone-in { from { opacity: 0; transform: translateX(-58%) translateY(40px) rotate(2deg); } }
@keyframes lock-tl { from { opacity: 0; transform: translate(-26px, -26px); } }
@keyframes lock-tr { from { opacity: 0; transform: translate(26px, -26px); } }
@keyframes lock-bl { from { opacity: 0; transform: translate(-26px, 26px); } }
@keyframes lock-br { from { opacity: 0; transform: translate(26px, 26px); } }
@keyframes scan { 0% { opacity: 0; top: 20%; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; top: 84%; } }
@keyframes scan-idle { 0%, 70% { opacity: 0; top: 20%; } 74% { opacity: .7; } 96% { opacity: .7; } 100% { opacity: 0; top: 84%; } }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: .55; } 100% { opacity: 0; } }
@keyframes press { 50% { transform: scale(.88); } }
@keyframes card-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes grow { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .landing *, .landing *::before, .landing *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .pill { opacity: 1; }
}

/* --- Responsive ------------------------------------------------------------------------------ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; padding-bottom: 72px; }
  .stage { height: 560px; max-width: 520px; width: 100%; margin: 0 auto; }
  .features { grid-template-columns: 1fr; }
  .feat.wide { grid-row: auto; }
  .feat.band { grid-template-columns: 1fr; }
  .vows { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .l-bar { padding: 16px 16px; }
  .l-links a:not(.l-signin) { display: none; }
  .hero, .how, .features, .closing, .privacy-inner { padding-left: 16px; padding-right: 16px; }
  .lede { font-size: 17px; line-height: 27px; }
  .facts { gap: 20px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .stage { height: 580px; }
  .phone { width: 250px; height: 510px; transform: translateX(-50%) rotate(-3deg); }
  @keyframes phone-in { from { opacity: 0; transform: translateX(-50%) translateY(40px) rotate(2deg); } }
  .receipt { width: 148px; font-size: 9.5px; }
  .l-card.pdf { right: 0; top: 346px; width: 236px; padding: 12px; }
  .card-body b { font-size: 13px; }
  .tick { display: none; }
  .l-card.fields { left: 0; bottom: 0; width: 200px; }
  .feat { padding: 26px 22px; border-radius: 24px; }
  .privacy-inner { padding-top: 80px; padding-bottom: 80px; }
  .closing { padding-top: 90px; padding-bottom: 90px; }
}

/* Longer product name: keep the top bar on one line on phones. */
.l-brand span, .l-links a { white-space: nowrap; }
@media (max-width: 420px) {
  .l-brand { font-size: 17px; gap: 8px; }
  .l-brand img { width: 26px; height: 26px; }
  .landing .l-links .l-signin { padding: 9px 14px; font-size: 14px; }
}
