/* ============================================================
   cycle.kitchen — shared site chrome
   Used by every page: index.html (Prints) and sketchbook.html.
   Page-specific styling (hero, gallery cards, journal entries,
   etc.) lives in each page's own <style> block, not here.
   ============================================================ */

:root{
  --paper:#F7F5EF;
  --paper-alt:#EFEAE0;
  --ink:#1C1917;
  --ink-soft:#5B564D;
  --accent:#B23A24;
  --line:#DAD2C1;
  --plate-shadow: 0 1px 0 rgba(28,25,23,0.05);
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Public Sans', sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
::selection{background:var(--accent); color:var(--paper);}

.mono{font-family:'Courier Prime', monospace; letter-spacing:0.02em;}
.display{font-family:'Newsreader', serif;}

a{color:inherit;}

/* ---------- registration mark, the signature motif ---------- */
.regmark{
  position:relative;
  width:22px; height:22px;
  flex-shrink:0;
}
.regmark svg{width:100%; height:100%; display:block;}
.regmark path{fill:none; stroke:currentColor; stroke-width:1.4; stroke-linecap:square;}
.regmark line{stroke:currentColor; stroke-width:1.4; stroke-linecap:square;}

/* out-of-register variant: two offset copies of the kento mark, one
   in accent, one in ink — each path/line inherits its own group's
   stroke color instead of the single-color currentColor rule above */
.regmark-duo path, .regmark-duo line{ stroke:inherit; }

/* ---------- layout shell ---------- */
.wrap{max-width:1180px; margin:0 auto; padding:0 32px;}

/* ---------- swimming fish ----------
   A one-off print, cut loose and let to drift behind whichever
   section wraps it in a .fish-tank container (position:relative,
   overflow:hidden) so it never wanders past that container's edges;
   its own negative z-index keeps it below that section's text and
   cards, only showing through in the paper gaps between them. */
.fish-tank{ position:relative; overflow:hidden; }
.swimming-fish{
  position:absolute; top:0; left:0; z-index:-1;
  width:115px; opacity:0.35; pointer-events:none;
  animation: swim-path-about 210s ease-in-out infinite;
  will-change:left, top, transform;
}
.swimming-fish img{
  display:block; width:100%; height:auto;
  animation: fish-bob 5.5s ease-in-out infinite;
  transform-origin:50% 50%;
}
@keyframes swim-path-about{
  0%    { left:-8%;  top:8%;  transform: rotate(-3deg) scaleX(-1); }
  10%   { left:14%;  top:38%; transform: rotate(4deg) scaleX(-1); }
  22%   { left:34%;  top:10%; transform: rotate(-2deg) scaleX(-1); }
  34%   { left:58%;  top:34%; transform: rotate(3deg) scaleX(-1); }
  46%   { left:82%;  top:14%; transform: rotate(-2deg) scaleX(-1); }
  50%   { left:106%; top:22%; transform: rotate(2deg) scaleX(-1); }
  50.5% { left:106%; top:22%; transform: rotate(2deg) scaleX(1); }
  62%   { left:78%;  top:62%; transform: rotate(-3deg) scaleX(1); }
  74%   { left:52%;  top:78%; transform: rotate(2deg) scaleX(1); }
  86%   { left:24%;  top:56%; transform: rotate(-2deg) scaleX(1); }
  96%   { left:2%;   top:70%; transform: rotate(3deg) scaleX(1); }
  100%  { left:-8%;  top:8%;  transform: rotate(-3deg) scaleX(1); }
}
@keyframes fish-bob{
  0%, 100%{ transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-4px) rotate(1.5deg); }
}

/* ---------- header / nav ---------- */
header.site{
  position:sticky; top:0; z-index:40;
  background:rgba(247,245,239,0.86);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 32px;
  max-width:1180px; margin:0 auto;
}
.nav .mark{
  display:flex; align-items:center; gap:10px;
  font-family:'Courier Prime', monospace;
  font-size:15px; font-weight:700; text-decoration:none;
  text-transform:uppercase; letter-spacing:0.14em;
}
.nav .mark .regmark{color:var(--accent);}
.nav ul{
  list-style:none; display:flex; gap:34px; margin:0; padding:0;
}
.nav a.nav-link{
  text-decoration:none; font-size:13px; text-transform:uppercase;
  letter-spacing:0.12em; color:var(--ink-soft);
  padding-bottom:3px; border-bottom:1px solid transparent;
  transition:color .2s ease, border-color .2s ease;
}
.nav a.nav-link:hover{color:var(--ink); border-color:var(--ink);}
.nav a.nav-link[aria-current="page"]{ color:var(--ink); border-color:var(--accent); }

