/* Mossnote site. Tokens follow the app theme (D-010 "Warm paper"); dark mode follows the system. */
:root {
  color-scheme: light dark;
  --paper: #FAF6EE; --card: #FFFFFF; --ink: #1C1B18; --sec: #66625B;
  --sage: #4F7357; --on-sage: #FFFFFF; --soft: #E4EDE2; --clay: #B8714F;
  --hair: rgba(60, 55, 45, .2); --shadow: 0 10px 30px rgba(60, 55, 45, .10);
  --serif: ui-serif, "New York", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
/* Dark follows the system unless the visitor picked a theme with the toggle (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1C1B18; --card: #2A2825; --ink: #F2EEE6; --sec: #A9A59D;
    --sage: #9DC3A3; --on-sage: #1C1B18; --soft: #36403A; --clay: #D9A07F;
    --hair: rgba(255, 255, 255, .14); --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1C1B18; --card: #2A2825; --ink: #F2EEE6; --sec: #A9A59D;
  --sage: #9DC3A3; --on-sage: #1C1B18; --soft: #36403A; --clay: #D9A07F;
  --hair: rgba(255, 255, 255, .14); --shadow: none;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font: 1.0625rem/1.55 system-ui, -apple-system, sans-serif;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; }
h1 { font-size: 2.125rem; line-height: 1.1; }
h2 { font-size: 1.625rem; line-height: 1.2; }
h3 { font-size: 1.1875rem; line-height: 1.3; }
p { margin: 0; }
a { color: var(--sage); text-underline-offset: 3px; transition: color .15s ease; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding-inline: 16px; }
.sec { color: var(--sec); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 2; }

/* Header and tabs */
/* Floating pill that stays in view while scrolling. Opaque paper when blur is unsupported. */
.site-header { position: sticky; top: 8px; z-index: 5; padding-block: 8px 0; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 8px 4px 16px; border: 1px solid var(--hair); border-radius: 999px; background: var(--paper); }
@supports (backdrop-filter: blur(1px)) {
  .nav { background: color-mix(in srgb, var(--paper) 92%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
}
.nav .links { display: flex; align-items: center; gap: 4px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: 4px; border: 1px solid var(--hair); border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; transition: border-color .15s ease; }
.theme-toggle:hover { border-color: var(--sage); }
.theme-toggle:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
/* Phone width: tighter tabs so the logo, both tabs and the toggle fit in one row. */
@media (max-width: 480px) {
  .nav { gap: 0 8px; flex-wrap: nowrap; padding: 2px 4px 2px 12px; }
  .nav .links { gap: 0; margin-left: auto; }
  .nav .links a { padding: 0 4px; font-size: 1rem; }
  .brand { gap: 8px; font-size: 1.0625rem; }
  .brand .logo { width: 28px; height: 28px; }
  .tab-mark { left: 4px; right: 4px; }
  .theme-toggle { margin-left: 2px; }
}
.theme-toggle .sun { display: none; }
.is-dark .theme-toggle .sun { display: block; }
.is-dark .theme-toggle .moon { display: none; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; }
.nav .links a[aria-current="page"] { color: var(--ink); }
.tab-mark { position: absolute; left: 10px; right: 10px; bottom: 8px; height: 2px; border-radius: 2px; background: var(--sage); }
.brand { display: inline-flex; align-items: center; gap: 10px; padding-left: 0 !important; font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--ink) !important; }
.logo { display: block; flex: none; border-radius: 22.5%; background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--shadow); }
.logo .bar { fill: var(--sage); }
.logo .dot { fill: var(--clay); }

/* Landing */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 40px 56px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.eyebrow { font-family: var(--serif); font-style: italic; font-size: 1.125rem; color: var(--sec); }
/* One sentence per line on wide screens, so "and you are done" never breaks away from its clause. */
.lead { max-width: 34rem; color: var(--sec); }
.lead > span { display: block; text-wrap: balance; }
.keep { white-space: nowrap; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--sage); color: var(--on-sage); font-weight: 600; font-size: 1rem; }
.phone { width: min(280px, 78vw); margin: 0 auto; padding: 10px; background: #1C1B18; border-radius: 44px; box-shadow: var(--shadow); border: 1px solid var(--hair); }
.phone img { display: block; width: 100%; height: auto; border-radius: 34px; }
/* Live typing over the baked sentence in the screenshot (type.js adds .on). Colors match the light screenshot, not the page theme. */
.screen { position: relative; container-type: inline-size; border-radius: 34px; overflow: hidden; }
.typed { display: none; position: absolute; left: 8%; top: 20.6%; width: 84%; height: 3.8%; align-items: center; padding-left: 1.1%; background: #FFFFFF; color: #1C1B18; font-family: var(--serif); font-size: 4.6cqw; white-space: nowrap; overflow: hidden; }
.typed.on { display: flex; }
.typed span::after { content: ""; display: inline-block; width: .09em; height: 1.2em; margin-left: 1px; vertical-align: text-bottom; background: #4F7357; }
.band { background: var(--soft); padding-block: 56px; }
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 28px; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 8px; transition: transform .2s var(--ease), border-color .2s ease; }
.num { width: 36px; height: 36px; border-radius: 999px; background: var(--soft); display: flex; align-items: center; justify-content: center; font-weight: 600; }
.shot { display: block; width: 160px; height: auto; align-self: center; border-radius: 20px; border: 1px solid var(--hair); margin-top: auto; }
.steps .card p.sec { margin-bottom: 12px; }
.privacy { padding-block: 56px; }
.panel { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.panel-body { display: flex; flex-direction: column; gap: 14px; max-width: 60ch; align-items: flex-start; }
.features { padding-block: 0 56px; }
.fgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 28px; align-items: start; }
.flist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tile { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--sage); }
.views { display: flex; justify-content: center; gap: clamp(12px, 4vw, 40px); }
.views figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(260px, 44vw); }
.views figcaption { font-size: .875rem; color: var(--sec); }
.cal { width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--hair); display: block; }
.close { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.close p { max-width: 46ch; }

/* Privacy and Support */
.doc { max-width: 60ch; padding-block: 24px 0; }
.doc h1 { margin: 8px 0 4px; }
.doc h2 { font-size: 1.375rem; margin: 36px 0 8px; }
.doc h3 { font-size: 1.125rem; margin: 24px 0 4px; }
.doc p, .doc li { margin: 0 0 10px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 10px; }
.short { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; padding: 20px 24px; margin: 24px 0; }
.short h2 { margin-top: 0; }
.faq { margin: 12px 0 0; border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 12px 0; font-family: var(--serif); font-weight: 600; font-size: 1.125rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--sage); border-bottom: 2px solid var(--sage); transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 6px; }
.faq details > :not(summary) { margin-top: 0; }
.faq details > :last-child { margin-bottom: 16px; }

