/* Hammock — shared site styles.
   Everything the pages need lives here so each page ships one stylesheet and
   no third-party request: fonts and icons are self-hosted next to this file.
   Design tokens come straight from the Claude Design source. */

@import url("fonts.css");
@import url("icons.css");

:root {
  --paper: #f6f1e8; --paper2: #fffdf8; --paper3: #efe7d9;
  --ink: #25221b; --ink2: #6c6555; --ink3: #9c9484;
  --line: rgba(40, 34, 22, .12); --line2: rgba(40, 34, 22, .06);
  --sky: oklch(0.62 0.062 246);
  --sky-strong: oklch(0.52 0.074 250);
  --sky-ink: oklch(0.46 0.075 252);
  --sky-soft: oklch(0.62 0.062 246 / .16);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: -apple-system, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace;
}

html[data-theme="dark"] {
  --paper: #15181e; --paper2: #1e222a; --paper3: #272c35;
  --ink: rgba(255, 255, 255, .93); --ink2: rgba(255, 255, 255, .6); --ink3: rgba(255, 255, 255, .4);
  --line: rgba(255, 255, 255, .1); --line2: rgba(255, 255, 255, .055);
  --sky: oklch(0.75 0.07 246);
  --sky-strong: oklch(0.7 0.09 248);
  --sky-ink: oklch(0.8 0.07 246);
  --sky-soft: oklch(0.75 0.07 246 / .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* The nav is sticky (~66px), so anything jumped to by #id needs to clear it. */
[id] { scroll-margin-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s ease, color .35s ease;
}
a { color: var(--sky-ink); text-decoration: none; }
a:hover { color: var(--sky-strong); }

/* Skip link — offscreen until focused. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  padding: 10px 16px; border-radius: 0 0 10px 0;
  background: var(--sky-strong); color: #fff; font-size: 14px; font-weight: 600;
}
.skip:focus { left: 0; color: #fff; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 30px;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line2);
  font-family: var(--sans);
}
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.nav-brand:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nv-a {
  padding: 8px 12px; border-radius: 9px; color: var(--ink2);
  font-size: 14px; font-weight: 500; transition: background .15s, color .15s;
}
.nv-a:hover { background: var(--paper3); color: var(--ink); }
.nv-tg {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--ink2); cursor: pointer;
  transition: background .15s, color .15s;
}
.nv-tg:hover { background: var(--paper3); color: var(--ink); }
.nv-dl {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 10px;
  background: var(--sky-strong); color: #fff; font-size: 13.5px; font-weight: 580;
  box-shadow: 0 2px 6px -1px var(--sky-soft); transition: filter .15s;
}
.nv-dl:hover { filter: brightness(1.07); color: #fff; }

/* The app mark: a rounded tile with the notch bitten out of the top. */
.mark {
  position: relative; width: 27px; height: 27px; border-radius: 8px;
  background: linear-gradient(150deg, var(--sky), var(--sky-strong));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 7px rgba(0, 0, 0, .12);
  display: inline-block; flex: 0 0 auto;
}
.mark::after {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 11px; height: 4px; background: var(--paper); border-radius: 0 0 4px 4px;
}
.mark-on-paper2::after { background: var(--paper2); }
.wordmark { font-weight: 660; font-size: 17px; letter-spacing: -.02em; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line); background: var(--paper2);
  padding: 56px 30px 34px; font-family: var(--sans);
}
.footer-grid {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px;
}
.footer-head {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink3); font-weight: 600; margin-bottom: 6px;
}
.ft-a { color: var(--ink2); font-size: 14px; line-height: 2.1; transition: color .15s; display: block; }
.ft-a:hover { color: var(--sky-ink); }
.footer-base {
  max-width: 1080px; margin: 34px auto 0; padding-top: 22px;
  border-top: 1px solid var(--line2);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink3);
}

