/* PDFStamp showcase — clean, restrained styles */
:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f4;
  --tint: #f4f7fd;
  --text: #16181d;
  --muted: #5a5e68;
  --line: #e4e4de;
  --accent: #1f5fd6;
  --accent-dark: #184cab;
  --code-bg: #f3f3ef;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --maxw: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; font-weight: 650; letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--code-bg); padding: 0.12em 0.38em; border-radius: 4px; }
pre { margin: 0; }
pre code { display: block; background: #15181f; color: #e9ecf2; border: 0; border-radius: 8px; padding: 1.1rem 1.2rem; overflow-x: auto; font-size: 0.8rem; line-height: 1.6; white-space: pre; }

.wrap { width: min(var(--maxw), 90vw); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.6rem 1.25rem; border: 1px solid var(--line);
  border-radius: 7px; background: var(--bg); color: var(--text);
  font-size: 0.95rem; font-weight: 550; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--bg-alt); text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--block { display: block; width: 100%; text-align: center; }

/* Nav */
.nav { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,0.88); backdrop-filter: blur(8px); z-index: 20; }
.nav__inner { display: flex; align-items: center; height: 60px; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; color: var(--text); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.logo { width: 26px; height: 26px; display: block; }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; font-size: 0.93rem; }
.nav__links a { color: var(--muted); }
.nav__links a:hover { color: var(--text); }
.nav__auth { display: flex; align-items: center; gap: 0.9rem; margin-left: 1.6rem; }
.nav__login { color: var(--muted); font-weight: 500; }
.nav__login:hover { color: var(--text); }
.btn--sm { padding: 0.42rem 0.9rem; font-size: 0.9rem; }
@media (max-width: 680px) {
  .nav__links { display: none; }
  .nav__auth { margin-left: auto; }
}

/* Hero */
.hero { background: linear-gradient(180deg, var(--tint), var(--bg) 85%); border-bottom: 1px solid var(--line); padding: 4.5rem 0 4rem; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero__eyebrow { font-size: 0.9rem; font-weight: 600; color: var(--accent); margin-bottom: 0.9rem; letter-spacing: 0.01em; }
.hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); max-width: 16ch; margin-bottom: 1.1rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46ch; margin-bottom: 1.8rem; }
.lead code { background: #e7eefb; color: var(--accent-dark); }
.hero__actions { display: flex; gap: 0.7rem; }
.hero__art svg { width: 100%; height: auto; display: block; }
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero__art { order: -1; max-width: 460px; }
}

/* Sections */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: 0.6rem; }
.section__intro { color: var(--muted); max-width: 62ch; margin-bottom: 2.6rem; font-size: 1.05rem; }

/* Benefits */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
@media (max-width: 760px) { .benefits { grid-template-columns: 1fr; } }
.benefit { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 1.6rem; transition: box-shadow 0.18s, transform 0.18s; }
.benefit:hover { box-shadow: 0 10px 30px -18px rgba(20,30,60,0.35); transform: translateY(-2px); }
.benefit__icon { width: 42px; height: 42px; border-radius: 10px; background: var(--tint); color: var(--accent); display: grid; place-items: center; margin-bottom: 1rem; }
.benefit__icon svg { width: 22px; height: 22px; }
.benefit h3 { font-size: 1.1rem; margin-bottom: 0.45rem; }
.benefit p { color: var(--muted); font-size: 0.95rem; }
.benefit code { background: #e7eefb; color: var(--accent-dark); }

/* How it works */
.works { display: grid; gap: 1.2rem; }
.work { display: grid; grid-template-columns: 290px 1fr; gap: 1.8rem; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 1.8rem 2rem; }
.work__num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.9rem; }
.work__text h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.work__text p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 820px) { .work { grid-template-columns: 1fr; gap: 1.4rem; } }

.ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.work__visual { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.upload { display: flex; align-items: center; gap: 0.7rem; }

/* chips and documents */
.chip, .tpl, .pdfout {
  display: inline-flex; align-items: center; gap: 0.45rem; border: 1px solid var(--line);
  border-radius: 9px; padding: 0.5rem 0.75rem; background: var(--bg); font-size: 0.86rem;
  font-weight: 550; color: var(--text); white-space: nowrap;
}
.chip .ico, .tpl .ico { color: var(--accent); }
.flowarrow { color: var(--muted); font-size: 1.3rem; line-height: 1; }

/* library panel */
.library { border: 1px solid var(--line); border-radius: 12px; background: var(--tint); padding: 0.85rem 0.9rem; }
.library__head { display: flex; align-items: center; gap: 0.4rem; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); margin-bottom: 0.75rem; }
.library__head .ico { color: var(--accent); width: 16px; height: 16px; }
.library__docs { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 360px; }
.tpl { background: var(--bg); }
.tpl--ghost { color: var(--muted); border-style: dashed; background: transparent; }
.tpl--pick { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--accent-dark); }
.tpl--dim { opacity: 0.5; }

