/* Curio, marketing site.
   Three colours only, the same three the app uses:
   paper #F8F6F1, ink #1C1B19, clay #B4502A. Everything else is a shade
   mixed from those, never a fourth hue. */

:root {
  --paper: #f8f6f1;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --separator: #e6e2da;

  --ink: #1c1b19;
  --ink-2: #6b6760;
  --ink-3: #9a958c;

  --clay: #b4502a;
  --clay-soft: #f6e4da;
  --clay-edge: #8a3a1c;
  --on-clay: #fff9f5;

  --radius-card: 28px;
  --radius-btn: 18px;
  --depth: 5px;

  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Inter, system-ui, sans-serif;

  --shell: min(1180px, 92vw);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --surface: #1c1b19;
    --surface-2: #272522;
    --separator: #2e2c28;

    --ink: #f3f1ec;
    --ink-2: #a8a39a;
    --ink-3: #7a766e;

    --clay: #e8845c;
    --clay-soft: #3a2118;
    --clay-edge: #b05c38;
    --on-clay: #2a1109;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
}

/* A page of prose is the one place scrolling is allowed. It has to give up the
   full-height body the landing page needs: a body pinned to 100% with
   overflow:auto becomes its own scroll container while the window scrolls too,
   which lets the page scroll past the end of the text into blank paper. */
body.doc {
  height: auto;
  min-height: 100%;
  overflow: visible;
  display: block;
}

a {
  color: inherit;
}

/* ---------------------------------------------------------------- header */

.bar {
  width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(14px, 2.4vh, 26px);
  display: flex;
  align-items: center;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(19px, 2.1vh, 22px);
  letter-spacing: -0.02em;
}

.wordmark svg {
  width: clamp(28px, 3.4vh, 34px);
  height: auto;
  display: block;
}

.bar nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.bar nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
}

.bar nav a:hover {
  color: var(--ink);
}

/* --------------------------------------------------------------- buttons */

.btn {
  --face: var(--clay);
  --edge: var(--clay-edge);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--face);
  color: var(--on-clay);
  font: inherit;
  font-weight: 800;
  font-size: clamp(15px, 1.9vh, 17px);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;

  /* The app's raised button: a face sitting above a darker edge, which
     compresses when you press it. */
  box-shadow: 0 var(--depth) 0 var(--edge);
  transform: translateY(0);
  transition: transform 90ms ease, box-shadow 90ms ease;
}

.btn:active {
  transform: translateY(var(--depth));
  box-shadow: 0 0 0 var(--edge);
}

.btn-quiet {
  --face: var(--surface);
  --edge: var(--separator);
  color: var(--ink);
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
}

/* The mail icon is drawn with strokes, so it must opt out of the solid fill
   the Apple logo above relies on. */
.btn-mail svg {
  width: 1.15em;
  height: 1.15em;
  fill: none;
}

/* ----------------------------------------------------------------- hero */

.hero {
  width: var(--shell);
  margin-inline: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}

.eyebrow {
  margin: 0 0 clamp(10px, 1.6vh, 18px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  background: var(--clay-soft);
  color: var(--clay);
  font-size: clamp(12px, 1.5vh, 13.5px);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6.2vh, 62px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}

h1 em {
  font-style: normal;
  color: var(--clay);
  position: relative;
  white-space: nowrap;
}

/* Hand-drawn underline under the one word that carries the promise. */
h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.06em;
  height: 0.11em;
  border-radius: 999px;
  background: var(--clay);
  opacity: 0.28;
}

.lede {
  margin: clamp(14px, 2.2vh, 24px) 0 0;
  max-width: 30em;
  font-size: clamp(15.5px, 2.1vh, 19px);
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 500;
  text-wrap: pretty;
}

.cta {
  margin-top: clamp(18px, 3vh, 32px);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta .note {
  font-size: clamp(12.5px, 1.6vh, 14px);
  color: var(--ink-3);
  font-weight: 600;
}

/* ------------------------------------------------------------------ art */

.art {
  min-width: 0;
  display: grid;
  place-items: center;
}

.art svg {
  width: 100%;
  height: auto;
  max-height: 72vh;
  display: block;
}

/* The three review marks land one after another, then the badge arrives. */
@keyframes pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.25);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes rise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.art .curve-kept {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 1.9s cubic-bezier(0.4, 0, 0.2, 1) 0.25s forwards;
}

/* The fading curve keeps its dotted stroke, so it cannot be drawn with a
   dash offset the way the solid one is. It fades up instead. */
.art .curve-lost {
  opacity: 0;
  animation: fade 1.1s ease 0.45s forwards;
}

@keyframes fade {
  to {
    opacity: 1;
  }
}

