/* HNote's landing page. The colors, corners and buttons come from the app's App/Theme.swift: the logo's blue on white,
   flat, solid colors only. */
:root {
  --white: #fff;
  --panel: #f5f7ff;
  --raised: #eef1ff;
  --border: #e4e8f7;
  --border-hi: #c9d2f5;
  --navy: #131f6e;
  --text: #111a55;
  --text2: #3b4577;
  --muted: #6b7499;
  --blue: #1f40e0;
  --fold: #a9b9f9;
  --red: #d92d4a;
  --violet: #3d5af1;
  --selected: #e8ecff;
  --corner: 14px;
  --card-corner: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
p, ul, dl, dd, h1, h2, h3, h4 { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--blue); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--fold); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 48px); }

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--blue); color: var(--white);
  padding: 8px 14px; border-radius: 999px; font-weight: 600; text-decoration: none; z-index: 10;
}
.skip:focus { top: 12px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 5; background: var(--white); border-bottom: 1px solid var(--border); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 60px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 700; font-size: 20px; text-decoration: none; }
.wordmark.small { font-size: 16px; gap: 6px; }
nav { display: flex; gap: 4px; }
nav a { color: var(--text2); font-size: 14px; font-weight: 600; text-decoration: none; padding: 6px 10px; border-radius: 8px; }
nav a:hover { background: var(--raised); }

