/* zuperduper.app. Colours come from the app icon: its plum, its white Z,
   its green check. */

:root {
  --plum: #3b0f37;
  --plum-soft: #5b2356;
  --paper: #fbf8fc;
  --ink: #2a1630;
  --muted: #6c5a72;
  --line: #e4d9e8;
  --check: #2bab74;
  --check-ink: #17734c;
  --yours: #f1e8f3;
  --code: #efe6f1;

  --step--1: 0.85rem;
  --step-0: 1.125rem;
  --step-1: 1.4rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4vw, 2.6rem);
  --step-4: clamp(2.6rem, 6.4vw, 4.6rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1d0f1f;
    --ink: #f3eaf4;
    --muted: #b9a7be;
    --line: #3d2741;
    --check-ink: #4fd197;
    --yours: #2c1630;
    --code: #2f1b33;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Familjen Grotesk", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

img { display: inline-block; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--check);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.1; margin: 0; }

h2 {
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5em;
}

h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--code);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
.wrap.narrow { max-width: 44rem; }

/* ---- hero: the route ------------------------------------------------- */

.hero {
  background: var(--plum);
  color: #fff;
  padding-bottom: 5rem;
}

.top {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: var(--step-1);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.top-link { text-decoration: none; font-weight: 500; opacity: 0.85; }
.top-link:hover { opacity: 1; text-decoration: underline; }

.hero-body {
  max-width: 68rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

h1 {
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-bottom: 0.45em;
  text-wrap: balance;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  color: #e9d9e7;
  max-width: 32rem;
}
.lede strong { display: block; color: #fff; font-weight: 600; margin-bottom: 0.35rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 2rem;
}

.hero-note { color: #d6bfd3; font-size: var(--step--1); }
.hero-note a { color: #fff; }

.route { position: relative; margin: 0; }
.route svg { display: block; width: 100%; height: auto; overflow: visible; }

.route .device rect,
.route .device line,
.route .device path {
  fill: none;
  stroke: #fff;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route .track,
.route .trail {
  fill: none;
  stroke-width: 26;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.route .track { stroke: rgba(255, 255, 255, 0.14); }
.route .trail { stroke: #fff; }

.route .check circle { fill: var(--check); stroke: var(--plum); stroke-width: 8; }
.route .check path {
  fill: none;
  stroke: #fff;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The one moment of motion: the photo's route draws itself, then lands. */
@media (prefers-reduced-motion: no-preference) {
  .route .trail {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: travel 1.5s cubic-bezier(0.65, 0, 0.35, 1) 0.35s forwards;
  }
  .route .check {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0);
    animation: land 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 1.8s forwards;
  }
}

@keyframes travel { to { stroke-dashoffset: 0; } }
@keyframes land { to { transform: scale(1); } }

.tag {
  position: absolute;
  font-size: var(--step--1);
  font-weight: 500;
  white-space: nowrap;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.tag-from { left: 0; top: 30.5%; color: #e9d9e7; }
.tag-to { right: 0; top: 91%; color: #e9d9e7; }
.tag-file {
  left: 38%;
  top: 2%;
  background: #fff;
  color: var(--plum);
}

/* ---- buttons --------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: var(--plum);
  color: #fff;
  border: 2px solid var(--plum);
}
.button:hover { background: var(--plum-soft); border-color: var(--plum-soft); }
.button .size { font-weight: 400; opacity: 0.75; font-size: var(--step--1); }

.button.primary {
  background: var(--check);
  border-color: var(--check);
  color: #fff;
  font-size: var(--step-1);
  padding: 0.8rem 1.5rem;
}
.button.primary:hover { background: #33c085; border-color: #33c085; }

.button.disabled {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  cursor: default;
}

@media (prefers-color-scheme: dark) {
  .button:not(.primary):not(.disabled) { background: #fff; color: var(--plum); border-color: #fff; }
  .button:not(.primary):not(.disabled):hover { background: #ecdcef; border-color: #ecdcef; }
}

/* ---- downloads ------------------------------------------------------- */

main > section { padding: 5rem 0; }

.section-lede { color: var(--muted); max-width: 40rem; margin-bottom: 2.5rem; }

.platforms { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.platform {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) auto;
  gap: 0.5rem 2rem;
  align-items: start;
  padding: 1.6rem 1rem;
  border-bottom: 1px solid var(--line);
}
.platform-name p { margin: 0.3rem 0 0; color: var(--muted); font-size: var(--step--1); }
.platform-how { margin: 0; max-width: 34rem; }

/* The row for the device you're reading this on. */
.platform.yours { background: var(--yours); border-radius: 12px; border-bottom-color: transparent; }
.platform.yours .platform-name h3::after {
  content: "This device";
  display: inline-block;
  margin-left: 0.6rem;
  vertical-align: middle;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--check-ink);
}

/* ---- features -------------------------------------------------------- */

.features { border-top: 1px solid var(--line); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 3rem;
  margin-top: 1rem;
}
.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--muted); margin: 0; }

/* ---- private & updates ---------------------------------------------- */

.private { background: var(--plum); color: #fff; }
.private p { color: #e9d9e7; font-size: var(--step-1); line-height: 1.5; }

.updates h3 { margin: 2rem 0 0.25rem; }
.release-date { color: var(--muted); font-size: var(--step--1); margin: 0 0 0.75rem; }
.notes { padding-left: 1.2rem; margin: 0; }
.notes li { margin-bottom: 0.4rem; }

/* Earlier releases, folded away until asked for. */
.history { margin-top: 2rem; border-top: 1px solid var(--line); }
.history summary {
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 600;
  color: var(--check-ink);
  list-style: none;
}
.history summary::-webkit-details-marker { display: none; }
.history summary::after { content: " ▾"; }
.history[open] summary::after { content: " ▴"; }
.history summary:hover { text-decoration: underline; }
.release { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.release h4 { margin: 0 0 0.15rem; font-size: var(--step-0); font-weight: 600; }
.release .notes { color: var(--muted); }

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

.foot { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--muted); font-size: var(--step--1); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.foot p { margin: 0; display: inline-flex; align-items: center; gap: 0.5rem; }

/* ---- smaller screens ------------------------------------------------- */

@media (max-width: 900px) {
  .hero-body { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-top: 2rem; }
  .route { max-width: 30rem; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform { grid-template-columns: minmax(0, 1fr) auto; }
  .platform-how { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 600px) {
  .hero { padding-bottom: 3.5rem; }
  .top, .hero-body { padding-left: 1rem; padding-right: 1rem; }
  .wrap { padding: 0 1rem; }
  main > section { padding: 3.5rem 0; }
  .feature-grid { grid-template-columns: 1fr; gap: 2rem; }
  .platform { grid-template-columns: 1fr; padding: 1.4rem 0.75rem; }
  .platform-how { grid-row: auto; }
  .platform .button { justify-self: start; }
  .tag { font-size: 0.75rem; padding: 0.1rem 0.45rem; }
}
