/* The Lupa design language, carried over from the app.
 *
 * Every value here is copied from ios/Sources/DesignSystem/Theme.swift rather
 * than picked by eye. If a colour drifts from Palette, that is a bug. */

:root {
  --navy: #0f2e3d;
  --navy-deep: #0a2431;
  --ink: #1f4759;
  --mint: #5dbdb4;
  --mint-pale: #c4e8e4;
  --paper: #faf7f2;
  --canvas: #edeae3;
  --surface: #ffffff;
  --divider: #e4dfd3;
  --card-border: rgba(15, 46, 61, 0.12);
  --measure: 62ch;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  /* Outfit ships in the app binary; on the web it comes from Google Fonts with
   * a stack behind it, so a blocked font request costs polish, not legibility. */
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  /* There is no bold anywhere in this design system: 400 and 500 only. */
}

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */

.site-head {
  border-bottom: 1px solid var(--divider);
  background: var(--paper);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}

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

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

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

/* ---- The "//" section header device ---- */

.sec {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}

.sec::before {
  content: "//";
  letter-spacing: normal;
  color: var(--mint);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--divider);
}

.hero .wrap {
  /* Deliberately NOT relative: the art inside it anchors to .hero, which is
   * full-bleed, so it reaches the viewport edge instead of the 940px column. */
  padding-top: 64px;
}

.hero-copy {
  /* Room for the art, which bleeds past the wrap to the viewport edge. */
  padding-right: min(360px, 40vw);
  padding-bottom: 78px;
}

.hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.hero p {
  margin: 0;
  max-width: 46ch;
  font-size: 19px;
  color: var(--ink);
}

/* Anchored to the right edge of the SCREEN, not of the text column. Ending it
 * at the wrap left a hard vertical cut through the shelves that read as a
 * broken image; running it off the page is what the app does too. */
.hero-art {
  position: absolute;
  right: 0;
  bottom: -1px;
  width: min(330px, 38vw);
  pointer-events: none;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- Cards and feature grid ---- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 22px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
}

.card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.note {
  background: var(--canvas);
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 22px;
  font-size: 15px;
}

.note p {
  margin: 0 0 10px;
}

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

section {
  padding: 48px 0;
}

section + section {
  padding-top: 0;
}

/* ---- Long-form legal pages ---- */

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

.doc h1 {
  margin: 10px 0 6px;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.doc .updated {
  margin: 0 0 34px;
  font-size: 14px;
  color: var(--ink);
  opacity: 0.6;
}

.doc h2 {
  margin: 38px 0 10px;
  font-size: 21px;
  font-weight: 500;
  color: var(--navy);
}

.doc h3 {
  margin: 24px 0 6px;
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
}

.doc p,
.doc li {
  max-width: var(--measure);
  font-size: 16px;
}

.doc ul {
  padding-left: 20px;
}

.doc li {
  margin-bottom: 8px;
}

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

.doc table {
  border-collapse: collapse;
  width: 100%;
  max-width: var(--measure);
  margin: 16px 0;
  font-size: 15px;
}

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

.doc th {
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
}

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

a:hover {
  color: var(--mint);
}

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

.site-foot {
  border-top: 1px solid var(--divider);
  background: var(--canvas);
  padding: 30px 0 40px;
  font-size: 14px;
}

.site-foot .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-foot nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-foot a {
  color: var(--ink);
  text-decoration: none;
  opacity: 0.8;
}

.site-foot a:hover {
  opacity: 1;
  color: var(--navy);
}

.site-foot .who {
  opacity: 0.6;
}

@media (max-width: 720px) {
  .hero .wrap {
    padding-top: 40px;
  }

  /* The art becomes a floor under the copy rather than a thing beside it —
   * the same job it does at the bottom of the Envios tab in the app. */
  .hero-copy {
    padding-right: 0;
    padding-bottom: 200px;
  }

  .hero-art {
    width: 200px;
  }
}
