/* 財庫 Money Pool: the app's design system on the web. Light is the
   hydrology station by day, dark the blueprint at night. */

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/BarlowSemiCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/BarlowSemiCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #edf1ee;
  --sheet: #f8faf8;
  --sunken: #e2e8e4;
  --rule: #c3cfc9;
  --ink: #15303b;
  --ink-muted: #48626c;
  --water: #155e7d;
  --on-water: #f3f8f9;
  --foam: #d6e9ef;
  --gauge: #c03b25;
  --silt: #845820;
  --river: #2a6f57;
  --radius-field: 6px;
  --radius-sheet: 10px;
  --radius-window: 16px;
  --numeric: "Barlow Semi Condensed", "Helvetica Neue", Arial, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Helvetica Neue",
    Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f2a3b;
    --sheet: #143447;
    --sunken: #0c2331;
    --rule: #2b5168;
    --ink: #e4eef1;
    --ink-muted: #a6bfc8;
    --water: #a9dcef;
    --on-water: #0b2433;
    --foam: #1d4b62;
    --gauge: #f27a5f;
    --silt: #e0ae6b;
    --river: #7fcca6;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.7;
}

a {
  color: var(--water);
  text-underline-offset: 3px;
}

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 3px;
}

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

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  background: var(--sheet);
  padding: 8px 12px;
  border-radius: var(--radius-field);
}

/* Header */

.site-header {
  padding: 18px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand .latin {
  font-family: var(--numeric);
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

/* Hero */

.hero {
  padding: 40px 0 64px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--water);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.lead {
  margin: 0 0 28px;
  color: var(--ink-muted);
  font-size: 18px;
  max-width: 34em;
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px 20px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-field);
  background: var(--water);
  color: var(--on-water);
  font-weight: 700;
  text-decoration: none;
}

.button svg {
  width: 20px;
  height: 20px;
}

.note {
  color: var(--ink-muted);
  font-size: 14px;
}

.phone {
  margin: 0;
  justify-self: center;
  width: min(320px, 100%);
}

.phone img,
.screens img {
  display: block;
  width: 100%;
  border-radius: 28px;
  border: 1px solid var(--rule);
  background: var(--sheet);
}

/* Sections */

section {
  padding: 56px 0;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.35;
}

.section-lead {
  margin: 0 0 32px;
  color: var(--ink-muted);
  max-width: 36em;
}

.questions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.questions li,
.features li {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sheet);
  padding: 22px 20px;
}

.questions svg {
  width: 32px;
  height: 32px;
  color: var(--water);
}

h3 {
  margin: 12px 0 6px;
  font-size: 18px;
}

.questions p,
.features p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15.5px;
}

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

.screens figure {
  margin: 0;
}

.screens figcaption {
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: 15px;
}

.screens figcaption strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features h3 {
  margin-top: 0;
}

.closing {
  text-align: center;
}

.closing .actions {
  justify-content: center;
}

.number {
  font-family: var(--numeric);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Documents: privacy, terms, account deletion */

.doc {
  padding: 24px 0 64px;
}

.doc .wrap {
  max-width: 760px;
}

.doc h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 8px;
}

.doc .meta {
  margin: 0 0 32px;
  color: var(--ink-muted);
  font-size: 15px;
}

.doc h2 {
  margin-top: 40px;
  font-size: 22px;
}

.doc ul,
.doc ol {
  padding-left: 1.3em;
}

.doc li {
  margin: 6px 0;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15.5px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rule);
}

.doc th {
  color: var(--ink-muted);
  font-weight: 600;
}

.callout {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sheet);
  padding: 16px 20px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0 40px;
  color: var(--ink-muted);
  font-size: 14.5px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.site-footer a {
  color: var(--ink-muted);
}

.site-footer p {
  margin: 4px 0;
}

/* Narrow screens */

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding-top: 16px;
  }

  .questions,
  .features {
    grid-template-columns: 1fr;
  }

  .screens {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .screens figure {
    width: min(300px, 100%);
    margin: 0 auto;
  }

  .doc table,
  .doc thead,
  .doc tbody,
  .doc tr,
  .doc th,
  .doc td {
    display: block;
  }

  .doc thead {
    display: none;
  }

  .doc td {
    border-bottom: 0;
    padding: 2px 0;
  }

  .doc td:first-child {
    font-weight: 600;
    padding-top: 12px;
  }

  .doc tr {
    border-bottom: 1px solid var(--rule);
    padding-bottom: 10px;
  }
}
