/* Ownotes website. Colours and the pen line come from tokens.css, a copy of
   design/brand/tokens.css. Fonts are served from this site (no Google Fonts),
   so visiting the site sends nothing to a third party. */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/BricolageGrotesque-ExtraBold.ttf") format("truetype"); font-weight: 500 900; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Regular.ttf") format("truetype"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { background: var(--ow-page); color: var(--ow-ink); font-family: var(--ow-sans); line-height: 1.55; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ow-pen); outline-offset: 2px; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and footer */
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; }
.site-nav img { height: 34px; display: block; }
.site-nav .actions { display: flex; align-items: center; gap: 20px; }
.nav-link { font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.nav-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 40px 0; margin-top: 80px; border-top: 1px solid var(--ow-line); font-size: 14px; color: var(--ow-ink-soft); }
.site-foot img { height: 22px; display: block; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.site-foot nav a { color: var(--ow-ink); text-decoration: none; }
.site-foot nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-foot nav span { color: var(--ow-line); }

/* Buttons */
.btn { display: inline-block; background: var(--ow-pen); color: var(--ow-on-ink); padding: 14px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; font-size: 16px; border: 0; box-shadow: 0 3px 0 var(--ow-pen-deep); white-space: nowrap; }
.btn:hover { background: var(--ow-pen-deep); }
.btn.small { padding: 10px 18px; font-size: 14px; }
.btn:disabled { background: var(--ow-line); color: var(--ow-ink-soft); box-shadow: none; cursor: not-allowed; }
.text-btn { background: none; border: 0; color: var(--ow-ink-soft); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; padding: 0; font-size: 14px; }

/* Type */
h1 { font-family: var(--ow-display); font-weight: 800; font-size: 66px; line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-family: var(--ow-display); font-weight: 800; font-size: 44px; line-height: 1.05; letter-spacing: -0.03em; }
.sub { color: var(--ow-ink-soft); font-size: 17px; margin-top: 12px; max-width: 560px; }
section { margin-top: 112px; }

/* Hero */
.hero { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; padding: 36px 0 0; }
.lede { font-size: 19px; color: var(--ow-ink-soft); margin: 22px 0 30px; max-width: 470px; }
.places { display: block; margin-top: 14px; font-size: 14px; color: var(--ow-ink-soft); min-height: 1.55em; }
.places b { color: var(--ow-ink); }

/* Demo: a small version of the app */
.app { background: var(--ow-card); border: 1.5px solid var(--ow-ink); border-radius: 20px; box-shadow: 8px 8px 0 var(--ow-ink); overflow: hidden; }
.app-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--ow-line); background: var(--ow-surface); font-size: 13px; }
.app-bar .dots { display: flex; gap: 6px; }
.app-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--ow-line); }
.app-bar b { font-weight: 700; }
.app-bar .words { color: var(--ow-ink-soft); }
.app-bar .words b { color: var(--ow-ink); }

