/* getlog.app's one stylesheet: Log's design system (docs/DesignSystem.md) carried to the web. The page sits on
   Sunset's sky, the theme the icon is drawn in (Nov 12, James's prototype icon), so the icon, the preview card
   (scripts/site-art) and the page read as one thing; cards are the app's at 24 px corners
   and 12 px spacing with no shadow; Log's own words (titles, the pack's name) are rounded, the rest the system face.
   No web fonts: Apple devices already have SF Pro and SF Rounded, and a font file would be one more request. */

:root {
  color-scheme: light dark;
  --sky: #EFECE6;
  --ink: #2A1C24;
  --quiet: #6B5A5E;
  --accent: #B03B1A;
  --card: rgba(255, 255, 255, 0.72);
  --rim: rgba(255, 255, 255, 0.9);
  --corner: 24px;
  --space: 12px;
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dark mode's Today sky and accent, as the app's (Theme.sunset, dark). Light mode's accent is a shade darker than the
   app's #E0522A, which is 3:1 on the paper: enough for a button's shape, short of the 4.5:1 a link's words need. */
@media (prefers-color-scheme: dark) {
  :root {
    --sky: #120B26;
    --ink: #F4EEE8;
    --quiet: #B3A7B4;
    --accent: #FF8A65;
    --card: rgba(255, 255, 255, 0.08);
    --rim: rgba(255, 255, 255, 0.14);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--sky); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--sky);
  color: var(--ink);
  font: 17px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: max(env(safe-area-inset-top), 28px) 20px max(env(safe-area-inset-bottom), 40px);
}

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

h1, h2, .rounded { font-family: var(--rounded); }

h1 {
  font-size: 2.125rem;
  line-height: 1.15;
  margin: 0;
  overflow-wrap: anywhere;
}

h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }

p { margin: 0.5rem 0; }

.quiet { color: var(--quiet); }

/* The masthead: Log's mark and name, a link home from every page. */
.masthead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font: 600 1.0625rem var(--rounded);
  margin-bottom: 28px;
}

.masthead .mark {
  width: 28px;
  height: 28px;
  background: var(--ink);
  -webkit-mask: url(/mark.svg) center / contain no-repeat;
  mask: url(/mark.svg) center / contain no-repeat;
}

/* The squiggle under a title's first word, drawn like the app's: 3.5 px, round ends, in the accent, a wave about
   every 20 px (Squiggle.waves). It draws itself once, as Today's does at launch. */
.squiggle {
  display: block;
  height: 10px;
  margin: 6px 0 20px;
  overflow: visible;
}

.squiggle path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 0.8s ease-out 0.15s forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .squiggle path { animation: none; stroke-dashoffset: 0; }
}

/* Cards on the sky: the app's glass card as far as the web can, a light frosted panel with a thin rim. */
.cards {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: grid;
  gap: var(--space);
}

.card {
  background: var(--card);
  border: 1px solid var(--rim);
  border-radius: var(--corner);
  padding: 14px 16px;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.card .name {
  font: 600 1.0625rem/1.3 var(--rounded);
  overflow-wrap: anywhere;
}

.card .how {
  color: var(--quiet);
  font-size: 0.9375rem;
  margin-top: 2px;
}

.card .kind {
  float: right;
  margin-left: 12px;
  color: var(--quiet);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* The two buttons: a filled one in the accent for the main way on, and a quiet one beside it. 50 px tall, past the
   44 px tap area the app keeps at every size. */
.actions { display: grid; gap: var(--space); margin-top: 24px; }

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 999px;
  font: 600 1.0625rem var(--rounded);
  text-decoration: none;
  text-align: center;
}

.button.primary { background: var(--accent); color: #fff; }
.button.secondary { background: var(--card); border: 1px solid var(--rim); color: var(--ink); }

@media (prefers-color-scheme: dark) {
  .button.primary { color: #120B26; }
}

.button:active { transform: scale(0.97); }

@media (prefers-reduced-motion: reduce) {
  .button:active { transform: none; }
}

footer {
  margin-top: 48px;
  font-size: 0.875rem;
  color: var(--quiet);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

footer a { color: var(--quiet); }

[hidden] { display: none !important; }
