/*
 * The front door: the landing page (/welcome, shown at / to signed-out visitors), the sign-in page,
 * and the Privacy and About pages.
 * Approved design 2026-10-16 ("Neetz note list" design canvas, boards Landing and SignIn).
 * Colors are the app's dark theme (clients/web/src/styles/theme.css); keep the two in step.
 * Fonts are self-hosted (scripts/vendor-frontend-libs.sh); Georgia and system-ui stand in until loaded.
 */

@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/lib/ibm-plex/5.3.0/ibm-plex-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("/lib/ibm-plex/5.3.0/ibm-plex-serif-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/lib/ibm-plex/5.3.0/ibm-plex-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/lib/ibm-plex/5.3.0/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/lib/ibm-plex/5.3.0/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/lib/ibm-plex/5.3.0/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --surface: #121316;
  --surface-raised: #1b1d21;
  --text: #ececee;
  --muted: #9a9ca3;
  --line: #2a2d33;
  --accent: #e8a33d;
  --accent-strong: #f0b357;
  /* Margin notes in the study drawing: decoration only, never body text. */
  --margin-note: #9a7a45;
  --serif: "IBM Plex Serif", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Links and buttons get a 44px touch target. */
.fd-link { min-height: 44px; display: inline-flex; align-items: center; }

/* ---- The notebook study (shared drawing) ---- */

.study { display: block; width: 100%; height: auto; overflow: visible; }
.study-lines { fill: none; stroke: var(--line); stroke-width: 1; }
.study-ink { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linecap: round; }
.study-dots { fill: var(--accent); }
.study-marks { fill: var(--muted); font-family: var(--serif); font-style: italic; font-size: 15px; }
.study-margin { fill: var(--margin-note); font-family: var(--serif); font-style: italic; font-size: 14px; }

/* One drawn-in moment on load; still for anyone who prefers reduced motion. */
@keyframes fd-ink { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fd-appear { from { opacity: 0; } to { opacity: 1; } }
.study-ink { stroke-dasharray: 1; stroke-dashoffset: 1; animation: fd-ink 2.6s cubic-bezier(.4, 0, .2, 1) .3s forwards; }
.study-lines { opacity: 0; animation: fd-appear 1.2s ease .1s forwards; }
.study-notes { opacity: 0; animation: fd-appear 1.4s ease 2.2s forwards; }
@media (prefers-reduced-motion: reduce) {
  .study-ink { animation: none; stroke-dashoffset: 0; }
  .study-lines, .study-notes { animation: none; opacity: 1; }
}

/* ---- Google button: Google's dark theme, as its branding rules require ---- */

.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 54px;
  padding: 0 24px;
  border: 1px solid #8e918f;
  border-radius: 14px;
  background: #131314;
  color: #e3e3e3;
  font-family: Roboto, var(--sans);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.google-button:hover { background: #1f1f21; }
.google-button svg { width: 20px; height: 20px; flex: none; }
.google-form { margin: 0; }

/* ---- Landing page ---- */

.fd-wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }

.fd-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; }
.fd-wordmark { font-family: var(--serif); font-weight: 500; font-size: 24px; color: var(--text); text-decoration: none; }
.fd-wordmark:hover { color: var(--text); }
.fd-header .fd-link { font-weight: 500; }

.fd-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 64px 0 112px; }
.fd-hero-text { flex: 1 1 460px; min-width: 0; }
.fd-hero-art { flex: 1 1 420px; min-width: 0; max-width: 580px; margin: 0 auto; }

.fd-headline {
  margin: 0;
  max-width: 10em;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.fd-lede { margin: 28px 0 40px; max-width: 31em; font-size: 19px; line-height: 1.6; color: var(--muted); }
.fd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 17px; }

.fd-section { border-top: 1px solid var(--line); padding: 96px 0; }


.fd-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 56px; margin: 0; padding: 0; list-style: none; }
.fd-point { display: flex; flex-direction: column; gap: 14px; }
.fd-point-mark { width: 44px; height: 44px; color: var(--accent); }
.fd-point-lambda { display: flex; align-items: center; height: 44px; font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--accent); }
.fd-point h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.25; }
.fd-point p { margin: 0; max-width: 26em; font-size: 17px; line-height: 1.65; color: var(--muted); }

.fd-phone-section { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.fd-phone-copy { flex: 1 1 360px; min-width: 0; }
.fd-subhead { margin: 0; max-width: 12em; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 48px); line-height: 1.1; }
.fd-phone-copy p { margin: 24px 0 0; max-width: 30em; font-size: 18px; line-height: 1.65; color: var(--muted); }

/* A drawing of the note list, in the app's own look. Illustration only. */
.fd-phone {
  flex: none;
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 36px;
  padding: 18px 0 28px;
  background: var(--surface);
}
.fd-phone-bar { display: flex; gap: 8px; padding: 0 16px 14px; }
.fd-phone-plus { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); }
.fd-phone-filter { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-raised); }
.fd-phone-search { flex: 1; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-raised); }
.fd-phone-group { border-top: 1px solid var(--line); padding: 12px 16px 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); }
.fd-phone-row { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 16px 16px 30px; font-size: 15px; }
.fd-phone-row span:last-child { color: var(--muted); font-size: 13px; }

.fd-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  border-top: 1px solid var(--line); padding: 28px 0 48px; font-size: 15px; color: var(--muted);
}
.fd-footer-name { font-family: var(--serif); font-size: 18px; color: var(--text); }
.fd-footer nav { display: flex; gap: 24px; }

/* ---- Text pages: Privacy, About ---- */

.fd-doc { max-width: 38em; padding: 56px 0 96px; font-size: 17px; line-height: 1.65; }
.fd-doc h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 56px); line-height: 1.08; letter-spacing: -0.01em; }
.fd-doc h2 { margin: 40px 0 8px; font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.3; }
.fd-doc p, .fd-doc ul { margin: 0 0 12px; color: var(--muted); }
.fd-doc ul { padding-left: 1.2em; }
.fd-doc li { margin-bottom: 8px; }
.fd-doc strong { color: var(--text); font-weight: 600; }
.fd-doc-date { margin-top: 12px !important; font-size: 15px; }
.fd-doc-lede { margin-top: 24px !important; font-size: 19px; color: var(--text) !important; }
.fd-doc-note { margin-top: 48px !important; }

/* ---- Sign-in page ---- */

.signin {
  min-height: 100dvh;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: max(56px, env(safe-area-inset-top)) 28px max(36px, env(safe-area-inset-bottom));
}
.signin .study { max-width: 334px; margin: 0 auto; }
.signin-intro { display: flex; flex-direction: column; gap: 14px; margin-top: 44px; }
.signin-name { font-family: var(--serif); font-weight: 500; font-size: 22px; }
.signin h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.12; letter-spacing: -0.01em; }
.signin-intro p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.signin-spacer { flex: 1; min-height: 40px; }
.signin-actions { display: flex; flex-direction: column; gap: 14px; }
.signin-actions .google-button { width: 100%; }
.signin-actions p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }
.signin-error { margin: 0; padding: 12px 14px; border: 1px solid #f08a8a; border-radius: 12px; color: #f08a8a; font-size: 15px; }
.signin-links { display: flex; justify-content: center; gap: 24px; margin-top: 28px; font-size: 14px; }
