/*
 * getleafnote.app. Plain CSS, no build step.
 * Colours come from src/ui/theme/palette.ts, shapes from src/ui/theme/tokens.ts and type from
 * src/ui/theme/typography.ts. Light and dark follow prefers-color-scheme.
 */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src:
    url('/fonts/PlusJakartaSans-400.woff2') format('woff2'),
    url('/fonts/PlusJakartaSans_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/PlusJakartaSans-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/PlusJakartaSans-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src:
    url('/fonts/PlusJakartaSans-700.woff2') format('woff2'),
    url('/fonts/PlusJakartaSans_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --bg: #f2f2f2;
  --surface: #ffffff;
  --inset: #f3f3f5;
  --line: rgba(0, 0, 0, 0.08);
  --fg: #0b0b0c;
  --fg2: #5e5e66;
  --muted: #6e6e74;

  /* Big type and decoration only. It's 3:1 on the canvas, not enough for small text. */
  --accent: #1a9f5a;
  /* Links, tags and other small green text. */
  --accent-text: #137a43;
  --accent-soft: #e6f6ec;
  /* Green fills with white text on them, 5.4:1. */
  --fill: #137a43;
  /* The hero panel, the same green as the App Store art. No text sits on it. */
  --panel: #15904e;

  /* The action layer: always the highest contrast thing on screen. */
  --action: #262628;
  --on-action: #ffffff;

  --device-edge: transparent;

  --radius-sm: 16px;
  --radius: 28px;
  --radius-lg: 36px;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --surface: #1b1b1e;
    --inset: #26262a;
    --line: rgba(255, 255, 255, 0.1);
    --fg: #f5f5f7;
    --fg2: #ababb3;
    --muted: #8b8b92;
    --accent: #2fb872;
    --accent-text: #7fd8a4;
    --accent-soft: #15301f;
    --fill: #137a43;
    --panel: #137a43;
    --action: #f5f5f7;
    --on-action: #0b0b0c;
    --device-edge: rgba(255, 255, 255, 0.16);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 20px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    'Plus Jakarta Sans',
    -apple-system,
    system-ui,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  /* Short pages keep the footer at the bottom. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
main {
  flex: 1;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 0.16em;
}

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  margin: 0 0 0.85em;
}
p:last-child {
  margin-bottom: 0;
}

.wrap {
  width: min(100% - var(--gutter) * 2, 1180px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--action);
  color: var(--on-action);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--fg);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.site-nav {
  display: flex;
  gap: 4px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 999px;
  color: var(--fg2);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover {
  background: var(--surface);
  color: var(--fg);
}
.site-nav a[aria-current='page'] {
  background: var(--surface);
  color: var(--fg);
}

/* The App Store slot and buttons */

.store {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  margin: 0;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--action);
  color: var(--on-action);
  font-weight: 600;
  line-height: 1.25;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--action);
  color: var(--on-action);
  font-weight: 600;
  text-decoration: none;
}

/* Tags */

