/* Layout concept: a warm paper gallery. Name centred at the top, projects lead in a sideways-scrolling
   row. A serif is used only for names and headings; all running text is sans. Images sit straight on the
   page with no backdrop. Single light theme by choice. */
:root {
  --bg: #faf8f5;      /* warm paper white */
  --ink: #2b2723;     /* warm charcoal */
  --muted: #8c847a;
  --line: #e7e1d8;
  --stage: #ebe7df;   /* warm neutral backdrop behind mockups */
  --hover: #8a5a44;   /* soft clay, hover only */

  --font: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --head: 80px;

  --gutter: clamp(16px, 3vw, 40px);
  --max: 1440px;
  --s-0: 0.95rem;
  --s-1: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  --s-2: clamp(1.35rem, 1.1rem + 0.9vw, 1.9rem);
  --s-3: clamp(2rem, 1.2rem + 3vw, 3.75rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--s-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, img:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--bg); }
h1, h2, h3 { font-weight: 400; margin: 0; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.small { font-size: 0.8rem; letter-spacing: 0.01em; }
.muted { color: var(--muted); }
.link-u { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .4s ease; }
.link-u:hover { background-size: 100% 1px; }

/* ---------- Header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg);
}
.site-header { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50; background: var(--bg); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: var(--head); }
.site-header .burger { justify-self: end; }
.logo { font-size: var(--s-1); }
.burger {
  display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 0; cursor: pointer;
  font: inherit; color: inherit; font-size: var(--s-0);
}
.burger i { position: relative; width: 22px; height: 9px; display: block; }
.burger i::before, .burger i::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: currentColor; transition: transform .35s ease, top .35s ease; }
.burger i::before { top: 0; } .burger i::after { top: 8px; }
.menu-open .burger i::before { top: 4px; transform: rotate(45deg); }
.menu-open .burger i::after { top: 4px; transform: rotate(-45deg); }
.page { padding-top: calc(var(--head) + env(safe-area-inset-top, 0px)); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--bg);
  padding-top: calc(var(--head) + 24px + env(safe-area-inset-top, 0px)); padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.menu .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; min-height: 100%; }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; align-content: start; }
.menu-list a { font-size: var(--s-3); line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); transition: color .25s; display: inline-block; }
.menu-list:hover a { color: var(--muted); }
.menu-list a:hover, .menu-list a:focus-visible { color: var(--ink); }
.menu-sub { list-style: none; margin: 40px 0 0; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; font-size: var(--s-1); }
.menu-label { margin: 0 0 14px; }
/* hover preview: whole image, dropped at a slightly different spot each time */
.menu-peek { position: relative; height: min(72vh, 680px); align-self: start; pointer-events: none; }
.menu-peek img {
  position: absolute; left: var(--px, 10%); top: var(--py, 6%);
  width: auto; height: auto; max-width: 66%; max-height: 72%;
  opacity: 0; transform: translateY(10px) rotate(var(--rot, 0deg)); transition: opacity .3s ease, transform .45s cubic-bezier(.2,.7,.2,1);
}
.menu-peek.on img { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)); }

/* ---------- Horizontal project rail ---------- */
.rail { position: relative; }
.rail-sticky {
  position: sticky; top: calc(var(--head) + env(safe-area-inset-top, 0px));
  height: calc(100vh - var(--head) - env(safe-area-inset-top, 0px));
  height: calc(100svh - var(--head) - env(safe-area-inset-top, 0px));
  overflow: hidden; display: flex; align-items: flex-start; padding-top: calc(clamp(40px, 7vw, 100px) + 3px);
}
.rail-track {
  display: flex; align-items: flex-start; gap: clamp(32px, 6vw, 110px);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: 22vw;
  will-change: transform;
}
.rail-card { flex: 0 0 auto; display: grid; gap: 16px; align-self: flex-start; }
.rail-card .frame {
  height: min(calc(var(--h) * 1vh), calc(78vw / var(--ar)));
  aspect-ratio: var(--ar);
}
.rail-card img { width: 100%; height: 100%; object-fit: contain; }
.rail-card .cap { width: 0; min-width: 100%; display: grid; gap: 4px; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.cap-name { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.6rem); line-height: 1.2; }
.cap-blurb { color: var(--muted); max-width: 40ch; transition-delay: .08s; }
.rail-card.is-focus .cap, .rail-card:hover .cap, .rail-card:focus-visible .cap { opacity: 1; transform: none; }
.rail-count { position: absolute; left: max(var(--gutter), env(safe-area-inset-left, 0px)); bottom: 22px; font-variant-numeric: tabular-nums; }

/* phones + reduced motion: swipe sideways */
.rail.is-static .rail-sticky { position: static; height: auto; padding-block: 16px 8px; }
.rail.is-static .rail-track { overflow-x: auto; scroll-padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); scroll-snap-type: x mandatory; padding-bottom: 56px; padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); scrollbar-width: none; align-items: flex-start; }
.rail.is-static .rail-track::-webkit-scrollbar { display: none; }
.rail.is-static .rail-card { scroll-snap-align: start; margin-top: 0; }
.rail.is-static .rail-card { transform: none !important; }
.rail.is-static .rail-count { bottom: 16px; }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(72px, 10vw, 150px) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: clamp(28px, 4vw, 56px); }
.sec-head h2 { font-size: var(--s-0); }

