/* Maple Notes website. The colours are the app's own: warm stone neutrals and the maple red of the icon. */

:root {
  color-scheme: light;
  --bg: #f5f5f4;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #57534e;
  --border: #e7e5e4;
  --accent: #8f1d21;
  --accent-hover: #731619;
  --accent-text: #8f1d21;
  --accent-soft: #fdf3f3;
  --on-accent: #ffffff;
  --code-bg: #1c1917;
  --code-text: #f5f5f4;
  --inline-code-bg: #f5f5f4;
  --shadow: 0 1px 2px rgb(28 25 23 / 0.05), 0 12px 32px -16px rgb(28 25 23 / 0.2);
  --shadow-lg: 0 2px 4px rgb(28 25 23 / 0.04), 0 28px 60px -24px rgb(28 25 23 / 0.35);
  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0c0a09;
    --surface: #1c1917;
    --text: #f5f5f4;
    --muted: #a8a29e;
    --border: #292524;
    --accent: #b0282d;
    --accent-hover: #c43439;
    --accent-text: #e57373;
    --accent-soft: #2a1515;
    --code-bg: #0c0a09;
    --inline-code-bg: #292524;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 28px 60px -24px rgb(0 0 0 / 0.8);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}

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

picture {
  display: block;
}

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--inline-code-bg);
  border-radius: 6px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

pre {
  margin: 0;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 12px;
  padding: 16px;
  font-size: 12.5px;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* On phones, long commands wrap instead of hiding off the edge; copying them still gives the original lines. */
@media (max-width: 40rem) {
  pre {
    white-space: pre-wrap;
  }
}

.wrap {
  width: min(100% - 32px, 1080px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.skip:focus {
  top: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  font-size: 17px;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 20px;
}

.site-header nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--text);
}

@media (max-width: 32rem) {
  .site-header nav .optional {
    display: none;
  }
}

/* Hero */

.hero {
  padding-block: 72px 24px;
  background: radial-gradient(56rem 28rem at 90% -8rem, var(--accent-soft), transparent 70%);
}

/* The link above the headline that points to end-to-end encryption. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.pill:hover {
  border-color: var(--accent-text);
  color: var(--text);
}

.pill-label {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.pill-arrow {
  color: var(--accent-text);
  transition: transform 0.15s;
}

.pill:hover .pill-arrow {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .pill-arrow {
    transition: none;
  }
}

@media (max-width: 26rem) {
  .pill-text {
    display: none;
  }
}

h1 {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.6rem);
  font-weight: 750;
  line-height: 1.07;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  margin: 22px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  border-color: var(--muted);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.button.primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.facts li::before {
  content: "✓";
  margin-right: 7px;
  color: var(--accent-text);
  font-weight: 700;
}

.showcase {
  position: relative;
  margin-top: 56px;
}

.screen {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.phone {
  display: none;
}

@media (min-width: 56rem) {
  .showcase {
    margin-right: 8%;
  }

  .phone {
    display: block;
    position: absolute;
    right: -8%;
    bottom: -40px;
    width: 21%;
    border: 7px solid #1c1917;
    border-radius: 28px;
    background: #1c1917;
    box-shadow: var(--shadow-lg);
  }
}

@media (max-width: 40rem) {
  .screen {
    width: min(100%, 340px);
    margin-inline: auto;
    aspect-ratio: 780 / 1250;
    object-fit: cover;
    object-position: top;
    border-radius: 24px;
  }
}

/* Sections */

.section {
  padding-block: 72px;
  scroll-margin-top: 48px;
}

.section h2 {
  margin: 0;
  max-width: 26ch;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-lead {
  margin: 14px 0 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 14px;
  font-size: 1.15rem;
}

.card[id] {
  scroll-margin-top: 96px;
}

/* Reached from a link such as #end-to-end: a ring shows which card was meant. */
.card:target {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-text) 30%, transparent), var(--shadow);
}

.groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 20px;
  margin-top: 36px;
}

.features {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.features strong {
  color: var(--text);
  font-weight: 600;
}

/* Screenshots */

.gallery {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: 36px;
}

.gallery figure {
  margin: 0;
}

/* Flex ratios follow the images' aspect ratios, so both come out the same height. */
.gallery .wide {
  flex: 3.08 1 0;
}

.gallery .tall {
  flex: 1 1 0;
}

.gallery img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.gallery .tall img {
  border-radius: 22px;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 44rem) {
  .gallery {
    flex-direction: column;
  }

  .gallery .wide,
  .gallery .tall {
    flex: none;
    width: 100%;
  }

  .gallery .tall {
    align-self: center;
    width: min(100%, 300px);
  }
}

/* Privacy */

.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  margin-top: 36px;
}

.mode h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mode p {
  margin: 0;
  color: var(--muted);
}

.mode p + p {
  margin-top: 12px;
}

.mode-more {
  font-size: 14px;
}

.mode.strongest {
  border-color: var(--accent-text);
}

.badge {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
}

.checks {
  display: grid;
  gap: 10px;
  max-width: 72ch;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.checks li {
  position: relative;
  padding-left: 26px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.6em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-text);
}

.note {
  max-width: 72ch;
  margin: 28px 0 0;
  padding-left: 16px;
  border-left: 3px solid var(--border);
  color: var(--muted);
  font-size: 15px;
}

/* Install */

.install {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

.install .card {
  min-width: 0;
}

.install .span {
  grid-column: 1 / -1;
}

.install .card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.install .span p {
  margin-top: 0;
}

.install .card p + pre,
.install .card pre + p {
  margin-top: 14px;
}

@media (max-width: 52rem) {
  .install {
    grid-template-columns: minmax(0, 1fr);
  }
}

.callouts {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.callout {
  margin: 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-text);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
}

.callout strong {
  color: var(--text);
}

/* Demo, Falcon Notes and license */

.demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 32px;
}

.demo h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
}

.demo p {
  max-width: 56ch;
  margin: 12px 0 0;
  color: var(--muted);
}

.demo .actions {
  margin-top: 16px;
}

#demo,
#falcon {
  padding-block: 24px;
}

.prose p {
  max-width: 72ch;
  margin: 14px 0 0;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 28px 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.brand.small {
  margin: 0;
  gap: 8px;
  font-size: 15px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--text);
  text-decoration: underline;
}
