/* Lyle JG Pieterse portfolio: shared styles for every page.
   Home sections are in this file too; case-study pages add css/case.css. */

:root {
  /* palette */
  --cyan: #00A3E0;    /* process cyan: home works band, Xara Playbooks */
  --magenta: #D6007E; /* process magenta: links, highlights, Team79 */
  --process-yellow: #FFE500; /* Playground band */
  --key: #161616;     /* process black */
  --ink: #161616;     /* text, dark sections */
  --navy: #161616;    /* dark feature sections (was navy) */
  --blue: #D6007E;    /* links, highlights: magenta */
  --yellow: #FFE500;  /* accents on dark: process yellow */
  --paper: #F7F8F9;   /* light ground */
  --mist: #ECEEF0;    /* second light ground */
  --white: #ffffff;
  --muted: #565B63;   /* secondary text on light */
  --on-dark: rgba(255, 255, 255, .86); /* body text on navy and ink */
  --on-dark-muted: rgba(255, 255, 255, .7);
  --rule: rgba(22, 22, 22, .24);
  --rule-dark: #2A2A2A;
  --ink-soft: #2C2F33; /* long chapter text */
  --steel: #9A9EA5;    /* tool names on ink */
  /* rhythm */
  --sy: clamp(80px, 8vw, 120px);   /* section top and bottom */
  --after-label: 64px;             /* space between a section label and its content */
  --pad: clamp(20px, 2.4vw, 34px);
  --container: 1331px;
  --container-narrow: 1155px;
  /* shape and depth */
  --radius-tag: 30px;
  --radius-button: 40px;
  --radius-round: 50%;
  --shadow-post: 0 1px 2px rgba(17, 19, 25, .06), 0 12px 32px -12px rgba(17, 19, 25, .22);
  --shadow-float: 0 6px 20px -6px rgba(17, 19, 25, .45);
  /* type scale */
  --giant: clamp(64px, 11.8vw, 170px);
  --big: clamp(38px, 5.6vw, 80px);
  --mid: clamp(28px, 2.9vw, 42px);
  --pill: clamp(18px, 1.6vw, 23px);
  --body-lg: 20px;
  --font: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  --ease: cubic-bezier(.3, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
/* focus ring that stays visible on the coloured bands: key black on cyan, white on magenta */
.explore :focus-visible { outline-color: var(--ink); }
/* skip link: hidden above the page until tabbed to */
.skip { position: absolute; top: 12px; left: var(--pad); z-index: 10; padding: 12px 22px; border-radius: var(--radius-button); background: var(--ink); color: var(--white); font-weight: 500; transform: translateY(-200%); transition: transform .2s var(--ease); }
.skip:focus-visible { transform: none; outline-color: var(--yellow); }
[tabindex="-1"]:focus { outline: none; }   /* the skip link's target (each page's main heading) takes focus without a ring */
::selection { background: var(--yellow); color: var(--ink); }

/* ── shared pieces ── */
.label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; text-align: center; }
.label svg { width: 14px; height: 8px; }
.explore .label, .tools .label, .chapter--navy .label, .quote .label { color: var(--yellow); }
.giant { font-size: var(--giant); font-weight: 700; letter-spacing: -.03em; line-height: .74; margin: 0; }
.pill { display: inline-flex; align-items: center; border: 1px solid currentColor; border-radius: var(--radius-tag); padding: 0 9px; font-size: 12px; line-height: 20px; letter-spacing: 0; white-space: nowrap; }
.btn-pill { display: inline-flex; font-size: clamp(16px, 5.6vw, 22px); letter-spacing: .03em; line-height: 1.2; padding: 12px 28px; border: 2px solid currentColor; border-radius: var(--radius-button); transition: background .25s, border-color .25s, color .25s; }
.btn-pill:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

/* container: content stops at 1331px (1399 with padding), centred */
.intro > *, .explore > .label, .explore > .filter, .works ol, .got > *, .talk > *, .experience > *, .tools > .label, .tools > .toolset, .contact > * { width: 100%; max-width: var(--container); margin-left: auto; margin-right: auto; }

/* ── intro ── */
.intro { position: relative; min-height: 100svh; display: flex; flex-direction: column; padding: 0 var(--pad) 56px; overflow: hidden; }
.intro > .roles { margin-top: auto; }
/* nav: the same three columns as the text row under the headline, so About / Works / Contact
   start exactly above the three blocks of text */
.nav { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 40px 0 0; font-size: 16px; }
.nav__links { display: contents; }
.nav a { position: relative; justify-self: start; transition: color .25s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-btn { display: none; }
.nav .brand { font-weight: 700; letter-spacing: .04em; }   /* LJGP: home link, first column on every page */
.nav .brand::after { display: none; }
.nav .brand:hover, .nav .brand:focus-visible { color: var(--blue); }
.hi { position: relative; z-index: 1; margin-top: 56px; margin-bottom: 0; font-size: clamp(26px, 2.45vw, 35px); font-weight: 700; line-height: .9; letter-spacing: -.01em; }
.roles { position: relative; z-index: 1; padding-top: 56px; line-height: .8; }
.roles span { display: block; overflow: hidden; padding: .16em 0 .22em; margin: -.16em 0 -.22em; } /* room for dots and descenders inside the reveal mask */
.roles span > b { display: inline-block; font-weight: 700; transform: translateY(130%); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.roles span:nth-child(2) > b { animation-delay: .12s; padding-left: .45em; }
.roles span:nth-child(3) > b { animation-delay: .24s; }
.roles .swap { color: var(--blue); transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .5s, color .5s; }
.roles .swap.out { transform: translateY(-105%); opacity: 0; }
@keyframes rise { to { transform: translateY(0); } }
.intro__foot { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-top: 72px; }
.intro__foot p { margin: 0; max-width: 372px; color: var(--muted); }
.intro__foot address { font-style: normal; }
.intro__foot address a { display: table; text-decoration-color: var(--blue); text-decoration-thickness: 1.5px; }
.intro__foot address a:hover { text-decoration-line: underline; }

/* ── explore ── */
.explore { background: var(--navy); color: var(--white); padding: var(--sy) var(--pad) 0; overflow: hidden; }
.filter { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 0 12px; margin: var(--after-label) 0 0; font-size: var(--pill); letter-spacing: .03em; line-height: 1.22; }
.filter__lead { text-align: right; margin: 0; }
.filter__tail { margin: 0; }
.rotor { display: flex; justify-content: center; }
.chip { position: relative; display: inline-flex; justify-content: center; overflow: hidden; white-space: nowrap; color: inherit; border: 2px solid var(--yellow); border-radius: var(--radius-tag); padding: 4px 10px; transition: width .35s var(--ease), background .25s, color .25s; }
.chip:hover, .chip:focus-visible { background: var(--yellow); color: var(--ink); }
.chip__text { display: inline-block; transition: transform .25s var(--ease), opacity .25s; }
.chip.is-out .chip__text { transform: translateY(-110%); opacity: 0; }
.chip.is-in .chip__text { transform: translateY(110%); opacity: 0; transition: none; }
.selected-title { margin: clamp(96px, 12vw, 168px) 0 0; padding-bottom: .04em; text-align: center; white-space: nowrap; line-height: .82; }

/* ── works list (home and the "next project" row on case pages) ── */
.works { background: var(--paper); padding: 0 var(--pad) 72px; }
.works ol { list-style: none; margin: 0 auto; padding: 0; }
.work { position: relative; border-bottom: 1px dotted var(--rule); transition: opacity .35s; }
.work a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 46px 0; }
.work__title { position: relative; display: flex; flex-direction: column; align-items: center; font-size: var(--big); line-height: 1.08; letter-spacing: -.01em; font-weight: 400; }
.work__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.work__bg { position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); z-index: 0; opacity: 0; transition: opacity .35s;
  background: radial-gradient(120% 160% at 25% 0%, #F5F6F8 0%, #E9ECF1 55%, #DEE3EA 100%); } /* soft cool grey, close to the hero */
.work__bg::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 220px 220px; opacity: .22; mix-blend-mode: multiply; }
.work:hover .work__bg, .work:focus-within .work__bg { opacity: 1; }
.works.is-hinting .work:not(.is-match) { opacity: .18; }

/* ── got a role / let's talk ── */
.got { background: var(--paper); padding: calc(var(--sy) - 16px) 0 72px; }
.talk { position: relative; background: var(--ink); color: var(--white); min-height: 710px; padding: 160px var(--pad) 120px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.talk .giant { position: relative; z-index: 1; text-align: center; }
.talk__row { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 28px; margin-top: 56px; text-align: center; font-size: 18px; }
.talk__row p { margin: 0; }

/* ── cards (experience on home, two- and four-up groups on case pages) ── */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 582px)); justify-content: center; gap: 48px 74px; margin-top: var(--after-label); }
.card { position: relative; padding: 36px 31px; transition: background .3s; }
.card:hover, .card:first-child { background: var(--white); }
.card__meta { font-size: 11px; line-height: 1.25; margin: 0 0 15px; color: var(--muted); }
.card h3 { font-size: var(--mid); font-weight: 400; line-height: 1.33; margin: 0 0 16px; letter-spacing: -.01em; }
.card__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.card p { margin: 0; }

