/* PDFly site — tokens mirror core/ui Color.kt / Type.kt / Shape.kt (docs/DESIGN_SYSTEM.md) */
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope_medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter_medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --brand-indigo: #5B5FEF;
  --brand-coral: #FF6B5B;
  --brand-mint: #2FD9C4;

  --surface: #FAFAFC;
  --surface-container: #F1F1F6;
  --surface-high: #E8E8F0;
  --card: #FFFFFF;
  --on-surface: #1B1B23;
  --on-surface-variant: #5F5D6B;
  --outline: #D9D8E3;
  --primary: #4A4ED6;
  --cta: #CC3A28;
  --on-cta: #FFFFFF;
  --success: #0F7A6B;

  --ft-pdf: #D93A3F; --ft-word: #3E63DD; --ft-excel: #0E8074;
  --ft-ppt: #C25510; --ft-epub: #8E4EC6; --ft-image: #9A6A00;

  --fold-shade: rgba(27, 27, 35, .10);
  --hero-a: #3438C8; --hero-b: #4A6BD6; --hero-c: #6A4FB8;

  --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 28px;
  --heading: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #12121A; --surface-container: #1C1C26; --surface-high: #262633; --card: #1C1C26;
    --on-surface: #ECECF2; --on-surface-variant: #A5A2B8; --outline: #33323F;
    --primary: #A9ABFF; --cta: #FF8A7A; --on-cta: #1B1B23; --success: #2FD9C4;
    --ft-pdf: #FF6369; --ft-word: #849DFF; --ft-excel: #2FD9C4; --ft-ppt: #FF9A4D; --ft-epub: #C08CFF; --ft-image: #FFC65C;
    --fold-shade: rgba(0, 0, 0, .35);
    --hero-a: #23268F; --hero-b: #2C3F95; --hero-c: #3E2E78;
  }
}
:root[data-theme="dark"] {
  --surface: #12121A; --surface-container: #1C1C26; --surface-high: #262633; --card: #1C1C26;
  --on-surface: #ECECF2; --on-surface-variant: #A5A2B8; --outline: #33323F;
  --primary: #A9ABFF; --cta: #FF8A7A; --on-cta: #1B1B23; --success: #2FD9C4;
  --ft-pdf: #FF6369; --ft-word: #849DFF; --ft-excel: #2FD9C4; --ft-ppt: #FF9A4D; --ft-epub: #C08CFF; --ft-image: #FFC65C;
  --fold-shade: rgba(0, 0, 0, .35);
  --hero-a: #23268F; --hero-b: #2C3F95; --hero-c: #3E2E78;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--on-surface); font: 400 16px/1.6 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible, .gallery:focus-visible { outline: 3px solid var(--brand-indigo); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--heading); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Paper Fold — PaperShape bevel on the top-right corner + darker folded triangle */
.paper { --fold: 18px; position: relative; clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%); }
.paper::after { content: ""; position: absolute; top: 0; right: 0; width: var(--fold); height: var(--fold);
  background: linear-gradient(225deg, transparent 50%, var(--fold-shade) 50%); border-bottom-left-radius: 4px; }

/* Buttons — large radius (20dp), coral CTA fill */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px;
  border-radius: var(--r-lg); font: 500 15px/1.2 var(--body); text-decoration: none; border: 0; cursor: pointer;
  transition: transform .25s cubic-bezier(.34,1.3,.64,1), box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn-play { background: var(--cta); color: var(--on-cta); padding: 10px 22px 10px 18px; box-shadow: 0 8px 24px rgba(204, 58, 40, .28); }
.btn-play span { display: flex; flex-direction: column; text-align: left; font: 700 18px/1.1 var(--heading); }
.btn-play small { font: 500 11px/1.2 var(--body); text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.btn-ghost { background: var(--surface-container); color: var(--primary); }
.btn-small { min-height: 40px; padding: 8px 16px; background: var(--cta); color: var(--on-cta); font-size: 14px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--outline); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-surface); font: 700 20px/1 var(--heading); }
.brand img { border-radius: 10px; }
.topnav { display: flex; align-items: center; gap: 22px; }
.topnav a:not(.btn) { color: var(--on-surface-variant); text-decoration: none; font-weight: 500; font-size: 15px; }
.topnav a:not(.btn):hover { color: var(--primary); }
@media (max-width: 640px) { .topnav a:not(.btn) { display: none; } }

/* Hero — indigo gradient like the store screenshots */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate;
  background: linear-gradient(140deg, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 100%); }