/* mobile menu toggle — hidden on desktop, becomes a real hamburger
   button below the 880px breakpoint where the inline links hide */
.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:32px; height:32px; padding:0; background:none; border:none; cursor:pointer;
}
.nav-toggle span{
  display:block; width:100%; height:2px; background:var(--ink);
  transition:transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0;}
.nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* ---------- section basics (shared rhythm, pages may override padding) ---------- */
section{padding:88px 0;}
.section-head{
  display:flex; justify-content:space-between; align-items:flex-end;
  margin-bottom:48px; gap:24px; flex-wrap:wrap;
}
.section-head h2{
  font-size:clamp(28px,3.4vw,40px); margin:0; font-weight:600;
}
.section-num{
  font-size:12px; color:var(--ink-soft); margin:0 0 8px;
}

.btn{
  display:inline-flex; align-items:center; gap:10px;
  background:var(--ink); color:var(--paper);
  padding:14px 26px; text-decoration:none;
  font-size:13px; text-transform:uppercase; letter-spacing:0.1em;
  border:1px solid var(--ink);
  transition:background .2s ease, color .2s ease;
}
.btn:hover{background:transparent; color:var(--ink);}
.text-link{
  font-size:13px; text-transform:uppercase; letter-spacing:0.1em;
  text-decoration:none; border-bottom:1px solid var(--ink);
  padding-bottom:2px;
}

/* ---------- contact / footer ---------- */
footer{
  padding:72px 0 40px;
  border-top:1px solid var(--line);
  position:relative;
  z-index:2;
  overflow:hidden;
}
.footer-grid{
  display:grid; grid-template-columns:1.3fr 1fr; gap:40px; align-items:end;
  position:relative; z-index:2;
}
.footer-mark-slot{
  position:relative;
}
footer h2{font-size:clamp(30px,4.2vw,52px); margin:0 0 16px; font-weight:600;}
.footer-email{
  font-family:'Newsreader', serif; font-weight:600; font-size:22px;
  text-decoration:none; border-bottom:1px solid var(--ink); padding-bottom:2px;
}
.footer-links{list-style:none; margin:21px 0 0; padding:0; display:flex; gap:22px; flex-wrap:wrap; row-gap:10px;}
.footer-links a{font-size:12px; text-transform:uppercase; letter-spacing:0.1em; text-decoration:none; color:var(--ink-soft);}
.footer-links a:hover{color:var(--ink);}
.footer-bottom{
  margin-top:56px; padding-top:16px; border-top:1px solid var(--line);
  display:flex; justify-content:space-between; font-size:11px; color:var(--ink-soft);
}
.footer-signature{ display:inline-flex; align-items:center; gap:8px; }
.footer-mark{ width:14px; height:14px; }
.giant-mark{
  position:absolute; right:0; bottom:0; color:var(--line);
  width:130px; height:130px; z-index:1; pointer-events:none;
}
.giant-mark svg{width:100%; height:100%;}
.giant-mark path{fill:none; stroke:currentColor; stroke-width:0.6; stroke-linecap:square;}
.giant-mark line{stroke:currentColor; stroke-width:0.6; stroke-linecap:square;}
.giant-mark.regmark-duo path, .giant-mark.regmark-duo line{ stroke:inherit; }

/* ---------- lightbox (shared full-size viewer) ----------
   `align-items: safe center` (with the `overflow-y:auto` below) is
   load-bearing, not decoration: plain `center` plus overflow is a
   known flexbox trap — when content is taller than the viewport, the
   browser only lets you scroll to the *bottom* half of the overflow,
   so the top of the modal (the close button) becomes permanently
   unreachable on a phone. `safe center` centers when it fits and
   falls back to top-aligned + scrollable when it doesn't. */
