/* Shared styles for paulameehan.com.
   Each page links this, then keeps its own <style> for anything only it uses.

   Sections:
     1. Tokens + base ............ every page
     2. Post chrome ............... <body class="writing"> and <body class="project">
                                    (progress bar, nav, end-of-page CTA, footer)
     3. Writing template .......... <body class="writing">  — essays (720px column)
     4. Project template .......... <body class="project">  — case studies (1000px, demo/build layout)

   Template rules are wrapped in :where(...) so they keep the same specificity
   they had when they lived in each page — a page's own <style> still overrides them. */


/* ── 1. TOKENS + BASE ── */
:root{
  --cream:#FAF7F0;--cream-2:#F0EBDF;--ink:#171512;--ink-2:#3A362F;--line:#E6DFD3;
  /* cut-paper palette (traced from Paula's hand-drawn shapes) */
  --cobalt:#2C4A8C;--olive:#6E7B3D;--mustard:#E4A62C;--rasp:#C23A55;--pink:#E79BB0;--ochre:#B5761A;
  /* shared tokens (see design-system.html) */
  --rhythm:clamp(44px,6vw,80px);--r:20px;
  --shadow-soft:0 14px 30px -16px rgba(23,21,18,.45);
  --shadow-soft-lg:0 24px 48px -18px rgba(23,21,18,.6);
}
*{margin:0;padding:0;box-sizing:border-box}
body{background:var(--cream);color:var(--ink);font-family:"Hanken Grotesk",sans-serif;font-size:18px;line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden}
a{color:inherit;text-decoration:none}


/* ── 2. POST CHROME (writing + project) ── */
:where(.writing,.project) .progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:60;pointer-events:none}
:where(.writing,.project) .progress i{display:block;height:100%;width:0;background:var(--rasp);will-change:width}
:where(.writing,.project) nav{position:sticky;top:0;z-index:50;background:rgba(250,247,240,.85);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-bottom:2px solid var(--ink)}
:where(.writing,.project) nav .wrap{display:flex;align-items:center;justify-content:space-between;height:62px}
:where(.writing,.project) .back{font-weight:700;font-size:.95rem;text-decoration:none;display:inline-flex;align-items:center;gap:8px}
:where(.writing,.project) .back:hover{color:var(--rasp)}
:where(.writing,.project) nav .nm{font-family:"Bricolage Grotesque",sans-serif;font-weight:800;font-size:1rem}
:where(.writing,.project) nav .nm b{color:var(--rasp)}
:where(.writing,.project) .kicker{color:var(--rasp);font-weight:700;text-transform:uppercase;letter-spacing:.08em;font-size:.8rem}

:where(.writing,.project) .end-cta{margin:0 auto 36px;padding-bottom:34px;border-bottom:1px solid var(--line);max-width:640px}
:where(.writing,.project) .end-cta .lead{font-family:"Bricolage Grotesque",sans-serif;font-weight:800;letter-spacing:-.01em;font-size:clamp(1.3rem,3vw,1.8rem);line-height:1.15;color:var(--ink);margin-bottom:20px}
:where(.writing,.project) .sayhi{display:inline-flex;align-items:center;gap:.5em;font-weight:700;font-size:1rem;background:var(--ink);color:var(--cream);padding:13px 28px;border-radius:100px;transition:transform .18s,box-shadow .18s}
:where(.writing,.project) .sayhi .ic{width:1.05em;height:1.05em;fill:currentColor;flex:none}
:where(.writing,.project) .sayhi:hover{transform:translateY(-2px);box-shadow:0 12px 26px -12px rgba(23,21,18,.5)}
:where(.writing,.project) .sayhi:active{transform:scale(.97)}
:where(.writing,.project) .end-cta .more{display:inline-block;margin-top:18px;font-weight:700;font-size:.95rem;color:var(--ink-2);transition:color .18s}
:where(.writing,.project) .end-cta .more:hover{color:var(--rasp)}
:where(.writing,.project) footer{padding:44px 0 56px;text-align:center;margin-top:16px}
:where(.writing,.project) .foot-deco{display:flex;gap:18px;justify-content:center;margin-bottom:14px}
:where(.writing,.project) .foot-deco svg{width:28px;height:28px;display:block;fill:currentColor}
:where(.writing,.project) .foot-name{color:var(--ink-2);font-size:.86rem;font-weight:500}
:where(.writing,.project) .foot-name a{color:var(--ink);border-bottom:2px solid var(--rasp);padding-bottom:1px;white-space:nowrap;transition:color .18s}
:where(.writing,.project) .foot-name a:hover{color:var(--rasp)}
:where(.writing,.project) .foot-made{color:var(--ink-2);font-size:.82rem;margin-top:8px;opacity:.85}
@media (prefers-reduced-motion: reduce){:where(.writing,.project) *{transition:none!important}}


/* ── 3. WRITING TEMPLATE ── */
body:where(.writing){font-size:19px;line-height:1.65}
:where(.writing) .wrap{max-width:720px;margin:0 auto;padding:0 clamp(20px,5vw,40px)}
:where(.writing) nav .wrap{max-width:1000px}
:where(.writing) h1{font-family:"Bricolage Grotesque",sans-serif;letter-spacing:-.02em;line-height:1.06;font-weight:800;font-size:clamp(2rem,5.4vw,3.1rem);margin:14px 0 0;max-width:20ch}

