/* ============================================================================
   base.css — shared site chrome for alextoddslick.net
   Loaded by every page. No third-party requests: system faces only.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg:      #fbfbfd;
  --surface: #ffffff;
  --ink:     #0f1419;
  --body:    #5b6672;
  --muted:   #8b95a1;
  --line:    #e5e8ec;
  --accent:  #0d7f72;
  --tint:    #0d7f720f;
  --shadow:  0 1px 2px rgba(15,20,25,.04), 0 8px 24px -12px rgba(15,20,25,.10);

  --nav-bg:  rgba(251,251,253,.72);

  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  --text:    -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --mono:    ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #0a0c0f;
    --surface: #13171c;
    --ink:     #f4f6f8;
    --body:    #98a2ad;
    --muted:   #6b7681;
    --line:    #222930;
    --accent:  #34d6c0;
    --tint:    #34d6c014;
    --shadow:  0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.5);

    --nav-bg:  rgba(10,12,15,.72);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* -------------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 3rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-mark {
  font-weight: 620;
  font-size: .9375rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  font-size: .8125rem;
  color: var(--body);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 560; }

/* ------------------------------------------------------------------- type */

.eyebrow {
  font-size: .75rem;
  font-weight: 590;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

h1 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 680;
  margin: 0 0 1.5rem;
  max-width: 16ch;
}
h1 .quiet { color: var(--muted); display: block; }

.lede {
  font-size: clamp(1.0625rem, 2vw, 1.3125rem);
  line-height: 1.5;
  color: var(--body);
  max-width: 48ch;
  margin: 0;
}

/* ----------------------------------------------------------------- ledger */
/* The bundle stated as arithmetic rather than as a claim. */

.ledger {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.75rem clamp(1.25rem, 4vw, 2.25rem) 1.5rem;
  margin: 3.5rem 0 0;
}

.ledger-label {
  font-size: .75rem;
  font-weight: 590;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.row {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .6rem 0;
  font-variant-numeric: tabular-nums;
}
.row .name { font-weight: 480; white-space: nowrap; }
.row .rule {
  flex: 1;
  border-bottom: 1px dashed var(--line);
  transform: translateY(-.2em);
  min-width: 1rem;
}
.row .val {
  font-family: var(--mono);
  font-size: .875rem;
  color: var(--muted);
  white-space: nowrap;
}

.row.total {
  margin-top: .75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.row.total .name {
  font-size: 1.25rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}
.row.total .val {
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 660;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.row.total .val .per {
  font-size: .9375rem;
  font-weight: 450;
  color: var(--muted);
  letter-spacing: 0;
}

.ledger-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.alt { font-size: .9375rem; color: var(--body); }
.alt strong { color: var(--ink); font-weight: 560; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8125rem;
  font-weight: 530;
  color: var(--accent);
  background: var(--tint);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 999px;
  padding: .3rem .7rem;
  margin-left: auto;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.promise {
  margin: 1.25rem 0 0;
  font-size: .9375rem;
  color: var(--muted);
  max-width: 52ch;
}

/* ------------------------------------------------------------- app cards */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-size: 1.5rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-head p { margin: 0; font-size: .9375rem; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* A card that is a link to a product page. */
a.card { text-decoration: none; color: inherit; }

.mark {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: var(--tint);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
  flex: none;
}
.mark svg { display: block; }

.card h3 {
  font-size: 1.1875rem;
  font-weight: 620;
  letter-spacing: -0.015em;
  margin: 0 0 .3rem;
}

.platform {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.tagline {
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 1.25rem;
  font-weight: 480;
}

.card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: .6rem;
}
.card li {
  font-size: .9375rem;
  line-height: 1.45;
  color: var(--body);
  padding-left: 1.1rem;
  position: relative;
}
.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .55;
}

.status {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: .8125rem;
  font-weight: 530;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: .4rem;
}
/* On a linked card, the status line doubles as the affordance. */
a.card .status { color: var(--accent); }
a.card .status .arrow { transition: transform .25s ease; }
a.card:hover .status .arrow { transform: translateX(3px); }

/* ----------------------------------------------------------------- footer */

.site-footer {
  margin-top: 6rem;
  padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: center;
  font-size: .875rem;
  color: var(--muted);
}
.site-footer a {
  color: var(--body);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.site-footer a:hover { color: var(--accent); border-color: var(--accent); }
.site-footer .spacer { margin-left: auto; }

/* ------------------------------------------------------------------ focus */

a:focus-visible,
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ----------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.2, .7, .3, 1) backwards; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }
}

@media (max-width: 34rem) {
  .row .val { font-size: .8125rem; }
  .pill { margin-left: 0; }
}
