/* Keepworth's website. The same paper, ink and seal red as the app. */

@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fraunces-600.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #f2e9d8;
  --card: #fbf5e8;
  --well: #e7dcc5;
  --ink: #2b2018;
  --ink-soft: #594a3b;
  --ink-faint: #6e5f4f;
  --seal: #9a3324;
  --seal-dark: #7a2418;
  --rule: rgba(58, 42, 24, 0.2);
  --rule-soft: rgba(58, 42, 24, 0.12);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper) url('/assets/grain.png') repeat;
  background-size: 96px 96px;
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}

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

a {
  color: var(--seal);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--card);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  left: 12px;
}

/* Top bar */

.bar {
  border-bottom: 1px solid var(--rule-soft);
}

.bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 600 24px/1 var(--serif);
}

.brand-small {
  font-size: 19px;
}

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

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

.bar nav a:hover,
.foot nav a:hover {
  color: var(--seal);
}

/* Home: the opening */

.hero {
  padding: 56px 0 72px;
}

.hero-row {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 8vw, 68px);
  letter-spacing: -0.5px;
}

.lede {
  margin-top: 20px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34em;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 14px 22px;
  border-radius: 16px;
  background: var(--seal);
  color: #fff5e4;
  font: 600 19px/1.2 var(--serif);
}

.soon-note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-faint);
}

.phone {
  width: min(300px, 78vw);
  margin: 0 auto;
  border-radius: 40px;
  border: 8px solid var(--ink);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 30px 60px rgba(58, 26, 16, 0.25);
}

.phone img {
  display: block;
  width: 100%;
}

.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}

/* Sections */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--rule-soft);
}

.section h2 {
  font-size: clamp(30px, 5vw, 42px);
}

.section .intro {
  margin-top: 14px;
  color: var(--ink-soft);
  max-width: 40em;
  font-size: 19px;
}

.kicker {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--seal);
}

.steps {
  display: grid;
  gap: 18px;
  margin-top: 36px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li,
.find,
.point {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 24px;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--seal);
  color: #fff5e4;
  font: 600 20px/1 var(--serif);
}

.steps h3,
.point h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.steps p,
.point p {
  color: var(--ink-soft);
}

.split {
  display: grid;
  gap: 44px;
  align-items: center;
}

.ticks {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.ticks li {
  position: relative;
  padding-left: 30px;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0.6em;
  width: 9px;
  height: 9px;
  background: var(--seal);
  transform: rotate(45deg);
}

.ticks b {
  font-weight: 700;
}

.finds {
  display: grid;
  gap: 18px;
  margin-top: 36px;
}

.find {
  display: flex;
  align-items: center;
  gap: 18px;
}

.find img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  flex: none;
  object-fit: cover;
}

.find img.square {
  border-radius: 16px;
}

.find h3 {
  font: 700 17px/1.3 var(--sans);
}

.find .worth {
  font: 600 22px/1.3 var(--serif);
  margin-top: 2px;
}

.find .how {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ink-soft);
}

.small {
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-faint);
  max-width: 46em;
}

.points {
  display: grid;
  gap: 18px;
  margin-top: 36px;
}

/* Reading pages: privacy, terms, support */

.prose {
  max-width: 760px;
  padding-top: 48px;
  padding-bottom: 80px;
}

.prose h1 {
  font-size: clamp(34px, 6vw, 48px);
}

.prose .updated {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 15px;
}

.prose h2 {
  font-size: 25px;
  margin-top: 44px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.prose h3 {
  font: 700 18px/1.35 var(--sans);
  margin-top: 26px;
}

.prose p,
.prose ul {
  margin-top: 14px;
}

.prose ul {
  padding-left: 22px;
}

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

.prose .summary {
  margin-top: 26px;
  padding: 20px 22px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--card);
}

.center {
  text-align: center;
  padding: 96px 20px 120px;
}

/* Footer */

.foot {
  border-top: 1px solid var(--rule);
  padding: 36px 0 44px;
}

.foot-row {
  display: grid;
  gap: 18px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.fine {
  font-size: 14px;
  color: var(--ink-faint);
}

/* Arriving on scroll. Only when the script is running. */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .float {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Wider screens */

@media (min-width: 640px) {
  .steps,
  .points {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .foot-row {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .foot nav {
    justify-content: flex-end;
  }

  .fine {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .hero-row,
  .split {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .split.flip > :first-child {
    order: 2;
  }
}

@media (max-width: 560px) {
  .bar nav a:not(:last-child) {
    display: none;
  }
}