.about { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 24px; }
.about-text { grid-column: 4 / span 7; margin: 0; font-size: var(--s-2); line-height: 1.35; letter-spacing: -0.01em; text-wrap: pretty; }
.about-lists { grid-column: 4 / span 9; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin-top: clamp(32px, 4vw, 56px); }
.about-lists h3 { font-size: var(--s-0); color: var(--muted); }
.about-lists ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.about-lists li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.about-lists li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(32px, 5vw, 80px); }
.quote { margin: 0; display: grid; gap: 18px; align-content: start; }
.quote p { margin: 0; font-size: var(--s-1); line-height: 1.5; text-wrap: pretty; }
.quote p::before { content: "“"; } .quote p::after { content: "”"; }
.quote footer { display: grid; gap: 2px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(80px, 10vw, 150px); border-top: 1px solid var(--line); padding-block: clamp(48px, 7vw, 96px) 24px; overflow: hidden; }
.foot-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.foot-cta { grid-column: 1 / span 6; margin: 0; font-size: var(--s-2); line-height: 1.3; letter-spacing: -0.01em; }
.foot-links { grid-column: 9 / span 4; display: grid; gap: 8px; align-content: start; }
.foot-links a { width: fit-content; }
.email { font-size: var(--s-1); overflow-wrap: anywhere; }
.copy-btn { font: inherit; font-size: 0.8rem; background: none; border: 1px solid var(--line); color: var(--muted); padding: 3px 10px; border-radius: 999px; cursor: pointer; width: fit-content; }
.copy-btn:hover { color: var(--ink); border-color: var(--ink); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(56px, 8vw, 110px); }

/* ---------- Project page ---------- */
.p-head { padding-block: clamp(40px, 7vw, 100px) clamp(32px, 5vw, 64px); }
.p-back { display: inline-block; margin-bottom: clamp(28px, 4vw, 48px); }
.p-title { font-size: var(--s-3); line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.p-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; margin-top: clamp(28px, 4vw, 56px); border-top: 1px solid var(--line); padding-top: 20px; }
.p-meta { grid-column: 1 / span 4; display: grid; gap: 16px; margin: 0; align-content: start; }
.p-meta div { display: grid; gap: 2px; }
.p-meta dt { color: var(--muted); }
.p-meta dd { margin: 0; }
.p-copy { grid-column: 6 / span 7; display: grid; gap: 1em; }
.p-copy p { margin: 0; font-size: var(--s-1); line-height: 1.55; max-width: 56ch; text-wrap: pretty; }

.stage { background: var(--stage); padding-block: clamp(32px, 6vw, 96px); }
.gallery { display: grid; gap: clamp(28px, 5vw, 80px); }
.row { display: flex; gap: clamp(12px, 2.5vw, 40px); align-items: flex-start; justify-content: center; }
.row > * { flex: var(--r) 1 0; min-width: 0; }
.row.narrow { max-width: 820px; margin-inline: auto; width: 100%; }
.row.mid { max-width: 1100px; margin-inline: auto; width: 100%; }
.row.feed { align-items: center; }
.zoom { cursor: zoom-in; }
.grid-phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 32px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.5vw, 24px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.5vw, 24px); }
.cell img, .grid-phones img, .grid-3 img, .grid-2 img { width: 100%; height: auto; }
.grid-2 img { box-shadow: 0 12px 30px -20px rgba(0,0,0,.3); }
.sub-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid rgba(26,26,26,.15); padding-top: 12px; }
.sub-head h2 { font-size: var(--s-2); letter-spacing: -0.01em; line-height: 1.2; }
.sub-head span { color: #6f6f6b; }

.p-quote { padding-block: clamp(56px, 8vw, 120px) 0; }
.p-quote .quote { max-width: 760px; }
.p-quote .quote p { font-size: var(--s-2); line-height: 1.35; letter-spacing: -0.01em; }

.next { display: block; border-top: 1px solid var(--line); margin-top: clamp(56px, 8vw, 120px); padding-top: 20px; }
.next span { display: block; }
.next .name { font-size: var(--s-3); letter-spacing: -0.03em; line-height: 1.1; margin-top: 8px; transition: color .3s; }
.next:hover .name { color: var(--hover); }
.next + .site-footer { margin-top: clamp(56px, 8vw, 120px); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(255,255,255,.97); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox button { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; padding: 8px; }

/* ---------- Load-in ---------- */
@keyframes fade { from { opacity: .001; } to { opacity: 1; } }
.fade { animation: fade 1s ease both; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .menu .wrap { grid-template-columns: 1fr; }
  .menu-peek { display: none; }
  .about-text, .about-lists, .foot-cta, .foot-links, .p-meta, .p-copy { grid-column: 1 / -1; }
  .p-meta { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .grid-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3.phones-m2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row.stack-m { flex-direction: column; align-items: stretch; }
  .row.stack-m > * { flex: none; }
  .row.stack-m > .phone { width: 62%; margin-inline: auto; }
  .grid-2.stack-m { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Serif: names and headings only ---------- */
.logo, .menu-list a, .cap-name, .foot-cta, .p-title, .sub-head h2, .next .name {
  font-family: var(--serif); font-weight: 400; letter-spacing: 0.005em;
}
.logo { font-size: clamp(1.6rem, 1.35rem + 0.7vw, 2rem); line-height: 1; }
.menu-list a:hover, .menu-list a:focus-visible { color: var(--hover); }
.next:hover .name, .link-u:hover { color: var(--hover); }
.p-title { font-size: clamp(2.6rem, 1.4rem + 4vw, 5rem); line-height: 1; }
.cap-name { font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.85rem); line-height: 1.15; }
.foot-cta { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.5rem); line-height: 1.15; }
.sub-head h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); line-height: 1.1; }
.next .name { font-size: clamp(2.4rem, 1.4rem + 3.5vw, 4.25rem); line-height: 1; }
.menu-list a { font-size: clamp(2.2rem, 1.3rem + 3.2vw, 4rem); line-height: 1.08; }
.burger { padding: 10px 0 10px 10px; }
.burger i { width: 26px; }

/* Running text stays sans */
.about-text { font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.75rem); line-height: 1.45; letter-spacing: -0.01em; }
.quote p { font-size: var(--s-1); line-height: 1.55; }
.p-quote .quote p { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.45rem); line-height: 1.5; letter-spacing: -0.005em; }
.p-copy p { font-size: var(--s-1); line-height: 1.6; }