.lightbox{
  position:fixed; inset:0; background:rgba(28,25,23,0.92);
  display:flex; align-items:safe center; justify-content:center;
  overflow-y:auto; -webkit-overflow-scrolling:touch;
  z-index:100; opacity:0; pointer-events:none; transition:opacity .25s ease;
  padding:40px;
}
.lightbox.open{opacity:1; pointer-events:auto;}
.lightbox-inner{
  background:var(--paper); max-width:640px; width:100%;
  padding:26px; position:relative;
}
.lightbox-image{background:var(--paper-alt); padding:16px;}
.lightbox-image svg, .lightbox-image img{width:100%; height:auto; display:block;}
.lightbox-meta{
  display:flex; justify-content:space-between; align-items:flex-end; margin-top:18px;
  padding-top:16px; border-top:1px solid var(--line);
}
.lightbox-meta h3{margin:0 0 4px; font-family:'Newsreader', serif; font-size:22px;}
.lightbox-meta p{margin:0; font-size:12px; color:var(--ink-soft);}
.lightbox-share{
  background:none; border:1px solid var(--line); cursor:pointer;
  font-family:'Courier Prime', monospace; font-size:11px; text-transform:uppercase;
  letter-spacing:0.08em; color:var(--ink-soft); padding:8px 14px;
  white-space:nowrap; transition:border-color .2s ease, color .2s ease;
}
.lightbox-share:hover{ border-color:var(--ink); color:var(--ink); }
.lightbox-share.copied{ border-color:var(--accent); color:var(--accent); }
.lightbox-close{
  position:absolute; top:-40px; right:0; background:none; border:none;
  color:var(--paper); font-size:13px; cursor:pointer; letter-spacing:0.1em;
  text-transform:uppercase; font-family:'Courier Prime', monospace;
}

/* ---------- lightbox compare mode ----------
   Used on both pages wherever a print and its source journal sketch
   are shown side by side: the Sketchbook page's "Became [Print]"
   link, and the Prints page's hero plate when it's linked to a
   sketch. A wider frame, two image panes instead of one. */
.lightbox-inner.wide{ max-width:920px; }
.compare-grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.compare-pane img{ width:100%; height:auto; display:block; background:var(--paper-alt); }
.compare-label{
  margin:8px 0 0; font-size:11px; text-align:center; color:var(--ink-soft);
  text-transform:uppercase; letter-spacing:0.08em;
}
.lightbox-sketch-link{
  display:inline-block; margin-top:8px; font-size:11px;
  text-transform:uppercase; letter-spacing:0.08em; color:var(--ink-soft);
  text-decoration:none; border-bottom:1px solid var(--line);
}
.lightbox-sketch-link:hover{ color:var(--ink); border-color:var(--ink); }
@media (max-width: 640px){
  .compare-grid{ grid-template-columns:1fr; gap:14px; }
  .lightbox-inner.wide{ max-width:480px; }
}

/* ---------- shared responsive rules ---------- */
@media (max-width: 880px){
  .footer-grid{grid-template-columns:1fr;}
  /* desktop-only flourish — on tablet/mobile the fish competes with
     thumbs for space and reads as distracting rather than charming */
  .swimming-fish{ display:none; }

  .nav-toggle{ display:flex; }
  .nav ul#navMenu{
    display:flex; flex-direction:column; gap:0;
    position:absolute; top:100%; left:0; right:0;
    background:var(--paper); border-bottom:1px solid var(--line);
    max-height:0; overflow:hidden;
    transition:max-height .25s ease;
  }
  .nav ul#navMenu.open{ max-height:320px; }
  .nav ul#navMenu li{ width:100%; }
  .nav ul#navMenu a.nav-link{
    display:block; padding:16px 20px; border-bottom:1px solid var(--line);
  }
}

@media (max-width: 560px){
  .wrap, .nav{padding-left:20px; padding-right:20px;}
  /* the copyright line and location tag were fighting for the
     same row and overlapping — stack them instead on narrow screens */
  .footer-bottom{flex-direction:column; align-items:flex-start; gap:10px;}

  /* 40px of lightbox padding eats a fifth of a phone's width — and
     the close button needs room above the inner box to stay tappable
     rather than pinned to the very top edge */
  .lightbox{ padding:56px 16px 24px; }
  .lightbox-inner{ padding:18px; }
  .lightbox-close{ top:-34px; }
  .lightbox-meta{ flex-direction:column; align-items:flex-start; gap:12px; }
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  .swimming-fish{ display:none; }
}
