/* The public website (ADR-0026) on top of Pico.css, in the colours of the
   app (web/static/css/app.css): dark, with an amber accent. Keep it small. */

/* ---- Theme: the app's colours ------------------------------------------- */

:root[data-theme="dark"] {
  --sp-bg: #141517;
  --sp-raise: #1c1d20;
  --sp-raise-2: #25262a;
  --sp-line: #2f3135;
  --sp-line-strong: #43454b;
  --sp-text: #ecebe6;
  --sp-muted: #a09f99;
  --sp-accent: #f2a43a;
  --sp-accent-hover: #f7b95f;
  --sp-accent-ink: #1f1400;
  --sp-accent-soft: rgba(242, 164, 58, 0.14);
  --sp-radius: 6px;

  --pico-font-size: 100%;
  --pico-line-height: 1.5;
  --pico-border-radius: var(--sp-radius);
  --pico-background-color: var(--sp-bg);
  --pico-color: var(--sp-text);
  --pico-muted-color: var(--sp-muted);
  --pico-muted-border-color: var(--sp-line);
  --pico-h1-color: var(--sp-text);
  --pico-h2-color: var(--sp-muted);
  --pico-h3-color: var(--sp-text);
  --pico-h4-color: var(--sp-text);

  --pico-primary: var(--sp-accent);
  --pico-primary-background: var(--sp-accent);
  --pico-primary-border: var(--sp-accent);
  --pico-primary-underline: rgba(242, 164, 58, 0.45);
  --pico-primary-hover: var(--sp-accent-hover);
  --pico-primary-hover-background: var(--sp-accent-hover);
  --pico-primary-hover-border: var(--sp-accent-hover);
  --pico-primary-hover-underline: var(--sp-accent-hover);
  --pico-primary-focus: rgba(242, 164, 58, 0.4);
  --pico-primary-inverse: var(--sp-accent-ink);

  --pico-secondary: #c4c3bd;
  --pico-secondary-background: var(--sp-raise-2);
  --pico-secondary-border: var(--sp-line-strong);
  --pico-secondary-hover: var(--sp-text);
  --pico-secondary-hover-background: #2e2f34;
  --pico-secondary-hover-border: #5a5c62;
  --pico-secondary-inverse: var(--sp-text);

  --pico-card-background-color: var(--sp-raise);
  --pico-card-border-color: var(--sp-line);
  --pico-card-box-shadow: none;
}

:is([role="button"], button) {
  font-weight: 600;
}

[role="button"].small {
  padding: 0.35rem 0.8rem;
  font-size: 0.875rem;
}

.muted {
  color: var(--sp-muted);
}

/* Section headings are quiet labels, as in the app. */
h2 {
  --pico-font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* As in the app: Pico's containers have no side padding from 576px, so keep
   them narrower than the screen. */
@media (min-width: 1024px) {
  .container {
    max-width: 60rem;
  }
}

/* ---- Top bar ------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-block: 0; /* Pico pads body > header */
  background: var(--sp-raise);
  border-bottom: 1px solid var(--sp-line);
}

/* A link to a section stops below the sticky bar, not under it. */
section[id] {
  scroll-margin-top: 4rem;
}

.topbar > .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--sp-text);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  color: var(--sp-accent);
}

.topbar nav {
  margin-left: auto;
}

.topbar nav ul {
  margin: 0;
}

.topbar nav a {
  color: var(--sp-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.topbar nav a:hover {
  color: var(--sp-text);
}

.topbar [role="button"] {
  margin: 0;
}

/* On phones the anchors to the sections make room for the button. */
@media (max-width: 575px) {
  .topbar nav {
    display: none;
  }

  .topbar [role="button"] {
    margin-left: auto;
  }
}

/* ---- Screenshots -------------------------------------------------------- */

figure {
  margin: 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--sp-line-strong);
  background: var(--sp-raise);
}

/* A phone: narrow, rounded, like the screen it was taken on. */
.phone {
  max-width: 17rem;
  margin-inline: auto;
}

.phone img {
  border-width: 6px;
  border-color: #2a2b30;
  border-radius: 1.75rem;
}

.screen {
  margin-top: 1.5rem;
}

.screen img {
  border-radius: var(--sp-radius);
}

/* ---- Hero --------------------------------------------------------------- */

.hero {
  display: grid;
  gap: 2rem;
  padding-block: 2.5rem 3rem;
}

.hero h1 {
  margin-bottom: 1rem;
  --pico-font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero h1 span {
  display: block;
  margin-top: 0.35rem;
  color: var(--sp-accent);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}

.lead {
  font-size: 1.1875rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.actions [role="button"] {
  margin: 0;
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: center;
    padding-block: 4rem;
  }
}

/* ---- Features ----------------------------------------------------------- */

.features > h2,
section > h2 {
  margin-top: 2rem;
}

.feature {
  display: grid;
  gap: 1.5rem;
  margin: 0 0 2rem;
  padding: 1.5rem;
  border: 1px solid var(--sp-line);
}

.feature h3 {
  --pico-font-size: 1.375rem;
  margin-bottom: 0.75rem;
}

.feature .screen {
  margin-top: 0;
}

/* From a tablet on: the text beside the phone, every other one mirrored.
   A wide screenshot takes the full width below. */
@media (min-width: 768px) {
  .feature {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: center;
    padding: 2rem;
  }

  .feature:nth-of-type(even) .feature-text {
    order: 2;
  }

  .feature .screen {
    grid-column: 1 / -1;
    order: 3;
  }
}

.extra-title {
  margin-top: 2.5rem;
}

.extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.extras article {
  margin: 0;
  border: 1px solid var(--sp-line);
}

.extras h4 {
  margin-bottom: 0.5rem;
  --pico-font-size: 1.0625rem;
}

.extras p {
  margin: 0;
  color: var(--sp-muted);
}

/* ---- Privacy and access ------------------------------------------------- */

.narrow {
  max-width: 44rem;
  padding-block: 1rem;
}

ul.checks {
  padding: 0;
}

ul.checks li {
  position: relative;
  padding-left: 1.75rem;
  list-style: none;
}

ul.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sp-accent);
  font-weight: 700;
}

body > footer {
  margin-top: 2rem;
  padding-block: 2rem;
  border-top: 1px solid var(--sp-line);
  color: var(--sp-muted);
  text-align: center;
}
