/* spoolnotes.com lander. One screen: words and the invite form on the left; on the right, a thought and the moment it comes back, joined by a small loop (the train line's loop in the app). */
:root {
  --bg: #f7f7fa;
  --fg: #16161d;
  --fg-2: #5d5d6b;
  --hair: #dfdfe7;
  --card: #ffffff;
  --ink: #4b5bd6;
  --ink-on: #ffffff;
  --shadow: 0 18px 50px rgba(30,32,70,.13), 0 1px 3px rgba(30,32,70,.08);
  --e1: #D83A2E; --e2: #F07A2A; --e3: #F7C042;
  --t1: #4956e2; --t2: #d33896; --t3: #f86510; --t4: #fbb11f;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --e1: #E8503F; --e2: #F58A3A; --e3: #F9CB5A; --bg: #0d0d12; --fg: #f1f1f6; --fg-2: #a0a0ad; --hair: #2a2a33; --card: #1b1b22;
  --ink: #8f9bff; --ink-on: #12121a; --shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 .5px rgba(255,255,255,.08);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --e1: #E8503F; --e2: #F58A3A; --e3: #F9CB5A; --bg: #0d0d12; --fg: #f1f1f6; --fg-2: #a0a0ad; --hair: #2a2a33; --card: #1b1b22;
  --ink: #8f9bff; --ink-on: #12121a; --shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 .5px rgba(255,255,255,.08);
  color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.page { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; max-width: 1200px; margin: 0 auto;
  padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); }

header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 26px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 19px; letter-spacing: -.01em; }
.mark img { width: 30px; height: 30px; }

main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; padding-block: 12px; }
.words { max-width: 520px; display: grid; gap: 26px; }
h1 { font-family: var(--display); font-size: clamp(42px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.035em; font-weight: 700; margin: 0; text-wrap: balance; }
.lede { font-size: 20px; line-height: 1.45; color: var(--fg-2); margin: 0; max-width: 34ch; text-wrap: pretty; }
.lede b { color: var(--fg); font-weight: 600; }

form { display: flex; gap: 8px; max-width: 460px; padding: 6px; background: var(--card); border-radius: 999px; box-shadow: var(--shadow); }
form input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 17px; padding: 10px 6px 10px 18px; outline: none; }
form input::placeholder { color: var(--fg-2); }
form button { border: 0; border-radius: 999px; background: var(--ink); color: var(--ink-on); font: inherit; font-size: 16px; font-weight: 600; padding: 11px 20px; cursor: pointer; white-space: nowrap; }
form button:hover { filter: brightness(1.08); }
.after { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 16px; color: var(--fg-2); margin: -8px 0 0 4px; }
.after a { color: var(--ink); text-decoration: none; font-weight: 500; }
.after a:hover { text-decoration: underline; }
.done { font-size: 17px; padding: 14px 4px; }
.done b { color: var(--ink); }


h1 { font-size: clamp(36px, 4.3vw, 54px); }
/* The two notes and the loop between them */
.words { grid-template-columns: minmax(0, 1fr); }
form input { width: 0; }

.demo { display: grid; gap: 14px; width: 100%; max-width: 440px; justify-self: center; }
.scene { display: flex; flex-direction: column; }
.note { position: relative; z-index: 1; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 14px 18px 16px; display: grid; gap: 9px; }
.note p { margin: 0; font-size: 17px; line-height: 1.4; color: var(--fg); }
.when { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 15px; color: var(--fg-2); }
.when .tg { width: 15px; height: 15px; flex: none; color: var(--l1); }
.back .when .date { color: var(--fg); font-weight: 600; }
/* Same as the drawer's moment chips: glyph + label in a soft capsule */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 7%, transparent); color: var(--fg); font-size: 14px; line-height: 1.3; white-space: nowrap; }
.chip svg { width: 13px; height: 13px; color: var(--fg-2); flex: none; }
.gap { height: 92px; margin-block: -4px; position: relative; }
.gap .loop { position: absolute; left: 30px; top: 0; width: 56px; height: 92px; overflow: visible; }

/* Topic tabs: the underline fills while that example shows */
.tabs { display: flex; flex-wrap: wrap; gap: 0 6px; justify-content: flex-start; padding-left: 4px; }
.tab { appearance: none; border: 0; background: none; font: inherit; font-size: 15px; color: var(--fg-2); padding: 6px 10px 9px; cursor: pointer; position: relative; border-radius: 8px; }
.tab:hover { color: var(--fg); }
.tabs .more { font-size: 15px; color: var(--fg-2); padding: 6px 10px 9px; cursor: default; }
.tab[aria-selected="true"] { color: var(--fg); font-weight: 600; }
.tab::before, .tab i { content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 2px; }
.tab::before { background: var(--hair); }
.tab i { right: auto; width: 0; background: var(--fg); }
.tab[aria-selected="true"] i { width: calc(100% - 20px); animation: fill var(--dwell, 6s) linear both; }
.demo:hover .tab i, .demo:focus-within .tab i { animation-play-state: paused; }
@keyframes fill { from { width: 0; } to { width: calc(100% - 20px); } }
@media (prefers-reduced-motion: reduce) { .tab[aria-selected="true"] i { animation: none; } }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-block: 22px 26px; font-size: 15px; color: var(--fg-2); }
footer a { text-decoration: none; } footer a:hover { color: var(--fg); }

/* Phone: headline, the form and the first note fit in the first screen */
@media (max-width: 860px) {
  .page { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  header { padding-block: 16px; }
  main { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-block: 6px 20px; align-items: start; }
  .words { gap: 18px; }
  .demo { max-width: 520px; justify-self: stretch; }
}
@media (max-width: 480px) {
  h1 { font-size: 34px; }
  .lede { font-size: 17px; }
  form { padding: 4px; }
  form input { font-size: 16px; padding: 6px 4px 6px 14px; }
  form button { padding: 8px 15px; font-size: 15px; }
  .after { font-size: 15px; margin-top: -6px; }
  .note { padding: 12px 15px 14px; }
  .note p { font-size: 16px; }
  .gap { height: 76px; } .gap .loop { height: 76px; width: 46px; left: 24px; }
  .tabs { gap: 0; padding-left: 0; }
  .tab, .tabs .more { font-size: 15px; padding-inline: 6px; } .tab::before, .tab i { left: 6px; right: 6px; } .tab[aria-selected="true"] i { width: calc(100% - 12px); }
  @keyframes fill { from { width: 0; } to { width: calc(100% - 12px); } }
}
.mark img { border-radius: 7px; }
@media (max-width: 360px) { .tab, .tabs .more { font-size: 14px; padding-inline: 5px; } .tab::before, .tab i { left: 5px; right: 5px; } }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; }
.status { margin: -12px 0 0 4px; font-size: 15px; color: var(--fg-2); min-height: 0; }
.status:empty { display: none; }
.status.err { color: #c4372d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status.err { color: #ff8a80; } }
