/* Leadsheet website. Same look as the App Store screenshots: dark teal, note pattern, Source Sans Pro. */

@font-face {
  font-family: "Source Sans Pro";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/SourceSansPro-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Source Sans Pro";
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/SourceSansPro-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "Source Sans Pro";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/SourceSansPro-Bold.ttf") format("truetype");
}

:root {
  --bg: #0f2a2b;
  --bg-light: #133637;
  --bg-dark: #0b2122;
  --teal-deep: #154243;
  --teal: #00706f;
  --accent: #2fd3cf;
  --text: #ecf4f4;
  --muted: #b3caca;
  --line: rgba(255, 255, 255, 0.1);
  --content: 1160px;
  --gutter: 24px;
  --side: max(var(--gutter), calc((100% - var(--content)) / 2));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --topbar: 64px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--topbar); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.6 "Source Sans Pro", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-underline-offset: 0.2em; transition: color 0.2s; }
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0 0 0.45em; font-weight: 700; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 20;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}
.skip:focus { top: 12px; }

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--topbar);
  padding: 0 var(--side);
  background: rgba(15, 42, 43, 0.8);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600; /* the wordmark is lowercase Source Sans Pro SemiBold, like the "le" in the app icon */
  font-size: 1.35rem;
  text-decoration: none;
}
.brand img { border-radius: 8px; }
.topnav { display: flex; gap: 28px; margin-left: auto; }
.topnav a { color: var(--muted); font-weight: 600; text-decoration: none; }
.topnav a:hover { color: var(--text); }
.topnav[hidden] + .langs { margin-left: auto; }
.langs { display: flex; gap: 2px; }
.langs a {
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
.langs a:hover { color: var(--text); }
.langs a[aria-current="page"] { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.download {
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s var(--ease);
}
.download:hover { background: #fff; color: var(--bg); }
.download:active { transform: scale(0.97); }

/* Sections: full-width bands, each a shade apart so the page doesn't read as one long surface */

main > section { padding: 112px var(--side); }

/* Hero: solid teal on top, the note pattern fades in further down (like the store screenshots) */

main > .hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 128px;
  background: var(--teal-deep);
  overflow: hidden;
}
.hero::before, .contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/notes-pattern.webp") center / 1060px repeat;
  opacity: 0.22;
  filter: brightness(3);
  -webkit-mask-image: linear-gradient(to bottom, transparent 20%, #000 75%);
  mask-image: linear-gradient(to bottom, transparent 20%, #000 75%);
  pointer-events: none;
}
.hero > *, .contact > * { position: relative; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); letter-spacing: -0.025em; }
.lead { max-width: 30em; font-size: 1.3rem; line-height: 1.55; color: var(--muted); }
.badge { display: inline-block; margin-top: 16px; transition: transform 0.2s var(--ease); }
.badge:hover { transform: translateY(-2px); }
.badge img { display: block; width: auto; height: 54px; }
.note { margin-top: 14px; font-size: 0.92rem; color: var(--muted); }
.hero-visual { justify-self: center; width: 100%; max-width: 480px; padding-bottom: 18%; }
.pedal {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 72%;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6));
}

/* A soft stage light behind the devices lifts the dark app screens off the dark page.
   site.js draws it into this canvas pixel by pixel with dithering: as a CSS gradient it showed stripes. */
.hero-visual, .showcase-device { isolation: isolate; }
/* With the canvas, the shadow is drawn there too */
.js .hero-visual .ipad, .js .showcase-device .ipad { box-shadow: 0 0 0 2px #5a5f61; }
.glow {
  position: absolute;
  left: -25%;
  top: -15%;
  z-index: -1;
  width: 150%;
  height: 130%;
  pointer-events: none;
}

/* iPad frame around a screenshot */

.ipad {
  position: relative;
  padding: 3%;
  border-radius: 7% / 5.3%;
  background: #161616;
  box-shadow: 0 0 0 2px #5a5f61, 0 20px 40px rgba(0, 0, 0, 0.45);
}
.ipad img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4% / 3%;
}

/* Why: one short statement, set large */

main > .why { padding-top: 120px; padding-bottom: 120px; background: var(--bg-dark); text-align: center; }
.why p { max-width: 24em; margin: 0 auto; font-size: clamp(1.35rem, 2.4vw, 1.85rem); line-height: 1.4; color: var(--text); }
.why .since { max-width: none; margin-top: 32px; font-size: 1rem; font-weight: 600; color: var(--accent); }