/* ---------- Project galleries: small and airy, no backdrop ---------- */
.stage { background: none; padding-block: clamp(8px, 2vw, 24px) 0; }
.stage > .wrap > .gallery, .stage > .wrap > .grid-2 { max-width: 900px; margin-inline: auto; }
.gallery { gap: clamp(24px, 3vw, 40px); }
.row { gap: clamp(16px, 2vw, 28px); }
.row.narrow { max-width: 460px; }
.row.mid { max-width: 720px; }
.row.covers { max-width: 640px; margin-inline: auto; width: 100%; }
.grid-phones, .grid-3, .grid-2 { gap: clamp(16px, 2vw, 28px); }
.grid-3.phones-m2 { max-width: 680px; margin-inline: auto; width: 100%; }
.grid-2 img { box-shadow: none; }
.cover-page { display: flex; justify-content: flex-end; }
.cover-page img { width: 50%; }
.gallery .sub-head { margin-top: 0; border-top-color: var(--line); margin-bottom: clamp(4px, 1vw, 12px); }
.sub-head span { color: var(--muted); }

/* Kind words share the About column so both sections start on the same edge */
/* Label and content start on the same line under the divider */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 24px; border-top: 1px solid var(--line); padding-top: clamp(20px, 2.5vw, 32px); }
.sec-label { grid-column: 1 / span 3; font-size: var(--s-0); line-height: 1.6; }
.split > .about, .split > .quotes { grid-column: 4 / -1; }
.split .about { display: block; }
.split .about-text { margin: 0; max-width: 34em; }
@media (max-width: 860px) { .sec-label, .split > .about, .split > .quotes { grid-column: 1 / -1; } }
.gallery > .sub-head:not(:first-child) { margin-top: clamp(40px, 5vw, 72px); }

/* About + Kind words: equal space above and below each block, between the dividers */
.page > .sec { padding-block: 0; }
.page > .rail + .sec { margin-top: clamp(40px, 6vw, 80px); }
.split { padding-block: clamp(56px, 7vw, 104px); align-items: start; }
.sec-label { padding-top: 0.35em; }
main:has(.split) + .site-footer { margin-top: 0; }

/* Soft shadow on flat artwork (anything not mocked up on a device) */
.grid-2 img,
img[src*="00-cover-"],
img[src*="-about.webp"],
img[src*="fruce/01-logo"],
img[src*="fruce/05-brand-guide"],
.rail-card[href="space-honey.html"] .frame,
.rail-card[href="havana.html"] .frame,
.rail-card[href="fruce.html"] .frame,
.rail-card[href="clean-up-australia.html"] .frame {
  box-shadow: 0 1px 2px rgba(43,39,35,.06), 0 8px 24px -12px rgba(43,39,35,.22);
}

/* Fruce opening image at 85% size, centred in its space */
.cell.shrink-75 { display: flex; justify-content: center; }
.cell.shrink-75 img { width: 85%; }

/* Manual line breaks in home blurbs only apply on wider screens */
@media (max-width: 760px) { .cap-blurb br { display: none; } }

/* Optical balance: trim the extra line-height above the first line so the
   gap above the text matches the gap below it, between the dividers */
.split .about-text { margin-top: -0.24em; }
.split .quote p { margin-top: -0.16em; }
@media (max-width: 860px) { .sec-label { padding-top: 0; margin-top: -0.2em; } }
