/* braceletpattern.com: the home page, the privacy policy and the old
   accounts page. The colours are the designer's own (lib/theme.dart), so
   the site and the app at /app/ feel like one place; the bracelet pictures
   (images/) are drawn by the app's core in real DMC floss colours, and are
   the only bold thing on the page. */

:root {
  --ground: #fff9eb;
  --ink: #1d1c13;
  --muted: #4a4739;
  --olive: #6b5f10;
  --on-olive: #ffffff;
  --butter: #f5e389;
  --line: #ccc6b5;
  --type: ui-rounded, "SF Pro Rounded", system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #16150f;
    --ink: #ebe5d2;
    --muted: #b7b19e;
    --olive: #d8c770;
    --on-olive: #211c00;
    --butter: #514700;
    --line: #38352a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--type);
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--olive); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  width: min(100% - 32px, 68rem);
  margin-inline: auto;
}

/* Header and footer: quiet. */

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

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

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #fff;
}

.site-header nav a { font-weight: 600; }

/* On a phone the page's own button is right below: just the name. */
@media (max-width: 520px) {
  .site-header nav { display: none; }
}

.site-footer {
  margin-top: 96px;
  padding-block: 32px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

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

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 16px;
}

/* Type. */

h1, h2, h3 { line-height: 1.1; margin: 0; text-wrap: balance; }

h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* "knot by knot" stays on one line: on a computer the headline then reads
   "Design friendship bracelets / knot by knot". */
.keep { white-space: nowrap; }

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

p { margin: 0 0 16px; max-width: 36rem; }

.lede {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: var(--muted);
  max-width: 34rem;
  margin-top: 20px;
}

.small { font-size: 0.92rem; color: var(--muted); }

.note { margin-top: 32px; }

/* Buttons: one main action, the rest are links. */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 28px;
}

.button {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--olive);
  color: var(--on-olive);
  font-weight: 700;
  text-decoration: none;
}

.button:hover { background: color-mix(in srgb, var(--olive) 88%, var(--ink)); }

.actions a:not(.button) { font-weight: 600; }

/* The bracelet: wider than the page, laid across it at a slight angle,
   its ends cut off by the page's edges. */

.strip {
  margin-block: 56px 72px;
  overflow: hidden;
  padding-block: 28px;
}

.strip img {
  width: max(128vw, 760px);
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%) rotate(-2.5deg);
}

/* Sections. */

section { margin-top: 88px; }

.split {
  display: grid;
  gap: 40px;
  align-items: start;
}

@media (min-width: 860px) {
  .split { grid-template-columns: 5fr 7fr; gap: 64px; }
  .split.reverse { grid-template-columns: 7fr 5fr; }
  .split.reverse > :first-child { order: 2; }
}

.features { display: grid; gap: 28px; margin-top: 8px; }
.features p { margin: 0; }

.editor-picture {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 16px;
  padding: 18px 14px 10px;
}

/* A watch: the face cropped to a watch screen's shape (about 5 by 6),
   in a dark case. */
.watch {
  width: 210px;
  justify-self: center;
  padding: 12px;
  border-radius: 54px;
  background: #1d1c13;
  box-shadow: 0 0 0 1px var(--line);
}

.watch img {
  width: 100%;
  aspect-ratio: 396 / 484;
  object-fit: cover;
  border-radius: 42px;
}

.steps { margin: 0 0 16px; padding-left: 1.4em; max-width: 36rem; }
.steps li { margin-bottom: 10px; padding-left: 4px; }

.ways {
  display: grid;
  gap: 40px;
  margin-top: 8px;
}

@media (min-width: 760px) {
  .ways { grid-template-columns: 1fr 1fr; gap: 64px; }
}

.ways ul { margin: 0 0 20px; padding-left: 1.2em; }
.ways li { margin-bottom: 6px; }

/* The privacy policy and other pages of text. */

.page { max-width: 42rem; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: none; margin-bottom: 8px; }
.page h2 { font-size: 1.35rem; margin: 40px 0 10px; }
.page p, .page ul { max-width: none; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 8px; }