.hero-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.b1 { width: 420px; height: 420px; background: var(--brand-coral); top: -160px; left: -120px; opacity: .35; }
.b2 { width: 520px; height: 520px; background: var(--brand-mint); bottom: -260px; right: -120px; opacity: .35; }
.b3 { width: 360px; height: 360px; background: #8E7BFF; top: 30%; left: 45%; opacity: .3; }
.hero-inner { display: grid; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: 1.05fr .95fr; padding-top: 72px; padding-bottom: 80px; } }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); font: 500 14px/1 var(--body); letter-spacing: .02em; }
.pill img { border-radius: 7px; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.02; letter-spacing: -.035em; margin: 22px 0 20px; }
.hero h1 .hl { background: linear-gradient(90deg, #FFFFFF, #B9F5EC 45%, #FFC2B9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: rgba(255,255,255,.88); max-width: 32em; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-play { background: #fff; color: #1B1B23; box-shadow: 0 12px 34px rgba(0,0,0,.25); }
.hero .btn-play svg { color: var(--brand-indigo); }
.hero .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 28px 0 0; font-weight: 500; color: rgba(255,255,255,.92); }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { color: var(--brand-mint); }

/* Phone frame — never distorts: width-driven, height auto */
.phone { position: relative; background: #15151d; padding: 8px; border-radius: 38px; box-shadow: 0 30px 70px rgba(10, 10, 60, .35); }
.phone img { width: 100%; height: auto; border-radius: 30px; }
.hero-visual { position: relative; justify-self: center; width: min(460px, 100%); height: 560px; }
.hero-visual .phone-front { position: absolute; width: 250px; left: 50%; top: 0; transform: translateX(-38%); z-index: 2; }
.hero-visual .phone-back { position: absolute; width: 220px; left: 50%; top: 50px; transform: translateX(-112%) rotate(-8deg); opacity: .9; z-index: 1; }
.float-card { --fold: 14px; position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px;
  background: var(--card); color: var(--on-surface); border-radius: var(--r-md); box-shadow: 0 18px 40px rgba(10,10,60,.28);
  animation: float 6s ease-in-out infinite; }
.float-card strong { display: block; font: 700 15px/1.2 var(--heading); }
.float-card small { display: block; color: var(--on-surface-variant); font-size: 12.5px; margin-top: 2px; }
.float-card .icon-tile { width: 42px; height: 42px; border-radius: 12px; }
.float-card .icon-tile svg { width: 24px; height: 24px; }
.fc-1 { top: 70px; left: -40px; }
.fc-2 { top: 260px; right: -20px; animation-delay: -2s; }
.fc-3 { bottom: 40px; left: 10px; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 520px) {
  .hero-visual { height: 470px; }
  .hero-visual .phone-front { width: 210px; }
  .hero-visual .phone-back { width: 180px; }
  .fc-1 { left: 0; top: 20px; } .fc-2 { right: 0; top: 220px; } .fc-3 { left: 0; bottom: 30px; }
  .float-card { padding: 10px 14px 10px 10px; }
}

/* Stats strip */
.stats { background: var(--card); border-bottom: 1px solid var(--outline); position: relative; z-index: 1; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 26px 12px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--outline); }
@media (max-width: 759px) { .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--outline); } }
.stat strong { display: block; font: 700 clamp(30px, 4vw, 40px)/1 var(--heading); letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--primary), var(--cta)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { display: block; margin-top: 6px; color: var(--on-surface-variant); font-weight: 500; font-size: 14px; }

/* Sections */
.section { padding: 80px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--surface-container); }
.section-head { margin-bottom: 40px; }
.section-head.center { text-align: center; }
.section-head.center h2 { margin-left: auto; margin-right: auto; }
.eyebrow { margin: 0 0 10px; color: var(--primary); font: 500 13px/1.4 var(--body); text-transform: uppercase; letter-spacing: .1em; }
.section h2, .formats-band h2 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.1; letter-spacing: -.03em; max-width: 16em; }

/* Feature showcase rows */
.showcase { display: grid; gap: 36px; align-items: center; padding: 28px 0; }
.showcase + .showcase { margin-top: 32px; }
@media (min-width: 900px) {
  .showcase { grid-template-columns: 1fr 1fr; gap: 64px; }
  .showcase.reverse .showcase-copy { order: 2; }
}
.showcase-copy h3 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; letter-spacing: -.025em; margin: 20px 0 14px; }
.showcase-copy p { color: var(--on-surface-variant); font-size: 17px; margin: 0 0 20px; max-width: 30em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { padding: 7px 14px; border-radius: 999px; background: var(--surface-container); font-weight: 500; font-size: 14px; }
.showcase-visual { --tint: var(--primary); position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0;
  padding: 40px 24px 0; min-height: 420px; border-radius: var(--r-xl); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--tint) 30%, var(--surface)), color-mix(in srgb, var(--tint) 8%, var(--surface)) 70%); }
