/* Colors and type follow the app (core/designsystem/theme): light palette, Manrope. */
@font-face { font-family: "Manrope"; src: url("fonts/manrope_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope_semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope_extrabold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --background: #FAF8F5;
  --surface: #FFFFFF;
  --surface-variant: #F1EEE9;
  --outline: #E3DED7;
  --primary: #17806D;
  --primary-deep: #0B4D41;
  --primary-container: #D7F3EC;
  --secondary: #F26B4F;
  --secondary-container: #FFE3DA;
  --text: #1E2421;
  --text-secondary: #666D69;
  --water: #36A8F0;
  --steps: #5B6CFF;
  --weight: #9B7BF2;
  --radius: 20px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font: 400 17px/1.6 "Manrope", system-ui, sans-serif;
}

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

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-link { font-weight: 600; text-decoration: none; }

.wordmark, .hero-wordmark {
  display: inline-flex;
  align-items: flex-start;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark { font-size: 28px; line-height: 1.2; }
.wordmark:hover { color: var(--primary); }
.wordmark-feather { width: 0.73em; height: 0.73em; margin: -0.14em 0 0 -0.05em; fill: var(--secondary); }
.wordmark-feather .quill { fill: none; stroke: var(--secondary); stroke-width: 2.2; stroke-linecap: round; }

/* Hero — the app's welcome screen */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 0 40px; }
.hero-illustration { width: 160px; height: 160px; }
.hero-illustration .blob { fill: var(--primary-container); }
.hero-illustration .accent { fill: var(--secondary-container); }
.hero-illustration .dot { fill: var(--water); fill-opacity: 0.45; }
.hero-illustration .ring { fill: none; stroke: var(--primary); stroke-opacity: 0.35; stroke-width: 3.5; stroke-linecap: round; }
.hero-illustration .feather { fill: var(--primary); }
.hero-illustration .quill { fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-linecap: round; }
.hero-wordmark { margin: 20px 0 0; font-size: 64px; line-height: 1.15; }
.hero-title { margin: 12px 0 0; font-size: 28px; line-height: 1.3; font-weight: 800; }
.hero-lead { margin: 8px 0 0; max-width: 34em; color: var(--text-secondary); font-size: 19px; }
.hero-meta { margin: 12px 0 0; color: var(--text-secondary); font-size: 15px; }

.button {
  display: inline-block;
  margin-top: 28px;
  padding: 16px 36px;
  border-radius: 999px;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(11, 77, 65, 0.18);
  transition: background 0.15s, transform 0.15s;
}
.button:hover { background: var(--primary-deep); color: #FFFFFF; transform: translateY(-1px); }

.banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 560px;
  margin: 32px 0 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--surface-variant);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}
.banner .icon { color: var(--primary); margin-top: 1px; }

/* Screenshots */
.screens { width: 100vw; margin-left: calc(50% - 50vw); }
.screens-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px max(20px, calc(50vw - 540px)) 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--outline) transparent;
}
@media (min-width: 1880px) { .screens-row { justify-content: center; } }
.screens-row img {
  flex: none;
  width: 240px;
  height: auto;
  border-radius: 18px;
  scroll-snap-align: center;
  box-shadow: 0 10px 30px rgba(11, 77, 65, 0.12);
}

/* Features */
.features { padding: 40px 0 64px; }
.features h2 { margin: 0 0 24px; font-size: 32px; font-weight: 800; text-align: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--outline); }
.card h3 { margin: 16px 0 6px; font-size: 20px; font-weight: 800; line-height: 1.3; }
.card p { margin: 0; color: var(--text-secondary); font-size: 16px; }
.badge { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; }
.badge-coral { background: var(--secondary-container); color: var(--secondary); }
.badge-mint { background: var(--primary-container); color: var(--primary); }
.badge-blue { background: #DCEFFC; color: var(--water); }
.badge-violet { background: #EAE3FC; color: var(--weight); }

/* Legal documents */
.document {
  max-width: 780px;
  margin: 8px auto 64px;
  padding: 40px 48px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--outline);
}
.document h1 { margin: 0; font-size: 30px; line-height: 1.3; font-weight: 800; }
.document .edition { margin: 8px 0 24px; color: var(--text-secondary); font-size: 15px; }
.document h2 { margin: 36px 0 12px; font-size: 21px; line-height: 1.35; font-weight: 800; scroll-margin-top: 16px; }
.document p { margin: 0 0 12px; }
.document [id^="p-"] { scroll-margin-top: 16px; }
.document [id^="p-"]:target { background: var(--primary-container); border-radius: 8px; box-shadow: 0 0 0 6px var(--primary-container); }
.document ul { margin: 0 0 12px; padding-left: 22px; }
.document li { margin-bottom: 4px; }
.document li::marker { color: var(--primary); }
.document a { overflow-wrap: anywhere; }

.table { overflow-x: auto; margin: 4px 0 16px; }
.document table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.document th, .document td { padding: 10px 12px; border-bottom: 1px solid var(--outline); text-align: left; vertical-align: top; }
.document thead th { background: var(--surface-variant); font-weight: 600; }
.document thead th:first-child { border-top-left-radius: 10px; }
.document thead th:last-child { border-top-right-radius: 10px; }
.document .pairs th { width: 38%; color: var(--text-secondary); font-weight: 600; }

/* Footer */
.site-footer { padding: 40px 0 32px; background: var(--surface-variant); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px 48px; }
.site-footer h2 { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: var(--primary-deep); }
.site-footer h2:not(:first-child) { margin-top: 20px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 6px; }
.site-footer p { margin: 0; color: var(--text-secondary); }
.footer-note { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--outline); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Opened from the app (WebView adds ?app=1): the app shows its own top bar */
.in-app .site-header, .in-app .site-footer { display: none; }
.in-app .document { margin: 0 auto; padding: 20px 0 32px; border: 0; background: transparent; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-wordmark { font-size: 48px; }
  .hero-title { font-size: 23px; }
  .hero-lead { font-size: 17px; }
  .screens-row img { width: 200px; }
  .features h2 { font-size: 26px; }
  .document { padding: 24px 20px; margin-inline: -8px; }
  .document h1 { font-size: 24px; }
  .document h2 { font-size: 19px; }

  /* Wide tables become one card per row: a phone has no room for four columns. */
  .document table:not(.pairs) thead { display: none; }
  .document table:not(.pairs), .document table:not(.pairs) tbody, .document table:not(.pairs) tr { display: block; }
  .document table:not(.pairs) tr { margin-bottom: 12px; padding: 4px 14px; border-radius: 14px; background: var(--surface-variant); }
  .document table:not(.pairs) td { display: block; padding: 8px 0; }
  .document table:not(.pairs) td:last-child { border-bottom: 0; }
  .document table:not(.pairs) td::before { content: attr(data-label); display: block; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
  .document .pairs th, .document .pairs td { display: block; width: auto; padding: 0; border: 0; }
  .document .pairs th { padding-top: 10px; font-size: 13px; }
  .document .pairs td { padding-bottom: 10px; border-bottom: 1px solid var(--outline); }
}
