/* The hall (preview): the pages with text (About, Tools, Writing, Social media, Contact).
   These pages keep the live site's own markup and load its stylesheet (assets/site.css) first, so their
   lettering is the live site's. This file comes last and adds the hall: the canvas behind everything,
   the bar along the top, the contents of the page on the left, lighter and larger headings, and clear
   panels so the hall shows through. Everything sits inside "@media screen", so printing still uses the
   site's print styles. */
@media screen {
  :root {
    --bg: #08080a; --card: rgba(10, 10, 12, .88); --card-hover: rgba(22, 22, 25, .92);
    --line: rgba(245, 243, 238, .13); --line-2: rgba(245, 243, 238, .3);
    --ink: #f5f3ee; --text: #cdcac4; --soft: #b1aea7; --muted: #918e87;
  }
  html { background: #08080a; scroll-padding-top: 96px; }
  .has-rail { scroll-padding-bottom: 84px; }   /* so a link reached with the keyboard is not left under the line along the bottom */
  body { font-size: 17px; line-height: 1.65; }

  /* the hall is dimmer behind text, darkest on the side the words are on */
  .stage::after { background: linear-gradient(90deg, rgba(8, 8, 10, .8) 0%, rgba(8, 8, 10, .58) 55%, rgba(8, 8, 10, .36) 100%); }
  /* the page slides under the bar along the top, so the bar gets a dark band that fades out below it */
  .hud::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 96px; pointer-events: none;
    background: linear-gradient(#08080a 0%, #08080a 62%, rgba(8, 8, 10, 0) 100%); }
  .menu-open .hud::before { display: none; }

  .page, .end { position: relative; z-index: 2; }
  .page { padding-top: 64px; }
  /* every section opens with room around its heading, so the gate it stands behind in the hall can be seen */
  .page .sec { padding-top: clamp(96px, 17vh, 190px); }
  .page .sec-first { padding-top: clamp(56px, 9vh, 110px); }
  .page .feature { margin-bottom: clamp(72px, 13vh, 150px); padding-bottom: clamp(72px, 13vh, 150px); }

  /* ---------- Things that move with the hall ----------
     stage.js draws the headings in the first time they come into view (class "hall-on" on <html> while that is
     running), and brightens each picture when the travelling points reach it. */
  .hall-on .page-hero h1, .hall-on .sec-h h2, .hall-on .feature h2, .hall-on .next a { clip-path: inset(-12% 100% -12% 0); }
  .hall-on .page-hero h1.seen, .hall-on .sec-h h2.seen, .hall-on .feature h2.seen, .hall-on .next a.seen { animation: lab-wipe .95s cubic-bezier(.2, .7, .2, 1) both; }
  /* Contact: the character the points form, and the button that copies the address */
  .glyph-spot { width: 190px; height: 190px; margin: 0 auto 8px; }
  /* when the points cannot be drawn (no graphics, no scripts, or reduced motion) the place for them takes no room */
  .no-gl .glyph-spot, html:not(.js) .glyph-spot { display: none; }
  @media (prefers-reduced-motion: reduce) { .glyph-spot { display: none; } }
  .copy { display: block; margin: 18px 0 0; padding: 10px 14px; background: none; border: 1px solid var(--line-2); border-radius: 4px; cursor: pointer; font: 500 14px/1 var(--sans); color: var(--ink); vertical-align: middle; transition: border-color .15s; }
  .copy:hover { border-color: var(--ink); }

  /* ---------- The line along the bottom: the page's sections, and where you are ----------
     A mark for each section, a square that moves with the page, and the name of the section you are in under it. */
  .foot-page { position: fixed; z-index: 5; left: var(--edge); right: var(--edge); bottom: 6px; border-top: 0; pointer-events: none; }   /* (no top border: the live site's footer rule has the same class name) */
  .foot-page::before { content: ""; position: absolute; z-index: -1; left: -100vw; right: -100vw; bottom: -20px; top: -12px; pointer-events: none;
    background: #08080a; border-top: 1px solid var(--line); }
  .foot-page .rail { pointer-events: auto; cursor: pointer; }
  /* the points here are well apart, so each one's catch area is wide and reaches down past the name under the line */
  .foot-page .rail i::before { left: -18px; right: -18px; top: -14px; bottom: -26px; }
  .rail-now { position: absolute; top: 20px; transform: translateX(-50%); white-space: nowrap; font: 500 12.5px/1.2 var(--sans); color: var(--ink); }
  .rail-now.at-start { transform: none; }
  .rail-now.at-end { transform: translateX(-100%); }
  .page { padding-bottom: 0; }
  .has-rail .end { padding-bottom: 64px; }
  /* links inside the text keep the site's underline (the bar's own links have none) */
  :where(.page, .end) a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(245, 243, 238, .45); text-underline-offset: 4px; }
  :where(.page, .end) a:hover { text-decoration-color: var(--ink); }

  /* ---------- Lime for the small words that say where you are or what you can do; titles and reading text stay white ---------- */
  .page .label { color: var(--accent); }
  .page .btn-light { background: var(--accent); color: #0a0a0b; }
  .page .btn-light:hover { background: #d8ff66; }
  .page .more::after, .page .card-go::after, .page .rows a.ext .row-d::after, .next a::after { color: var(--accent); }
  :where(.page, .end) a:hover { text-decoration-color: var(--accent); }
  .copy:hover { border-color: var(--accent); }

  /* ---------- Headings: light, large, tight ---------- */
  .page .page-hero { padding-top: clamp(28px, 5vw, 72px); border-bottom: 0; }
  /* Every page opens on its title alone, with the hall and the first gate ahead; the page itself starts on the next
     screen. (Contact is short, so its address stays on the first screen.) */
  .page:not(.page-contact) .page-hero { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 150px); min-height: calc(100svh - 150px); padding-bottom: clamp(48px, 10vh, 120px); }
  .page:not(.page-contact) .page-hero > .wrap { width: 100%; }
  .page:not(.page-contact) .sec-first { padding-top: clamp(40px, 7vh, 90px); }
  .page .page-hero h1 { max-width: 13em; font-weight: 300; font-size: clamp(44px, 6.6vw, 96px); line-height: .98; letter-spacing: -.04em; }
  .page .page-hero .lead { color: var(--text); }
  .page .sec-h h2, .page .feature h2, .page .shelf-item h3, .page .card-t, .page .xp h3, .page .role h3,
  .page .areas h3, .page .mail, .page .row-t, .page .pub-t { font-weight: 300; }
  .page .sec-h h2 { font-size: clamp(34px, 4.4vw, 60px); letter-spacing: -.035em; }
  .page .feature h2 { font-size: clamp(38px, 4.6vw, 62px); letter-spacing: -.035em; }
  .page .mail { font-size: clamp(27px, 4.6vw, 62px); }
  .page .prose-lg { color: var(--ink); }
  .page .feature-img { background: none; border-color: var(--line-2); }
  .page .about-photo { top: 112px; }

  /* ---------- Links that leave the site carry a slanted arrow (stage.js marks them with the class "ext") ---------- */
  .page :where(p, li, dd, figcaption) > a.ext::after, .end-links a.ext::after { content: "\00a0\2197"; font-size: .82em; }
  .page .btn.ext::after { content: "\2197"; margin-left: .6em; }
  .page .more.ext::after, .page .card:has(a.card-link.ext) .card-go::after { content: "\2197"; }
  .page .rows a.ext::after { content: none; }   /* a row carries its arrow after the note on the right, not after the whole row */
  .page .rows a.ext .row-d::after { content: "\00a0\00a0\2197"; color: var(--ink); }

  /* ---------- "Next" at the foot of every page ---------- */
  .next { margin-top: clamp(72px, 9vw, 120px); padding: 34px 0 clamp(64px, 8vw, 104px); border-top: 1px solid var(--line); }
  .next a { display: inline-block; margin-top: 14px; font: 300 clamp(44px, 7vw, 104px)/1 var(--serif); letter-spacing: -.04em; text-decoration: none; }
  .next a::after { content: "\2192"; display: inline-block; margin-left: .22em; font-size: .62em; transition: transform .2s; }
  .next a:hover::after { transform: translateX(8px); }
  .page .sec-last { padding-bottom: 0; }

  /* ---------- Footer ---------- */
  .end { border-top: 1px solid var(--line); font: 400 15px/1.6 var(--sans); color: var(--soft); }
  .end-in { padding: 36px var(--gut) 34px; }
  .end-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 32px; }
  .end-name { font: 400 22px/1 var(--serif); letter-spacing: -.015em; color: var(--ink); }
  .end-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
  .end-links a { position: relative; padding: 8px 0; font-weight: 500; color: var(--soft); text-decoration: none; }
  .end-links a::before { content: ""; position: absolute; inset: 0 -12px; }   /* a short link ("X") is still easy to tap */
  .end-links a:hover { color: var(--ink); }
  .end-clock { margin-left: auto; font-size: 14px; color: var(--muted); }
  .end-note { max-width: 62em; margin-top: 22px; font-size: 14px; color: var(--muted); }
  .end-copy { margin-top: 10px; font-size: 14px; color: var(--muted); }

  /* ---------- A phone held upright: the line sits under the top bar ----------
     (the bottom strip of a phone's screen belongs to the browser's own bar, and taps there do not reach the page).
     The dark band behind the top bar grows to hold it, and the page starts lower. Only on pages that have a line. */
  @media (max-width: 699px) and (max-aspect-ratio: 999/1000) {
    .foot-page { z-index: 7; top: 56px; bottom: auto; }
    .foot-page::before { display: none; }
    .foot-page .rail { height: 40px; }
    .foot-page .rail i::before { top: -8px; bottom: -28px; }
    .menu-open .foot-page { visibility: hidden; }
    .has-rail { scroll-padding-top: 132px; scroll-padding-bottom: 0; }
    .has-rail .hud::before { height: 140px; background: linear-gradient(#08080a 0%, #08080a 74%, rgba(8, 8, 10, 0) 100%); }
    .has-rail .page { padding-top: 104px; }
    .has-rail .end { padding-bottom: 28px; }
  }

  /* ---------- Wide screens: the contents sit on the left, the page to their right ---------- */
  @media (min-width: 900px) and (min-aspect-ratio: 1/1) and (min-height: 500px) {
    html { scroll-padding-top: 112px; }
    .page { padding-top: 88px; }
    .page .wrap, .end-in { max-width: 1340px; margin: 0; padding-left: clamp(250px, 20vw, 330px); padding-right: clamp(24px, 4vw, 72px); }
    html:not(.js) .page .wrap, html:not(.js) .end-in { padding-left: clamp(24px, 4vw, 72px); }
    .hud-index { max-height: calc(100vh - 140px); overflow: auto; scrollbar-width: none; }
    .hud::before { height: 120px; background: linear-gradient(#08080a 0%, #08080a 60%, rgba(8, 8, 10, 0) 100%); }
    .foot-page { left: 50%; right: auto; bottom: 14px; width: min(620px, 52vw); transform: translateX(-50%); }
    .rail-now { font-size: 13px; }
    .glyph-spot { float: right; width: min(26vw, 330px); height: min(26vw, 330px); margin: clamp(-280px, -24vh, -150px) 0 20px 48px; }
  }
}
@media print {
  :root { --bg: #fff; --ink: #000; --text: #222; --dim: #555; --rule: #999; --hair: #ccc; }
  html { background: #fff; color: #222; }
  .stage, .hud, .next, .end-links, .end-clock, .door, .way, .foot-page, .glyph-spot, .copy { display: none !important; }
  .about-photo, .feature-img, .guide-cover, .social-shot, .shot a { opacity: 1 !important; }   /* a picture the points had not reached yet still prints at full strength */
}