.req { align-self: center; }
.req code { padding: 0.75rem 0.9rem; font-size: 0.72rem; line-height: 1.5; text-align: left; }

/* generate flow: keep on one line, compact library stacks vertically */
.work__visual--gen { flex-wrap: nowrap; gap: 0.85rem; }
.library--compact .library__docs { flex-direction: column; max-width: none; gap: 0.4rem; }
.library--compact .tpl { width: 100%; }
@media (max-width: 620px) {
  .work__visual--gen { flex-direction: column; }
  .work__visual--gen .flowarrow { transform: rotate(90deg); }
}
.pdfout { border-color: #e6bcbc; background: #fdeeee; color: #9b2c2c; }
.pdfout .ico { color: #d64545; }

/* API sample */
.sample { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.sample__label { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.5rem; }
.sample__status { float: right; font-family: var(--mono); color: #1f8a3b; }
@media (max-width: 680px) { .sample { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 1.7rem; background: var(--bg); display: flex; flex-direction: column; }
.plan--mid { border-color: var(--accent); box-shadow: 0 10px 34px -20px rgba(31,95,214,0.55); }
.plan__badge { position: absolute; top: -11px; left: 1.7rem; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.65rem; border-radius: 100px; }
.plan h3 { font-size: 1.2rem; margin-bottom: 0.7rem; }
.plan__price { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.plan__price span { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.plan__for { color: var(--muted); font-size: 0.9rem; margin: 0.4rem 0 1.1rem; }
.plan ul { list-style: none; margin: 0 0 1.4rem; padding: 0; font-size: 0.93rem; }
.plan ul li { padding: 0.4rem 0; border-top: 1px solid var(--line); }
.plan ul li:first-child { border-top: 0; }
.plan .btn { margin-top: auto; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 1.8rem 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.footer__brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 650; color: var(--text); }
.footer__brand .logo { width: 22px; height: 22px; }

/* ───────── Motion ───────── */

/* Button micro-lift */
.btn { transition: background 0.15s, border-color 0.15s, transform 0.12s, box-shadow 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn--primary:hover { box-shadow: 0 6px 18px -8px rgba(31, 95, 214, 0.65); }

/* Hero entrance */
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.hero__text { animation: fade-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.hero__text .lead { animation: fade-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.08s both; }
.hero__text .hero__actions { animation: fade-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.16s both; }
.hero__art { animation: fade-in 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s both; }

/* Scroll reveal (only applied once JS adds .reveal) */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* Graphic: data flowing along the wires + a soft pulse on the data box */
@keyframes wire-flow { to { stroke-dashoffset: -16; } }
@keyframes box-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.82; } }
@keyframes chip-glow { 0%, 100% { fill: #e9f0fc; } 50% { fill: #dbe7fb; } }
.hero__art .wire { stroke-dasharray: 5 5; animation: wire-flow 0.9s linear infinite; }
.hero__art .wire--2 { animation-delay: 0.45s; }
.hero__art .databox { animation: box-pulse 3.2s ease-in-out infinite; }
.hero__art .chip { animation: chip-glow 3.2s ease-in-out infinite; }
.hero__art .chip--2 { animation-delay: 1.1s; }

/* "How it works" — picked template pulses, arrows flow, PDF bobs */
@keyframes pick-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--accent); }
  50% { box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px rgba(31, 95, 214, 0.14); }
}
@keyframes arrow-flow { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.tpl--pick { animation: pick-pulse 2.4s ease-in-out infinite; }
.work__visual--gen .flowarrow { color: var(--accent); animation: arrow-flow 1.8s ease-in-out infinite; }
.work__visual--gen .flowarrow--2 { animation-delay: 0.9s; }

@media (prefers-reduced-motion: reduce) {
  .hero__text, .hero__text .lead, .hero__text .hero__actions, .hero__art,
  .hero__art .wire, .hero__art .databox, .hero__art .chip,
  .tpl--pick, .work__visual--gen .flowarrow { animation: none; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