/* ── Shared page furniture ───────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--sky-ink);
}
.h-serif {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(32px, 4.4vw, 46px); line-height: 1.06;
  letter-spacing: -.02em; margin: 16px 0 0; color: var(--ink); text-wrap: balance;
}
.lede {
  font-size: 17px; line-height: 1.55; color: var(--ink2);
  margin: 16px auto 0; text-wrap: pretty;
}
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -18px rgba(30, 25, 15, .3);
  border-color: var(--line);
}
.cta:hover { filter: brightness(1.07); }
.cta-primary {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 15px 26px; border-radius: 13px;
  background: var(--sky-strong); color: #fff; font-size: 16px; font-weight: 600;
  box-shadow: 0 12px 28px -12px var(--sky-soft), 0 2px 5px rgba(0, 0, 0, .14);
}
.cta-primary:hover { color: #fff; }
.pill {
  padding: 6px 12px; border-radius: 999px; background: var(--paper2);
  border: 1px solid var(--line); font-size: 12.5px; color: var(--ink2);
}
.prose { font-size: 15.5px; line-height: 1.7; color: var(--ink2); }
.prose h2 {
  font-family: var(--serif); font-weight: 500; font-size: 27px; letter-spacing: -.015em;
  color: var(--ink); margin: 40px 0 12px;
}
.prose h3 { font-size: 16px; font-weight: 640; color: var(--ink); margin: 28px 0 8px; }
.prose p { margin: 0 0 14px; text-wrap: pretty; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin: 0 0 7px; }
.prose code {
  font-family: var(--mono); font-size: .9em;
  background: var(--paper3); padding: 1px 5px; border-radius: 5px; color: var(--ink);
}
.prose strong { color: var(--ink); font-weight: 620; }

@keyframes floatY { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
@keyframes snapWin {
  0%, 12% { inset: 20% 27% 22% 23% } 30%, 70% { inset: 8% 52% 8% 5% }
  88%, 100% { inset: 20% 27% 22% 23% }
}
@keyframes snapPrev { 0%, 16% { opacity: 0 } 30%, 68% { opacity: .6 } 82%, 100% { opacity: 0 } }
@keyframes cbStep {
  0%, 22% { transform: translateY(0) } 30%, 52% { transform: translateY(37px) }
  60%, 88% { transform: translateY(74px) } 100% { transform: translateY(0) }
}
@keyframes softBreath { 0%, 100% { opacity: .3 } 50% { opacity: .85 } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

/* Four-up rows. A fixed repeat(4,1fr) cannot shrink past its content's
   min-width, so on a phone the last cell ran off-screen and gave the whole
   page a horizontal scrollbar. Two-up below 700px. */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 700px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }

/* Every multi-column layout on the marketing pages is written as an inline
   `grid-template-columns` on the section. A fixed `1fr 1fr` has a min-content
   floor, so on a phone the columns refused to shrink and the page scrolled
   sideways. Stack them instead — one column is what these read like on a
   phone anyway. `!important` because the declarations being overridden are
   inline. */
@media (max-width: 700px) {
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  /* Equal-height rows exist to match a neighbouring column that is no longer
     beside them once stacked; keeping 1fr 1fr leaves a tall empty card. */
  [style*="grid-template-rows"] { grid-template-rows: auto !important; }
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { padding: 12px 18px; }
  .nav-links .nv-a { display: none; }
}

