/* Slowcation website. One stylesheet for every page.
   Colours mirror the app: teal for the accent and Only Here, coral for Block Here. */

:root {
  --bg: #f5f2ea;
  --surface: #ffffff;
  --surface-2: #ece8dd;
  --map: #ebe7dc;
  --street: rgba(26, 29, 33, 0.07);
  --text: #1a1d21;
  --text-2: #565c65;
  --line: rgba(26, 29, 33, 0.1);
  --teal: #12806f;
  --teal-soft: rgba(18, 128, 111, 0.13);
  --on-teal: #ffffff;
  --coral: #d9573f;
  --coral-soft: rgba(217, 87, 63, 0.13);
  --blue: #0a7aff;
  --nav-bg: rgba(245, 242, 234, 0.72);
  --shadow: 0 1px 2px rgba(20, 23, 28, 0.05), 0 12px 32px rgba(20, 23, 28, 0.07);
  --radius: 24px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --surface: #1e232b;
    --surface-2: #252b35;
    --map: #232933;
    --street: rgba(255, 255, 255, 0.06);
    --text: #f2f3f5;
    --text-2: #a3aab5;
    --line: rgba(255, 255, 255, 0.1);
    --teal: #3dd1be;
    --teal-soft: rgba(61, 209, 190, 0.14);
    --on-teal: #06241f;
    --coral: #ff7b66;
    --coral-soft: rgba(255, 123, 102, 0.15);
    --blue: #3d95ff;
    --nav-bg: rgba(20, 23, 28, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1080px, 100% - 48px); margin-inline: auto; }
@media (max-width: 480px) { .wrap { width: calc(100% - 40px); } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 20; }
.skip:focus { left: 16px; }

/* ---------- Navigation: a translucent layer the page scrolls under ---------- */

.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 1.125rem; letter-spacing: -0.015em; }
.brand svg { width: 28px; height: 28px; }
.nav ul { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav li a { color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.nav li a:hover, .nav li a[aria-current="page"] { color: var(--text); }
@media (max-width: 680px) { .nav li.optional { display: none; } .nav ul { gap: 18px; } }

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.5rem); line-height: 1.03; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.028em; }
h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.012em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(1.125rem, 1.9vw, 1.3125rem); line-height: 1.5; color: var(--text-2); max-width: 36em; }
.eyebrow { font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.eyebrow.coral { color: var(--coral); }
.muted { color: var(--text-2); }

/* ---------- Buttons: respond on press ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0;
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 100ms ease-out, background-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--teal); color: var(--on-teal); }
.btn.quiet { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.soon { background: var(--surface-2); color: var(--text-2); cursor: default; }
.btn.soon:active { transform: none; }

/* ---------- Sections ---------- */

section { padding: clamp(64px, 9vw, 120px) 0; }
.hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .fine { margin-top: 18px; font-size: 0.9375rem; color: var(--text-2); }
.art { border-radius: 32px; overflow: hidden; box-shadow: var(--shadow); background: var(--map); }
.art svg { width: 100%; height: auto; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero .art { order: 2; } }

.section-head { max-width: 40em; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { margin-bottom: 16px; }

.band { background: var(--surface); border-block: 1px solid var(--line); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 18px;
  border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-weight: 700;
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--text-2); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.rule { background: var(--surface); border: 1px solid var(--line); border-radius: 32px; overflow: hidden; box-shadow: var(--shadow); }
.rule .art { border-radius: 0; box-shadow: none; }
.rule .body { padding: 28px 30px 32px; }
.rule h3 { font-size: 1.5rem; margin-bottom: 10px; letter-spacing: -0.02em; }
.rule p { color: var(--text-2); }
.rule .eg { margin-top: 14px; font-size: 0.9375rem; color: var(--text); }
@media (max-width: 860px) { .rules { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split h2 { margin-bottom: 18px; }
.split .lede { margin-bottom: 22px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.ticks li::before {
  content: ""; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: var(--teal-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.5 11.4l3 3 6-6.6' fill='none' stroke='%2312806f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  .ticks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.5 11.4l3 3 6-6.6' fill='none' stroke='%233dd1be' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}

/* A conversation between two phones, for the buddy section */
.chat { background: var(--bg); border: 1px solid var(--line); border-radius: 32px; padding: 28px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.band .chat { background: var(--bg); }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 20px; font-size: 0.9688rem; line-height: 1.4; }
.msg small { display: block; margin-top: 6px; font: 500 0.75rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; opacity: 0.6; word-break: break-all; }
.msg.me { justify-self: end; background: var(--teal); color: var(--on-teal); border-bottom-right-radius: 6px; }
.msg.them { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.chat .result { justify-self: center; margin-top: 6px; padding: 8px 14px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-weight: 600; font-size: 0.875rem; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.feature p { font-size: 0.9688rem; color: var(--text-2); }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

.cta { text-align: center; }
.cta h2 { margin-bottom: 16px; }
.cta .lede { margin-inline: auto; }
.cta .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

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

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--text-2); font-size: 0.9375rem; }
footer .wrap { display: grid; gap: 18px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { color: var(--text-2); }
footer a:hover { color: var(--text); }
footer .legal { font-size: 0.8125rem; line-height: 1.5; max-width: 60em; }

/* ---------- Text pages: privacy, support ---------- */

.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(24px, 3vw, 40px); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); margin-bottom: 16px; }
.prose { max-width: 46rem; padding-bottom: clamp(64px, 9vw, 120px); }
.prose h2 { font-size: 1.625rem; margin: 2.4em 0 0.6em; letter-spacing: -0.02em; }
.prose h3 { margin: 1.8em 0 0.4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.45em; }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 16px; padding: 20px 24px; margin: 0 0 1.6em; }
.callout p:last-child { margin-bottom: 0; }
.table-scroll { margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
table { border-collapse: collapse; width: 100%; font-size: 0.9688rem; }
th, td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); font-weight: 650; }

/* On a phone nothing may hide off to the side: each row becomes a card and
   every cell carries its own column label. */
@media (max-width: 720px) {
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tr { padding: 18px 20px; border-bottom: 1px solid var(--line); }
  tr:last-child { border-bottom: 0; }
  td { padding: 0; border: 0; }
  td + td { margin-top: 12px; }
  td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-size: 0.75rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2);
  }
}

.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin: 0 0 2em; }
.contact-card h2 { margin: 0 0 8px; font-size: 1.5rem; }
.contact-card .btn { margin-top: 18px; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; }
summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 22px; font-weight: 600; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -8px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); transition: transform 200ms ease; }
details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
details .answer { padding: 0 22px 20px; color: var(--text-2); }
details .answer p:last-child, details .answer ol:last-child, details .answer ul:last-child { margin-bottom: 0; }
.path { color: var(--text); font-weight: 600; }

/* ---------- Illustrations ---------- */

svg text { font-family: var(--font); font-weight: 650; font-size: 14px; fill: var(--text); }
.locked { filter: grayscale(1); opacity: 0.45; }

/* ---------- Motion ----------
   Sections rise into place as they scroll into view. The motion is tied to
   the scroll position itself, so it follows the finger and can't get stuck.
   No script: where a browser doesn't support it, or the reader prefers less
   motion, everything is simply there. */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
    @keyframes rise {
      from { opacity: 0; transform: translateY(28px); }
      to { opacity: 1; transform: none; }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, summary::after { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: currentColor; --text-2: var(--text); }
}
@media print {
  .nav, footer nav, .btn { display: none; }
  body { background: #fff; }
}