.board { position: relative; height: 196px; background: var(--ow-page); border-bottom: 1px solid var(--ow-line); }
.board.linked { height: 280px; }
.board .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ow-ink-soft); font-size: 14px; }
.board svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.board svg path { fill: none; stroke: var(--ow-pen); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 0.9s ease; }
.board.drawn svg path { stroke-dashoffset: 0; }
.card { position: absolute; width: 42%; background: var(--ow-card); border: 1.5px solid var(--ow-ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; opacity: 0; transform: translateY(8px); transition: opacity 0.35s, transform 0.35s; }
.card.show { opacity: 1; transform: none; }
.card b { display: block; font-family: var(--ow-display); font-size: 15px; line-height: 1.2; }
.card span { color: var(--ow-ink-soft); display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#c1 { left: 5%; top: 16px; }
#c2 { right: 5%; top: 16px; }
#c3 { left: 29%; bottom: 14px; border-width: 2px; background: var(--ow-highlight-soft); }

.step { padding: 20px 22px 22px; }
.step-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.step-top .of { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ow-pen); }
.step h3 { font-family: var(--ow-display); font-size: 22px; letter-spacing: -0.01em; margin: 4px 0 12px; }
.field { font-size: 15px; color: var(--ow-ink); background: var(--ow-page); border: 1px solid var(--ow-line); border-radius: 10px; padding: 11px 13px; width: 100%; }
.field.title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.field:focus, .editor:focus { outline: 3px solid var(--ow-highlight); border-color: var(--ow-ink); }
.step-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

.linkbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.linkbar button { background: var(--ow-card); border: 1.5px dashed var(--ow-pen); color: var(--ow-ink); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 700; }
.linkbar button:disabled { border-style: solid; border-color: var(--ow-mint); color: var(--ow-mint); cursor: default; }
.editor { min-height: 92px; font-size: 15px; background: var(--ow-page); border: 1px solid var(--ow-line); border-radius: 10px; padding: 11px 13px; line-height: 1.6; }
.editor:empty::before { content: attr(data-placeholder); color: var(--ow-ink-soft); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 13px; color: var(--ow-ink-soft); }
.checks span::before { content: "○ "; }
.checks span.ok { color: var(--ow-mint); font-weight: 700; }
.checks span.ok::before { content: "✓ "; }

.done { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; padding: 20px 22px 22px; }
.share { background: var(--ow-ink); color: var(--ow-on-ink); border-radius: 14px; padding: 18px 20px; }
.share img { height: 20px; display: block; }
.share .big { font-family: var(--ow-display); font-weight: 800; font-size: 54px; line-height: 1; letter-spacing: -0.04em; color: var(--ow-highlight); margin-top: 14px; }
.share p { color: var(--ow-on-ink-soft); font-size: 14px; margin-top: 4px; }
.share p b { color: var(--ow-on-ink); }
.share .bar { height: 8px; background: #333B4C; border-radius: 99px; margin-top: 12px; overflow: hidden; }
.share .bar span { display: block; height: 100%; width: 0; background: var(--ow-highlight); transition: width 0.8s ease; }
.done-copy { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 12px; }
.done-copy h3 { font-family: var(--ow-display); font-size: 22px; }
.done-copy p { color: var(--ow-ink-soft); font-size: 14.5px; }

/* Explainers */
.explain { margin-top: 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.explain div { border-top: 3px solid var(--ow-ink); padding-top: 16px; }
.explain h3 { font-family: var(--ow-display); font-size: 22px; letter-spacing: -0.01em; }
.explain p { color: var(--ow-ink-soft); margin-top: 6px; }

/* Words written */
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.profile { background: var(--ow-card); border: 1.5px solid var(--ow-ink); border-radius: 22px; padding: 26px; }
.ph { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ow-ink-soft); }
.total { font-family: var(--ow-display); font-weight: 800; font-size: 72px; letter-spacing: -0.04em; line-height: 1; margin-top: 8px; }
.total small { font-size: 20px; letter-spacing: 0; font-weight: 700; color: var(--ow-ink-soft); }
.next { margin-top: 18px; font-size: 15px; }
.meter { height: 14px; background: var(--ow-surface); border: 1.5px solid var(--ow-ink); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; width: 92%; background: var(--ow-highlight); border-right: 1.5px solid var(--ow-ink); }
.books { margin-top: 24px; display: flex; align-items: flex-end; gap: 6px; height: 150px; border-bottom: 5px solid var(--ow-ink); padding: 0 6px; overflow: hidden; }
.spine { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--ow-display); font-weight: 700; font-size: 12px; padding: 10px 0; border: 1.5px solid var(--ow-ink); border-radius: 4px 4px 0 0; white-space: nowrap; flex: none; }
.s1 { width: 24px; height: 108px; background: var(--ow-surface); }
.s2 { width: 26px; height: 124px; background: var(--ow-mint); color: var(--ow-on-ink); }
.s3 { width: 28px; height: 128px; background: var(--ow-highlight); }
.s4 { width: 30px; height: 118px; background: var(--ow-card); }
.s5 { width: 34px; height: 132px; background: var(--ow-pen); color: var(--ow-on-ink); }
.spine.up { width: 40px; height: 140px; border-style: dashed; border-color: var(--ow-ink-soft); color: var(--ow-ink-soft); background: transparent; }
.books-cap { display: flex; justify-content: space-between; font-size: 13px; color: var(--ow-ink-soft); margin-top: 8px; }

/* Old notes coming back */
.week { background: var(--ow-surface); border: 1.5px solid var(--ow-ink); border-radius: 22px; padding: 24px; }
.week-h { display: flex; justify-content: space-between; gap: 12px; font-family: var(--ow-display); font-weight: 700; }
.week-h span { color: var(--ow-mint); }
.back { background: var(--ow-card); border: 1px solid var(--ow-line); border-radius: 12px; padding: 14px 16px; margin-top: 12px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.back b { display: block; font-size: 15px; }
.back small { color: var(--ow-ink-soft); font-size: 13px; }
.tag { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 4px 10px; border: 1.5px solid var(--ow-ink); white-space: nowrap; }
.tag.linked { background: var(--ow-mint); color: var(--ow-on-ink); border-color: var(--ow-mint); }
.tag.open { background: var(--ow-highlight); }

/* Comparison */
.compare-wrap { overflow-x: auto; margin-top: 30px; }
table { width: 100%; min-width: 520px; border-collapse: separate; border-spacing: 0; border: 1.5px solid var(--ow-ink); border-radius: 18px; overflow: hidden; background: var(--ow-card); }
th, td { padding: 16px 22px; text-align: left; border-bottom: 1px solid var(--ow-line); font-size: 16px; }
tr:last-child td { border-bottom: 0; }
th { font-family: var(--ow-display); font-size: 18px; background: var(--ow-surface); border-bottom: 1.5px solid var(--ow-ink); }
th.us, td.us { background: var(--ow-highlight-soft); width: 22%; text-align: center; }
th.them, td.them { width: 22%; text-align: center; color: var(--ow-ink-soft); }
.yes { font-weight: 800; color: var(--ow-mint); }

/* Founding places and the request form */
.founding { margin-top: 112px; background: var(--ow-ink); color: var(--ow-on-ink); border-radius: 28px; padding: 56px 60px; display: grid; grid-template-columns: auto 1fr; gap: 44px; align-items: center; scroll-margin-top: 24px; }
.badge { width: 150px; height: 150px; border-radius: 50%; background: var(--ow-highlight); color: var(--ow-ink); border: 3px dashed var(--ow-ink); outline: 6px solid var(--ow-highlight); display: grid; place-items: center; text-align: center; font-family: var(--ow-display); font-weight: 800; line-height: 1.05; }
.badge b { display: block; font-size: 36px; letter-spacing: -0.03em; }
.badge span { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.founding p { color: var(--ow-on-ink-soft); margin-top: 10px; max-width: 560px; }
.founding p a { color: var(--ow-on-ink); }
.invite-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; max-width: 560px; }
.invite-form label.field-label { flex: 1 0 100%; font-size: 14px; font-weight: 700; color: var(--ow-on-ink); }
/* A rectangle with a visible border, so it reads as a field next to the pill button. */
.invite-form input[type="email"] { flex: 1 1 260px; font-size: 16px; color: var(--ow-ink); background: var(--ow-card); border: 2px solid var(--ow-on-ink-soft); border-radius: 12px; padding: 12px 16px; box-shadow: inset 0 2px 0 rgba(29, 35, 48, 0.08); }
.invite-form input[type="email"]::placeholder { color: var(--ow-ink-soft); }
.invite-form input[type="email"]:focus { border-color: var(--ow-highlight); outline: 3px solid var(--ow-highlight); outline-offset: 2px; }
.invite-form .btn { box-shadow: none; }
.founding .fine { font-size: 13px; margin-top: 12px; }
.founding .places { color: var(--ow-on-ink-soft); }
.founding .places b { color: var(--ow-highlight); }
.form-status { margin-top: 14px; font-weight: 700; min-height: 1.55em; }
.form-status.ok { color: var(--ow-highlight); }
.form-status.error { color: var(--ow-pen-on-ink); }

/* Privacy policy and terms */
.legal { max-width: 720px; margin: 24px auto 0; }
.legal h1 { font-size: 48px; }
.legal .updated { color: var(--ow-ink-soft); margin-top: 10px; }
.legal .summary { background: var(--ow-card); border: 1.5px solid var(--ow-ink); border-radius: 18px; padding: 20px 24px; margin-top: 28px; box-shadow: 5px 5px 0 var(--ow-ink); }
.legal .summary h2 { font-size: 22px; letter-spacing: -0.01em; margin: 0; }
.legal h2 { font-size: 26px; letter-spacing: -0.02em; margin-top: 44px; }
.legal h3 { font-size: 17px; margin-top: 22px; }
.legal p, .legal li { margin-top: 10px; }
.legal ul { padding-left: 22px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--ow-pen); }
.todo { background: var(--ow-highlight-soft); border-bottom: 2px dashed var(--ow-pen); padding: 0 3px; }

/* Tablet and phone. The app itself is for laptops and desktops; the website
   has to read well on the phone a student opens a shared card on. */
@media (max-width: 960px) {
  .hero, .split { grid-template-columns: 1fr; gap: 40px; }
  .split .week { order: 2; }
  .founding { grid-template-columns: 1fr; padding: 40px 32px; }
  h1 { font-size: 52px; }
  h2 { font-size: 36px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .site-nav .actions { gap: 12px; }
  .site-nav .btn.small { padding: 8px 12px; font-size: 13px; }
  .site-nav img { height: 24px; width: auto; }
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
  .legal h1 { font-size: 36px; }
  .lede { font-size: 17px; }
  section { margin-top: 80px; }
  .explain { grid-template-columns: 1fr; margin-top: 64px; }
  .done { grid-template-columns: 1fr; }
  .total { font-size: 56px; }
  .founding { margin-top: 80px; padding: 32px 22px; border-radius: 22px; gap: 28px; }
  .badge { width: 120px; height: 120px; }
  .badge b { font-size: 28px; }
  .app { box-shadow: 5px 5px 0 var(--ow-ink); }
  .card { width: 44%; font-size: 12px; }
  .ow-pen { white-space: normal; }
  table { min-width: 0; }
  th, td { padding: 12px 10px; font-size: 14px; }
  th { font-size: 15px; }
  th.us, td.us, th.them, td.them { width: auto; }
}