/* Features: without JavaScript (and on phones) each feature shows its own screenshot.
   With it, the texts scroll past one sticky iPad that crossfades to the matching screen. */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
}
.feature .ipad { justify-self: center; width: 100%; max-width: 420px; }
.feature h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.feature p { max-width: 28em; font-size: 1.2rem; color: var(--muted); }
.showcase-device { display: none; }

.js .showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.js .feature { display: flex; flex-direction: column; justify-content: center; min-height: 78vh; padding: 0; }
.js .feature .ipad { display: none; }
.js .feature-text { opacity: 0.3; transition: opacity 0.5s var(--ease); }
.js .feature.active .feature-text { opacity: 1; }
.js .showcase-device {
  display: block;
  position: sticky;
  top: max(calc(var(--topbar) + 24px), calc(50vh - 300px));
  align-self: start;
  margin-top: calc(39vh - 300px);
}
.showcase-device .ipad { width: min(100%, 440px, calc((100vh - 140px) / 1.4)); margin: 0 auto; }
.screen { position: relative; }
.screen img { transition: opacity 0.5s var(--ease); }
.screen img + img { position: absolute; inset: 0; }
.screen img:not(.active) { opacity: 0; }

/* Extras: heading on top, four items in a row, each with a line icon */

main > .extras { background: var(--bg-light); }
.extras h2 { margin-bottom: 56px; text-align: center; }
.extras-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.extra { padding-top: 24px; border-top: 1px solid var(--line); }
.extra svg { display: block; width: 30px; height: 30px; margin-bottom: 16px; color: var(--accent); }
.extra h3 { margin-bottom: 6px; }
.extra p { margin: 0; color: var(--muted); }

/* FAQ */

main > .faq { background: var(--bg); }
.faq h2 { margin-bottom: 40px; text-align: center; }
.faq-list { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }
details { overflow: hidden; border-bottom: 1px solid var(--line); }
summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 20px 4px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s;
}
summary:hover { color: var(--accent); }
summary::-webkit-details-marker { display: none; }
/* The plus turns into a cross while the answer is open */
summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}
details[open]:not(.closing) summary::after { transform: rotate(45deg); }
details p { max-width: 40em; padding: 0 4px 8px; color: var(--muted); }

/* Contact: the closing section, teal like the hero */

main > .contact {
  position: relative;
  overflow: hidden;
  padding-top: 120px;
  padding-bottom: 136px;
  background: var(--teal-deep);
  text-align: center;
}
.contact-icon { display: block; margin: 0 auto 28px; border-radius: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4); }
.contact p { font-size: 1.2rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; margin-top: 32px; }
.actions .badge { margin: 0; }
.button {
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.button:hover { border-color: var(--accent); background: rgba(47, 211, 207, 0.1); color: var(--text); }

/* Privacy policy, legal notice, 404 */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px var(--gutter) 96px;
}
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 { margin-top: 1.8em; font-size: 1.35rem; color: var(--accent); }
.legal p, .legal li { color: var(--muted); }
.back { margin-top: 40px; }

/* Footer */

.footer {
  padding: 40px var(--gutter) 56px;
  background: var(--bg-dark);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.footer p { margin: 0.3em 0; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* Small laptops, tablets, phones */

@media (max-width: 1000px) {
  .extras-list { grid-template-columns: repeat(2, 1fr); gap: 32px 48px; }
}
@media (max-width: 860px) {
  main > section { padding-top: 80px; padding-bottom: 80px; }
  main > .hero { grid-template-columns: 1fr; padding-top: 56px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-visual { max-width: 360px; }
  .js .showcase { display: block; }
  .js .showcase-device { display: none; }
  .feature, .js .feature { display: grid; grid-template-columns: 1fr; gap: 32px; min-height: 0; padding: 40px 0; }
  .js .feature .ipad { display: block; }
  .js .feature-text { opacity: 1; }
  .feature .ipad { max-width: 340px; }
}
@media (max-width: 600px) {
  .topnav { display: none; }
  .langs { margin-left: auto; }
  .extras-list { grid-template-columns: 1fr; gap: 0; }
  .extra { display: grid; grid-template-columns: 30px 1fr; column-gap: 16px; padding: 20px 0; }
  .extra svg { grid-row: span 2; margin: 0; }
  .topbar { gap: 12px; }
}
@media (max-width: 440px) {
  .brand span { display: none; } /* the app icon alone links home, so language and download still fit */
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
