/* The Odd Hour Studio — "Desk Journal" style (design proposal 6).
   Colours, fonts and the window component live here, shared by every page. */

:root {
  --desk: #ECECE7;        /* page background */
  --paper: #F6F6F3;       /* title bars, menu bar, footer */
  --white: #FFFFFF;       /* window body */
  --ink: #17171A;         /* text, outlines, dark buttons */
  --ink-2: #3D3D45;       /* body text */
  --muted: #5B5B63;       /* labels */
  --rule: #E2E2DC;        /* light dividers */
  --shadow: #D9D9D2;      /* window shadow */
  --accent: #B23A14;      /* studio accent (ember) */

  /* Per-project colours. A page sets --project to one of these. */
  --snake: #4E6B12;
  --snake-tint: #9DB04F;
  --swipe: #C2452A;
  --swipe-tint: #17122B;  /* the app icon's background */

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --max: 1160px;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.mono { font-family: var(--mono); font-size: 14px; color: var(--muted); letter-spacing: 0.02em; }
.serif { font-family: var(--serif); font-weight: 400; }
em.accent, .accent { color: var(--accent); }
em.project { color: var(--project, var(--accent)); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px;
}
.skip:focus { left: 8px; color: var(--paper); }

/* ---------- Menu bar ---------- */

.menubar { background: var(--paper); border-bottom: 1px solid var(--ink); }
.menubar .wrap {
  min-height: 56px;
  display: flex; flex-wrap: wrap; gap: 8px 32px;
  align-items: center; justify-content: space-between;
}
.logo { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.logo span { color: var(--accent); }
.menubar-right { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }
.menubar nav { display: flex; gap: 24px; font-size: 15px; }
.menubar nav a[aria-current="page"] { border-bottom: 2px solid var(--accent); }
.clock { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 9ch; }

/* ---------- Page openings ---------- */

.hero { padding-top: 104px; padding-bottom: 80px; }
.hero h1 {
  margin: 24px 0 0; max-width: 980px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(46px, 7.5vw, 112px); line-height: 0.96; letter-spacing: -0.02em;
}
.hero-foot {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; justify-content: space-between;
}
.lead { margin: 0; max-width: 560px; font-size: 20px; color: var(--ink-2); }

.entry-head { padding-top: 56px; padding-bottom: 48px; }
.meta {
  margin-top: 36px; padding-bottom: 14px; border-bottom: 1px solid var(--ink);
  display: flex; flex-wrap: wrap; gap: 8px 40px;
}
.entry-head h1 {
  margin: 36px 0 0;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(60px, 10vw, 148px); line-height: 0.92; letter-spacing: -0.03em;
}
.entry-head .lead { margin-top: 28px; font-size: 21px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1px solid var(--ink);
  font: 500 16px/1 var(--sans);
  cursor: pointer;
}
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #2C2C32; color: var(--paper); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; pointer-events: none; }

/* ---------- Windows ---------- */

.window {
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 10px;
  box-shadow: 6px 6px 0 var(--shadow);
  overflow: hidden;
}
.window-bar {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  align-items: center; justify-content: space-between;
  padding: 10px 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono); font-size: 13px; color: var(--muted);
}
.window-name { display: flex; align-items: center; gap: 12px; }
.dots { display: flex; gap: 6px; }
.dots i {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid var(--ink);
}
.dots i:last-child { background: var(--accent); border-color: var(--accent); }
.window-body { padding: 36px; }

.window.dark { background: var(--ink); color: var(--paper); }
.window.dark .window-bar { background: var(--ink); color: #B5B5BD; border-bottom-color: #3D3D45; }
.window.draft { background: var(--paper); border-style: dashed; box-shadow: none; }
.window.draft .window-bar { border-bottom-style: dashed; }

a.window { display: block; color: var(--ink); transition: transform 0.15s ease, box-shadow 0.15s ease; }
a.window:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--shadow); }
a.window.dark:hover { color: var(--paper); }

/* ---------- Home: journal entries ---------- */

.entries { display: flex; flex-direction: column; gap: 32px; padding-bottom: 96px; }
.entry { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.entry-text { flex: 999 1 380px; min-width: 0; }
.entry-title {
  display: block; margin-top: 8px;
  font-family: var(--serif); font-size: clamp(44px, 5vw, 64px); line-height: 1; letter-spacing: -0.02em;
}
.entry-text p { margin: 14px 0 0; max-width: 480px; color: var(--ink-2); }
.entry-link { display: inline-block; margin-top: 18px; font-weight: 600; border-bottom: 2px solid var(--accent); }
.entry-art {
  flex: 1 1 320px; height: 240px;
  border: 1px solid var(--ink); border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.entry-art img { width: 100%; height: 100%; object-fit: cover; }

.draft-body { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 32px 36px; }
.draft-body .serif { margin: 0; font-style: italic; font-size: 40px; line-height: 1; }
.draft-body p { margin: 8px 0 0; color: var(--muted); }
.progress { flex: 0 1 320px; height: 4px; background: var(--shadow); border-radius: 2px; overflow: hidden; }
.progress span { display: block; width: 40%; height: 100%; background: var(--accent); }

.quote-body {
  display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; justify-content: space-between;
  padding: 48px 36px;
}
.quote-body .serif { max-width: 720px; font-size: clamp(34px, 4.5vw, 56px); line-height: 1.05; }
.quote-body .btn { border-color: var(--paper); color: var(--paper); }

/* ---------- Project pages ---------- */

.split { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-bottom: 56px; }
.split > .main { flex: 999 1 560px; min-width: 0; }
.split > .side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 28px; }

.board {
  position: relative; aspect-ratio: 4 / 3;
  background: var(--snake-tint);
  display: flex; align-items: center; justify-content: center;
}
.board svg { width: 78%; height: auto; }
.board .fig { position: absolute; left: 20px; bottom: 14px; font-family: var(--mono); font-size: 12px; color: #1C2B07; }

.or { margin: 14px 0 10px; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stores .btn { min-height: 48px; padding: 0 12px; font-size: 15px; }
.note { margin: 12px 0 0; font-size: 14px; color: var(--muted); text-align: center; }

.steps { margin: 0; padding: 8px 24px; list-style: none; }
.steps li { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 0; }
.steps .num { flex: none; min-width: 1.6em; font-family: var(--serif); font-size: 28px; line-height: 1; color: var(--project, var(--accent)); }

.app-window { display: flex; flex-wrap: wrap; gap: 36px; align-items: center; }
.app-window > div:first-child { flex: 999 1 280px; min-width: 0; }
.app-icon { width: 76px; height: 76px; border: 1px solid var(--ink); border-radius: 20px; overflow: hidden; }
.app-icon img { width: 100%; height: 100%; }
.phone {
  flex: 1 1 220px; max-width: 240px; margin: 0 auto;
  border: 1px solid var(--ink); border-radius: 34px; padding: 10px;
  background: var(--paper);
}
.phone img { border-radius: 24px; }
.actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.notes-body { display: flex; flex-wrap: wrap; gap: 40px; padding: 36px; }
.notes-body > .serif { flex: 999 1 420px; min-width: 0; margin: 0; font-size: 32px; line-height: 1.25; }
.shots { flex: 1 1 360px; display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.shots img, .shots .shot-ph {
  flex: 0 0 140px; width: 140px; height: 280px; object-fit: cover;
  border: 1px solid var(--ink); border-radius: 16px; background: var(--paper);
}
.shot-ph { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; color: var(--muted); }

.pager { border-top: 1px solid var(--ink); }
.pager .wrap { padding-top: 36px; padding-bottom: 36px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.pager .serif { font-size: 32px; }

/* ---------- About ---------- */

.facts { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--ink); }
.facts div { padding: 18px 0; }
.facts p { margin: 0; }
.facts .serif { margin-top: 4px; font-size: 26px; }
.photo { aspect-ratio: 3 / 4; background: #E6E6E1; display: flex; align-items: center; justify-content: center; }
.caption { padding: 12px 18px; border-top: 1px solid var(--ink); }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--ink); background: var(--paper); }
.footer .wrap {
  padding-top: 24px; padding-bottom: 24px;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-family: var(--mono); font-size: 13px; color: var(--muted);
}
.footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ---------- Cookie notice (only shown when analytics is switched on) ---------- */

.consent {
  position: fixed; left: 16px; bottom: 16px; z-index: 10;
  width: min(420px, calc(100% - 32px));
}
.consent-body { padding: 20px; }
.consent-body p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.consent-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.consent-actions .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.footer [data-consent-open][hidden] { display: none; }

/* ---------- Phones ---------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .hero { padding-top: 56px; padding-bottom: 48px; }
  .entry-head { padding-top: 32px; padding-bottom: 32px; }
  .window-body, .notes-body, .quote-body { padding: 24px; }
  .draft-body { padding: 24px; }
  .entry { gap: 24px; }
  .entry-art { height: 200px; }
  .pager .serif { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  a.window { transition: none; }
  a.window:hover { transform: none; }
}
