/* owed-app.com. The home page puts the app on show (three screens on a wash panel); every other page is the
   app opened as a page: a washed sidebar beside inset grouped lists. Tokens match the blue palette in
   apps/mobile/src/styles/theme.ts. Nothing here loads from another domain. */

@font-face {
  font-family: "Gabarito";
  src: url("/assets/gabarito.780dd129.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #16161a;
  --muted: #656b78;
  --canvas: #ffffff;
  --fill: #f1f4fa;
  --pressed: #ebeff7;
  --hairline: rgba(18, 28, 60, 0.08);
  --accent: #1b66e8;
  --accent-text: #1448a8;
  --accent-soft: rgba(27, 102, 232, 0.1);
  --violet: #7140d4;
  --violet-soft: #f1ebff;
  --success-text: #166534;
  --success-soft: rgba(22, 163, 74, 0.1);
  /* The wash: the app's blue-to-lavender. It frames the home page's screens and the sidebars. */
  --aura: linear-gradient(135deg, #bfd6ff 0%, #dccfff 100%);
  --settled: linear-gradient(135deg, #c9edd6 0%, #e0f5e7 100%);
  /* Secondary text on the wash: tinted from the wash's own blue, never grey (about 9:1). */
  --on-aura: #202b52;
  --chevron: #8990a2;
  --focus: #7140d4;

  --r-md: 12px;
  --r-lg: 16px;
  --r-card: 24px;
  --r-hero: 28px;
  --shadow-card: 0 6px 18px rgba(16, 24, 60, 0.07);
  --shadow-float: 0 12px 28px rgba(27, 102, 232, 0.3);
  /* Only for the phones in the home page's picture of the app. */
  --shadow-device: 0 24px 48px rgba(12, 24, 80, 0.24);
  --bar: 64px;

  --display: "Gabarito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar) + 20px);
  scrollbar-color: #c7cddb transparent;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
}

::selection {
  background: rgba(27, 102, 232, 0.22);
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 30;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------- Top bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--bar);
  background: #fff;
  border-bottom: 1px solid var(--hairline);
}

.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 40px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin-left: -8px;
  font: 800 1.45rem/1 var(--display);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  border-radius: 9px;
}

.bar nav {
  display: flex;
  gap: 2px;
}

.bar nav a {
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.bar nav a:hover {
  background: var(--fill);
}

.bar nav a[aria-current] {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* ---------- Split view: sidebar + pane ---------- */

.shell {
  display: grid;
  grid-template-columns: minmax(440px, 1fr) minmax(0, 1fr);
}

.side {
  position: sticky;
  top: var(--bar);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--bar));
  height: calc(100dvh - var(--bar));
  padding: clamp(28px, 5.5vh, 64px) clamp(32px, 4.5vw, 72px) 0;
  background: var(--aura);
  /* On a short or zoomed window the sidebar scrolls rather than cutting off the badge. */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.side-copy {
  flex: none;
  max-width: 36rem;
}

h1 {
  margin: 0;
  font: 800 clamp(2.3rem, 3.7vw, 3.7rem) / 1.03 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  max-width: 32rem;
  margin: 20px 0 0;
  color: var(--on-aura);
  font-size: 1.1875rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin: 28px 0 0;
  padding: 10px 22px;
  border-radius: var(--r-lg);
  font: 700 1.17rem/1.2 var(--text);
}

.store .icon {
  width: 22px;
  height: 22px;
}

/* Not a button: it does nothing yet, so it is a plain badge. */
.store--soon {
  background: var(--fill);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hairline);
  cursor: default;
}

.store--live {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-float);
}

.store--live:hover {
  background: #1558cc;
}

.platform {
  margin: 10px 0 0;
  color: var(--on-aura);
  font-size: 0.9375rem;
}

.pane {
  min-width: 0;
  padding: clamp(40px, 7vh, 72px) clamp(20px, 5vw, 80px) 96px;
}

.pane > * {
  max-width: 40rem;
  margin-inline: auto;
}

.pane > section + section {
  margin-top: 64px;
}

h2 {
  margin: 0 0 18px;
  font: 700 clamp(1.5rem, 2.2vw, 1.875rem) / 1.15 var(--display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* ---------- Inset grouped lists ---------- */

.group {
  --inset: 80px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.group--plain {
  --inset: 66px;
}

.faq {
  --inset: 20px;
}

.group > li,
.group > details {
  position: relative;
}

.group > * + *::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--inset);
  right: 0;
  height: 1px;
  background: var(--hairline);
}

.row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
}

.row--tight {
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
}

.row-text {
  min-width: 0;
}

.row-title {
  margin: 0;
  font: 600 1.0625rem/1.3 var(--text);
  letter-spacing: -0.015em;
}

.row-text p,
.row-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.96875rem;
  line-height: 1.5;
}

.row-desc {
  display: block;
  margin-top: 2px;
}

