/* samjoch.com — plain CSS, no build step.
   Desktop (>= 960px): black brand panel pinned left, content column scrolls.
   Mobile  (<  960px): black brand band on top, content stacked below. */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #111827;
  --body: #4b5563;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 96px;
}

html { background: #fff; }
body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
.mono { font-family: var(--mono); }

/* ---- layout -------------------------------------------------------------- */
.page {
  display: grid;
  grid-template-columns: minmax(380px, 39vw) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---- brand panel: pure black so the square logo melts into it ------------- */
.brand {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  background: #000; color: var(--faint);
  display: flex; align-items: center; justify-content: center;
}
.brand .path {
  position: absolute; top: 28px; left: 48px;
  font-size: 13px; font-weight: 500; color: #d1d5db; text-decoration: none;
}
.brand .path span { color: var(--muted); }
.brand .mark { display: block; width: min(320px, 70%); height: auto; }
.brand .foot {
  position: absolute; bottom: 28px; left: 48px; right: 48px;
  font-size: 12px; color: var(--muted);
}

/* ---- content column ------------------------------------------------------ */
.main {
  position: relative;
  display: flex; flex-direction: column;
  padding: 0 var(--gutter);
  min-width: 0;
}
.top {
  height: 84px; display: flex; align-items: center; justify-content: flex-end; gap: 28px;
  font-size: 13px;
}
.top a.link { color: var(--muted); text-decoration: none; }
.top a.link:hover, .top a.link[aria-current="page"] { color: var(--ink); }
.cta {
  font-family: var(--mono); font-weight: 500; font-size: 13px;
  color: #fff; background: var(--ink);
  padding: 8px 14px; border-radius: 6px; text-decoration: none;
  transition: background .15s;
}
.cta:hover { background: #000; }

.hero { margin-top: clamp(48px, 13vh, 120px); max-width: 640px; }
.hero .kicker { font-size: 12px; color: var(--faint); letter-spacing: .04em; }
.hero h1 { margin-top: 18px; font-size: 52px; line-height: 1.08; font-weight: 600; letter-spacing: -.03em; }
.hero .sub { margin-top: 18px; font-size: 19px; line-height: 1.6; color: var(--body); }
.hero .meta { margin-top: 20px; font-size: 12px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px 20px; }
.hero .meta span + span::before { content: "·"; margin-right: 20px; color: #d1d5db; }
.hero .cta-block { display: none; }

/* ---- rows (home "what we do" and terms sections) ------------------------- */
.rows { margin-top: 56px; max-width: 720px; border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 140px 1fr 170px; gap: 32px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.row.soon { border-bottom-style: dashed; }
.row .label { font-size: 13px; font-weight: 500; color: var(--ink); }
.row .label .n { color: #d1d5db; margin-right: 8px; font-weight: 400; }
.row .desc { font-size: 15px; line-height: 1.6; color: var(--body); }
.row .desc p + p { margin-top: 10px; }
.row .desc b { color: var(--ink); font-weight: 500; }
.row .desc .mono { font-size: .9em; color: var(--ink); }
.row .meta { text-align: right; font-size: 11.5px; color: var(--faint); line-height: 1.7; }
.row .meta > * { display: block; }

.status { display: inline-flex !important; align-items: center; gap: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; }
.live { color: #059669; } .live .dot { background: #10b981; }
.build { color: var(--muted); } .build .dot { background: var(--faint); }

.rows.terms .row { grid-template-columns: 140px 1fr; }
.rows.terms { margin-bottom: 40px; }

/* ---- footer -------------------------------------------------------------- */
.bottom {
  margin-top: auto; padding: 48px 0 28px;
  display: flex; justify-content: flex-end; gap: 24px;
  font-size: 12px;
}
.bottom a { color: var(--muted); text-decoration: none; }
.bottom a:hover, .bottom a[aria-current="page"] { color: var(--ink); }
.bottom .copy { display: none; color: var(--faint); }

:focus-visible { outline: 2px solid #10b981; outline-offset: 3px; border-radius: 2px; }

/* ---- narrower desktops --------------------------------------------------- */
@media (max-width: 1280px) {
  :root { --gutter: 56px; }
  .hero h1 { font-size: 44px; }
  .row { grid-template-columns: 120px 1fr 150px; gap: 24px; }
  .rows.terms .row { grid-template-columns: 120px 1fr; }
}

/* ---- mobile / tablet ----------------------------------------------------- */
@media (max-width: 959px) {
  :root { --gutter: 20px; }
  .page { display: block; }

  .brand { position: relative; height: 300px; }
  .brand .path { top: 18px; left: 20px; }
  .brand .mark { width: 220px; margin-top: 16px; }
  .brand .foot { display: none; }

  /* header floats over the black band: only the outlined "Book a call" */
  .top {
    position: absolute; top: -300px; right: 20px; left: 20px; height: 44px; margin-top: 4px;
    gap: 20px;
  }
  .top a.link { display: none; }
  .top .cta {
    font-family: var(--sans); font-size: 12.5px;
    background: transparent; border: 1px solid #374151; border-radius: 8px; padding: 7px 12px;
  }

  .hero { margin-top: 32px; }
  .hero .kicker { font-size: 11px; }
  .hero h1 { margin-top: 12px; font-size: 32px; line-height: 1.12; }
  .hero .sub { margin-top: 12px; font-size: 16px; }
  .hero .cta-block {
    display: block; margin-top: 24px; text-align: center;
    font-family: var(--sans); font-size: 14px; padding: 12px 14px; border-radius: 8px;
  }

  .rows { margin-top: 32px; max-width: none; }
  .row {
    grid-template-columns: 1fr auto; gap: 8px 16px;
    grid-template-areas: "label status" "desc desc" "when when";
    padding: 18px 0;
  }
  .row .label { grid-area: label; font-size: 12.5px; }
  .row .desc { grid-area: desc; font-size: 14px; line-height: 1.55; }
  .row .meta { display: contents; }
  .row .meta .status { grid-area: status; font-size: 11px; }
  .row .meta .when { grid-area: when; font-size: 11px; text-align: left; }

  .rows.terms .row { grid-template-columns: 1fr; grid-template-areas: "label" "desc"; }

  .bottom {
    margin: 28px calc(-1 * var(--gutter)) 0; padding: 20px var(--gutter) 32px;
    border-top: 1px solid #f3f4f6;
    flex-direction: column; justify-content: flex-start; gap: 10px;
  }
  .bottom .copy { display: block; }
}

@media (max-width: 959px) and (min-width: 600px) {
  :root { --gutter: 40px; }
  .brand { height: 360px; }
  .top { top: -360px; left: 40px; right: 40px; }
  .brand .path { left: 40px; }
  .hero h1 { font-size: 40px; }
  .hero .cta-block { display: inline-block; }
}

/* ---- 3D logo (logo3d.js) — static .mark stays until the first frame ------- */
.brand canvas.stage {
  position: absolute; inset: 0; width: 100%; height: 100%;
  cursor: grab; touch-action: pan-y;   /* vertical swipes still scroll on mobile */
}
.brand.dragging canvas.stage { cursor: grabbing; }
.brand.is-3d .mark { visibility: hidden; }
.brand .path, .brand .foot { z-index: 1; }
.brand.is-3d::after {
  content: "drag to rotate";
  position: absolute; bottom: 64px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: 11px; color: #4b5563;
  pointer-events: none; transition: opacity .6s;
}
.brand.touched::after { opacity: 0; }
@media (max-width: 959px) { .brand.is-3d::after { display: none; } }