:where(.writing) header{padding:clamp(40px,6vw,72px) 0 clamp(18px,3vw,28px)}
:where(.writing) .byline{margin-top:18px;color:var(--ink-2);font-weight:600;font-size:.92rem}
:where(.writing) .updated{margin-top:4px;color:var(--ink-2);font-weight:500;font-size:.85rem;opacity:.75}

:where(.writing) article{padding-bottom:clamp(40px,6vw,72px)}
:where(.writing) article p{margin:0 0 22px;color:var(--ink-2)}
:where(.writing) article p strong{color:var(--ink)}
:where(.writing) article .lede{font-size:1.16rem;color:var(--ink)}
:where(.writing) article h2{font-family:"Bricolage Grotesque",sans-serif;font-weight:800;letter-spacing:-.01em;font-size:clamp(1.25rem,2.8vw,1.6rem);line-height:1.15;margin:34px 0 10px;color:var(--ink)}
/* short punchy one-line paragraph with a red bar on the left */
:where(.writing) article .rule{font-family:"Bricolage Grotesque",sans-serif;font-weight:800;letter-spacing:-.02em;font-size:clamp(1.3rem,3.2vw,1.8rem);line-height:1.25;color:var(--ink);border-left:4px solid var(--rasp);padding:6px 0 6px 22px;margin:32px 0}
:where(.writing) article p a{color:var(--ink);font-weight:600;border-bottom:2px solid var(--rasp);padding-bottom:1px;transition:color .18s}
:where(.writing) article p a:hover{color:var(--rasp)}


/* ── 4. PROJECT TEMPLATE ── */
html:has(> body.project){scroll-behavior:smooth}
:where(.project) .wrap{max-width:1000px;margin:0 auto;padding:0 clamp(20px,5vw,56px)}
:where(.project) h1,:where(.project) h2,:where(.project) h3{font-family:"Bricolage Grotesque",sans-serif;letter-spacing:-.02em;line-height:1.05}

:where(.project) header{padding:clamp(40px,6vw,72px) 0 clamp(20px,3vw,32px)}
:where(.project) header h1{font-weight:800;font-size:clamp(2.6rem,8vw,5rem);margin:12px 0 0}
:where(.project) header .tag{margin-top:16px;font-size:clamp(1.1rem,2.2vw,1.4rem);color:var(--ink-2);font-weight:500;max-width:44ch}
:where(.project) section{padding:clamp(30px,4vw,48px) 0}
:where(.project) h2{font-weight:800;font-size:clamp(1.5rem,3.4vw,2.2rem);margin-bottom:14px}
:where(.project) .eyebrow{color:var(--rasp);font-weight:700;text-transform:uppercase;letter-spacing:.08em;font-size:.78rem;margin-bottom:8px}

/* problem callout */
:where(.project) .problem{position:relative;background:var(--cobalt);color:#fff;border-radius:var(--r);padding:clamp(30px,5vw,52px)}
:where(.project) .problem .eyebrow{color:#C3D0EC}
:where(.project) .problem p{font-family:"Bricolage Grotesque",sans-serif;font-weight:700;letter-spacing:-.02em;font-size:clamp(1.3rem,2.9vw,1.85rem);line-height:1.28;max-width:34ch}
:where(.project) .problem .blob{position:absolute;right:-14px;bottom:-46px;width:128px;height:150px;color:var(--mustard);opacity:1;transition:transform .55s cubic-bezier(.2,.7,.2,1)}
:where(.project) .problem:hover .blob{transform:rotate(-18deg) scale(1.12)}

/* two-column build layout */
:where(.project) .build{display:grid;grid-template-columns:1fr minmax(300px,420px);gap:clamp(30px,5vw,60px);align-items:start;margin-top:clamp(30px,4.5vw,48px)}
@media(max-width:760px){:where(.project) .build{grid-template-columns:1fr;gap:40px}}
:where(.project) .build-text p{max-width:52ch;color:var(--ink-2);margin:0 0 20px}
:where(.project) .build-text h2{margin:30px 0 12px}
:where(.project) .build-text h2:first-child{margin-top:0}
:where(.project) .build-demo h2{margin-bottom:6px}
:where(.project) .build-demo .launch{margin:0 0 18px}
:where(.project) .build-demo .demo-note{text-align:left;margin:0 0 14px}

/* live demo: a phone-sized iframe scaled to fit (sizes set in each page's script) */
:where(.project) .demo-scaler{position:relative;width:min(440px,100%);border:2px solid var(--ink);border-radius:var(--r);overflow:hidden;background:#E8E4DD;box-shadow:var(--shadow-soft-lg)}
:where(.project) .demo-scaler iframe{position:absolute;top:0;left:0;width:440px;height:912px;border:0;background:#E8E4DD;transform-origin:top left}
:where(.project) .launch{display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:1rem;color:var(--cobalt);text-decoration:none;transition:color .18s}
:where(.project) .launch:hover{text-decoration:underline;text-underline-offset:3px}
:where(.project) .demo-note{text-align:center;color:var(--ink-2);font-size:.86rem;margin-top:12px}
