/* SelfSyncMe — selfsyncme.app
 *
 * System fonts only, no webfonts, no scripts, no third-party requests. A site
 * for an app whose whole claim is that nothing leaves your machine should not
 * be loading a typeface from somebody else's server, and the app's own type is
 * the platform's anyway - so this looks like the product rather than like a
 * page about it. */

:root {
  --paper:      #fbfaf8;
  --panel:      #ffffff;
  --ink:        #17171a;
  --ink-soft:   #6c6c73;
  --ink-faint:  #9a9aa1;
  --rule:       #e7e4de;
  --amber:      #c2620a;
  --amber-soft: #fdf3e6;
  --tag:        #4c5fd7;
  --tag-soft:   #eef0fd;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Mono", monospace;

  /* One line height shared by both halves of the hero. The file and the note
     line up row for row only because they are drawn on the same grid. */
  --row: 2.05rem;
  --edge: clamp(1.25rem, 5vw, 4rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #121214;
    --panel:      #1a1a1d;
    --ink:        #ececee;
    --ink-soft:   #9b9ba2;
    --ink-faint:  #6a6a71;
    --rule:       #2b2b30;
    --amber:      #f0a44a;
    --amber-soft: #2a1f11;
    --tag:        #8f9cf0;
    --tag-soft:   #1e2036;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 61rem; margin: 0 auto; padding-inline: var(--edge); }
.narrow { max-width: 44rem; }

/* ---- masthead ---------------------------------------------------------- */

.masthead { border-bottom: 1px solid var(--rule); }
.masthead .wrap {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding-block: 1.15rem; flex-wrap: wrap;
}
.mark {
  font-family: var(--mono);
  font-size: 0.95rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.mark::before { content: "▍"; color: var(--amber); margin-right: 0.4rem; }
.masthead nav { display: flex; gap: 1.35rem; flex-wrap: wrap; }
.masthead nav a {
  font-size: 0.9rem; color: var(--ink-soft); text-decoration: none;
}
.masthead nav a:hover { color: var(--ink); }

/* ---- hero -------------------------------------------------------------- */

.hero { padding-block: clamp(3rem, 9vw, 6rem) clamp(2rem, 5vw, 3.5rem); }

.eyebrow {
  font-family: var(--mono); font-size: 0.8rem; color: var(--ink-faint);
  letter-spacing: 0.01em; margin: 0 0 1.1rem;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 640;
  margin: 0 0 1.1rem;
  max-width: 16ch;
}
h1 .dim { color: var(--ink-faint); display: block; }

.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft); max-width: 46ch; margin: 0 0 2rem;
}

.actions { display: flex; gap: 0.85rem; flex-wrap: wrap; align-items: center; }
.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.15rem; border-radius: 8px;
  font-size: 0.95rem; font-weight: 550; text-decoration: none;
  border: 1px solid transparent;
}
.button.primary { background: var(--amber); color: #fff; }
.button.primary:hover { filter: brightness(1.07); }
.button.quiet { border-color: var(--rule); color: var(--ink); }
.button.quiet:hover { border-color: var(--ink-faint); }
.note-inline { font-size: 0.85rem; color: var(--ink-faint); }

/* ---- the diptych: the file, and the note ------------------------------- */

.diptych {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule); border-radius: 12px;
  overflow: hidden;
  margin-block: clamp(1rem, 4vw, 2rem) 0;
}
.pane { background: var(--panel); padding: 1.4rem clamp(1rem, 2.5vw, 1.75rem) 1.75rem; min-width: 0; }
.pane-label {
  font-family: var(--mono); font-size: 0.75rem; color: var(--ink-faint);
  display: flex; justify-content: space-between; gap: 1rem;
  padding-bottom: 1rem; margin-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule);
}
.pane-label b { font-weight: 500; color: var(--ink-soft); }

/* Every row in both panes is exactly --row tall, which is what makes the two
   halves readable across. */
