/* Braids website. Colours and fonts are the app's own (shared/.../theme/PatinaTheme.kt). */
@font-face { font-family: "DM Sans"; src: url(assets/fonts/dm_sans.ttf); font-weight: 100 1000; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f8f8f6; --ink: #242622; --muted: #72766f; --line: #e3e3de;
  --card: #fff; --bar: #f8f8f6d9; --glow: #d6e3fa; --accent: #2f63d0; /* one colour, blue: the full stops, the glow, the pressed card */
  --invert: none; --blend: multiply; /* for the drawings and the wordmark, which are black on white */
  --day: block; --night: none; /* which of an iPhone's two pictures shows: the light app or the dark app */
}
/* The dark look: plain black, the app in its own dark look. It applies when the device is set to dark and
   the visitor has not chosen light, or when they chose dark with the switch: CSS needs the list twice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0b0b0c; --ink: #f3f3f1; --muted: #a2a2a6; --line: #232326;
    --card: #131315; --bar: #0b0b0cd9; --glow: #122340; --accent: #5b8def;
    --invert: invert(1); --blend: screen; --day: none; --night: block;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b0b0c; --ink: #f3f3f1; --muted: #a2a2a6; --line: #232326;
  --card: #131315; --bar: #0b0b0cd9; --glow: #122340; --accent: #5b8def;
  --invert: invert(1); --blend: screen; --day: none; --night: block;
}
* { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 "DM Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; } /* the line above would show a hidden picture again */
h1, h2, h3, p, ol { margin: 0; }
a { color: inherit; }
[id] { scroll-margin-top: 96px; } /* the bar stays on top, a jump must stop below it */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 max(20px, 5vw); }

h1, h2 { font-weight: 800; letter-spacing: -.02em; text-wrap: balance; text-transform: capitalize; }
h1 { font-size: clamp(40px, 6.8vw, 76px); line-height: 1.04; }
h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; }
h3 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.card h3, .steps h3 { text-transform: capitalize; }
.dot { color: var(--accent); }
.lead { margin: 18px auto 0; max-width: 34em; text-wrap: balance; color: var(--muted); font-size: clamp(16px, 1.8vw, 18px); }
.mono { color: var(--muted); font: 500 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .16em; text-transform: uppercase; }

/* The bar: it stays at the top of every page. */
header.nav { position: sticky; top: 0; z-index: 10; padding: 12px max(20px, 5vw); }
.pill { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 768px; margin: 0 auto; padding: 8px 8px 8px 14px; border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); border-radius: 16px; background: var(--bar); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 22px; } .brand .icon { height: 40px; border-radius: 10px; border: 1px solid var(--line); }
img[src$="wordmark.svg"] { filter: var(--invert); }
.pill nav { display: flex; gap: 26px; font-size: 14px; }
.pill nav a, footer.site a { color: var(--muted); text-decoration: none; }
.pill nav a:hover, footer.site a:hover { color: var(--ink); }
.side-end { display: flex; align-items: center; gap: 8px; }
.theme { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: none; color: inherit; cursor: pointer; }
.theme svg { width: 16px; height: 16px; }
.soon { display: inline-block; padding: 14px 24px; border-radius: 14px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; }
.soon.small { padding: 7px 14px; border-radius: 10px; font-size: 14px; }

/* The first screen: what Braids is, and the app itself. It reaches up behind the bar. */
.hero { margin-top: -78px; padding-top: 136px; text-align: center; background: radial-gradient(70% 300px at 50% 0, var(--glow), transparent 72%), radial-gradient(58% 44% at 50% 74%, var(--glow), transparent 70%); }
.cta { display: flex; justify-content: center; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 30px; }
.more { font-weight: 600; text-decoration: none; } .more::after { content: " ↓"; }
.hero .mono { margin-top: 26px; }
.by-day { display: var(--day); } .by-night { display: var(--night); }

/* Our own neutral device around a screen of the app. It has nothing that only an iPhone has (no camera
   island, no side buttons): Apple's own pictures may not tilt or overlap, a neutral device may. */