.showcase-visual .phone { width: 230px; flex: none; border-radius: 34px 34px 0 0; padding-bottom: 0; margin-bottom: -2px;
  max-height: 440px; overflow: hidden; box-shadow: 0 20px 50px color-mix(in srgb, var(--tint) 35%, transparent); }
.showcase-visual .phone img { border-radius: 26px 26px 0 0; }
.showcase-visual .phone-side { width: 200px; margin-left: -60px; transform: translateY(40px) rotate(6deg); max-height: 380px; z-index: 0; }
.showcase-visual .phone:first-child { z-index: 1; }
.v-indigo { --tint: var(--brand-indigo); }
.v-coral { --tint: var(--brand-coral); }
.v-amber { --tint: #FFC65C; }
.v-mint { --tint: var(--brand-mint); }
@media (max-width: 520px) {
  .showcase-visual { min-height: 0; padding: 28px 12px 0; }
  .showcase-visual .phone { width: 190px; max-height: 360px; }
  .showcase-visual .phone-side { width: 160px; margin-left: -70px; max-height: 300px; }
}

.icon-tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--tile); background:
  linear-gradient(135deg, color-mix(in srgb, var(--tile) 12%, var(--card)), color-mix(in srgb, var(--tile) 26%, var(--card))); }
.icon-tile svg { width: 28px; height: 28px; }
.icon-tile.big { width: 60px; height: 60px; border-radius: 18px; }
.icon-tile.big svg { width: 32px; height: 32px; }
.tile-indigo { --tile: var(--primary); }
.tile-coral { --tile: var(--cta); }
.tile-mint { --tile: var(--success); }
.tile-amber { --tile: var(--ft-image); }
.tile-word { --tile: var(--ft-word); }
.tile-epub { --tile: var(--ft-epub); }

/* Tools grid */
.tool-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .tool-grid { grid-template-columns: repeat(6, 1fr); } }
.tool { --fold: 16px; background: var(--card); border-radius: var(--r-sm); padding: 22px 14px; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 4px; transition: transform .25s cubic-bezier(.34,1.3,.64,1), box-shadow .2s; }
.tool:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(27,27,35,.08); }
.tool .icon-tile { margin-bottom: 10px; }
.tool strong { font: 700 16px/1.3 var(--heading); }
.tool span:not(.icon-tile) { color: var(--on-surface-variant); font-size: 13.5px; }

/* Formats band */
.formats-band { color: #fff; background: linear-gradient(135deg, #1B1B3A, #22245E 60%, #2E1F5C); padding: 56px 0; }
.formats-inner { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .formats-inner { grid-template-columns: .9fr 1.1fr; } }
.formats-band h2 { margin: 0; }
.formats { display: flex; flex-wrap: wrap; gap: 12px; }
.fmt { position: relative; padding: 14px 22px 14px 24px; border-radius: 12px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1); font: 700 18px/1.2 var(--heading); overflow: hidden; }
.fmt::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--c); }

/* Gallery — fixed 9:16 tiles, no stretching */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 4px 4px 16px; margin: 0 -4px; scrollbar-width: thin; }
@media (min-width: 1100px) { .gallery { grid-auto-columns: calc((100% - 80px) / 6); overflow: visible; padding: 0; margin: 0; } }
.gallery img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; scroll-snap-align: start;
  border-radius: var(--r-md); box-shadow: 0 10px 30px rgba(27,27,35,.12); }

