/* Rekursive Studios — shared stylesheet
   Layout concept: every page is a sheet of grid paper. Projects are filed like
   drawings, each with a small title block (number, status, revision). */

@font-face { font-family: "Sukashi"; src: url("../fonts/sukashi-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Sukashi"; src: url("../fonts/sukashi-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sukashi"; src: url("../fonts/sukashi-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* color */
  --paper: #f3f5f2;        /* grid paper, faint green-grey */
  --sheet: #fbfcfa;        /* card surface */
  --ink: #1d2422;          /* pencil graphite */
  --ink-soft: #55615c;
  --grid: #dfe7e1;         /* minor grid line */
  --grid-major: #cbd8cf;   /* 10 mm line */
  --accent: #2f6b4f;       /* drafting green, from the Sukashi specimen */
  --accent-ink: #ffffff;
  --rule: #c5d0c9;
  --ok: #2f6b4f; --wip: #9a6a12; --plan: #5a6772;

  /* type */
  --display: "Sukashi", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.82rem; --step-0: 1.05rem; --step-1: 1.35rem; --step-2: 1.9rem; --step-3: 2.9rem; --step-4: clamp(3.2rem, 9vw, 6.4rem);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141a18; --sheet: #1b2320; --ink: #e4ebe6; --ink-soft: #9fb0a7;
    --grid: #1d2522; --grid-major: #25302c; --accent: #7cc4a0; --accent-ink: #10201a;
    --rule: #2f3b36; --ok: #7cc4a0; --wip: #e0b25c; --plan: #9aa8b3; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141a18; --sheet: #1b2320; --ink: #e4ebe6; --ink-soft: #9fb0a7;
  --grid: #1d2522; --grid-major: #25302c; --accent: #7cc4a0; --accent-ink: #10201a;
  --rule: #2f3b36; --ok: #7cc4a0; --wip: #e0b25c; --plan: #9aa8b3; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 12px 12px, 12px 12px;
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}

/* ---------- header ---------- */
.site-head { padding-block: 22px; }
.site-head .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-size: var(--step-1); color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.brand b { font-weight: 700; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--display); font-size: var(--step-0); }
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

/* ---------- labels ---------- */
.label {
  font-family: var(--mono); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft);
}

/* ---------- home hero ---------- */
.hero { padding-block: 48px 40px; }
.hero h1 {
  font-family: var(--display); font-weight: 400; font-size: var(--step-4);
  line-height: 0.95; margin: 10px 0 18px; text-wrap: balance;
}
.hero h1 .r { color: var(--accent); }
.hero p { max-width: 58ch; font-size: var(--step-1); line-height: 1.45; margin: 0; color: var(--ink-soft); }

/* ---------- project index ---------- */
.index-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 8px; }
.index-head h2 { font-family: var(--display); font-weight: 700; font-size: var(--step-1); margin: 0; }

.sheets { list-style: none; margin: 20px 0 64px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }

.sheet {
  background: var(--sheet); border: 1px solid var(--rule);
  display: flex; flex-direction: column; min-width: 0;
  color: inherit; text-decoration: none; height: 100%;
  transition: border-color .15s, transform .15s;
}
a.sheet:hover { border-color: var(--accent); transform: translateY(-2px); }
.sheet .face {
  aspect-ratio: 16 / 9; max-width: 100%; border-bottom: 1px solid var(--rule);
  display: grid; place-items: center; overflow: hidden; position: relative;
  font-family: var(--display); color: var(--ink);
}
.sheet .face img { width: 100%; height: 100%; object-fit: cover; }
.sheet .body { padding: 16px 18px 6px; flex: 1; }
.sheet h3 { font-family: var(--display); font-weight: 700; font-size: var(--step-2); line-height: 1; margin: 0 0 8px; }
.sheet p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* title block at the foot of each sheet, like an engineering drawing */
.tblock {
  display: grid; grid-template-columns: auto 1fr auto; margin-top: 16px;
  border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft);
}
.tblock > span { padding: 7px 18px; }
.tblock > span + span { border-left: 1px solid var(--rule); }
.tblock .status { text-align: right; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-ok { color: var(--ok); } .s-wip { color: var(--wip); } .s-plan { color: var(--plan); }

/* placeholder art, until real photos land */
.face.placeholder { background:
  repeating-linear-gradient(135deg, transparent 0 10px, var(--grid) 10px 11px); }
.face.placeholder span { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); background: var(--sheet); padding: 4px 8px; border: 1px dashed var(--rule); }
.face.type-sample { font-size: clamp(2.6rem, 8vw, 4rem); background: var(--sheet); }

/* ---------- project page ---------- */
.crumbs { padding-block: 26px 0; }
.crumbs a { font-family: var(--mono); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none; }
.project-head { padding-block: 14px 26px; border-bottom: 2px solid var(--ink); }
.project-head h1 { font-family: var(--display); font-weight: 400; font-size: var(--step-4); line-height: 0.95; margin: 6px 0 14px; text-wrap: balance; }
.project-head .lede { max-width: 60ch; font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); margin: 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; }

.project-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; padding-block: 34px 72px; }
@media (max-width: 760px) { .project-body { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.prose { max-width: 65ch; min-width: 0; }
.prose h2 { font-family: var(--display); font-weight: 700; font-size: var(--step-2); line-height: 1.05; margin: 34px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.figure { margin: 22px 0; background: var(--sheet); border: 1px solid var(--rule); }
.figure .face { aspect-ratio: 16/9; max-width: 100%; display: grid; place-items: center; }
.figure figcaption { padding: 8px 14px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); }

.aside { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.aside .box { background: var(--sheet); border: 1px solid var(--rule); padding: 14px 16px; }
.aside .box h3 { margin: 0 0 8px; }
.aside ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.button {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-weight: 700; font-size: var(--step-1);
  padding: 8px 18px 10px; text-decoration: none; border: 0;
}
.button:hover { filter: brightness(1.08); }

/* things Sam still needs to fill in — visible on purpose */
.todo { background: color-mix(in srgb, var(--wip) 18%, transparent); outline: 1px dashed var(--wip); padding: 0 4px; }

/* specimen block on the Sukashi page */
.specimen { background: var(--sheet); border: 1px solid var(--rule); padding: 18px 20px; font-family: var(--display); overflow-x: auto; }
.specimen .big { font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 1; }
.specimen .row { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--grid-major); }
.specimen .row .label { width: 70px; flex: none; }
.specimen .row span:last-child { font-size: var(--step-2); line-height: 1.1; }
.specimen textarea {
  width: 100%; margin-top: 10px; font-family: var(--display); font-size: var(--step-2); line-height: 1.1;
  color: var(--ink); background: transparent; border: 1px dashed var(--rule); padding: 8px 10px; resize: vertical;
}

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); padding-block: 22px 34px; background: var(--paper); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