.row { height: var(--row); display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
/* <i> is used here as an inline box, not for emphasis. Only the quote is
   actually italic. */
.row i { font-style: normal; }
.row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.file .row { font-family: var(--mono); font-size: 0.83rem; color: var(--ink-soft); }
.file .sy { color: var(--amber); }
.file .cm { color: var(--ink-faint); }

.note .row { font-size: 0.95rem; }
.note .h1 { font-weight: 660; font-size: 1.15rem; letter-spacing: -0.02em; }
.note .h2 { font-weight: 620; color: var(--ink); border-bottom: 1px solid var(--rule); }
.note .box {
  width: 15px; height: 15px; border: 1.6px solid var(--ink-faint);
  border-radius: 50%; flex: none;
}
.note .box.done { border-color: var(--amber); background: var(--amber); box-shadow: inset 0 0 0 3px var(--panel); }
.note .box.sq { border-radius: 4px; }
.note .done-text { color: var(--ink-faint); text-decoration: none; }
.note .time {
  font-family: var(--mono); font-size: 0.76rem; color: var(--amber);
  background: var(--amber-soft); padding: 0.12rem 0.4rem; border-radius: 5px; flex: none;
}
.note .tag {
  font-size: 0.78rem; color: var(--tag); background: var(--tag-soft);
  padding: 0.1rem 0.42rem; border-radius: 5px; flex: none;
}
.note .bullet { color: var(--amber); flex: none; }
.note .quote {
  border-left: 2.5px solid var(--amber); padding-left: 0.7rem;
  font-style: italic; color: var(--ink-soft);
}
.note .bang { color: #cf3c2e; font-weight: 700; flex: none; }

@media (max-width: 720px) {
  .diptych { grid-template-columns: 1fr; }
  :root { --row: 1.95rem; }
}

/* ---- sections ---------------------------------------------------------- */

section { padding-block: clamp(3rem, 8vw, 5rem); }
section + section { border-top: 1px solid var(--rule); }

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem); letter-spacing: -0.025em;
  font-weight: 620; margin: 0 0 0.6rem; line-height: 1.15;
}
.section-note { color: var(--ink-soft); max-width: 52ch; margin: 0 0 2.2rem; }

.rows { border-top: 1px solid var(--rule); }
.rows > div {
  display: grid; grid-template-columns: 13rem 1fr; gap: 1.5rem;
  padding-block: 1.15rem; border-bottom: 1px solid var(--rule);
}
.rows h3 {
  margin: 0; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em;
}
.rows p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.rows .where {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint);
  display: block; margin-top: 0.3rem; font-weight: 400; letter-spacing: 0;
}
@media (max-width: 640px) {
  .rows > div { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* ---- the negative space: what it does not do --------------------------- */

/* Exactly three across, because there are six of them: auto-fit gave four and
   left a stranded empty cell showing the grid's own background. */
.nots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.nots div { background: var(--panel); padding: 1.35rem 1.4rem; }
.nots strong {
  display: block; font-family: var(--mono); font-size: 0.82rem;
  font-weight: 500; color: var(--ink-faint); text-decoration: line-through;
  text-decoration-color: var(--amber); text-decoration-thickness: 1.5px;
  margin-bottom: 0.45rem;
}
.nots p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
@media (max-width: 860px) { .nots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .nots { grid-template-columns: 1fr; } }

/* ---- get it ------------------------------------------------------------ */

.get { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }
.get > div { border: 1px solid var(--rule); border-radius: 12px; padding: 1.5rem; background: var(--panel); }
.get h3 { margin: 0 0 0.3rem; font-size: 1.05rem; letter-spacing: -0.015em; }
.get p { margin: 0 0 1.1rem; color: var(--ink-soft); font-size: 0.92rem; }

/* ---- prose pages ------------------------------------------------------- */

.prose { padding-block: clamp(2.5rem, 6vw, 4rem); }
.prose h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); max-width: none; margin-bottom: 0.4rem; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin: 1.7rem 0 0.3rem; font-size: 1.02rem; }
.prose .updated { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-faint); margin: 0 0 2.2rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { color: var(--ink-faint); font-weight: 550; font-size: 0.85rem; }
.prose code {
  font-family: var(--mono); font-size: 0.87em;
  background: var(--amber-soft); color: var(--amber);
  padding: 0.12em 0.36em; border-radius: 4px;
}
.callout {
  border-left: 2.5px solid var(--amber); background: var(--panel);
  padding: 1rem 1.2rem; margin: 1.5rem 0; border-radius: 0 8px 8px 0;
}
.callout strong { color: var(--ink); }

/* ---- colophon ---------------------------------------------------------- */

footer.site { border-top: 1px solid var(--rule); }
footer.site .wrap { padding-block: 2rem 2.5rem; }
.foot-links { display: flex; gap: 1.35rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.foot-links a { font-size: 0.9rem; color: var(--ink-soft); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.colophon { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-faint); margin: 0; line-height: 1.7; }

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.55s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
  .reveal.d1 { animation-delay: 0.06s; }
  .reveal.d2 { animation-delay: 0.13s; }
  .reveal.d3 { animation-delay: 0.2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
