/* The Journal: a broadsheet in the Nomad palette. No shadows, no gradients. */
:root{
  --cream:#f2ecdf;--ink:#1c1915;--stone:#d8cfbc;--red:#c8232c;--red-deep:#a01b23;
  --butter:#e8c15c;--olive-deep:#454128;
  --serif:'Fraunces',Georgia,serif;
  --sans:'Archivo',Helvetica,sans-serif;
  --mono:'JetBrains Mono',Menlo,monospace;
  --gutter:clamp(16px,4vw,48px);
  --rule:1px solid var(--ink);
  --hair:1px solid var(--stone);
}
@view-transition{navigation:auto}
@media (prefers-reduced-motion:reduce){
  @view-transition{navigation:none}
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-padding-top:72px}
body{
  background:var(--cream);color:var(--ink);font-family:var(--sans);
  font-size:17px;line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:clip;
}
img{display:block;width:100%;height:auto;object-fit:cover;background:var(--stone)}
a{color:inherit;text-decoration:none}
a:focus-visible{outline:2px solid var(--red);outline-offset:3px}

/* top bar */
.topbar{
  position:sticky;top:-61px;z-index:20;background:var(--cream);border-bottom:var(--rule);   /* scrolls off like a section, then waits just above the screen */
  height:60px;padding:0 var(--gutter);
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  transition:top .25s ease;
}
/* autohide-nav.js: slides back in when the page scrolls up */
html{--navtop:0px}
html.nav-shown{--navtop:60px}
html.nav-shown .topbar{top:0}
@media (prefers-reduced-motion: reduce){ .topbar,.masthead,.jlead{transition:none!important} }
.tb-home{display:flex;align-items:center;gap:10px;flex:none}
.tb-home img{width:auto;height:26px;background:none}
.tb-home span{
  font-size:10px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;
}
.topbar nav{display:flex;align-items:center;gap:clamp(14px,3vw,28px)}
.tb-book,.tb-close{
  font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;
}
.tb-book{color:var(--red)}
.tb-book:hover{color:var(--red-deep)}
.tb-close span{display:inline-block;margin-left:6px;font-size:15px;line-height:1;vertical-align:-1px}
.tb-close:hover{color:var(--red)}

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

/* masthead */
/* the masthead's rules: thick over thin */
.masthead::before,.masthead::after,.mini-mast::before,.mini-mast::after{content:'';display:block;height:5px;box-sizing:border-box;border-top:2.5px solid var(--ink);border-bottom:1px solid var(--ink)}
.masthead{position:relative;display:flex;flex-direction:column;padding:14px 0 0}
/* The folded corner sits on the masthead, so it stays with it while the page scrolls. The sheet's
   box-shadow is square, so this patch repaints the corner: the background, and over it a sheet with the
   corner cut off, casting the same shadow, so that the shadow follows the fold. The cut-out keeps the
   patch off the rest of the sheet; only its seams touch the square shadow, where the two match */
