/* Deep Work: the website. Governed by DESIGN.md.
   The gallery: a neutral room, and the app is the object in it. Rust is the
   only colour borrowed from the app; the screenshots are the only saturated
   thing on the page. Everything is served from this origin: two font files,
   the screenshots, the installer. No script. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
}

@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/fraunces-latin-wght-normal.woff2) format('woff2-variations');
}

:root {
  --gallery: #f7f7f5;
  --gallery-2: #eeeeeb;
  --ink: #17161a;
  --ink-soft: #6a6a72;
  --hairline: #dedddb;
  --rust: #8c3b2e;
  --rust-hover: #73301f;
  --on-rust: #fbf9f6;
  --shadow: 0 24px 60px -24px rgba(23, 22, 26, 0.35);

  --page: 62rem;
  --measure: 34rem;
  --prose: 40rem;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

html {
  background: var(--gallery);
}

body {
  background: var(--gallery);
  color: var(--ink);
  font-family: 'Inter Variable', system-ui, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  text-align: center;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  text-wrap: balance;
  margin: 0;
}

a {
  color: var(--rust);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--rust-hover);
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--gallery);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(var(--page), 100%);
  margin: 0 auto;
  padding: 0 16px;
}

section {
  padding: clamp(3.5rem, 9vh, 6.5rem) 0;
}

/* ---- the top line on inner pages ---- */
.site-head {
  padding: 1.25rem 0 0;
}

.site-head .mark {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

/* ---- hero ---- */
.hero {
  padding-top: clamp(3rem, 10vh, 6.5rem);
  padding-bottom: clamp(2.5rem, 7vh, 4.5rem);
}

.welcome {
  margin: 0 0 0.5rem;
  font-weight: 300;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.wordmark {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 500;
  font-size: clamp(4rem, 13vw, 8.5rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.tagline {
  margin: 1.75rem auto 0;
  max-width: var(--measure);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--ink-soft);
}

.tagline strong {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

/* ---- the plinth: a full-bleed band where a screenshot stands ---- */
.plinth {
  background: var(--gallery-2);
  padding: clamp(3rem, 8vh, 6rem) 0;
}

.plinth figure {
  margin: 0;
}

.plinth img {
  margin: 0 auto;
  width: min(56rem, 100%);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.plinth figcaption {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---- the passage between the two screenshots ---- */
.passage .wrap {
  max-width: calc(var(--measure) + 32px);
}

.passage h2 {
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}

.passage p {
  margin: 0 0 1.1rem;
}

.passage p:last-child {
  margin-bottom: 0;
}

/* ---- the local nav: name left, Buy right, stays at the top ---- */
.localnav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--gallery) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.localnav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3rem;
}

.localnav .mark {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.localnav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.localnav .quiet {
  color: var(--ink-soft);
  text-decoration: none;
}

.localnav .quiet:hover {
  color: var(--ink);
}

.localnav .pill {
  display: inline-block;
  padding: 0.3rem 0.95rem;
  border-radius: 999px;
  background: var(--rust);
  color: var(--on-rust);
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease;
}

.localnav .pill:hover {
  background: var(--rust-hover);
  color: var(--on-rust);
}

.hero-price {
  margin: 1.25rem 0 0;
  color: var(--ink);
  font-weight: 500;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0;
}

.cta-row .btn {
  display: inline-flex;
  justify-content: center;
  min-width: 10rem;
  padding: 0.8rem 1.5rem;
}

.btn.btn-quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.btn.btn-quiet:hover {
  background: var(--gallery-2);
  color: var(--ink);
}

/* ---- the feature list: one line each, hairlines between ---- */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.features li {
  padding: 1rem 0;
  border-top: 1px solid var(--hairline);
}

.features li:last-child {
  border-bottom: 1px solid var(--hairline);
}

.features strong {
  font-weight: 600;
}

/* ---- buy ---- */
.buy {
  background: var(--gallery-2);
}

.buy .wrap {
  max-width: calc(var(--measure) + 32px);
}

.big-price {
  margin: 0.5rem 0 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.6rem;
}

.big-price .amount {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 500;
  font-size: clamp(3.5rem, 9vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.big-price .once {
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.buy-sub {
  margin: 1rem auto 0;
  color: var(--ink-soft);
}

.how {
  margin: 2.5rem auto 0;
  padding: 0 0 0 1.4rem;
  text-align: left;
  color: var(--ink-soft);
}

.how li {
  padding: 0.3rem 0;
}

.how li::marker {
  color: var(--ink);
  font-weight: 600;
}

.fine-print {
  margin: 1.75rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.fine-print a {
  color: inherit;
}

/* ---- download ---- */
.download {
  border-top: 1px solid var(--hairline);
}

.cta {
  margin: 0 0 0.5rem;
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
}

.cta-sub {
  margin: 0 0 2.25rem;
  color: var(--ink-soft);
}

.platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  text-align: left;
}

.platform {
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 1.75rem 1.75rem 1.5rem;
  background: var(--gallery);
}

.platform header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.platform svg {
  width: 24px;
  height: 24px;
  fill: var(--ink);
  flex: none;
}

.platform h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  background: var(--rust);
  color: var(--on-rust);
  text-decoration: none;
  font-weight: 600;
  transition:
    background 150ms ease,
    transform 150ms ease;
}

.btn span:last-child {
  font-weight: 400;
  font-size: 0.9rem;
  opacity: 0.8;
  white-space: nowrap;
}

.btn:hover {
  background: var(--rust-hover);
  color: var(--on-rust);
}

.btn:active {
  transform: scale(0.99);
}

.req {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.req + .req {
  margin-top: 0.35rem;
}

.req a {
  color: inherit;
}

.price {
  margin: 2.5rem auto 0;
  max-width: var(--measure);
  color: var(--ink-soft);
}

.price strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---- sign-off ---- */
footer {
  padding: 2.5rem 0 3rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

footer .names {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink);
  font-weight: 500;
  font-size: 1.05rem;
}

footer .fine {
  margin: 1.5rem auto 0;
  max-width: var(--prose);
  font-size: 0.85rem;
}

footer .fine a,
footer nav a {
  color: inherit;
}

footer nav {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ---- the legal pages ---- */
.legal .hero {
  padding-top: clamp(3rem, 8vh, 5rem);
  padding-bottom: 0;
}

.legal h1 {
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
}

.legal .updated {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.prose {
  max-width: var(--prose);
  margin: 0 auto;
  text-align: left;
}

.prose h2 {
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.75rem;
}

.prose p {
  margin: 0 0 1rem;
}

/* ---- entrance ---- */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    opacity: 0;
    transform: translateY(10px);
    animation: rise 600ms cubic-bezier(0.22, 0.8, 0.24, 1) forwards;
  }

  .rise:nth-child(2) {
    animation-delay: 80ms;
  }

  .rise:nth-child(3) {
    animation-delay: 160ms;
  }

  @keyframes rise {
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (max-width: 640px) {
  .platforms {
    grid-template-columns: 1fr;
  }

  .platform {
    padding: 1.4rem 1.25rem 1.25rem;
  }
}