.row-line {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.row--link {
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s;
}

.row--link:hover {
  background: #f8faff;
}

.row--link:active {
  background: var(--pressed);
}

.row--link:focus-visible,
.faq-item summary:focus-visible {
  outline-offset: -3px;
  border-radius: var(--r-md);
}

.icon--chevron {
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: auto;
  color: var(--chevron);
}

/* Icon tiles: the app's tinted rounded squares. */
.tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.tile .icon {
  width: 24px;
  height: 24px;
}

.tile--blue {
  background: var(--accent-soft);
  color: var(--accent);
}

.tile--violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.tile--mint {
  background: var(--success-soft);
  color: var(--success-text);
}

.tile--fill {
  background: var(--fill);
  color: var(--ink);
}

.tile--small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.tile--small .icon {
  width: 18px;
  height: 18px;
}

/* The privacy group borrows the app's mint "settled" wash as its frame. */
.settled {
  padding: 6px;
  border-radius: var(--r-hero);
  background: var(--settled);
}

.settled .group {
  border-color: transparent;
  border-radius: 22px;
  box-shadow: none;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font: 600 1.0625rem/1.35 var(--text);
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s;
}

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

.faq-item summary:hover {
  background: #f8faff;
}

.faq-item .icon--chevron {
  margin-left: 0;
  transition: transform 0.25s var(--ease-out);
}

.faq-item[open] .icon--chevron {
  transform: rotate(90deg);
}

.faq-item p {
  max-width: 34rem;
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
}

.faq-item p a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

/* ---------- Home page: the app on show ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(20px, 4vh, 44px) clamp(20px, 4vw, 40px) 0;
}

.hero-copy {
  max-width: 36rem;
}

.hero .lede,
.hero .platform {
  color: var(--muted);
}

.hero .platform {
  font-weight: 600;
}

/* The picture of the app: three screens, the middle one in front, on the wash. The measures are
   percentages of the panel so the whole picture scales together. */
.stage {
  position: relative;
  aspect-ratio: 0.94;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--r-hero);
  background: var(--aura);
}

.phone {
  position: absolute;
  width: 36%;
  aspect-ratio: 1170 / 2532;
  overflow: hidden;
  border: clamp(5px, 1.4vw, 9px) solid var(--ink);
  border-radius: 16% / 7.4%;
  background: #fff;
  box-shadow: var(--shadow-device);
}

.phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* The phone's camera island, so the screenshot reads as a phone. */
.phone::after {
  content: "";
  position: absolute;
  top: 1.1%;
  left: 50%;
  width: 28%;
  height: 2.3%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--ink);
}

.phone--main {
  top: 9%;
  left: 50%;
  z-index: 2;
  width: 41.5%;
  transform: translateX(-50%);
}

.phone--left {
  top: 21.7%;
  left: 6%;
  transform: rotate(-3deg);
}

.phone--right {
  top: 27.5%;
  right: 6%;
  transform: rotate(3deg);
}

.stage-mascot {
  position: absolute;
  bottom: -1%;
  left: 3%;
  z-index: 3;
  width: 31%;
  height: auto;
}

.steps {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px clamp(20px, 4vw, 40px) 0;
}