/* Hero */
.hero { padding: 64px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 64px; align-items: center; }
.tags { display: flex; gap: 6px; margin-bottom: 20px; }
.tags li { background: var(--raised); color: var(--text2); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
h1 { font-size: clamp(36px, 4.7vw, 54px); line-height: 1.08; font-weight: 800; letter-spacing: -.022em; color: var(--navy); text-wrap: balance; }
.lede { margin-top: 20px; font-size: 19px; line-height: 1.5; color: var(--text2); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button { display: inline-block; padding: 11px 20px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; }
.button.primary { background: var(--blue); color: var(--white); }
.button.primary:hover { background: #1a36c0; }
.button.secondary { background: var(--raised); color: var(--text); border: 1px solid var(--border); }
.button.secondary:hover { background: var(--border); }
.callout { margin-top: 28px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; color: var(--text2); }
.callout strong { color: var(--text); }

/* The open note in the hero */
.hero-art { position: relative; padding-bottom: 64px; }
.sheet { background: var(--white); border: 1px solid var(--border-hi); border-radius: var(--card-corner); overflow: hidden; }
.sheet-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--border); }
.chev { color: var(--blue); flex: none; }
.sheet-title { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segment { margin-left: auto; flex: none; display: inline-flex; background: var(--raised); border-radius: 8px; padding: 2px; font-size: 12px; font-weight: 600; color: var(--text2); }
.segment span { padding: 3px 9px; border-radius: 6px; }
.segment .on { background: var(--white); color: var(--blue); }
.ink { width: 100%; height: auto; }
.typed-card {
  position: absolute; right: -14px; bottom: 0; width: min(310px, 72%);
  background: var(--white); border: 1px solid var(--border-hi); border-radius: var(--corner); padding: 14px 16px;
}
.typed-head { margin: 8px 0 4px; font-size: 15px; font-weight: 700; color: var(--navy); }
.typed-line { font-size: 13px; line-height: 1.45; color: var(--text2); }
.typed-line + .typed-line { margin-top: 4px; }
.typed-line b { color: var(--text); }

.tag { display: inline-block; font-size: 11px; font-weight: 600; line-height: 20px; padding: 0 8px; border-radius: 999px; white-space: nowrap; }
.tag.blue { background: #e4e8fb; color: var(--blue); }
.tag.violet { background: #e5e9fc; color: var(--violet); }
.tag.red { background: #fae3e7; color: #b81f39; }
.tag.plain { background: var(--raised); color: var(--text2); }

/* Sections */
.section { padding: 88px 0; }
.section.band { background: var(--panel); }
.section-head { max-width: 40em; margin-bottom: 44px; }
h2 { font-size: clamp(28px, 3.3vw, 38px); line-height: 1.15; font-weight: 800; letter-spacing: -.016em; color: var(--navy); text-wrap: balance; }
.section-head p { margin-top: 12px; color: var(--text2); font-size: 18px; }
h3 { font-size: 23px; line-height: 1.25; font-weight: 700; color: var(--text); letter-spacing: -.008em; }

/* Features */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 40px 0; border-top: 1px solid var(--border); }
.feature.flip .feature-copy { order: 2; }
.feature-copy p { margin-top: 10px; color: var(--text2); }
.feature-copy p.aside { margin-top: 14px; font-size: 14px; color: var(--muted); }
.list { margin-top: 14px; display: grid; gap: 7px; }
.list li { position: relative; padding-left: 20px; color: var(--text2); font-size: 16px; line-height: 1.45; }
.list li::before { content: ""; position: absolute; left: 2px; top: .52em; width: 8px; height: 8px; border-radius: 2.6px; background: var(--blue); }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--card-corner); padding: 20px; min-width: 0; }

.tools { display: flex; gap: 8px; }
.tool { flex: 1; display: grid; place-items: center; height: 52px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; color: var(--text2); }
.tool svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool.on { background: var(--selected); border-color: var(--border-hi); color: var(--blue); }
.swatches { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; }
.swatch.on { outline: 2px solid var(--blue); outline-offset: 2px; }
.swatch.navy { background: var(--navy); }
.swatch.blue { background: var(--blue); }
.swatch.red { background: var(--red); }
.swatch.fold { background: var(--fold); }
.width { height: 22px; width: 30px; position: relative; border-radius: 6px; }
.width::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; transform: translateY(-50%); background: var(--navy); border-radius: 4px; }
.width.w1 { margin-left: auto; }
.width.w1::after { height: 2px; }
.width.w2::after { height: 4px; }
.width.w3::after { height: 7px; }
.width.on { background: var(--selected); }
.papers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.paper { position: relative; height: 112px; background-color: var(--white); border: 1px solid var(--border); border-radius: 10px; }
.paper span { position: absolute; left: 8px; bottom: 6px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--white); padding: 0 4px; border-radius: 4px; }
.paper.lined { background-image: repeating-linear-gradient(to bottom, transparent 0 15px, var(--border-hi) 15px 16px); }
.paper.grid { background-image: repeating-linear-gradient(to bottom, transparent 0 15px, var(--border) 15px 16px), repeating-linear-gradient(to right, transparent 0 15px, var(--border) 15px 16px); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.note-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--corner); padding: 10px 10px 12px; min-width: 0; }
.thumb { height: 74px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); padding: 10px 12px; display: grid; gap: 7px; align-content: start; margin-bottom: 9px; overflow: hidden; }
.thumb i { display: block; height: 3px; border-radius: 2px; background: var(--fold); width: 78%; }
.thumb i:nth-child(2n) { width: 58%; }
.thumb i:nth-child(3n) { width: 88%; background: var(--navy); }
.card-title { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-date { font-size: 12px; color: var(--muted); margin-bottom: 7px; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--white); border: 1px solid var(--border); border-radius: var(--corner); padding: 10px 14px; min-width: 0; }
.kpi b { display: block; font-size: 26px; line-height: 1.2; color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.due { margin-top: 12px; background: var(--white); border: 1px solid var(--border); border-radius: var(--corner); padding: 14px; }
.due.plain-due { margin-top: 0; }
.due-head { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.due-head small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.due-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.due-row:first-of-type { border-top: 0; }
.chip { flex: none; width: 46px; padding: 4px 0; text-align: center; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.chip small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.chip b { display: block; font-size: 16px; line-height: 1.2; color: var(--text); }
.chip.hot { background: var(--raised); border-color: #a5b3f0; }
.chip.hot small { color: #b81f39; }
.due-text { min-width: 0; flex: 1; display: grid; }
.due-text b { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.due-text small { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 2.6px; flex: none; }
.dot.c1 { background: var(--blue); }
.dot.c2 { background: #1a9e7a; }
.dot.c3 { background: #d9822b; }

.chat { display: grid; gap: 10px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.bubble.me { justify-self: end; background: var(--blue); color: var(--white); }
.bubble.them { background: var(--white); border: 1px solid var(--border); color: var(--text); }
.source { margin-top: 8px; }

.more-head { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--border); }
.more { margin-top: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.more li { background: var(--white); border: 1px solid var(--border); border-radius: var(--card-corner); padding: 16px 18px; }
h4 { font-size: 15px; font-weight: 600; color: var(--text); }
.more p { margin-top: 5px; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Canvas */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.compare-col { background: var(--white); border: 1px solid var(--border); border-radius: var(--card-corner); padding: 24px 26px 26px; }

/* Where your notes live */
.where { border: 1px solid var(--border); border-radius: var(--card-corner); overflow: hidden; }
.where > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 28px; padding: 18px 24px; border-top: 1px solid var(--border); }
.where > div:first-child { border-top: 0; }
.where dt { font-size: 15px; font-weight: 600; color: var(--text); }
.where dd { font-size: 15px; line-height: 1.5; color: var(--text2); }
.good-to-know { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.know { background: var(--panel); border: 1px solid var(--border); border-radius: var(--card-corner); padding: 20px 22px 22px; }
.know h3 { font-size: 17px; font-weight: 600; }
.know p { margin-top: 7px; font-size: 14.5px; line-height: 1.5; color: var(--text2); }
.know strong { color: var(--text); font-weight: 600; }

/* Questions */
.faq { background: var(--white); border: 1px solid var(--border); border-radius: var(--card-corner); overflow: hidden; }
details { border-top: 1px solid var(--border); }
details:first-child { border-top: 0; }
summary { cursor: pointer; padding: 15px 44px 15px 20px; font-size: 16px; font-weight: 600; color: var(--text); list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(45deg); }
details[open] summary::after { margin-top: -2px; transform: rotate(-135deg); }
summary:hover { background: var(--panel); }
details p { padding: 0 20px 16px; font-size: 15.5px; color: var(--text2); }

/* Footer */
.foot { border-top: 1px solid var(--border); padding: 26px 0 34px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot p { font-size: 13px; color: var(--muted); }

/* The page that isn't there */
.gone { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px; }
.gone h1 { font-size: 30px; }
.gone p { color: var(--text2); }
.gone .button { margin-top: 8px; }

@media (max-width: 980px) {
  .hero { padding: 44px 0 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .typed-card { right: 12px; }
  .more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .good-to-know { grid-template-columns: minmax(0, 1fr); }
  .feature { gap: 32px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap, .wrap.narrow { width: calc(100% - 40px); }
  .section { padding: 60px 0; }
  .section-head { margin-bottom: 30px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 32px 0; }
  .feature.flip .feature-copy { order: 0; }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .where > div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 15px 18px; }
  .lede { font-size: 18px; }
}

@media (max-width: 560px) {
  .top-row { height: 54px; }
  nav a[href="#canvas"], nav a[href="#features"] { display: none; }
  .more { grid-template-columns: minmax(0, 1fr); }
  .sheet-title { display: none; }
  .segment { margin-left: auto; }
  .hero-art { padding-bottom: 96px; }
  .typed-card { right: 8px; width: 82%; }
}