/* ── experience ── */
.experience { background: var(--mist); padding: var(--sy) var(--pad); }
.experience .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }


/* ── tools ── */
.tools { background: var(--ink); color: var(--steel); padding: var(--sy) 0; }
.tools { padding-left: var(--pad); padding-right: var(--pad); }
.toolset { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; list-style: none; margin-top: var(--after-label) !important; padding: 0; max-width: 980px !important; }
.toolset li { padding: 10px 22px; border: 1.5px solid rgba(255,255,255,.45); border-radius: var(--radius-tag); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.2; color: var(--white); white-space: nowrap; transition: border-color .25s, color .25s; }
.toolset li { cursor: default; transition: background .25s, border-color .25s, color .25s; }
.toolset li:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }   /* same hover as the pill buttons; not a link */

/* ── contact (footer on every page) ── */
.contact { position: relative; border-top: 1px solid var(--rule-dark); background: var(--ink); color: var(--white); display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 112px var(--pad) 40px; overflow: hidden; text-align: center; }
.contact .label { color: var(--yellow); margin-bottom: 40px; }
.contact__mail { align-self: center; width: auto !important; }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .35em; margin-top: 56px !important; font-size: var(--mid); font-weight: 700; letter-spacing: -.03em; line-height: .9; }
.contact__links a { transition: opacity .25s, color .25s; }
.contact__links:hover a { opacity: .4; }
.contact__links a:hover, .contact__links a:focus-visible { color: var(--yellow); opacity: 1; }
.contact__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 112px !important; padding-top: 24px; border-top: 1px solid var(--rule-dark); font-size: 13px; color: var(--on-dark-muted); }
.contact__bar small { font-size: inherit; }

