/*
 * keepsake — website styles.
 * Mirrors the app's design tokens (desktop/src/styles/tokens.css) so the
 * site and the app read as one product. The only third-party call is
 * Vercel Web Analytics (cookieless, no PII) on the pages; the app itself
 * still makes no network calls at all.
 */

@font-face {
  font-family: "PP Kyoto";
  src: url("assets/fonts/PPKyoto-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Kyoto";
  src: url("assets/fonts/PPKyoto-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "PP Kyoto";
  src: url("assets/fonts/PPKyoto-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #005363;
  --color-secondary: #5d909b;
  --color-background: #eceff5;
  --color-surface: #fbfcfd;
  --color-text: #525252;
  --color-on-primary: #ffffff;
  --font-serif: "PP Kyoto", Georgia, "Times New Roman", serif;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-xxxl: 64px;
  --radius-button: 12px;
  --radius-card: 12px;
  --radius-large-card: 20px;
  --measure: 42rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  /* Horizontal only — using the `padding` shorthand here would zero the
     vertical padding that `section` sets, collapsing the gaps between
     sections. */
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: var(--space-xxxl) var(--space-lg) var(--space-xl);
}

.hero-book {
  width: 132px;
  height: 132px;
  margin: 0 auto var(--space-md);
}

.wordmark {
  color: var(--color-primary);
  font-size: 2.6rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.1;
}

.tagline {
  font-style: italic;
  font-size: 1.2rem;
  margin: var(--space-md) auto 0;
  max-width: 26rem;
}

.lede {
  font-size: 1.1rem;
  margin: var(--space-lg) auto 0;
  max-width: 34rem;
}

/* ---- Buttons ------------------------------------------------------------- */

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-xl);
}

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 15rem;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-button);
  background: var(--color-primary);
  color: var(--color-on-primary);
  text-decoration: none;
  font-style: italic;
  font-size: 1.15rem;
}

.btn:hover {
  opacity: 0.92;
}

.btn small {
  font-style: normal;
  font-size: 0.8rem;
  opacity: 0.85;
}

/* The non-detected platform is quieter (sage) but fully usable. */
.btn--secondary {
  background: var(--color-secondary);
}

/* JS marks the visitor's OS; that card floats first and reads "Recommended". */
.btn[data-recommended="true"]::after {
  content: "Recommended for your computer";
  font-style: normal;
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 2px;
}

/* ---- Screenshot showcase ------------------------------------------------- */

.showcase {
  padding-top: var(--space-lg);
}

.shot {
  margin: 0 0 var(--space-xxl);
  text-align: center;
}

.shot img {
  width: 100%;
  max-width: 880px;
  height: auto;
  /* The window frame + soft shadow are baked into the transparent PNG, so
     it floats on the page background with no extra styling. */
}

.shot figcaption {
  font-style: italic;
  max-width: 32rem;
  margin: var(--space-sm) auto 0;
  opacity: 0.85;
}

/* The section's own bottom padding provides the gap after the last shot. */
.shot:last-child {
  margin-bottom: 0;
}

/* ---- Sections ------------------------------------------------------------ */

section {
  padding: var(--space-xxl) 0;
}

.section-title {
  color: var(--color-primary);
  font-size: 1.6rem;
  font-weight: 500;
  text-align: center;
  margin: 0 0 var(--space-lg);
}

/* Three feature cards, always one row on desktop (stacks on narrow screens
   via the media query below). */
#about {
  max-width: 60rem;
}

.features {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature {
  background: var(--color-surface);
  border-radius: var(--radius-large-card);
  padding: var(--space-lg);
}

.feature h3 {
  color: var(--color-primary);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0 0 var(--space-sm);
}

.feature p {
  margin: 0;
}

/* ---- Install instructions ------------------------------------------------ */

.install {
  background: var(--color-surface);
  border-radius: var(--radius-large-card);
  padding: var(--space-lg) var(--space-xl);
  margin-top: var(--space-lg);
}

.install h3 {
  color: var(--color-primary);
  font-size: 1.1rem;
  font-weight: 500;
  margin: var(--space-md) 0 var(--space-sm);
}

.install ol {
  margin: 0;
  padding-left: 1.3em;
}

.install li {
  margin: var(--space-sm) 0;
}

.note {
  font-style: italic;
  text-align: center;
  max-width: 34rem;
  margin: var(--space-lg) auto 0;
}

/* ---- Contact block (support page) ---------------------------------------- */

.contact {
  background: var(--color-surface);
  border-radius: var(--radius-large-card);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-lg) 0 var(--space-xl);
  text-align: center;
}

.contact-email {
  display: inline-block;
  font-size: 1.25rem;
  margin-top: var(--space-sm);
}

/* ---- Footer -------------------------------------------------------------- */

footer {
  text-align: center;
  padding: var(--space-xl) var(--space-lg) var(--space-xxl);
  font-size: 0.9rem;
}

footer a {
  margin: 0 var(--space-sm);
}

/* ---- Privacy page -------------------------------------------------------- */

.doc {
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--space-xxl) var(--space-lg) var(--space-xxxl);
}

.doc h1 {
  color: var(--color-primary);
  font-weight: 500;
}

.doc h2 {
  color: var(--color-primary);
  font-size: 1.15rem;
  font-weight: 500;
  margin: var(--space-xl) 0 var(--space-sm);
}

/* FAQ-style question headings sit under the teal h2 section headings. */
.doc h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin: var(--space-lg) 0 var(--space-xs);
}

.doc h3 em {
  opacity: 0.7;
  font-size: 0.9rem;
}

.doc .effective {
  font-style: italic;
  opacity: 0.7;
}

.doc .back {
  display: inline-block;
  margin-bottom: var(--space-lg);
}

/* Below this width three cards get too cramped — stack them. */
@media (max-width: 720px) {
  .features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .wordmark {
    font-size: 2.1rem;
  }
  .btn {
    min-width: 100%;
  }
}
