/* Happy Detour Apps. Night sky at the top of every page, dawn at the bottom. */
:root {
  --night: #0f1438;
  --paper: #fbf9ff;
  --ink: #1f1a3a;
  --muted: #5d5878;
  --rule: #e4def2;
  --link: #5b2a86;
  --gold: #ffd08a;
  --dawn-mid: #ffe3d3;
  --dawn-end: #ffcf9a;
  --foot-ink: #2a1b4d;
  --foot-link: #5b2a86;
  --display: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14122b;
    --ink: #f1edfb;
    --muted: #b3add0;
    --rule: #2e2a52;
    --link: #d9c4ff;
    --dawn-mid: #3a2466;
    --dawn-end: #8b3f6f;
    --foot-ink: #f6f1ff;
    --foot-link: #ffd9a0;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* Header: the top of the night sky */
.site-header { background: var(--night); }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
}

.brand svg { width: 2.1rem; height: 2.1rem; flex: none; }

.site-nav { display: flex; gap: 1.25rem; }
.site-nav a { color: #e9e4fa; text-decoration: none; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

/* The sky */
.sky {
  position: relative;
  color: #ffffff;
  background:
    radial-gradient(1.5px 1.5px at 2.2% 14%, #fff 98%, transparent),
    radial-gradient(1.1px 1.1px at 3.4% 47%, #fff 98%, transparent),
    radial-gradient(1.3px 1.3px at 1.6% 72%, #fff 98%, transparent),
    radial-gradient(1.4px 1.4px at 97.6% 9%, #fff 98%, transparent),
    radial-gradient(1.1px 1.1px at 96.8% 38%, #fff 98%, transparent),
    radial-gradient(1.5px 1.5px at 98.2% 63%, #fff 98%, transparent),
    linear-gradient(180deg, #0f1438 0%, #1d1f5e 34%, #43307f 64%, #8f468f 88%, #cf6a8c 100%);
}

@media (min-width: 60rem) {
  .sky {
    background:
    radial-gradient(1.6px 1.6px at 3% 16%, #fff 98%, transparent),
    radial-gradient(1.1px 1.1px at 8% 52%, #fff 98%, transparent),
    radial-gradient(1.3px 1.3px at 12% 27%, #fff 98%, transparent),
    radial-gradient(1.2px 1.2px at 5% 74%, #fff 98%, transparent),
    radial-gradient(1.1px 1.1px at 15% 8%, #fff 98%, transparent),
    radial-gradient(1.5px 1.5px at 86% 12%, #fff 98%, transparent),
    radial-gradient(1.1px 1.1px at 91% 44%, #fff 98%, transparent),
    radial-gradient(1.6px 1.6px at 96% 24%, #fff 98%, transparent),
    radial-gradient(1.2px 1.2px at 88% 66%, #fff 98%, transparent),
    radial-gradient(1.1px 1.1px at 98% 58%, #fff 98%, transparent),
    linear-gradient(180deg, #0f1438 0%, #1d1f5e 34%, #43307f 64%, #8f468f 88%, #cf6a8c 100%);
  }
}

.sky .wrap { position: relative; padding-top: 2.25rem; padding-bottom: 1.5rem; }

.sky h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 7.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.sky .lede { margin: 0 0 1rem; max-width: 34rem; font-size: 1.2rem; color: #f3effd; }
.sky .sky-note { margin: 0; font-size: 0.95rem; color: #e3dcf6; }

.sky .sparkle { float: right; width: 3.25rem; height: 3.25rem; margin: 0 0 0.5rem 1rem; fill: #ffd9a0; filter: drop-shadow(0 0 10px rgba(255, 208, 138, 0.7)); }

.horizon { display: block; width: 100%; height: 3.25rem; margin-bottom: -1px; fill: var(--paper); }

/* The path that leaves the road */
.trail { display: block; width: 100%; height: auto; margin-top: 0.75rem; overflow: visible; }
.trail-plan { fill: none; stroke: rgba(255, 255, 255, 0.34); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1 11; }
.trail-line {
  fill: none;
  stroke: url(#glow);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 6px rgba(255, 170, 200, 0.75));
  animation: draw 2.6s cubic-bezier(0.6, 0.1, 0.2, 1) 0.3s both;
}
.trail-stars { fill: #ffffff; opacity: 0.85; animation: appear 1.2s ease 2.4s both; }
.trail-star {
  fill: #ffe2b0;
  filter: drop-shadow(0 0 12px rgba(255, 215, 150, 0.9));
  transform-box: fill-box;
  transform-origin: center;
  animation: bloom 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) 2.7s both;
}

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; } to { opacity: 0.85; } }
@keyframes bloom { from { opacity: 0; transform: scale(0.2) rotate(-40deg); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .trail-line, .trail-stars, .trail-star { animation: none; }
}

/* Page content */
.content { padding-top: 1.5rem; }

h2, h3 { font-family: var(--display); line-height: 1.2; }
h2 { font-size: 1.75rem; font-weight: 600; margin: 2.75rem 0 0.6rem; }
h3 { font-size: 1.3rem; font-weight: 600; margin: 1.85rem 0 0.3rem; }
.content > h2:first-child, .content > section:first-child h2 { margin-top: 1rem; }

p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }
li::marker { color: #b98ad6; }
li strong { font-weight: 650; }

.note { color: var(--muted); font-size: 0.95rem; }
.contact-line { font-size: 1.25rem; font-weight: 600; }

/* Apps on the home page */
.app { padding: 1.6rem 0 0.9rem; border-top: 1px solid var(--rule); }
.app h3 { margin-top: 0; font-size: 1.6rem; }
.app h3::before {
  content: "";
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-right: 0.45em;
  background: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2040%2040%27%3E%3Cpath%20fill=%27%23e08a3c%27%20d=%27M20%202C21.8%2014.6%2025.4%2018.2%2038%2020C25.4%2021.8%2021.8%2025.4%2020%2038C18.2%2025.4%2014.6%2021.8%202%2020C14.6%2018.2%2018.2%2014.6%2020%202Z%27/%3E%3C/svg%3E") center / contain no-repeat;
}
.app h3 a { color: var(--ink); text-decoration-color: #c9a3e6; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.app .status { color: var(--muted); font-weight: 600; margin-bottom: 0.5rem; }

/* Footer: dawn */
.site-footer {
  margin-top: 3.5rem;
  background: linear-gradient(180deg, var(--paper) 0%, var(--dawn-mid) 38%, var(--dawn-end) 100%);
  color: var(--foot-ink);
  font-size: 0.95rem;
}

.site-footer .wrap { padding-top: 4.5rem; padding-bottom: 2.5rem; }
.site-footer a { color: var(--foot-link); }
.site-footer address { font-style: normal; margin-bottom: 1rem; }
.site-footer p { margin-bottom: 0.5rem; }

/* App icon in the hero: rounded corners are baked into the image too */
.app-icon {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 0 1.4rem;
  border-radius: 22.37%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 14px 30px rgba(5, 8, 40, 0.55),
    0 0 46px rgba(255, 208, 138, 0.28);
}
@media (max-width: 30rem) { .app-icon { width: 92px; height: 92px; } }


/* Icons on the home page app cards */
.app { display: grid; grid-template-columns: 64px 1fr; column-gap: 1.25rem; align-items: start; }
.app h3::before { content: none; }
.card-icon {
  width: 64px; height: 64px; margin-top: 0.15rem;
  border-radius: 22.37%;
  box-shadow: 0 0 0 1px rgba(31, 26, 58, 0.08), 0 6px 16px rgba(31, 26, 58, 0.16);
}
.card-icon-blank {
  display: block;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 217, 160, 0.9) 0 7%, transparent 8%),
    linear-gradient(180deg, #1d1f5e 0%, #43307f 60%, #8f468f 100%);
}
@media (max-width: 30rem) {
  .app { grid-template-columns: 52px 1fr; column-gap: 1rem; }
  .card-icon { width: 52px; height: 52px; }
}