.fan { display: flex; justify-content: center; align-items: flex-end; margin-top: 44px; padding-bottom: 80px; perspective: 1700px; background: radial-gradient(46% 50% at 50% 52%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 72%); }
.device { --w: min(250px, 27vw); position: relative; flex: none; width: var(--w); padding: calc(var(--w) * .033); border-radius: calc(var(--w) * .175); background: linear-gradient(135deg, #34343a, #0c0c0d 45%, #1d1d20); box-shadow: inset 0 0 0 1px #55555c, 0 40px 60px -30px #0009; transform-style: preserve-3d; }
.device::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #3a3a40; transform: translateZ(-12px); } /* the side of the device, seen when it turns */
.device img { width: 100%; height: auto; border-radius: calc(var(--w) * .145); }
.device.mid { --w: min(290px, 31vw); z-index: 1; }
.device.left { transform: translateX(19%) rotateY(27deg) rotateZ(-3deg); }
.device.right { transform: translateX(-19%) rotateY(-27deg) rotateZ(3deg); }

.sec { padding-top: 104px; text-align: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; padding: 0; list-style: none; text-align: left; }
.steps li { padding-top: 20px; border-top: 1px solid var(--line); }
.steps b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); font: 600 13px/1 ui-monospace, "SF Mono", Menlo, monospace; }
.steps h3 { margin-top: 14px; }
.steps p, .card p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.after { margin: 44px auto 0; max-width: 36em; color: var(--muted); }

/* Cards on the left, the iPhone with the pressed card's screen on the right. */
.inside { display: grid; grid-template-columns: 1fr auto; gap: clamp(20px, 4vw, 56px); align-items: center; margin-top: 40px; text-align: left; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { display: block; width: 100%; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: inherit; font: inherit; text-align: left; }
button.card { cursor: pointer; }
button.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
button.card[aria-pressed="true"] { border-color: var(--accent); }
.stage { padding: 28px; background: radial-gradient(closest-side, var(--glow), transparent); }
.stage .device { --w: min(270px, 68vw); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 48px; text-align: left; }
.facts h3 { margin-top: 12px; }
.doodle { display: block; width: 46px; aspect-ratio: 1; background: url(assets/brand/doodles.webp) 0 0 / 400% 400% no-repeat; filter: var(--invert); mix-blend-mode: var(--blend); }
.d-coffee { background-position: 0 0; } .d-note { background-position: 33.33% 33.33%; } .d-key { background-position: 100% 66.67%; }
.arrow { display: inline-block; margin-top: 28px; color: var(--accent); font-weight: 600; text-decoration: none; } .arrow::after { content: " →"; }

.final { margin-top: 48px; padding: 120px 0; text-align: center; background: radial-gradient(46% 62% at 50% 56%, var(--glow), transparent 72%); }
.final .soon { margin-top: 30px; } .final .mono { margin-top: 22px; }

footer.site { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 32px; padding: 48px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site img { height: 22px; }
footer.site .about p { margin-top: 12px; max-width: 22em; }
footer.site nav { display: grid; gap: 10px; align-content: start; }
footer.site .made { grid-column: 1 / -1; margin-top: 16px; font-size: 11px; }

@media (max-width: 760px) {
  .pill nav { display: none; } /* the links are in the footer too */
  .steps, .facts { grid-template-columns: 1fr; }
  /* The cards become a row to swipe, the iPhone stands below it. */
  .inside { display: block; }
  .cards { display: flex; margin: 0 calc(-1 * max(20px, 5vw)); padding: 16px max(20px, 5vw); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .cards .card { flex: 0 0 74%; scroll-snap-align: center; }
  .stage { width: fit-content; margin: 0 auto; }
  footer.site { grid-template-columns: 1fr 1fr; } footer.site .about { grid-column: 1 / -1; }
}

/* Pages of text: privacy, help, imprint. */
.prose { max-width: 720px; margin: 0 auto; padding: 40px 0 90px; }
.prose .lead { margin: 16px 0 0; font-size: 19px; }
.prose h2 { margin-top: 48px; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
.prose h3 { margin-top: 28px; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 22px; } .prose li + li { margin-top: 6px; }
.prose a { text-underline-offset: 3px; }
.prose table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; }
.scroll { overflow-x: auto; }