.jp-fold{
  --t:var(--edge);--o:var(--edge);--l:60px;--b:60px;--f:var(--fold);
  position:absolute;z-index:2;top:calc(var(--t) * -1);right:calc(clamp(14px,3.4vw,40px) * -1 - var(--o));
  width:calc(var(--l) + var(--f) + var(--o));height:calc(var(--t) + var(--f) + var(--b));
  background:#e5dabf;pointer-events:none;
  /* its far edges fade out, so it melts into the square shadow around it */
  -webkit-mask:linear-gradient(to right,transparent,#000 50px),linear-gradient(to top,transparent,#000 50px);-webkit-mask-composite:source-in;
  mask:linear-gradient(to right,transparent,#000 50px),linear-gradient(to top,transparent,#000 50px);mask-composite:intersect;
  clip-path:polygon(0 0,100% 0,100% 100%,calc(100% - var(--o)) 100%,calc(100% - var(--o)) calc(100% - var(--b)),
    calc(100% - var(--o) - var(--f)) calc(100% - var(--b)),calc(100% - var(--o) - var(--f)) var(--t),0 var(--t));
}
.jp-fold span{position:absolute;inset:0;filter:drop-shadow(0 0 15px rgba(28,25,21,.5))}
.jp-fold span::before{
  content:'';position:absolute;top:var(--t);right:var(--o);width:calc(100% + 100px);height:calc(100% + 100px);
  background:var(--cream);clip-path:polygon(0 0,calc(100% - var(--f)) 0,100% var(--f),100% 100%,0 100%);
}
.jp-fold::after{
  content:'';position:absolute;top:var(--t);right:var(--o);width:var(--f);height:var(--f);
  background:var(--stone);clip-path:polygon(0 0,100% 100%,0 100%);
}
.masthead::after{order:1}
.masthead::after,.mini-mast::after{border-top:1px solid var(--ink);border-bottom:2.5px solid var(--ink)}   /* the bottom pair mirrors the top one */
.masthead h1{
  font-family:var(--serif);font-weight:900;font-style:italic;text-align:center;
  font-size:7.05vw;line-height:1;letter-spacing:-.015em;
  padding:calc(.344em - 2px) 0 calc(.268em - 2px);border-bottom:1px solid var(--ink);   /* same optical gap above the capitals and below the baseline */
}
/* the skateboarding dog rolls along the rule under the name */
/* side columns of equal width keep the name centered and the dog and the wine halfway between each margin and the name */
.mh-brand{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end}
.mh-dog,.mh-wine{justify-self:center;width:1.57em;height:auto;margin-bottom:calc(8px - .268em);background:none}
.mh-wine{grid-column:3;width:.885em}
.mh-name{grid-column:2}
.mh-line{
  display:flex;justify-content:space-between;gap:16px;
  font-family:var(--mono);font-size:6px;line-height:1;text-transform:uppercase;letter-spacing:.06em;
  padding:1px 0;
}
/* box trimmed to the capitals, so the text sits dead center in every browser */
.mh-line>span,.jbanner{text-box:trim-both cap alphabetic}
.d-short{display:none}
/* black banner under the masthead; the frame's side lines drop from its two ends */
.jbanner{
  order:2;margin-top:8px;padding:3.5px 8px;background:var(--ink);color:var(--cream);text-align:center;
  font-family:var(--serif);font-weight:600;font-size:clamp(6.5px,1.75vw,8.5px);line-height:1;
  text-transform:uppercase;letter-spacing:.08em;
}
.jbody{position:relative;padding:0 clamp(10px,1.6vw,20px);border-left:var(--rule);border-right:var(--rule)}

/* shared story pieces */
.rubric{
  font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--red);
}
.meta{font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:.02em;color:#5f584b}
.dek{font-family:var(--serif);line-height:1.4}
article a{display:block}
article a:hover h2,article a:hover h3{color:var(--red)}
h2,h3{font-family:var(--serif);font-weight:600;letter-spacing:-.012em;transition:color .15s ease}

/* front page: two columns that run independently, so the eye zigzags down the page */
/* the paper: a sheet on the dark page, with its top right corner folded over */
body:has(.front){background:#e5dabf}
.front{
  --edge:clamp(10px,2.6vw,36px);--fold:clamp(24px,3vw,40px);
  position:relative;width:calc(100% - var(--edge) * 2);max-width:1120px;margin:var(--edge) auto 0;
  padding:0 clamp(14px,3.4vw,40px);background:var(--cream);
  isolation:isolate;box-shadow:0 0 30px rgba(28,25,21,.5);   /* soft, like the Why Nomad cards */
}
.spread{
  --gap:clamp(14px,3.4vw,40px);
  position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:calc(var(--gap) * 2);
}
.spread .col{display:flex;flex-direction:column}
.spread::before{content:'';position:absolute;top:0;bottom:0;left:50%;border-left:var(--rule)}
.spread .card{padding:var(--gap) 0 calc(var(--gap) + 4px);border-bottom:var(--rule)}
.spread .col>:last-child{border-bottom:0}
.spread .card img{aspect-ratio:4/3;margin-bottom:clamp(12px,1.8vw,18px)}
.spread .card h2{
  font-weight:400;letter-spacing:-.008em;overflow-wrap:break-word;
  font-size:clamp(19px,3.3vw,36px);line-height:1.2;margin:clamp(8px,1.2vw,12px) 0 clamp(12px,1.6vw,16px);
}
.spread .rubric{color:var(--ink);font-weight:600;font-size:clamp(10px,1.4vw,12px)}
.spread a:hover .rubric{color:var(--red)}
/* Nomad's ad in the paper */
.nad{padding:var(--gap) 0 calc(var(--gap) + 4px);border-bottom:1px solid var(--ink)}
/* a printed ad: fills the rest of its column on desktop, the picture centered on its own paper color */
.nad-fill{border-bottom:0}
.nad-print{background:#eeebe2;border:1px solid var(--ink)}
.nad .nad-print img{display:block;width:100%;height:auto;margin:0}
.nad-label{
  margin:0 0 5px;text-align:center;font-family:var(--mono);font-size:7.7px;line-height:1;
  text-transform:uppercase;letter-spacing:.06em;max-width:none;
}
.nad-card{position:relative;isolation:isolate;display:block;aspect-ratio:9/16;overflow:hidden;color:var(--cream);text-decoration:none;border:1px solid var(--ink)}
.nad .nad-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:56% center;margin:0;aspect-ratio:auto}
.nad-card::after{content:'';position:absolute;inset:0;background:rgba(28,25,21,.28)}
.nad-body{
  position:absolute;z-index:1;inset:0;padding:12px;display:flex;flex-direction:column;align-items:center;
  gap:10px;text-align:center;
}
/* centered between the top of the photo and where the lamp starts */
.nad .nad-logo{position:absolute;top:9.7%;left:50%;transform:translate(-50%,-50%);width:62%;height:auto;margin:0;aspect-ratio:auto;background:none}
.nad-line{margin-top:auto;text-shadow:0 1px 10px rgba(28,25,21,.65);font-family:var(--serif);font-weight:900;font-size:clamp(15px,4.4vw,26px);line-height:1;letter-spacing:-.015em}
.nad-line em{font-style:italic;font-weight:600;color:var(--butter)}
.nad-btn{
  padding:6px 10px;border:1.5px solid var(--ink);border-radius:999px;background:var(--butter);color:var(--ink);
  font-family:var(--sans);font-size:9px;font-weight:700;line-height:1;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;
}
.nad-card:hover .nad-btn{background:var(--mustard)}
@media (max-width:900px){.nad-btn{display:none}}
.jlead,.book-band.only-desktop{display:none}

/* shared card */
.card img{aspect-ratio:4/3;margin-bottom:14px}
.card h3{font-size:clamp(21px,1.9vw,25px);line-height:1.14;margin:8px 0 10px}

/* post */
.mini-mast{
  display:block;padding:14px 0 0;text-align:center;
  font-family:var(--serif);font-weight:900;font-style:italic;letter-spacing:-.015em;
  font-size:clamp(23px,7.05vw,35px);line-height:1;
}
.mini-mast::before{margin-bottom:calc(.344em - 2px)}
.mini-mast::after{margin-top:calc(.268em - 2px)}
.post-head{max-width:920px;margin:0 auto;text-align:center;padding:clamp(32px,5vw,64px) 0 clamp(24px,3vw,36px)}
.post-head h1{
  font-family:var(--serif);font-weight:600;letter-spacing:-.018em;
  font-size:clamp(38px,6vw,78px);line-height:1.03;margin:16px 0 18px;
  overflow-wrap:break-word;
}
.post-image{aspect-ratio:16/9;max-width:1100px;margin:0 auto}
.post-body{
  max-width:66ch;margin:0 auto;padding:clamp(32px,5vw,56px) 0 clamp(40px,6vw,72px);
  font-family:var(--serif);font-size:clamp(18px,1.6vw,20px);line-height:1.62;
}
.post-body p{margin-bottom:1.05em}
.post-body>p:first-of-type::first-letter{
  float:left;font-weight:900;color:var(--red);font-size:4.4em;line-height:.82;
  padding:.06em .08em 0 0;
}
.post-body ul{margin:0 0 1.05em 1.2em}
.post-body li{margin-bottom:.3em}
.post-body li p{margin:0}
.signoff{
  margin-top:2em;font-family:var(--sans);font-size:12px;font-weight:600;
  letter-spacing:.14em;text-transform:uppercase;
}
.signoff span{color:var(--red);margin-right:6px}
.more{border-top:var(--rule);padding:22px 0 clamp(32px,5vw,56px)}
.more-title{
  font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:.04em;margin-bottom:18px;
}
.three{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(20px,3vw,40px)}

/* closing bands */
.book-band{
  background:var(--red);color:var(--cream);padding:clamp(36px,5vw,60px) var(--gutter);
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:20px clamp(24px,4vw,48px);
  text-align:center;
}
.bb-title{font-family:var(--serif);font-weight:600;font-size:clamp(30px,4.4vw,54px);line-height:1.05}
.bb-btn{
  background:var(--cream);color:var(--ink);border-radius:999px;padding:13px 28px;
  font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
}
.bb-btn:hover{background:var(--butter)}
.jfoot{
  background:var(--ink);color:var(--cream);padding:18px var(--gutter);
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px 24px;
  font-family:var(--mono);font-size:11px;text-transform:uppercase;
}
.jfoot a:hover{color:var(--butter)}

@media (max-width:760px){
  body{font-size:16px}
  .tb-home span{display:none}
  .tb-book,.tb-close{font-size:11px;letter-spacing:.05em}
  .mh-line{font-size:5px}
  .spread .meta .sep{display:none}
  .spread .meta time,.spread .meta span{display:block}
  .three{grid-template-columns:1fr}
  .post-image{aspect-ratio:3/2}
}
@media (max-width:460px){
  .tb-book{display:none}
  .tb-home img{height:22px}
}
@media (max-width:900px){
  .d-long{display:none}
  .d-short{display:inline}
}
/* desktop front: the newest post stays on the left half while the page scrolls the
   two columns on the right. Plain sticky, so it works wherever the mouse is */
@media (min-width:901px){
  .only-mobile{display:none}
  .book-band.only-desktop{display:flex}
  .front{--fold:clamp(48px,6vw,80px)}
  /* the masthead keeps the proportions of the phone held sideways (measured at 844px wide, rule 743px): --r is the
     width of the rules, which stops growing with the sheet at 1320px, and every size below is a share of it, except the date row, kept readable.
     The rules themselves and the 14px above them stay fixed. */
  .front{--r:calc(min(100vw - 2 * var(--edge),1320px) - 2 * clamp(14px,3.4vw,40px));--lf:clamp(11px,calc(var(--r) * .0105),13px);--mast:calc(var(--r) * .1519 + var(--lf) * 1.064 + 29px);--rest:calc(100vh - var(--mast));max-width:1320px}
  /* the margin (cancelled by the one on .jbody) lets the masthead go up together with the left half */
  .front .masthead{
    position:sticky;top:var(--navtop);z-index:1;height:var(--mast);padding:14px 0 0;background:var(--cream);margin-bottom:var(--rest);transition:top .25s ease;
  }
  .front .masthead h1{font-size:calc(var(--r) * .0801);font-variation-settings:'opsz' 59.5;padding:.3104em 0 .2344em}
  .front .mh-dog,.front .mh-wine{margin-bottom:calc(20px - .1336em)}
  .mh-line{font-size:var(--lf);padding:calc(.167em + 2px) 0}
  .front .jbanner{margin-top:calc(var(--r) * .0108);padding:.412em 8px;font-size:calc(var(--r) * .0114)}
  .jbody{
    --split:clamp(32px,4vw,64px);
    position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--split);
    margin-top:calc(var(--rest) * -1);
  }
  .jbody::before{content:'';position:absolute;top:0;bottom:0;left:50%;border-left:var(--rule)}
  .jlead{
    display:block;position:sticky;top:calc(var(--navtop) + var(--mast));
    height:var(--rest);padding:24px 0;transition:top .25s ease;   /* same size with or without the header, which just pushes it down */
  }
  .jlead a{display:flex;flex-direction:column;height:100%;gap:18px}
  .jlead img{flex:1 1 0;height:0;min-height:120px}
  .jlead a:hover h2{color:var(--red)}
  .jlead h2{font-weight:400;font-size:clamp(30px,3.2vw,46px);line-height:1.1;margin:10px 0 12px}
  .jl-excerpt{
    font-family:var(--serif);font-size:18px;line-height:1.5;margin-bottom:12px;
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;
  }
  .spread{--gap:24px}
  .nad-fill{flex:1;display:flex;flex-direction:column}
  .nad-print{flex:1;position:relative;min-height:320px}
  .nad .nad-print img{position:absolute;inset:0;height:100%;object-fit:contain}
  .spread .card h2{font-size:clamp(20px,1.75vw,26px)}
  .spread .rubric{font-size:11px}
  .nad-card{aspect-ratio:2/3}
}
/* short windows: the taller masthead leaves less room, so the lead post's excerpt gives up two lines */
@media (min-width:901px) and (max-height:760px){
  .jl-excerpt{-webkit-line-clamp:2}
}