/* Privacy band */
.privacy-band { --fold: 36px; display: grid; gap: 32px; align-items: center; padding: 44px; border-radius: var(--r-xl); color: #fff;
  background: radial-gradient(80% 120% at 100% 0%, rgba(47,217,196,.35), transparent 60%), linear-gradient(135deg, #0E6B60, #12405F 60%, #22245E); }
@media (min-width: 900px) { .privacy-band { grid-template-columns: 1.1fr .9fr; padding: 56px; } }
@media (max-width: 540px) { .privacy-band { padding: 28px 20px; } }
.privacy-band h2 { margin: 18px 0 12px; }
.privacy-copy p { margin: 0 0 24px; color: rgba(255,255,255,.85); max-width: 34em; }
.icon-tile.shield { --tile: #fff; background: rgba(255,255,255,.15); color: #fff; width: 56px; height: 56px; }
.btn-light { background: #fff; color: #0E6B60; }
.privacy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.privacy-list li { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-md);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.privacy-list svg { width: 26px; height: 26px; flex: none; color: var(--brand-mint); }
.privacy-list strong { display: block; font: 700 16px/1.3 var(--heading); }
.privacy-list span span, .privacy-list li > span { color: rgba(255,255,255,.8); font-size: 14px; }
.privacy-list li > span strong { color: #fff; }

/* Final CTA */
.cta-final { position: relative; overflow: hidden; display: grid; gap: 24px; align-items: end; border-radius: var(--r-xl); color: #fff;
  padding: 48px 32px 0; background: radial-gradient(60% 90% at 90% 100%, rgba(255,107,91,.45), transparent 60%),
  linear-gradient(135deg, var(--hero-a), var(--hero-b) 60%, var(--hero-c)); }
@media (min-width: 900px) { .cta-final { grid-template-columns: 1.2fr .8fr; padding: 56px 56px 0; } }
.cta-copy { padding-bottom: 48px; }
.cta-icon { border-radius: 18px; margin-bottom: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.cta-final h2 { margin: 0 0 12px; }
.cta-final p { color: rgba(255,255,255,.88); margin: 0 0 26px; max-width: 30em; font-size: 17px; }
.cta-final .btn-play { background: #fff; color: #1B1B23; }
.cta-final .btn-play svg { color: var(--brand-indigo); }
.cta-phone { justify-self: center; width: 240px; }
.cta-phone .phone { border-radius: 36px 36px 0 0; padding-bottom: 0; max-height: 360px; overflow: hidden; }
.cta-phone .phone img { border-radius: 28px 28px 0 0; }
@media (max-width: 899px) { .cta-copy { padding-bottom: 0; } }

.footer { border-top: 1px solid var(--outline); padding: 32px 0 40px; color: var(--on-surface-variant); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer nav a { color: var(--on-surface-variant); text-decoration: none; font-weight: 500; }
.footer nav a:hover { color: var(--primary); }
.footer p { margin: 0; flex-basis: 100%; }

/* Privacy policy page */
.doc-hero { padding: 48px 0 36px; background: linear-gradient(135deg, var(--hero-a), var(--hero-b) 55%, var(--hero-c)); color: #fff; }
.doc-hero h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.1; margin: 16px 0 10px; }
.doc-hero .meta { color: rgba(255,255,255,.82); font-size: 14px; margin: 0 0 6px; }
.doc-hero p { margin: 0; color: rgba(255,255,255,.9); max-width: 46em; }
.doc-layout { display: grid; gap: 24px; padding: 32px 0 64px; }
@media (min-width: 960px) { .doc-layout { grid-template-columns: 240px 1fr; align-items: start; } }
.toc { --fold: 16px; background: var(--card); border: 1px solid var(--outline); border-radius: var(--r-md); padding: 18px 18px 14px; }
@media (min-width: 960px) { .toc { position: sticky; top: 84px; } }
.toc strong { display: block; font: 700 15px/1.3 var(--heading); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2 150px; column-gap: 20px; font-size: 14px; }
@media (min-width: 960px) { .toc ol { columns: 1; } }
.toc li { margin: 0 0 6px; break-inside: avoid; color: var(--on-surface-variant); }
.toc a { color: var(--on-surface-variant); text-decoration: none; }
.toc a:hover { color: var(--primary); }
.doc { --fold: 28px; background: var(--card); border: 1px solid var(--outline); border-radius: var(--r-lg); padding: 36px; min-width: 0; }
@media (max-width: 540px) { .doc { padding: 24px 18px; } }
.doc section { scroll-margin-top: 84px; overflow-wrap: anywhere; }
.doc section + section { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--outline); }
.doc h2 { font-size: 21px; line-height: 1.35; margin: 0 0 12px; display: flex; gap: 10px; align-items: baseline; }
.doc h2 .num { flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 9px; font-size: 14px;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--card)); }
.doc p { margin: 0 0 14px; }
.doc ul { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--primary); }

@media print {
  .topbar, .toc, .footer nav { display: none; }
  .doc-hero { background: none; color: #000; padding: 0 0 16px; }
  .doc-hero .meta, .doc-hero p { color: #333; }
  .doc { border: 0; padding: 0; clip-path: none; }
  .paper::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .tool { transition: none; } .float-card { animation: none; } }