/* ── tablet ── */
@media (max-width: 900px) {
  .intro__foot { grid-template-columns: 1fr 1fr; }
  .intro__foot address { grid-column: 1 / -1; }
  .filter { grid-template-columns: 1fr; gap: 16px; }
  .filter__lead, .filter__tail { text-align: center; }
  .cards, .experience .cards { grid-template-columns: 1fr; }
  .work__tags { margin-top: 14px; }

  /* the nav folds into a menu button that opens a full-screen panel */
  .nav { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; }
  .nav.is-open .brand { position: fixed; top: 24px; left: var(--pad); z-index: 3; display: flex; align-items: center; min-height: 44px; color: var(--white); }   /* LJGP stays as the home link on the open menu */
  .menu-btn { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: inherit; font-size: 16px; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
  .menu-btn__icon { position: relative; width: 22px; height: 10px; }
  .menu-btn__icon::before, .menu-btn__icon::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .35s var(--ease), top .35s; }
  .menu-btn__icon::before { top: 0; }
  .menu-btn__icon::after { top: 8.5px; }
  .nav.is-open .menu-btn { color: var(--white); position: fixed; top: 24px; right: var(--pad); }
  .nav.is-open .menu-btn__icon::before { top: 4.25px; transform: rotate(45deg); }
  .nav.is-open .menu-btn__icon::after { top: 4.25px; transform: rotate(-45deg); }
  .nav__links { position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; padding: 96px var(--pad); background: var(--navy);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transition: opacity .3s; }
  .nav__links:focus { outline: none; }
  .nav__links a { color: var(--white); font-family: var(--display); font-size: clamp(44px, 11vw, 72px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
  .nav__links a::after { background: var(--yellow); bottom: 2px; height: 3px; }
  body.menu-open { overflow: hidden; }
}

/* ── phone ── */
@media (max-width: 600px) {
  .toolset { gap: 8px; }
  .toolset li { padding: 8px 16px; }
  .intro__foot { grid-template-columns: 1fr; }
  .selected-title { white-space: normal; line-height: .8; }
  .contact__links { line-height: 1.1; }
  .contact__bar { justify-content: center; text-align: center; }
  .talk { min-height: 0; padding-top: 120px; padding-bottom: 96px; }
}

/* ── reduced motion: everything is shown in its final state ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .roles span > b { transform: none; }
}

/* ── back to top: a round button that appears once the hero is out of view (added by js/site.js) ── */
.to-top { position: fixed; right: var(--pad); bottom: var(--pad); z-index: 5; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-round);
  background: var(--ink); color: var(--white); border: 1px solid rgba(255,255,255,.22); box-shadow: var(--shadow-float);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s var(--ease), visibility 0s .3s, background .25s; }
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .3s var(--ease), background .25s; }
.to-top:hover, .to-top:focus-visible { background: var(--blue); }
.to-top svg { width: 16px; height: 16px; }
body.menu-open .to-top { display: none; }

/* ── display face: Bricolage Grotesque for headlines; labels stay in Hanken Grotesk ── */
.giant, .roles, .hi, .case-title, .work__title, .chapter h2:not(.label), .quote blockquote, .contact__links, .card h3, .timeline h3, .bio__lead, .services { font-family: var(--display); }
.pill, .work__tags { font-family: var(--font); }   /* tags stay in Hanken Grotesk, even inside a display-set title */
.label { font-family: var(--font); }
.work__bg { background: var(--mist) !important; }
.work__bg::after { display: none; }

/* home: the selected-works band is process cyan with key text */
.explore { background: var(--cyan); color: var(--key); }
.explore .label { color: var(--key); }
.chip { background: var(--ink); border-color: var(--ink); color: var(--white); }   /* Explore chip: key black with white text */
.chip:hover, .chip:focus-visible { background: var(--white); border-color: var(--white); color: var(--ink); }   /* inverted on hover */

