/* meaghanmalone.com: the bridge
   The journal, posts, the bookshelf, the design studio (/design), the portfolio, and the résumé were
   built in an earlier look (plum ink, jewel tones, frosted glass). Their stylesheets still do the layout,
   in the `legacy` layer. This file sits on top and gives them the site's black and white:
   it points the old color and font names at the new ones, turns the glass into paper, and restyles the
   few things (buttons, labels, pills) that should match the photography pages exactly.
   Load order on those pages: css/site.css, the page's own stylesheets, then this file. */

/* ---------- old names, new values ---------- */
:root, .gl {
  /* paper and ink */
  --paper2: var(--paper-2); --bg: var(--paper); --panel: var(--paper-2); --band: var(--paper-2);
  --wall: var(--paper-2); --check: var(--paper); --chip: var(--paper-2);
  --ink2: var(--ink-2); --ink3: var(--ink-3);
  --navy: var(--ink); --plum: var(--ink); --dark: var(--ink); --accent-deep: var(--ink);
  --brick: var(--berry); --wine: var(--berry-2); --accent: var(--berry); --accent-text: var(--berry-2);
  --rule: var(--line); --line-strong: var(--line-2); --on-plum: var(--paper);
  /* the jewel tones become a family of grays (subject dots, tints, book cloth) */
  --blue: #4D4D4D; --coral: #6B6B6B; --blush: #707070; --lavender: #6C6C6C; --mustard: #A6A6A6; --sage: #696969;
  /* the six-color ribbon becomes one quiet gray line; the era colors become grays */
  --e0: #A6A6A6; --e1: #6B6B6B; --e2: #3A3A3A; --e3: #707070; --e4: #CFCFCF; --e5: #696969;
  --ribbon: linear-gradient(90deg, var(--berry), var(--berry));
  /* type: Cormorant for headlines, EB Garamond for reading, Jost for small labels */
  --slab: var(--serif-d); --display: var(--serif-d); --label: var(--serif-d);
  --read: var(--serif); --ui: var(--serif); --sans: var(--serif);
  --mono: var(--caps);
  --track: .2em;
  --radius: 3px; --r-img: 3px;
  --wrap: var(--max); --gutter: var(--pad);
}
.gl {
  --g-paper: var(--paper); --g-paper2: var(--paper-2);
  --g-ink: var(--ink); --g-ink2: var(--ink-2); --g-ink3: var(--ink-3);
  --g-plum: var(--ink); --g-wine: var(--berry-2); --g-brick: var(--berry); --g-brass: var(--brass);
  --g-line: var(--line);
  --g-serif: var(--serif-d); --g-read: var(--serif); --g-sans: var(--serif); --g-mono: var(--caps);
  --g-ribbon: linear-gradient(90deg, var(--berry), var(--berry));
  --g-ribbon-v: linear-gradient(180deg, var(--berry), var(--berry));
  background: var(--paper);
}
/* Everywhere but the portfolio and résumé, the frosted glass becomes paper: a thin line, a little lift,
   square corners, no blur. */
.gl:not(.pf) {
  --glass-bg: color-mix(in srgb, #fff 42%, transparent);
  --glass-brd: var(--line);
  --glass-blur: none;
  --glass-shadow: none;
  --r-lg: 3px; --r-md: 3px; --r-sm: 3px;
}
/* The portfolio and résumé keep their glass and round corners, over a soft gray field instead of a violet one. */
body.pf.gl {
  --glass-brd: rgba(255,255,255, .8);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255, .9), 0 0 0 1px rgba(0,0,0, .05), 0 18px 48px -28px rgba(0,0,0, .4);
  background:
    radial-gradient(62vmax 62vmax at -8% -14%, rgba(179,179,179, .42), rgba(179,179,179, 0) 70%),
    radial-gradient(52vmax 52vmax at 108% 2%, rgba(143,143,143, .2), rgba(143,143,143, 0) 70%),
    radial-gradient(60vmax 60vmax at 18% 118%, rgba(205,205,205, .55), rgba(205,205,205, 0) 70%),
    var(--paper);
  background-attachment: fixed;
}
html { background: var(--paper); }
body.gl { color: var(--ink); font-family: var(--serif); font-size: 1.125rem; line-height: 1.65; }
body.gl:not(.pf) { background: var(--paper); }
@media (max-width: 560px) { body.gl { font-size: 1.0625rem; } }
.gl ::selection { background: var(--tone-camel); color: var(--ink); }
.gl :focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; }
.aurora { display: none; }

/* page content lines up with the header and footer */
.gl .wrap { max-width: calc(var(--max) + 2 * var(--pad)); padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- buttons, labels, and pills match the photography pages ---------- */
.gl .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font: 500 .7rem/1 var(--caps); letter-spacing: .22em; text-transform: uppercase; text-decoration: none;
  padding: 1.05rem 1.7rem; border-radius: 999px;
}
.gl:not(.pf) .btn { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); box-shadow: none; transition: background .25s, border-color .25s, color .25s; }
.gl:not(.pf) .btn:hover { background: var(--berry-2); border-color: var(--berry-2); color: #fff; transform: none; box-shadow: none; }
.gl:not(.pf) .btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.gl:not(.pf) .btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gl .btn.small { padding: .85rem 1.3rem; }
.gl .kicker { font: 500 .7rem/1.3 var(--caps); letter-spacing: .22em; text-transform: uppercase; color: var(--berry); }

/* the small light in a page label, the lavender subject, and other spots that named a jewel color outright */
.gl .page-top .hand::before, .gl .page-top .kicker::before, .gl.labs-page .hero-grid > div:first-child > .kicker::before { background: var(--berry); box-shadow: 0 0 0 3px color-mix(in srgb, var(--berry) 18%, transparent); }
.c-lavender { --c: #6C6C6C; --c-ink: var(--paper); }
.gl .prose > h2 .h-k.bonus, .gl .toc .n.bonus { color: var(--berry-2); }
.gl .toc .n.bonus { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--berry) 50%, transparent); }
.gl .prose .browser .chrome i:nth-child(1) { background: var(--tone-mocha); }
.gl .prose .browser .chrome i:nth-child(2) { background: var(--tone-camel); }
.gl .prose .browser .chrome i:nth-child(3) { background: var(--tone-sand); }
.gl .hubcard::before, .gl .pkg::before { background: var(--hc, var(--berry)); }
.gl .start .form option, .gl .start .form optgroup { color: var(--ink); }
.shine { background-image: linear-gradient(100deg, var(--ink) 0%, var(--berry-2) 28%, var(--brass) 50%, var(--berry-2) 72%, var(--ink) 100%); }

/* the reading bar on a post */
.gl .pf-progress { position: fixed; z-index: 60; left: 0; right: 0; top: 0; height: 3px; pointer-events: none; }
.gl .pf-progress span { display: block; height: 100%; background: var(--berry); transform-origin: 0 50%; transform: scaleX(0); }

/* room between the last section and the footer */
.gl main { margin-bottom: clamp(3.5rem, 7vw, 6rem); }
.gl.labs-page main, .gl.pf main { margin-bottom: 0; }
.gl.pf main { padding-bottom: clamp(3.5rem, 7vw, 6rem); }

/* the project form sits on black: its button is paper, like the Inquire band on the photography pages */
.gl .start .form .btn { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.gl .start .form .btn:hover { background: var(--brass); border-color: var(--brass); color: var(--ink); }

/* on paper, the page is white */
@media print {
  html, body.gl, body.pf.gl { background: #fff !important; }
}