.steps h2 {
  margin-bottom: 36px;
  text-align: center;
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.steps-art {
  flex: none;
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.home-body {
  padding: 72px clamp(16px, 5vw, 80px) 96px;
}

.home-body > section {
  max-width: 40rem;
  margin-inline: auto;
}

.home-body > section + section {
  margin-top: 64px;
}

/* ---------- Document pages (privacy, terms, support, contact, notices) ---------- */

.side--doc h1 {
  font-size: clamp(2.1rem, 3.1vw, 3.1rem);
}

/* The list links hang 12px outside the text edge (so their hover tint lines up with the title);
   the side padding makes room for that so the scroll area never shows a sideways bar. */
.side--doc .side-copy {
  flex: 0 1 auto;
  min-height: 0;
  margin-inline: -12px;
  padding: 0 12px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.toc {
  margin-top: 28px;
}

.toc--mobile {
  display: none;
}

.toc-title {
  margin: 0;
  font: 700 0.9375rem/1 var(--text);
  letter-spacing: -0.01em;
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  margin: 0 -12px;
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--on-aura);
  font-size: 0.9375rem;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:focus-visible {
  outline-offset: -3px;
}

.toc a:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.side-spot {
  flex: none;
  align-self: flex-end;
  width: clamp(96px, 10vw, 148px);
  height: auto;
  margin-top: auto;
}

.pane-title {
  margin-top: 0;
}

.doc {
  max-width: 40rem;
}

.doc > :first-child {
  margin-top: 0;
}

.doc p {
  margin: 0 0 1em;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.doc h2 {
  position: relative;
  margin: 3rem 0 0.75rem;
  font-size: 1.75rem;
  line-height: 1.2;
}

.doc h3 {
  position: relative;
  margin: 2rem 0 0.5rem;
  font: 700 1.3rem/1.3 var(--text);
  letter-spacing: -0.015em;
}

.doc ul,
.doc ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}

.doc li {
  margin: 0.35em 0;
  line-height: 1.7;
}

.doc li::marker {
  color: var(--muted);
}

.doc a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.doc a:hover {
  color: #0f3478;
}

.doc strong {
  font-weight: 700;
}

.doc blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  background: var(--fill);
}

.doc blockquote p {
  margin: 0 0 0.75em;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.doc blockquote p:last-child {
  margin-bottom: 0;
}

.doc code {
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: var(--fill);
  font: 0.88em ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

/* The support page's questions: a bold line, then the answer, one hairline apart. */
.doc p.qa {
  margin: 0;
  padding: 1.25rem 0 0.25rem;
  border-top: 1px solid var(--hairline);
}

.doc p.qa > strong:first-child {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.doc p.qa + ul,
.doc p.qa + ol {
  margin-top: 0.5rem;
}

/* Heading anchors: a "#" that appears beside a heading on hover or keyboard focus. */
.anchor {
  position: absolute;
  top: 0;
  left: -1.15em;
  width: 1em;
  height: 100%;
  color: var(--accent);
  font: 700 0.9em/1.3 var(--display);
  text-decoration: none;
  opacity: 0;
}

.anchor::before {
  content: "#";
}

.doc h2:hover .anchor,
.doc h3:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .anchor {
    display: none;
  }
}

.table-scroll {
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #c7cddb transparent;
  -webkit-overflow-scrolling: touch;
}

.table-scroll:focus-visible {
  outline-offset: 2px;
  border-radius: var(--r-lg);
}

table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
}

th {
  padding: 12px 16px;
  background: var(--fill);
  font-weight: 700;
  text-align: left;
}

td {
  padding: 14px 16px;
  border-top: 1px solid var(--hairline);
  vertical-align: top;
}

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--hairline);
  background: #fff;
}

.foot-inner {
  display: grid;
  gap: 8px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 40px) 40px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.foot p {
  margin: 0;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.foot a {
  display: inline-block;
  padding: 8px 0;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- One authored moment: the home mascot rises into the panel ---------- */

@media (prefers-reduced-motion: no-preference) {
  .stage-mascot {
    transform-origin: 50% 100%;
    animation: rise 0.9s var(--ease-out) 0.1s both;
  }

  /* Only size, never opacity: the picture is on screen from the first frame, and it grows from
     its feet so it never moves outside the panel. */
  @keyframes rise {
    from {
      transform: scale(0.9);
    }

    to {
      transform: none;
    }
  }
}

/* ---------- Phones and narrow windows ---------- */

@media (max-width: 899px) {
  .shell {
    display: block;
  }

  .side {
    position: static;
    height: auto;
    padding: 32px 20px 0;
    border-radius: 0 0 var(--r-hero) var(--r-hero);
  }

  .side--doc {
    padding-bottom: 28px;
  }

  .side--doc .side-copy {
    overflow: visible;
    padding-bottom: 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: 20px;
  }

  .stage {
    aspect-ratio: 0.82;
  }

  .phone {
    width: 42%;
  }

  .phone--main {
    top: 8%;
    width: 50%;
  }

  .phone--left {
    top: 26%;
    left: 2%;
  }

  .phone--right {
    top: 30%;
    right: 2%;
  }

  .stage-mascot {
    width: 34%;
  }

  .steps {
    padding-top: 56px;
  }

  .steps-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .home-body {
    padding: 56px 16px 72px;
  }

  .home-body > section + section {
    margin-top: 52px;
  }

  .side-spot {
    display: none;
  }

  .toc--desktop {
    display: none;
  }

  .toc--mobile {
    display: block;
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.62);
  }

  .toc--mobile summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font: 700 0.9375rem/1.2 var(--text);
    list-style: none;
  }

  .toc--mobile summary::-webkit-details-marker {
    display: none;
  }

  /* The same chevron the FAQ rows use, drawn in CSS. */
  .toc--mobile summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin: -3px 4px 0 0;
    border-right: 2px solid var(--on-aura);
    border-bottom: 2px solid var(--on-aura);
    transform: rotate(45deg);
    transition: transform 0.25s var(--ease-out);
  }

  .toc--mobile[open] summary::after {
    margin-top: 3px;
    transform: rotate(-135deg);
  }

  .pane {
    padding: 40px 16px 72px;
  }

  .pane > section + section {
    margin-top: 52px;
  }

  .doc h2 {
    margin-top: 2.5rem;
    font-size: 1.5rem;
  }

  .store {
    width: 100%;
    justify-content: center;
    padding-inline: 16px;
    font-size: 1.0625rem;
    text-align: center;
  }

  .platform {
    text-align: center;
  }
}

@media (max-width: 400px) {
  .bar nav a {
    padding: 10px 7px;
    font-size: 0.9rem;
  }

  .brand {
    font-size: 1.3rem;
  }

  .row {
    padding: 16px;
  }

  .group {
    --inset: 16px;
  }
}

@media print {
  .bar,
  .skip,
  .stage,
  .side-spot,
  .toc,
  .foot ul {
    display: none;
  }

  .shell {
    display: block;
  }

  .side {
    position: static;
    height: auto;
    padding: 0;
    background: none;
  }

  .pane {
    padding: 0;
  }

  .doc {
    max-width: none;
  }

  .doc a {
    color: inherit;
  }
}
