/* v30 — The Pen's Errand · Slender Morris masthead · 1440x420 design, holds 1280–1920
   The winning v25 dress, untouched — v30's one idea lives entirely in ink.js. */

@font-face{
  font-family:'EB Garamond';
  src:url('fonts/ebgaramond.woff2') format('woff2');
  font-weight:400 500; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'EB Garamond';
  src:url('fonts/ebgaramond-italic.woff2') format('woff2');
  font-weight:400; font-style:italic; font-display:swap;
}

:root{
  --ink:#28241c;
  --ink-deep:#1b1812;
  --ink-soft:rgba(40,36,28,.62);
  --bronze:#8a7457;
  --umber:#6E5F4B;
  --paper:#faf7f0;
  --paper-warm:#fffdf6;
  --paper-shade:#f1ebdd;
  --hair:rgba(110,95,75,.30);
}

*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{
  width:100%;height:420px;overflow:hidden;
  background:var(--paper);
  font-family:'EB Garamond',Georgia,serif;
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

.stage{position:relative;width:100%;height:420px;overflow:hidden}

/* ground: warm linen paper, soft daylight from upper left, faint fibre grain */
.paper{
  position:absolute;inset:0;
  background:
    radial-gradient(120% 160% at 18% -8%, var(--paper-warm) 0%, rgba(255,253,246,0) 55%),
    radial-gradient(110% 150% at 88% 118%, var(--paper-shade) 0%, rgba(241,235,221,0) 58%),
    var(--paper);
}
.paper::after{
  content:"";position:absolute;inset:0;opacity:.5;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.055'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode:multiply;
}

/* the daylight breathes across the paper — 64s, subliminal */
.lightdrift{
  position:absolute;inset:-12%;
  background:radial-gradient(55% 80% at 30% 10%, rgba(255,252,240,.55) 0%, rgba(255,252,240,0) 60%);
  animation:drift 64s ease-in-out infinite alternate;
  pointer-events:none;
}
@keyframes drift{
  from{transform:translate3d(-2.2%,0,0)}
  to{transform:translate3d(2.6%,1.2%,0)}
}
/* once every ~46s a soft pass of daylight crosses the paper — subliminal */
.sheen{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.sheen::after{
  content:"";position:absolute;top:-20%;bottom:-20%;left:0;width:38%;
  background:linear-gradient(100deg, rgba(255,252,240,0) 0%, rgba(255,252,240,.5) 50%, rgba(255,252,240,0) 100%);
  opacity:.11;
  transform:translateX(-120%) skewX(-8deg);
  animation:sheen 46s ease-in-out infinite;
}
@keyframes sheen{
  0%{transform:translateX(-120%) skewX(-8deg)}
  42%{transform:translateX(320%) skewX(-8deg)}
  100%{transform:translateX(320%) skewX(-8deg)}
}
@media (prefers-reduced-motion: reduce){
  .lightdrift{animation:none}
  .sheen::after{animation:none;opacity:0}
}

canvas{position:absolute;inset:0;pointer-events:none}

.frame{
  position:relative;height:100%;
  max-width:1680px;margin:0 auto;
}

.visually-hidden{
  position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;
}

/* ————— the desk: microcopy, search, tools ————— */
.desk{
  position:absolute;
  top:104px;right:76px;width:470px;
}

.micro{
  font-size:14.5px;letter-spacing:.22em;text-transform:uppercase;
  color:#4b4134;font-weight:500;
  margin-bottom:24px;
  font-weight:500;
}

.searchForm{
  position:relative;
  display:flex;align-items:baseline;gap:14px;
  padding:0 0 14px 34px; /* room for the inked rule below, lens at left */
}
.lens{display:inline-block;width:0;height:0}

#query{
  flex:1;min-width:0;
  font-family:'EB Garamond',Georgia,serif;
  font-size:24.5px;color:var(--ink-deep);
  background:transparent;border:0;outline:0;
  padding:2px 0 4px;
  caret-color:var(--ink);
}
#query::placeholder{
  font-style:italic;color:var(--ink-soft);opacity:1;
}

.go{
  font-family:'EB Garamond',Georgia,serif;
  font-size:12.5px;font-weight:500;
  letter-spacing:.24em;text-transform:uppercase;
  color:var(--ink);background:none;border:0;cursor:pointer;
  padding:2px 26px 2px 2px; /* right room for the drawn arrow */
  transition:color .25s ease;
}
.go:hover{color:var(--ink-deep)}

.tools{
  margin-top:46px;
  display:flex;gap:24px;align-items:baseline;flex-wrap:nowrap;
}
.tools a{
  font-style:italic;font-size:21.5px;
  color:var(--ink);text-decoration:none;
  padding-bottom:5px;
  transition:color .25s ease;
}
.tools a::after{
  content:'\2197';
  font-style:normal;font-size:11px;
  margin-left:7px;color:var(--bronze);
  transition:transform .3s ease, color .25s ease;
  display:inline-block;
}
.tools a:hover{color:var(--ink-deep)}
.tools a:hover::after{color:var(--ink-deep);transform:translate(2px,-2px)}

/* seat the masthead against the portal below */
.baseline-rule{
  position:absolute;left:0;right:0;bottom:0;height:1px;
  background:linear-gradient(90deg, rgba(110,95,75,0) 0%, var(--hair) 18%, var(--hair) 82%, rgba(110,95,75,0) 100%);
}


/* wide desks for wide screens (desktop-only page; the owner judges at ~2000px) */
@media (min-width:1720px){
  .desk{width:640px;right:60px;top:92px}
  .micro{font-size:17px;margin-bottom:30px;letter-spacing:.24em}
  #query{font-size:29px}
  .go{font-size:16px;letter-spacing:.26em}
  .tools{margin-top:56px;gap:34px}
  .tools a{font-size:26px}
}


/* placeholder: darker ink, breathing softly (Matthew, live tune) */
#query::placeholder{color:rgba(33,29,23,.8);animation:phBreathe 4.4s ease-in-out infinite}
@keyframes phBreathe{0%,100%{opacity:.66}50%{opacity:1}}
@media (prefers-reduced-motion: reduce){#query::placeholder{animation:none;opacity:.85}}


/* ————— phones & small tablets (<900px): the stacked composition —————
   Mobile amendment, 9 Jul 2026. One page, one iframe: below 900px the slogan
   owns the full width (laid out by the isMobile branch in ink.js) and the desk
   stacks beneath it, tools dropped by the owner's explicit call. At ≥900px
   nothing in this block exists — the desktop composition is untouched. */
@media (max-width:899px){
  .desk{top:296px;right:20px;left:20px;width:auto}
  .micro{font-size:10.5px;letter-spacing:.18em;margin-bottom:12px}
  .searchForm{padding:0 0 12px 30px;gap:10px}
  #query{font-size:17px}  /* ≥16px: stops iOS zooming the page on focus */
  .go{font-size:11px;letter-spacing:.2em;padding:2px 24px 2px 2px}
  .tools{display:none}
}