/* Hand-drawn underline under one phrase of the hero title. Drawn in full unless motion is allowed. */
.ul { position: relative; white-space: nowrap; }
.ul::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.14em; height: .26em; background: var(--sage);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'><path d='M2 8C30 3 60 11 100 6S170 4 198 7' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/></svg>") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'><path d='M2 8C30 3 60 11 100 6S170 4 198 7' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/></svg>") 0 0 / 100% 100% no-repeat; }

.foot { padding-block: 32px 48px; font-size: .875rem; color: var(--sec); display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.foot .name { font-family: var(--serif); font-weight: 600; color: var(--ink); }

@media (min-width: 720px) {
  body { font-size: 1.125rem; }
  h1 { font-size: 3.5rem; } h2 { font-size: 2.25rem; } h3 { font-size: 1.3125rem; }
  .doc h1 { font-size: 3rem; }
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); padding-block: 72px 96px; }
  .band, .privacy { padding-block: 96px; }
  /* The privacy card spans the page width: the heading on the left, the words on the right. */
  .panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); column-gap: 56px; align-items: start; padding: 44px 48px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shot { width: 220px; }
  .flist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { padding-block: 0 96px; }
}
@media (min-width: 1000px) {
  .flist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-contrast: more) { .card, .panel, .short { border-color: var(--ink); } }

/* Motion: calm and short, all of it off under reduced motion. */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: no-preference) {
  .hero-text { animation: rise .6s var(--ease) .1s both; }
  .ul::after { animation: draw .7s var(--ease) .8s both; }
  .faq summary::after { transition: transform .2s var(--ease); }
  .phone { animation: rise .7s var(--ease) both; }
  @media (hover: hover) {
    .card:hover { transform: translateY(-2px); border-color: var(--sage); }
  }

  /* Tab change: same-site page transitions (View Transitions API, CSS only).
     The header stays put, the tab underline slides to the new tab, the page body fades through. */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  .tab-mark { view-transition-name: tab-mark; }
  main { view-transition-name: page; }
  ::view-transition-group(tab-mark) { animation-duration: .35s; animation-timing-function: var(--ease); }
  ::view-transition-old(page) { animation: page-out .18s ease-in both; }
  ::view-transition-new(page) { animation: page-in .32s var(--ease) .06s both; }
}