.tag {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* Hero */

.hero {
  display: grid;
  gap: 36px;
  padding-block: 28px 20px;
}
.hero h1 {
  font-size: clamp(3.75rem, 16.5vw, 6.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.hero h1 span {
  display: block;
  color: var(--accent);
}
.lead {
  margin: 22px 0 28px;
  max-width: 30em;
  color: var(--fg2);
  font-size: clamp(1.1875rem, 1rem + 0.9vw, 1.5rem);
  line-height: 1.42;
}
.hero-panel {
  display: flex;
  justify-content: center;
  padding-top: 40px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--panel);
}

/* A phone: real app pixels in a drawn outline */

.phone {
  position: relative;
  padding: 2.6%;
  border-radius: 14.4% / 6.74%;
  background: #0b0b0c;
  box-shadow: 0 0 0 1px var(--device-edge);
}
/* Margins in percent follow the width, so the island holds on a cut-off phone too. */
.phone::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 28.4%;
  aspect-ratio: 3.41;
  margin-top: 5.6%;
  border-radius: 999px;
  background: #000000;
  transform: translateX(-50%);
}
.phone img {
  width: 100%;
  border-radius: 12.4% / 5.7%;
}
/* The hero image is cut above the input bar, so this phone ends at the panel's edge. */
.hero-panel .phone {
  flex: none;
  width: min(76%, 400px);
  padding-bottom: 0;
  border-radius: 14.4% 14.4% 0 0 / 9.6% 9.6% 0 0;
}
.hero-panel .phone img {
  border-radius: 12.4% 12.4% 0 0 / 7.8% 7.8% 0 0;
}

/* Sections */

.section {
  padding-block: 44px 0;
}
.section-head {
  max-width: 34em;
  margin-bottom: 26px;
}
.section-head h2 {
  font-size: clamp(2.25rem, 7.4vw, 3.75rem);
}
.section-head p {
  margin-top: 16px;
  color: var(--fg2);
  font-size: 1.125rem;
}

/* The short explainer */

.explain {
  display: grid;
  gap: 20px;
  align-items: center;
}
.explain .section-head {
  margin-bottom: 0;
}
.examples {
  margin: 0;
  padding: 8px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
}
.examples li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding-block: 18px;
  font-weight: 500;
}
.examples li + li {
  border-top: 1px solid var(--line);
}
@media (max-width: 479px) {
  .examples li {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Feature cards */

.features {
  display: grid;
  gap: 16px;
}
.feature {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.feature-text {
  padding: 30px 26px 26px;
}
.feature h2 {
  margin-top: 12px;
  font-size: clamp(2.25rem, 8vw, 3.25rem);
}
.feature-text p {
  margin-top: 12px;
  color: var(--fg2);
}
.feature-text p.pro {
  margin: 0;
}
.feature-shot {
  position: relative;
  flex: none;
  aspect-ratio: 10 / 11;
  overflow: hidden;
}
.feature-shot .phone {
  position: absolute;
  left: 50%;
  width: 78%;
  transform: translateX(-50%);
}
/* The same input bar as the phone's, lifted out of it and over its own spot. */
.feature-shot .pop {
  position: absolute;
  left: 6%;
  width: 88%;
  bottom: 7.1%;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
/* The top of the phone, cut off by the bottom of the card. */
.feature.rising .phone {
  top: 0;
}
/* The bottom of the phone, for screens where the input bar is the point. */
.feature.hanging {
  flex-direction: column-reverse;
}
.feature.hanging .phone {
  bottom: 0;
}

/* Free and Pro */

.plans {
  display: grid;
  gap: 16px;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.plan h3 {
  font-size: 1.375rem;
  letter-spacing: -0.015em;
}
.price {
  margin: 14px 0 4px;
  font-size: clamp(2.5rem, 9vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.price small {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.plan-note {
  color: var(--fg2);
}
.plan ul {
  flex: 1;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.plan li {
  position: relative;
  padding: 11px 0 11px 34px;
  border-top: 1px solid var(--line);
}
.plan li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 17px;
  width: 15px;
  height: 8px;
  border-bottom: 3px solid var(--accent-text);
  border-left: 3px solid var(--accent-text);
  border-radius: 1px;
  transform: rotate(-45deg);
}
.plan-pro {
  --line: rgba(255, 255, 255, 0.24);
  background: var(--fill);
  color: #ffffff;
}
.plan-pro .plan-note {
  color: #ffffff;
}
.plan-pro li::before {
  border-color: #ffffff;
}
.fine {
  margin: 16px 0 0;
  font-size: 0.9375rem;
  color: var(--fg2);
}
.plan-pro .fine {
  color: #ffffff;
}

/* The privacy promise */

.promise {
  padding: 32px 26px;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
}
.promise h2 {
  font-size: clamp(2.25rem, 7.4vw, 3.75rem);
}
.promise p {
  max-width: 40em;
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 1.125rem;
}

/* Closing */

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding-block: 64px 20px;
  text-align: center;
}
.closing img {
  width: 84px;
  height: 84px;
  border-radius: 20px;
}
.closing h2 {
  font-size: clamp(2.25rem, 7.4vw, 3.75rem);
}

/* Inner pages */

.doc {
  width: min(100% - var(--gutter) * 2, 760px);
  margin-inline: auto;
}
.doc-head {
  padding-block: 28px 20px;
}
.doc-head h1 {
  font-size: clamp(2.5rem, 10vw, 4rem);
  letter-spacing: -0.035em;
}
.doc-head .lead {
  margin-bottom: 0;
}
.meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.card {
  margin-block: 12px;
  padding: 24px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 1rem;
}
.card.soft {
  background: var(--accent-soft);
}
.card h2 {
  margin-bottom: 10px;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.card ul,
.card ol {
  margin: 0 0 0.85em;
  padding-left: 22px;
}
.card li {
  margin-bottom: 7px;
}
.card ul:last-child,
.card ol:last-child,
.card li:last-child {
  margin-bottom: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.4;
}
.table th,
.table td {
  padding: 10px 10px 10px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.table th:last-child,
.table td:last-child {
  padding-right: 0;
}
.table th {
  border-top: 0;
  color: var(--fg2);
  font-size: 0.875rem;
  font-weight: 600;
}
@media (max-width: 419px) {
  .table {
    font-size: 0.875rem;
  }
  .table th,
  .table td {
    padding-right: 6px;
  }
}

/* Support */

.faq {
  margin-block: 12px;
  padding-inline: 22px;
  border-radius: var(--radius);
  background: var(--surface);
}
.faq details + details {
  border-top: 1px solid var(--line);
}
.faq summary {
  position: relative;
  padding: 18px 32px 18px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 24px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}
.faq details[open] summary::after {
  top: 28px;
  transform: rotate(225deg);
}
.answer {
  padding-bottom: 20px;
  color: var(--fg2);
  font-size: 1rem;
}
.answer ol,
.answer ul {
  margin: 0 0 0.85em;
  padding-left: 22px;
}
.answer li {
  margin-bottom: 7px;
}
.answer strong {
  color: var(--fg);
  font-weight: 600;
}

/* 404 */

.lost {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  padding-block: 56px 88px;
}
.lost h1 {
  font-size: clamp(3rem, 13vw, 5.5rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.lost p {
  margin: 0;
  color: var(--fg2);
  font-size: 1.1875rem;
}
.lost-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  margin-top: 44px;
  padding-block: 20px 36px;
  border-top: 1px solid var(--line);
  color: var(--fg2);
  font-size: 0.9375rem;
}
.site-footer p {
  margin: 0;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin-inline: -12px;
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  color: var(--fg2);
}

/* The narrowest phones */

@media (max-width: 359px) {
  .brand {
    gap: 8px;
    font-size: 1.0625rem;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .site-nav {
    gap: 0;
    margin-right: -8px;
  }
  .site-nav a {
    padding-inline: 8px;
  }
  .store {
    padding-inline: 20px;
    font-size: 1rem;
  }
}

/* Wider screens */

@media (min-width: 620px) {
  :root {
    --gutter: 32px;
  }
  .feature-text {
    padding: 38px 38px 32px;
  }
  .plan,
  .promise {
    padding: 42px 40px;
  }
  .card {
    padding: 30px 32px;
  }
  .faq {
    padding-inline: 32px;
  }
  .examples {
    padding-inline: 30px;
  }
  .site-footer {
    margin-top: 56px;
  }
}

@media (min-width: 700px) {
  .features {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .feature-shot {
    aspect-ratio: 1;
  }
  .feature-shot .phone {
    width: 70%;
  }
  .feature-shot .pop {
    left: 8%;
    width: 84%;
    bottom: 6.7%;
  }
}

@media (min-width: 900px) {
  body {
    font-size: 1.125rem;
  }
  .hero {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 48px;
    padding-block: 32px 28px;
  }
  .section {
    padding-block: 72px 0;
  }
  .explain {
    grid-template-columns: 1.08fr 0.92fr;
    gap: 48px;
  }
  .plans {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .plan {
    padding: 48px;
  }
  .promise {
    padding: 56px;
  }
  .closing {
    padding-block: 96px 32px;
  }
}

@media (min-width: 1140px) {
  .hero h1 {
    font-size: 8rem;
  }
}