/* Respect the system's motion preference — the whole site is decorative motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ── The live notch demo (assets/notch-stage.js renders into .notch-stage) ── */
.notch-stage {
  --pa: #5B5BD6; --pa2: #7B7BE8;
  --pmono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace;
  --psf: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  position: relative; width: 100%; height: 100%; min-height: 300px;
  border-radius: inherit; overflow: hidden;
  background: linear-gradient(168deg, #232a3f 0%, #3a3750 40%, #6b566f 70%, #a9776a 100%);
  font-family: var(--psf); isolation: isolate;
}
/* JS-off fallback written into .notch-stage in the markup; the script wipes it. */
.ns-nojs {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 13px; padding: 32px; text-align: center; text-wrap: pretty;
}
.ns-key {
  appearance: none; -webkit-appearance: none; border: none; background: transparent;
  padding: 0; margin: 0; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 6px; font-family: var(--psf);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.ns-cap {
  min-width: 40px; height: 33px; padding: 0 11px; border-radius: 9px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(228,231,238,.94));
  box-shadow: 0 1px 0 rgba(0,0,0,.14), 0 3px 8px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.9);
  color: #2b2e36; font-family: var(--pmono); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  transition: transform .1s cubic-bezier(.32,.72,0,1), background .1s ease, box-shadow .1s ease;
  letter-spacing: .02em;
}
.ns-key:active .ns-cap, .ns-key.on .ns-cap {
  transform: translateY(2px);
  background: linear-gradient(180deg, var(--pa2), var(--pa)); color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.22);
}
.ns-lab {
  font-size: 10.5px; color: rgba(255,255,255,.72); letter-spacing: .005em;
  font-weight: 500; text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.ns-key.on .ns-lab { color: rgba(255,255,255,.95); }
.ns-file {
  cursor: grab; display: flex; flex-direction: column; align-items: center; gap: 7px;
  width: 74px; padding: 7px 4px; border-radius: 10px;
  transition: background .15s ease, transform .15s ease;
  border: none; background: transparent; font-family: var(--psf);
  /* The demo drags with pointer events, so the browser must not claim the
     gesture for scrolling — without this a touch drag never starts. */
  touch-action: none; -webkit-user-select: none; user-select: none;
}
.ns-file:hover { background: rgba(255,255,255,.13); }
.ns-file:active { cursor: grabbing; transform: scale(.96); }
/* The dragged card. One composited layer moved by transform only: no layout,
   and nothing behind it repaints — which is what the native drag image could
   not manage over the demo's two backdrop-filter bars. */
.ns-ghost {
  position: absolute; top: 0; left: 0; z-index: 12; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 7px 4px; font-family: var(--psf);
  will-change: transform; opacity: .92;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.5));
  transition: scale .12s ease;
}
.ns-ghost.over { scale: 1.06; opacity: 1; }
.ns-act {
  width: 20px; height: 20px; border-radius: 6px; background: rgba(255,255,255,.1);
  display: grid; place-items: center; color: rgba(255,255,255,.82);
  transition: background .15s ease;
}
.ns-act:hover { background: rgba(255,255,255,.2); }
.ns-w { border-radius: 5.5px; background: rgba(255,255,255,.08); transition: background .12s ease; }
.ns-w.on { background: var(--pa); }
.ns-hint {
  display: flex; align-items: center; gap: 5px; padding: 3px 6px 3px 4px;
  border-radius: 7px; background: rgba(255,255,255,.07);
}
.ns-hk {
  min-width: 15px; height: 15px; padding: 0 3px; border-radius: 4.5px; background: #2b2d34;
  font-family: var(--pmono); font-size: 9px; font-weight: 700; color: #fff;
  display: grid; place-items: center;
}
.ns-win { position: relative; width: 17px; height: 12px; border-radius: 3px; border: 1px solid rgba(255,255,255,.34); }
.ns-zone { position: absolute; border-radius: 1.5px; background: var(--pa2); }
@keyframes nsIn { from { transform: translateY(-7px) scale(.96) } to { transform: none } }
@keyframes nsGrow { from { transform: translateY(-7px) scaleY(.72) } to { transform: none } }
@keyframes nsPop { from { transform: translate(-50%,-50%) scale(.88) } to { transform: translate(-50%,-50%) scale(1) } }
@keyframes nsWave { 0%, 100% { transform: scaleY(.3) } 50% { transform: scaleY(1) } }
@keyframes nsSweep { 0%, 100% { opacity: .35 } 50% { opacity: .95 } }
@keyframes nsNudge { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }
