/* Website Projects · Q4 2026
   Tokens mirror solomonmomoh.space where known: cream theme colour (#f8f3e9),
   lowercase editorial voice, quiet ink-on-paper styling. */

:root {
  color-scheme: light;
  --paper: #f8f3e9;
  --paper-2: #efe8d8;
  --ink: #1f1b16;
  --muted: #5d5548;
  --line: #d9d0bd;
  --focus: #1f1b16;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px;
  --max: 1120px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd { margin: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 4px;
}
.skip:focus { top: 12px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.brand { font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.site-header ul { display: flex; gap: 20px; font-size: 0.9rem; }
.site-header a { text-decoration: none; color: var(--muted); }
.site-header a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 640px) {
  .site-header li:nth-child(-n + 2) { display: none; }
}

/* hero */
.hero { padding-block: clamp(56px, 10vw, 128px) clamp(40px, 6vw, 72px); }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 20px; }
h1 {
  font-size: clamp(2.5rem, 1.2rem + 6.4vw, 5.5rem);
  line-height: 1.02; letter-spacing: -0.035em; font-weight: 650;
  max-width: 14ch; text-wrap: balance;
}
.intro { margin-top: clamp(28px, 4vw, 48px); display: grid; gap: 14px; max-width: 62ch; color: var(--muted); }
.intro .lede { color: var(--ink); font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); line-height: 1.5; }

/* section label */
.section-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--muted);
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}

/* projects */
.projects { display: grid; }
.projects > li { padding-block: clamp(36px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.projects > li:last-child { border-bottom: 0; }

.project { display: grid; gap: clamp(20px, 3vw, 32px); }

.shot {
  display: block; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff;
}
.chrome {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.chrome em {
  margin-left: 10px; font-style: normal; font-size: 0.75rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.frame {
  display: block; position: relative; overflow: hidden; container-type: size;
  aspect-ratio: 16 / 10; background: var(--paper-2);
}
.ph {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.ph small { display: block; margin-top: 6px; text-transform: none; letter-spacing: 0; font-size: 0.8rem; }
/* Full home-page capture, top-aligned. Hidden if the file is missing. */
.frame img.page {
  position: absolute; top: 0; left: 0; width: 100%; height: auto;
  background: var(--paper-2);
}
.frame img[hidden] { display: none; }

.info { display: grid; gap: 18px 32px; grid-template-columns: 1fr; }
.num { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
h3 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 600; }
.main p { margin-top: 12px; color: var(--muted); max-width: 52ch; }

.meta { display: grid; gap: 10px; font-size: 0.9rem; }
.meta div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.meta dt { color: var(--muted); }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 2px 10px; border: 1px solid var(--ink); border-radius: 999px; font-size: 0.8rem;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }

.visit {
  justify-self: start; align-self: end; font-weight: 500;
  padding-bottom: 2px; border-bottom: 1px solid var(--ink); text-decoration: none;
  transition: gap 0.2s ease;
}
.visit:hover { border-bottom-width: 2px; }

@media (min-width: 860px) {
  .info { grid-template-columns: 48px minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
  .info .visit { grid-column: 3; }
  .info .meta { grid-column: 3; grid-row: 1; }
  .info .visit { grid-row: 2; }
}

/* beyond */
.beyond { padding-block: clamp(56px, 9vw, 112px); border-top: 1px solid var(--line); display: grid; gap: 28px; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; }
.beyond .cols { display: grid; gap: 16px; color: var(--muted); max-width: 70ch; }
@media (min-width: 860px) {
  .beyond { grid-template-columns: 1fr 1.4fr; gap: 48px; }
  .beyond .cols { max-width: none; }
}

/* closing */
.closing { padding-block: clamp(56px, 9vw, 112px); border-top: 1px solid var(--line); display: grid; gap: 16px; justify-items: start; }
.closing p { color: var(--muted); max-width: 52ch; }
.cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 8px;
  padding: 14px 24px; border-radius: 999px; background: var(--ink); color: var(--paper);
  text-decoration: none; font-weight: 500;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.cta:hover { background: #3a342b; }
.closing p:last-child { color: inherit; }

/* footer */
.site-footer { padding-block: 24px 40px; border-top: 1px solid var(--line); }
.banner { width: 100%; aspect-ratio: 4 / 1; object-fit: cover; border-radius: 10px; margin-bottom: 28px; opacity: 0.9; }
.banner[hidden] { display: none; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 0.9rem; color: var(--muted); }
.foot ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* motion: opt-in only, content stays visible by default */
@media (prefers-reduced-motion: no-preference) {
  /* Hover scrolls the full-page capture like a real browser. Pointer devices only;
     touch keeps the static top-of-page view. Duration is set per image in script.js. */
  @media (hover: hover) and (pointer: fine) {
    /* A gentle base ease returns the preview without a near-stationary start. */
    .frame img.page { transition: translate var(--dur, 10s) ease; }
    .shot:hover .frame img.page,
    .shot:focus-visible .frame img.page {
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      translate: 0 min(0px, calc(100cqh - 100%));
    }
  }
  .cta:hover { transform: translateY(-1px); }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
    @keyframes rise { from { opacity: 0; translate: 0 24px; } }
  }
}

@media (forced-colors: active) {
  .status { border-color: CanvasText; }
  .cta { border: 1px solid CanvasText; }
}
