:root {
  --navy: #0a1128;
  --navy-soft: #16255c;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --purple: #7c3aed;
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --green: #16a34a;
  --ink: #0f1b3c;
  --muted: #5b6785;
  --bg: #f6f8fc;
  --card: #ffffff;
  --border: #e6eaf5;

  --grad-brand: linear-gradient(90deg, var(--indigo) 0%, var(--blue) 55%, var(--teal) 100%);
  --shadow-sm: 0 1px 2px rgba(15, 27, 60, 0.06), 0 1px 3px rgba(15, 27, 60, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 27, 60, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 27, 60, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* "We" half of the WePDF wordmark - same gradient as the Red Tile logo */
.brand-we {
  background: linear-gradient(135deg, #FF7A45, #E03131);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 248, 252, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
}
.brand-mark.small { width: 28px; height: 28px; }

.brand-word {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.brand-word.small { font-size: 17px; }

.nav-links {
  display: flex;
  gap: 28px;
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
}
.nav-links a:hover { color: var(--blue); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-sm { padding: 9px 18px; font-size: 14px; }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* Hero */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(60% 60% at 15% 10%, rgba(37, 99, 235, 0.08), transparent),
    radial-gradient(50% 50% at 85% 20%, rgba(20, 184, 166, 0.10), transparent);
  text-align: center;
}

.hero-logo {
  width: 108px;
  height: 108px;
  margin-bottom: 8px;
}

.hero-word {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin: 0 0 6px;
}

.hero-tagline {
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 14px;
  font-weight: 500;
}
.hero-tagline strong { color: var(--blue); }

.hero-sub {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 17px;
}

.play-store-badge {
  display: inline-block;
  margin-bottom: 14px;
  line-height: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.play-store-badge:hover { transform: translateY(-1px); opacity: 0.92; }
.play-store-badge img { height: 56px; width: auto; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-note {
  min-height: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.form-note.is-success { color: var(--green); }
.form-note.is-error { color: var(--red); }

/* Trust row */
.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 44px auto 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--border);
  max-width: 980px;
}

.trust-row li {
  flex: 1 1 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.trust-icon svg {
  width: 30px;
  height: 30px;
}

.trust-row strong {
  font-size: 14px;
  color: var(--ink);
  margin-top: 2px;
}

/* Section shared */
.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-align: center;
  margin: 0 0 12px;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 44px;
  font-size: 16px;
}

/* Features */
.features { padding: 88px 0; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Toolkit at the top of the landing page: every card opens that tool in the web app. */
.toolkit-top {
  padding: 64px 0 80px;
  background:
    radial-gradient(55% 45% at 12% 0%, rgba(37, 99, 235, 0.09), transparent),
    radial-gradient(45% 40% at 90% 8%, rgba(232, 65, 44, 0.08), transparent);
}
.toolkit-title {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--navy);
  text-align: center;
  max-width: 16ch;
  margin: 0 auto 16px;
  text-wrap: balance;
}
.toolkit-top .section-sub { margin-bottom: 40px; max-width: 600px; font-size: 17px; }
a.feature-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
a.feature-card p { flex: 1; }
.feature-open {
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--blue); /* full strength: 5.2:1 on white (a faded label fails contrast) */
}
a.feature-card:hover { border-color: rgba(37, 99, 235, 0.35); }
a.feature-card:hover .feature-open { text-decoration: underline; text-underline-offset: 3px; }
a.feature-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }

.icon-blue   { background: #e8effe; color: var(--blue); }
.icon-indigo { background: #ecebfe; color: var(--indigo); }
.icon-teal   { background: #e3faf6; color: var(--teal); }
.icon-orange { background: #fff1e6; color: var(--orange); }
.icon-purple { background: #f1eafe; color: var(--purple); }
.icon-cyan   { background: #e3f7fb; color: var(--cyan); }
.icon-pink   { background: #fde9f3; color: var(--pink); }
.icon-green  { background: #e8f8ec; color: var(--green); }

.feature-card h3 {
  font-size: 17px;
  margin: 0 0 6px;
  color: var(--ink);
}
.feature-card p {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
}

/* Security */
.security { padding: 80px 0; background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.security-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}
.security .section-title, .security .section-sub { text-align: left; margin-left: 0; }

.check-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--grad-brand);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 6.5px;
  top: 7px;
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.security-badge {
  display: flex;
  justify-content: center;
}
.security-logo {
  width: 220px;
  height: 220px;
  filter: drop-shadow(var(--shadow-lg));
}

/* Contact */
.contact { padding: 88px 0; }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}
.contact .section-title, .contact .section-sub { text-align: left; margin: 0 0 12px; }
.contact .section-sub { margin-bottom: 0; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fbfcfe;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.contact-form .btn { align-self: flex-start; }

/* Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.footer-links a:hover { color: var(--blue); }

/* Legal pages */
.legal-hero {
  padding: 56px 0 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.legal-hero h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.legal-hero p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.legal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.legal-content h2 {
  font-size: 21px;
  color: var(--navy);
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 16.5px;
  color: var(--ink);
  margin: 24px 0 8px;
}
.legal-content p {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0 0 14px;
}
.legal-content ul, .legal-content ol {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0 0 14px;
  padding-left: 22px;
}
.legal-content li { margin-bottom: 6px; }
.legal-content a { color: var(--blue); font-weight: 600; }
.legal-content a:hover { text-decoration: underline; }
.legal-content strong { color: var(--ink); }
.legal-content .placeholder {
  background: #fff7e6;
  border: 1px dashed #f0b429;
  border-radius: 6px;
  padding: 1px 6px;
  color: #8a5a00;
  font-weight: 600;
  font-size: 0.95em;
}
.legal-content .callout {
  background: #eef4ff;
  border: 1px solid #d6e4ff;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 28px;
}
.legal-toc {
  columns: 2;
  gap: 24px;
}
.legal-toc a { font-size: 14.5px; }
.faq-item { margin-bottom: 22px; }
.faq-item h3 { margin-top: 0; }

@media (max-width: 600px) {
  .legal-toc { columns: 1; }
}

/* Responsive */
@media (max-width: 860px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .security-inner, .contact-inner { grid-template-columns: 1fr; }
  .security-badge { order: -1; }
  .nav-links { display: none; }
  .hero-word { font-size: 42px; }
  .toolkit-top { padding: 44px 0 56px; }
}

/* Phones: compact two-column tool tiles (name only) so all 20 tools fit in a short scroll. */
@media (max-width: 520px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .feature-card { padding: 14px; border-radius: 14px; }
  .feature-card .feature-icon { width: 38px; height: 38px; margin-bottom: 10px; }
  .feature-card h3 { font-size: 15px; margin: 0; }
  .feature-card p, .feature-open { display: none; }
}

@media (prefers-color-scheme: dark) {
  body {
    background: #0b1020;
    color: #e7ecfb;
  }
  .nav { background: rgba(11, 16, 32, 0.85); border-color: #1c2440; }
  .brand-word, .hero-word, .section-title, .toolkit-title, .feature-card h3 { color: #f1f4ff; }
  .btn-ghost { color: #e7ecfb; border-color: #232b4a; }
  .feature-open { color: #7ea6ff; }
  .hero-sub, .section-sub, .feature-card p, .check-list li, .trust-row strong { color: #aeb8dd; }
  .feature-card, .contact-form { background: #10162c; border-color: #1c2440; }
  .contact-form input, .contact-form textarea {
    background: #10162c; border-color: #232b4a; color: #e7ecfb;
  }
  .security { background: #0b1020; border-color: #1c2440; }
  .footer { border-color: #1c2440; }
  .trust-row { border-color: #1c2440; }
  .legal-hero { border-color: #1c2440; }
  .legal-hero h1, .legal-content h2, .legal-content h3 { color: #f1f4ff; }
  .legal-hero p, .legal-content p, .legal-content ul, .legal-content ol { color: #aeb8dd; }
  .legal-content .callout { background: #10162c; border-color: #232b4a; color: #d7deff; }
  .legal-content .placeholder { background: #2a220a; border-color: #7a5400; color: #f0c14b; }
}

/* Mobile menu (the nav links are hidden below 860px) */
.mobile-menu { display: none; position: relative; margin-left: 8px; }
.mobile-menu summary {
  list-style: none; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 10px; font-size: 22px; cursor: pointer; color: var(--ink);
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu[open] summary { background: var(--border); }
.mobile-menu nav {
  position: absolute; right: 0; top: 52px; z-index: 50; min-width: 220px; display: grid; padding: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.mobile-menu nav a { min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 10px; font-weight: 600; }
.mobile-menu nav a:hover { background: var(--bg); }
@media (max-width: 860px) {
  .mobile-menu { display: block; }
  .nav-app { display: none; }
}
@media (prefers-color-scheme: dark) {
  .mobile-menu summary { color: #e7ecfb; }
  .mobile-menu[open] summary { background: #1c2440; }
  .mobile-menu nav { background: #10162c; border-color: #232b4a; }
  .mobile-menu nav a:hover { background: #161e3a; }
}

/* Continue where you left off (landing page; shown only when this browser has history) */
.continue { max-width: 1120px; margin: 0 auto 36px; padding: 20px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); text-align: left; }
.continue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.continue-title { margin: 0; font-size: 19px; color: var(--navy); }
.continue-clear { border: 0; background: none; color: var(--muted); font-weight: 600; cursor: pointer; min-height: 44px; padding: 0 10px; border-radius: 8px; }
.continue-clear:hover { color: var(--blue); background: var(--bg); }
.continue-group { display: grid; gap: 8px; margin-top: 8px; }
.continue-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.continue-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.continue-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: #eef4ff; color: #1d4ed8; font-weight: 700; }
.continue-chip:hover { background: #dbe7ff; }
.continue-docs { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.continue-doc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); min-height: 56px; }
.continue-doc:hover { border-color: var(--blue); }
.continue-doc-icon { flex: none; width: 38px; height: 46px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #b42318; background: #fff1f0; border: 1px solid #ffd6d1; }
.continue-doc-main { display: grid; min-width: 0; }
.continue-doc-main strong { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-doc-main span { font-size: 13px; color: var(--muted); }
.continue-all { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--blue); }
@media (prefers-color-scheme: dark) {
  .continue { background: #10162c; border-color: #1c2440; }
  .continue-title, .continue-doc-main strong { color: #f1f4ff; }
  .continue-chip { background: #1c2a55; color: #b4c8ff; }
  .continue-doc { border-color: #232b4a; }
  .continue-doc-icon { background: #2a1416; border-color: #5a2327; color: #ffb4ab; }
  .continue-all { color: #7ea6ff; }
}

/* 404 page */
.not-found { padding: 64px 0 88px; text-align: center; }
.not-found-inner { max-width: 720px; }
.not-found-code {
  margin: 0; font-size: clamp(72px, 16vw, 128px); font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  background: linear-gradient(135deg, #FF7A45, #E03131); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.not-found h1 { margin: 12px 0 10px; font-size: clamp(26px, 5vw, 36px); color: var(--navy); letter-spacing: -0.02em; }
.not-found-lead { margin: 0 auto 28px; max-width: 52ch; color: var(--muted); font-size: 16px; }
.not-found-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.not-found-actions .btn { min-height: 44px; }
.not-found-sub { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.not-found-tools { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.not-found-tools a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-weight: 600; color: var(--ink); }
.not-found-tools a:hover { border-color: var(--blue); color: var(--blue); }
.not-found-help { color: var(--muted); font-size: 14px; }
.not-found-help a { color: var(--blue); font-weight: 700; }
@media (prefers-color-scheme: dark) {
  .not-found h1 { color: #f1f4ff; }
  .not-found-lead, .not-found-help, .not-found-sub { color: #aeb8dd; }
  .not-found-tools a { background: #10162c; border-color: #232b4a; color: #e7ecfb; }
  .not-found-help a { color: #7ea6ff; }
}

/* Shown only on translated legal pages (the English original is the binding text). */
.legal-translation-note { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--blue) 8%, var(--card)); color: var(--ink); font-size: 14px; }
html[lang="en"] .legal-translation-note { display: none; }

/* Language switcher (injected into the footer by seo/site-i18n.js). Always the last footer row,
   start-aligned, so its upward menu opens into free space however long the footer links are. */
.footer .lang-switch { order: 10; flex-basis: 100%; }
.lang-switch details { position: relative; display: inline-block; }
.lang-switch summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--ink); font-weight: 600; font-size: 14px;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { border-color: var(--blue); }
.lang-switch ul {
  position: absolute; bottom: calc(100% + 8px); inset-inline-start: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 2px;
  width: max-content; max-width: calc(100vw - 32px); max-height: 60vh; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.lang-switch a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.lang-switch a:hover { background: var(--bg); color: var(--blue); }
.lang-switch a[aria-current] { background: color-mix(in srgb, var(--blue) 12%, var(--card)); color: var(--blue); font-weight: 700; }
@media (max-width: 420px) { .lang-switch ul { grid-template-columns: 1fr 1fr; } .lang-switch li a { white-space: normal; } }
