/* ClaspPDF Static Site Design System
 * Warm Paper Light & Obsidian-Slate Dark palette mirroring ClaspPdfColors.kt
 * Zero external fonts, zero trackers, zero cookies.
 */

:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --surface-variant: #EFEEE9;
  --surface-high: #E6E4DC;
  --text: #0F172A;
  --text-muted: #525866;
  --hairline: rgba(15, 23, 42, 0.08);
  --outline: #D5D2C8;

  --primary: #2157D5;
  --on-primary: #FFFFFF;
  --primary-soft: #E8F0FE;
  --on-primary-soft: #173FA3;

  --teal: #0F8F84;
  --on-teal: #FFFFFF;
  --teal-soft: #E0F5F2;
  --on-teal-soft: #0B615A;

  --coral: #DF4B3C;
  --coral-soft: #FDECEB;
  --on-coral-soft: #9E261B;

  --slate-soft: #E9ECF2;
  --on-slate-soft: #2A3548;

  --nav-bg: rgba(246, 245, 241, 0.86);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  --hero-gradient: linear-gradient(135deg, #2157D5 0%, #1577AD 52%, #129488 100%);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1120;
    --surface: #141E33;
    --surface-variant: #1B2740;
    --surface-high: #243352;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --hairline: rgba(248, 250, 252, 0.09);
    --outline: #334155;

    --primary: #60A5FA;
    --on-primary: #0B1F4D;
    --primary-soft: rgba(59, 130, 246, 0.18);
    --on-primary-soft: #93C5FD;

    --teal: #2DD4BF;
    --on-teal: #042F2E;
    --teal-soft: rgba(45, 212, 191, 0.16);
    --on-teal-soft: #5EEAD4;

    --coral: #F87171;
    --coral-soft: rgba(248, 113, 113, 0.16);
    --on-coral-soft: #FCA5A5;

    --slate-soft: rgba(148, 163, 184, 0.16);
    --on-slate-soft: #CBD5E1;

    --nav-bg: rgba(11, 17, 32, 0.84);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.28), 0 10px 28px rgba(0, 0, 0, 0.24);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-variant);
  padding: 0.15em 0.42em;
  border-radius: 6px;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* Layout containers */
.container {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 20px;
}

.container--narrow {
  max-width: 780px;
}

main {
  flex: 1;
}

/* Sticky translucent header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
  background: var(--surface-variant);
  color: var(--text);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--on-primary-soft);
  font-weight: 600;
}

/* Badges & pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pill--teal {
  background: var(--teal-soft);
  color: var(--on-teal-soft);
}

.pill--cobalt {
  background: var(--primary-soft);
  color: var(--on-primary-soft);
}

.pill--coral {
  background: var(--coral-soft);
  color: var(--on-coral-soft);
}

.pill--slate {
  background: var(--slate-soft);
  color: var(--on-slate-soft);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--hero-gradient);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(33, 87, 213, 0.24);
}

.btn--primary:hover {
  filter: brightness(1.06);
}

.btn--tonal {
  background: var(--primary-soft);
  color: var(--on-primary-soft);
}

.btn--tonal:hover {
  filter: brightness(0.97);
}

.btn--surface {
  background: var(--surface);
  color: var(--text);
  border-color: var(--outline);
}

.btn--surface:hover {
  background: var(--surface-variant);
}

/* Hero (Landing Page) */
.hero {
  padding: 56px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  margin: 16px 0 14px;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 0 26px;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 56ch;
}

.hero-visual {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.hero-app-icon {
  width: 108px;
  height: 108px;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(33, 87, 213, 0.22);
}

.hero-meta-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.hero-meta-tile {
  background: var(--surface-variant);
  border-radius: 14px;
  padding: 12px 8px;
}

.hero-meta-value {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-meta-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Sections */
.section {
  padding: 36px 0;
}

.section-header {
  margin-bottom: 22px;
}

.section-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 6px;
}

.section-header h2 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.8vw, 1.95rem);
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 62ch;
}

/* Bento tool grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.tool-card h3 {
  margin: 12px 0 6px;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
}

.tool-card p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.icon-orb {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.icon-orb--cobalt { background: var(--primary-soft); color: var(--on-primary-soft); }
.icon-orb--teal { background: var(--teal-soft); color: var(--on-teal-soft); }
.icon-orb--coral { background: var(--coral-soft); color: var(--on-coral-soft); }
.icon-orb--slate { background: var(--slate-soft); color: var(--on-slate-soft); }

/* Trust callout banner */
.trust-panel {
  background: var(--teal-soft);
  color: var(--on-teal-soft);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
}

.trust-panel h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--on-teal-soft);
}

.trust-panel p {
  margin: 0;
  font-size: 0.96rem;
  opacity: 0.92;
}

.trust-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.trust-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.93rem;
  font-weight: 500;
}

.trust-check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 2px;
}

/* Legal / Document pages */
.page-hero {
  padding: 40px 0 20px;
}

.page-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.8rem, 3.6vw, 2.45rem);
  letter-spacing: -0.028em;
  line-height: 1.18;
}

.page-meta {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.summary-box {
  background: var(--teal-soft);
  color: var(--on-teal-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 20px 0 28px;
}

.summary-box--coral {
  background: var(--coral-soft);
  color: var(--on-coral-soft);
}

.summary-box h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.summary-box ul {
  margin: 0;
  padding-left: 20px;
}

.summary-box li + li {
  margin-top: 6px;
}

.prose {
  padding-bottom: 48px;
}

.prose-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-card);
}

.prose h2 {
  margin: 28px 0 10px;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 18px 0 6px;
  font-size: 1.02rem;
}

.prose p {
  margin: 0 0 12px;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.prose li + li {
  margin-top: 6px;
}

.prose .muted {
  color: var(--text-muted);
}

/* Tables inside prose */
.table-wrap {
  overflow-x: auto;
  margin: 14px 0 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

th {
  background: var(--surface-variant);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* Highlighted contact callout */
.contact-box {
  background: var(--surface-variant);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 14px;
}

.contact-box p {
  margin: 0 0 6px;
}

.contact-box p:last-child {
  margin-bottom: 0;
}

/* Feedback page form & FAQ */
.feedback-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 48px;
}

.email-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: var(--surface-variant);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 14px 0 18px;
}

.email-address {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text);
  margin-right: auto;
  word-break: break-all;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 10px 12px;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.status-banner {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--on-teal-soft);
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

.status-banner.is-visible {
  display: block;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details.faq-item {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
}

details.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-muted);
  flex: none;
}

details.faq-item[open] summary::after {
  content: "−";
}

details.faq-item p {
  margin: 10px 0 0;
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* 404 page */
.not-found {
  padding: 72px 0;
  text-align: center;
}

.not-found-card {
  max-width: 520px;
  margin: 0 auto;
}

.not-found-code {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 10px 0;
  background: var(--hero-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 36px;
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

/* Responsive breakpoints */
@media (max-width: 900px) {
  .hero-grid,
  .trust-panel,
  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .prose-card {
    padding: 22px 18px;
  }

  .hero {
    padding: 36px 0 28px;
  }

  .hero-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* Clean print styles for Privacy Policy & Terms */
@media print {
  body {
    background: #FFFFFF;
    color: #000000;
  }

  .site-header,
  .site-footer,
  .btn-row {
    display: none;
  }

  .prose-card,
  .summary-box {
    box-shadow: none;
    border: 1px solid #CCCCCC;
    background: #FFFFFF;
    color: #000000;
  }
}