.art .mark {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.art .mark-1 {
  animation-delay: 0.85s;
}

.art .mark-2 {
  animation-delay: 1.25s;
}

.art .mark-3 {
  animation-delay: 1.65s;
}

.art .badge {
  opacity: 0;
  animation: rise 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 2.05s forwards;
}

.art .card-float {
  opacity: 0;
  animation: rise 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

/* ---------------------------------------------------------------- footer */

.foot {
  width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(14px, 2.4vh, 26px);
  border-top: 1px solid var(--separator);
  display: flex;
  align-items: center;
  gap: 12px 22px;
  flex-wrap: wrap;
  font-size: clamp(12.5px, 1.6vh, 13.5px);
  font-weight: 600;
  color: var(--ink-3);
}

.foot nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 22px);
  flex-wrap: wrap;
}

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

.foot a:hover {
  color: var(--clay);
}

.foot .llms {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--separator);
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
  font-weight: 500;
}

.foot .llms:hover {
  border-color: var(--clay);
}

/* -------------------------------------------------------------- responsive */

/* On a phone the page still may not scroll, so nothing is allowed to size off
   viewport height alone: a 375pt wide screen is tall, and vh-only type blows
   straight through the width. Every scale below is the smaller of the two. */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, auto);
    gap: clamp(10px, 2vh, 22px);
    align-content: center;
  }

  /* The illustration leads on a phone, and is capped by height so the copy
     underneath always has room. */
  .art {
    order: -1;
    justify-self: center;
  }

  .art svg {
    width: auto;
    height: clamp(140px, 25vh, 260px);
    max-height: none;
  }

  h1 {
    font-size: clamp(27px, min(5.2vh, 8.4vw), 44px);
    letter-spacing: -0.03em;
  }

  .lede {
    margin-top: clamp(10px, 1.6vh, 16px);
    font-size: clamp(13.5px, min(1.9vh, 3.9vw), 17px);
  }

  .eyebrow {
    font-size: clamp(11px, min(1.4vh, 3vw), 13px);
  }

  .cta {
    margin-top: clamp(14px, 2.2vh, 24px);
    gap: 10px;
  }

  .btn {
    padding: 14px 22px;
    font-size: clamp(14.5px, min(1.8vh, 4vw), 17px);
  }

  .bar nav {
    display: none;
  }

  .foot {
    justify-content: center;
  }

  .foot nav {
    margin-inline-start: 0;
  }
}

/* Very small phones: the lede is the first thing to go, then the picture. */
@media (max-height: 700px) and (max-width: 900px) {
  .art svg {
    height: clamp(120px, 21vh, 200px);
  }
}

/* Landscape phones have almost no height. Drop to copy only. */
@media (max-height: 480px) and (max-width: 900px) {
  .art {
    display: none;
  }

  .lede {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .art .curve-kept,
  .art .curve-lost,
  .art .mark,
  .art .badge,
  .art .card-float {
    animation: none;
    opacity: 1;
    stroke-dashoffset: 0;
    transform: none;
  }

  .btn {
    transition: none;
  }
}

/* ------------------------------------------------------- prose documents */

.prose {
  width: min(72ch, 90vw);
  margin: 0 auto;
  padding-block: clamp(24px, 6vh, 64px);
}

.prose .back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(20px, 4vh, 40px);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-2);
}

.prose .back:hover {
  color: var(--clay);
}

.prose h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: 8px;
}

.prose .updated {
  margin: 0 0 clamp(24px, 4vh, 40px);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
}

.prose h2 {
  margin: clamp(28px, 4.5vh, 44px) 0 10px;
  font-size: clamp(19px, 2.6vw, 23px);
  letter-spacing: -0.02em;
  font-weight: 800;
}

.prose h3 {
  margin: 24px 0 8px;
  font-size: 16.5px;
  font-weight: 800;
}

.prose p,
.prose li {
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink-2);
  font-weight: 450;
}

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

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.prose a {
  color: var(--clay);
  text-underline-offset: 3px;
}

/* Contact is a button rather than a printed address, so the mailbox is never
   sitting in the page as scrapable text. */
.prose .contact {
  margin-top: 18px;
}

/* `.prose a` is more specific than `.btn`, so without this the button paints
   clay text on a clay face and disappears. */
.prose .btn {
  color: var(--on-clay);
  text-decoration: none;
}

.prose .callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: var(--clay-soft);
}

.prose .callout p {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

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

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

.prose th {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.prose td {
  color: var(--ink-2);
}

.prose hr {
  margin: clamp(32px, 5vh, 52px) 0;
  border: 0;
  border-top: 1px solid var(--separator);
}
