/* ==========================================================================
   Thought & Vision — Marco Marin portfolio
   Plain CSS, no build step. Tokens first, then base, layout, components.
   Targets WCAG 2.2 AA: all text pairs ≥ 4.5:1, focus visible and never
   obscured, 24px+ targets, reduced-motion respected.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  /* Neutrals */
  --ink: #1e1e1e;            /* 16.7:1 on white */
  --ink-soft: #444;          /* 9.7:1 on white, 8.9:1 on --surface */
  --paper: #fff;
  --surface: #f4f4f4;
  --surface-2: #ebebeb;
  --line: #d6d6d6;

  /* Brand palette — carried over from the current site. Ink text on every one ≥ 5:1. */
  --yellow: #ffef00;
  --orange: #ff7a00;
  --pink: #ff46a2;
  --green: #00f000;
  --cyan: #00f0ff;
  --lilac: #d6b6ff;
  --coral: #ff3b5c;
  --tangerine: #ff9f1c;
  --emerald: #14b57a;        /* case-study bands, ink text 6.4:1 */
  --emerald-ink: #0b6b47;    /* emerald as text on white, 6.6:1 */
  --mint: #b3efbd;
  --sky: #c6e8f8;
  --night: #1e1e1e;

  /* HMW sticky notes */
  --note-green: #b3f0bc;
  --note-amber: #fde199;
  --note-teal: #b3f2ec;
  --note-violet: #d5c2fb;

  /* Type */
  --font: "Rethink Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(2.5rem, 1.75rem + 3.2vw, 4.5rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.75vw, 1.875rem);
  --fs-h4: 1.125rem;
  --fs-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-body: clamp(1rem, 0.97rem + 0.15vw, 1.125rem);
  --fs-small: 0.9375rem;
  --fs-stat: clamp(2.25rem, 1.8rem + 1.8vw, 3.5rem);

  /* Space (4pt scale) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 2.5rem; --s-8: 3rem; --s-9: 4rem; --s-10: 6rem;
  --section: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --gutter: clamp(1rem, 0.4rem + 3vw, 5rem);
  --max: 80rem;      /* 1280px page */
  --measure: 46rem;  /* comfortable reading width */

  /* Shape & motion */
  --r-sm: 0.75rem; --r-md: 1.25rem; --r-lg: 2rem; --r-xl: clamp(1.75rem, 1rem + 2vw, 3rem);
  --pill: 999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 140ms;
  --t-base: 220ms;
  --lift: -4px;
  --shadow-hover: 0 14px 28px -16px rgb(0 0 0 / 0.45);
  --focus: 3px solid var(--ink);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--s-6);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--fs-display); letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: 700; letter-spacing: 0; line-height: 1.35; }
p, li { text-wrap: pretty; overflow-wrap: break-word; }
img, video { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
strong { font-weight: 700; }
em { font-style: italic; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
.prose a, .inline-link { text-decoration: underline; }

:focus-visible { outline: var(--focus); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--s-4); top: var(--s-4); z-index: 100;
  padding: var(--s-3) var(--s-5); border-radius: var(--pill);
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; outline-color: var(--ink); }

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.narrow { max-width: var(--measure); }
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.band { padding-block: var(--section); }
.band--emerald { background: var(--emerald); }
.band--night { background: var(--night); color: #fff; }
.band--mint { background: var(--mint); }
.band--sky { background: var(--sky); }
.stack > * + * { margin-top: var(--stack, var(--s-4)); }
.stack-lg { --stack: var(--s-6); }
.section-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-6); max-width: var(--measure); }
.section-head p { color: var(--ink-soft); }
.band--emerald .section-head p, .band--emerald .muted { color: var(--ink); }

.grid { display: grid; gap: var(--s-4); }
@media (min-width: 40rem) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3, .grid--4, .grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.split { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 56rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); }
  .split--center { align-items: center; }
  .split--reverse > :first-child { order: 2; }
}

/* ---------- Header ---------- */
.site-header { padding-block: var(--s-5); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-weight: 700; font-size: 1.0625rem; text-decoration: none; letter-spacing: -0.01em;
  min-height: 44px;
}
.brand__mark {
  inline-size: 2.25rem; block-size: 2.25rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--yellow);
  font-size: 0.875rem; font-weight: 800; letter-spacing: 0;
  transition: transform var(--t-base) var(--ease-out);
}
.brand:hover .brand__mark { transform: rotate(-8deg); }
.brand__role { font-weight: 400; color: var(--ink-soft); }
@media (max-width: 30rem) { .brand__role { display: none; } }

.nav-toggle {
  display: none; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4); border-radius: var(--pill);
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer;
}
.nav-toggle svg { transition: transform var(--t-base) var(--ease-out); }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.site-nav a {
  display: inline-flex; align-items: center; gap: 0.35em;
  min-height: 44px; padding: 0 var(--s-4); border-radius: var(--pill);
  font-weight: 500; text-decoration: none;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current] { background: var(--ink); color: #fff; }
main:focus { outline: none; }
.site-nav a[aria-current="page"]:focus-visible { outline-offset: 3px; }

@media (max-width: 47.99rem) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { flex-basis: 100%; display: none; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: var(--s-1); padding-top: var(--s-3); }
  .site-nav a { width: 100%; padding-inline: var(--s-4); background: var(--surface); border-radius: var(--r-sm); }
}

/* ---------- Breadcrumb / back link ---------- */
.crumb { margin-bottom: var(--s-5); }
.back-link {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding-right: var(--s-3);
  font-weight: 500; text-decoration: none;
}
.back-link svg { transition: transform var(--t-fast) var(--ease-out); }
.back-link:hover svg { transform: translateX(-3px); }
.back-link:hover span { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- Page intro ---------- */
.page-intro { padding-top: var(--s-6); padding-bottom: var(--s-8); }
.page-intro h1 + p { margin-top: var(--s-4); font-size: var(--fs-lead); color: var(--ink-soft); max-width: 52rem; }

.hero { padding-top: var(--s-8); padding-bottom: var(--s-7); }
.hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem); max-width: 22ch; }
.hero__wave { display: inline-block; transform-origin: 70% 70%; }
@media (prefers-reduced-motion: no-preference) {
  .hero__wave { animation: wave 1.6s var(--ease-out) 0.4s 1 both; }
  @keyframes wave { 0%,100% { transform: rotate(0); } 20%,60% { transform: rotate(14deg); } 40%,80% { transform: rotate(-8deg); } }
}
.hero p { margin-top: var(--s-4); font-size: var(--fs-lead); color: var(--ink-soft); max-width: 48rem; }

/* ---------- Hub cards (home + "Want to know more?") ---------- */
.hub {
  display: grid; gap: var(--s-4);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 40rem) {
  .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub__card--projects { grid-column: 1 / -1; }
}
@media (min-width: 64rem) {
  .hub { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hub__card { grid-column: span 2; }
  .hub--home .hub__card--about,
  .hub--home .hub__card--philosophy { grid-column: 1 / span 3; }
  .hub--home .hub__card--projects { grid-column: 4 / span 3; grid-row: 1 / span 2; }
}

.hub__card {
  --card-bg: var(--surface);
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s-2);
  min-height: 11.5rem; padding: var(--s-6) var(--s-6) var(--s-5);
  border-radius: var(--r-xl); background: var(--card-bg); color: var(--ink);
  text-decoration: none;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.hub__card:hover { transform: translateY(var(--lift)); box-shadow: var(--shadow-hover); }
.hub__card:active { transform: translateY(-1px) scale(0.99); box-shadow: none; transition-duration: 80ms; }
.hub__card:focus-visible { outline-offset: 4px; border-radius: var(--r-xl); }
.hub__icon { width: 48px; height: 48px; margin-bottom: auto; }
.hub__card h2, .hub__card h3 { font-size: var(--fs-h3); padding-right: 3rem; margin-top: var(--s-5); }
.hub__desc { font-size: var(--fs-small); font-weight: 500; padding-right: 3rem; }
.hub__arrow {
  position: absolute; right: var(--s-5); bottom: var(--s-5);
  inline-size: 2.75rem; block-size: 2.75rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--ink);
  transition: background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out);
}
.hub__arrow svg { transition: transform var(--t-base) var(--ease-out); }
.hub__card:hover .hub__arrow, .hub__card:focus-visible .hub__arrow { background: var(--ink); color: var(--card-bg); }
.hub__card:hover .hub__arrow svg { transform: translate(2px, -2px); }
.hub__card--about { --card-bg: var(--yellow); }
.hub__card--philosophy { --card-bg: var(--orange); }
.hub__card--projects { --card-bg: var(--pink); min-height: 14rem; }
.hub__card--resume { --card-bg: var(--green); }
.hub__card--linkedin { --card-bg: var(--cyan); }
.hub__card--contact { --card-bg: var(--lilac); }
@media (min-width: 64rem) { .hub--home .hub__card--projects { min-height: 100%; } }

/* ---------- Testimonials ---------- */
.quotes { display: grid; gap: var(--s-5); }
@media (min-width: 48rem) { .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quote {
  --accent: var(--orange);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-5);
  padding: var(--s-6); border-radius: var(--r-lg);
  border: 3px solid transparent;
  border-right-color: var(--accent); border-bottom-color: var(--accent);
  background: var(--paper);
}
.quote:nth-child(2) { --accent: var(--green); border-color: transparent; border-left-color: var(--accent); border-bottom-color: var(--accent); }
.quote:nth-child(3) { --accent: var(--pink); border-color: transparent; border-left-color: var(--accent); border-top-color: var(--accent); }
.quote:nth-child(4) { --accent: #2bb5e3; border-color: transparent; border-right-color: var(--accent); border-top-color: var(--accent); }
.quote blockquote p { font-size: var(--fs-lead); line-height: 1.5; }
.quote blockquote p::before { content: "“"; }
.quote blockquote p::after { content: "”"; }
.quote figcaption { display: flex; align-items: center; gap: var(--s-4); }
.quote figcaption img { inline-size: 4rem; block-size: 4rem; border-radius: 50%; object-fit: cover; flex: none; }
.quote cite { font-style: normal; display: grid; line-height: 1.4; }
.quote cite b { font-weight: 700; }
.quote cite span { color: var(--ink-soft); }

/* ---------- Generic cards ---------- */
.card { padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); }
.card--white { background: var(--paper); }
.card--outline { background: var(--paper); border: 2px solid var(--line); }
.card h3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); }
.card h3 + *, .card h4 + * { margin-top: var(--s-2); }
.card .icon { width: 48px; height: 48px; margin-bottom: var(--s-4); }
.card ul:not([role]) { padding-left: 1.2em; margin: var(--s-2) 0 0; }
.card ul:not([role]) li + li { margin-top: var(--s-1); }
.muted { color: var(--ink-soft); }
.small { font-size: var(--fs-small); }

/* ---------- About ---------- */
.intro-card { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 48rem) { .intro-card { grid-template-columns: minmax(0, 1fr) auto; } }
.intro-card .card p + p { margin-top: var(--s-3); }
.avatar { inline-size: clamp(9rem, 7rem + 8vw, 13rem); aspect-ratio: 1; border-radius: 50%; object-fit: cover; }

.tools { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.tool {
  display: inline-flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-5) var(--s-3) var(--s-3); border-radius: var(--pill);
  background: var(--surface); font-weight: 600;
}
.tool img { width: 32px; height: 32px; object-fit: contain; }

.achievement .icon { height: 56px; width: auto; }
.achievement h3 { margin-top: var(--s-2); }

.jobs { display: grid; gap: var(--s-4); }
@media (min-width: 40rem) { .jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .jobs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.job { display: flex; flex-direction: column; gap: var(--s-2); }
.job__logo { height: 64px; width: auto; max-width: 11rem; object-fit: contain; object-position: left center; margin-bottom: var(--s-3); }
.job h3 { font-size: 1.5rem; }
.job__org { font-weight: 700; }
.job__dates { font-size: var(--fs-small); color: var(--ink-soft); }
.job p:last-child { margin-top: var(--s-2); }
.cv-card {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-6); border-radius: var(--r-lg); background: var(--coral); color: var(--ink);
  text-decoration: none; min-height: 12rem;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.cv-card:hover { transform: translateY(var(--lift)); box-shadow: var(--shadow-hover); }
.cv-card:active { transform: scale(0.99); }
.cv-card strong { font-size: var(--fs-h3); font-weight: 500; line-height: 1.15; display: flex; align-items: center; gap: var(--s-3); }
.cv-card strong svg { transition: transform var(--t-base) var(--ease-out); }
.cv-card:hover strong svg { transform: translate(3px, -3px); }

.edu { display: grid; gap: var(--s-4); }
@media (min-width: 40rem) { .edu { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.edu dl { display: grid; gap: var(--s-1); }
.edu dt { font-weight: 700; }

/* ---------- Philosophy ---------- */
.principle .icon { width: 48px; height: 48px; }
.principle h2 { font-size: var(--fs-h3); margin-top: var(--s-4); }
.principle p { margin-top: var(--s-3); color: var(--ink-soft); }

/* ---------- Projects ---------- */
.projects { display: grid; gap: var(--s-7) var(--s-5); }
@media (min-width: 40rem) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.projects--3 { gap: var(--s-5); }
@media (min-width: 64rem) { .projects--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.project { position: relative; display: grid; gap: var(--s-4); text-decoration: none; color: inherit; }
.project__media { position: relative; overflow: hidden; border-radius: var(--r-xl); aspect-ratio: 1; background: var(--surface); }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.project:hover .project__media img { transform: scale(1.035); }
.project__name {
  position: absolute; left: var(--s-5); bottom: var(--s-5);
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.4em 0.9em; border-radius: var(--pill);
  border: 2px solid var(--ink); background: #fff;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.375rem); font-weight: 600; line-height: 1.2;
  transition: background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out);
}
.project__name svg { transition: transform var(--t-base) var(--ease-out); }
.project:hover .project__name, .project:focus-visible .project__name { background: var(--ink); color: #fff; }
.project:hover .project__name svg { transform: translate(2px, -2px); }
.project:focus-visible { outline: none; }
.project:focus-visible .project__media { outline: var(--focus); outline-offset: 4px; }
.badge {
  position: absolute; right: var(--s-4); top: var(--s-4);
  padding: 0.35em 0.85em; border-radius: var(--pill);
  border: 2px solid var(--ink); background: #fff;
  font-size: var(--fs-small); font-weight: 600;
}
.project__desc { color: var(--ink-soft); max-width: 40ch; }
.projects--3 .project__desc { display: none; }

/* ---------- Case study hero ---------- */
.case-hero { --hero-bg: var(--yellow); background: var(--hero-bg); padding-block: var(--s-6) var(--s-9); }
.case-hero--yellow { --hero-bg: var(--yellow); }
.case-hero--cyan { --hero-bg: var(--cyan); }
.case-hero--green { --hero-bg: var(--green); }
.case-hero--pink { --hero-bg: var(--pink); }
.case--yellow .site-header { background: var(--yellow); }
.case--cyan .site-header { background: var(--cyan); }
.case--green .site-header { background: var(--green); }
[class*="case--"] .site-nav a:not([aria-current]):hover { background: rgb(255 255 255 / 0.6); }
[class*="case--"] .nav-toggle { background: transparent; }
[class*="case--"] .brand__role { color: var(--ink); }
.case-hero h1 { margin-top: var(--s-3); }
.case-hero__lead { margin-top: var(--s-4); font-size: var(--fs-lead); max-width: 60rem; }
.award {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.3em 0.9em; border-radius: var(--pill); border: 2px solid var(--ink); background: #fff;
  font-size: var(--fs-small); font-weight: 600;
}
.award:hover { background: var(--ink); color: #fff; }
.facts { display: grid; gap: var(--s-6); margin-top: var(--s-7); }
@media (min-width: 56rem) { .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } }
.facts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-5); align-content: start; }
.facts dt, .facts h2 { font-weight: 700; font-size: 1rem; letter-spacing: 0; }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.tags li {
  padding: 0.3em 0.85em; border-radius: var(--pill); border: 2px solid var(--ink);
  background: #fff; font-size: var(--fs-small); font-weight: 600; line-height: 1.3;
}

/* ---------- Case study content ---------- */
.case-section { padding-block: var(--section); }
.case-section + .case-section { padding-top: 0; }
.case-section h2 { margin-bottom: var(--s-4); }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--s-4); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: var(--s-2); }
.statement { padding: var(--s-6); border-left: 6px solid var(--ink); background: var(--surface); border-radius: 0 var(--r-md) var(--r-md) 0; }
.statement h3 { font-size: var(--fs-h4); font-weight: 700; margin-bottom: var(--s-2); }
.statement p { font-size: var(--fs-lead); font-style: italic; line-height: 1.5; }

.figure { display: grid; gap: var(--s-2); }
.figure img { border-radius: var(--r-md); width: 100%; }
.figure figcaption { font-size: var(--fs-small); color: var(--ink-soft); }
.full-size {
  justify-self: start; display: inline-flex; align-items: center; min-height: 24px;
  font-size: var(--fs-small); font-weight: 600; text-decoration: underline;
}
.logos { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
.logos img { height: clamp(3rem, 2.5rem + 2vw, 4.5rem); width: auto; }
.logos span { font-size: 1.5rem; font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.chips li {
  padding: var(--s-3) var(--s-5); border-radius: var(--r-sm);
  border: 2px dashed var(--emerald-ink); font-size: 1.125rem; font-weight: 600;
}

/* Findings — real cards instead of the old empty accordions */
.findings { display: grid; gap: var(--s-4); }
@media (min-width: 40rem) { .findings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .findings--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.finding { padding: var(--s-5); border-radius: var(--r-md); background: var(--paper); }
.finding h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.35; letter-spacing: 0; }
.finding p { margin-top: var(--s-2); color: var(--ink-soft); }
.finding--title-only { display: flex; align-items: center; gap: var(--s-3); }
.finding--title-only::before {
  content: ""; flex: none; inline-size: 0.6rem; block-size: 0.6rem; border-radius: 50%; background: var(--emerald-ink);
}

.persona { text-align: left; }
.persona img { width: 72px; height: 72px; }
.persona h3 { font-size: 1.0625rem; font-weight: 700; margin-top: var(--s-3); letter-spacing: 0; }
.persona p { margin-top: var(--s-1); font-size: var(--fs-small); color: var(--ink-soft); }

/* How might we — sticky notes */
.notes { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.note {
  --note: var(--note-green);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-6);
  min-height: 15rem; padding: var(--s-6) var(--s-5) var(--s-5);
  background: var(--note); font-size: 1.1875rem; line-height: 1.45;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.06), 0 10px 20px -14px rgb(0 0 0 / 0.35);
}
.note:nth-child(4n+2) { --note: var(--note-amber); }
.note:nth-child(4n+3) { --note: var(--note-teal); }
.note:nth-child(4n+4) { --note: var(--note-violet); }
.note footer { font-size: var(--fs-small); color: #4d4d4d; }

/* Principles on emerald */
.principles { display: grid; gap: var(--s-4); }
@media (min-width: 48rem) { .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.principle-card { padding: var(--s-6); border-radius: var(--r-lg); background: #d4f3e6; }
.principle-card:nth-child(2) { background: #e6f9f0; }
.principle-card:nth-child(3) { background: var(--paper); }
.principle-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.principle-card__head img { width: 44px; height: 44px; }
.principle-card h3 { font-size: var(--fs-h3); }
.principle-card h4 { margin-top: var(--s-4); }
.principle-card p { margin-top: var(--s-2); }
.principle-label {
  display: inline-block; margin-top: var(--s-4);
  padding: 0.25em 0.9em; border-radius: var(--r-sm); border: 2px dashed var(--emerald-ink);
  font-weight: 600; color: var(--emerald-ink);
}

/* Releases & stats */
.release { display: grid; gap: var(--s-5); }
.release + .release { margin-top: var(--section); }
.release__head p { margin-top: var(--s-2); max-width: var(--measure); }
.status { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: baseline; margin-top: var(--s-3); }
.status dt { font-weight: 700; }
.status dt::after { content: ":"; }
.status dd { color: var(--ink-soft); }
.screens { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-5); }
.screens img { width: clamp(9rem, 6rem + 12vw, 15rem); }
.screens--lg img { width: clamp(12rem, 8rem + 16vw, 21rem); }
.screens--sm img { width: clamp(7rem, 5rem + 8vw, 10.5rem); }
.screens figure { display: grid; gap: var(--s-2); justify-items: center; text-align: center; }
.screens figcaption { font-weight: 600; font-size: var(--fs-small); }
.device-label { font-weight: 700; margin-top: var(--s-4); }

.stats { display: grid; gap: var(--s-4); }
@media (min-width: 40rem) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat {
  padding: var(--s-5); border-radius: var(--r-md); border: 3px solid var(--emerald);
  text-align: center; display: grid; gap: var(--s-2); align-content: start;
}
.stat dt { order: 2; color: var(--ink-soft); line-height: 1.45; }
.stat dd { order: 1; font-size: var(--fs-stat); font-weight: 500; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.footnote { margin-top: var(--s-3); text-align: right; font-size: var(--fs-small); font-weight: 600; }

/* Demo video */
.demo { display: grid; gap: var(--s-6); align-items: center; justify-items: center; padding: var(--s-7) var(--s-5); border-radius: var(--r-lg); }
@media (min-width: 48rem) { .demo { grid-template-columns: 1fr auto 1fr; padding: var(--s-8); } }
.demo--night { background: var(--night); color: #fff; }
.demo--mint { background: var(--mint); }
.demo--sky { background: var(--sky); }
.demo__label { display: grid; gap: var(--s-2); justify-self: center; max-width: 18rem; }
@media (min-width: 48rem) { .demo__label { justify-self: end; text-align: right; } }
.demo__label b { font-size: var(--fs-h3); font-weight: 500; line-height: 1.1; }
.demo__label p { font-size: var(--fs-small); opacity: 0.9; }
.phone {
  inline-size: clamp(13rem, 10rem + 10vw, 16rem);
  padding: 10px; border-radius: 2.6rem; background: #0b0b0b;
  box-shadow: 0 0 0 2px #cfcfd4, 0 24px 40px -22px rgb(0 0 0 / 0.6);
}
.phone video { inline-size: 100%; aspect-ratio: 888 / 1920; object-fit: cover; border-radius: 2rem; background: #111; }

/* Galleries */
.gallery { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md); }
.phones-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4); }
.phones-row img { width: clamp(7.5rem, 5rem + 9vw, 11rem); }
.phones-row figure { display: grid; gap: var(--s-2); justify-items: center; font-weight: 600; font-size: var(--fs-small); text-align: center; }

.process-row { display: grid; gap: var(--s-5); align-items: center; }
@media (min-width: 48rem) { .process-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } .process-row--flip > :first-child { order: 2; } }
.process-row + .process-row { margin-top: var(--s-7); }
.process-row p { max-width: 36rem; }

/* Strategy (Rewards) */
.strategy { display: grid; gap: var(--s-6); }
.strategy__item { display: grid; gap: var(--s-3); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.strategy__item:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 48rem) { .strategy__item { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-6); } }
.strategy__item h3 { display: flex; align-items: center; gap: var(--s-3); }
.strategy__item h3 img { width: 40px; height: 40px; }
.strategy__item h4 { margin-top: var(--s-3); }
.strategy__item ul { padding-left: 1.2em; margin: var(--s-1) 0 0; }

.okrs { display: grid; gap: var(--s-5); }
@media (min-width: 48rem) { .okrs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.okr { padding: var(--s-5); border-radius: var(--r-md); background: var(--surface); }
.okr h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: 0; }
.okr__nums { display: flex; align-items: center; gap: var(--s-3); margin-block: var(--s-4); flex-wrap: wrap; }
.okr__num { display: grid; justify-items: center; text-align: center; padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); border: 2px solid var(--emerald); min-width: 6.5rem; }
.okr__num--key { background: var(--emerald); border-color: var(--emerald); }
.okr__num small { font-size: 0.8125rem; font-weight: 600; }
.okr__num b { font-size: 1.75rem; font-weight: 600; line-height: 1.15; }
.okr dt { font-weight: 700; margin-top: var(--s-2); }
.okr dt.tail { color: var(--emerald-ink); }
.okr dt.head { color: #b3261e; }

.cascade { display: grid; gap: var(--s-3); }
.cascade__row { display: grid; gap: var(--s-3); }
.cascade__row h3 { font-size: 1.25rem; color: var(--emerald-ink); margin-top: var(--s-3); }
.cascade__row ul { display: grid; gap: var(--s-3); }
@media (min-width: 48rem) { .cascade__row ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cascade__row li { padding: var(--s-4); border-radius: var(--r-sm); background: var(--surface); text-align: center; }

/* Learnings */
.learnings { display: grid; gap: var(--s-6); }
@media (min-width: 56rem) { .learnings--media { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; } }
.learnings img { border-radius: var(--r-lg); width: 100%; }
.learnings ul { display: grid; gap: var(--s-5); }
.learnings h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: 0; }
.learnings li p { margin-top: var(--s-2); color: var(--ink-soft); }

/* Coming soon / contact */
.contact-band { background: var(--tangerine); padding-block: var(--s-8); }
.contact-band .container { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); }
.contact-band img { width: 7rem; height: auto; }
.email-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5); border-radius: var(--pill);
  border: 2px solid var(--ink); background: var(--ink); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) ease, color var(--t-fast) ease;
}
.btn:hover { background: #000; }
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.email-big { font-size: clamp(1.375rem, 1rem + 2vw, 2.25rem); font-weight: 500; word-break: break-word; }
.copy-status { font-weight: 600; min-height: 1.6em; }

/* ---------- Footer ---------- */
.more { padding-block: var(--section) var(--s-8); }
.more h2 { margin-bottom: var(--s-6); }
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s-6) var(--s-7); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); align-items: center; justify-content: space-between; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; gap: var(--s-2); }
.to-top { font-weight: 600; text-decoration: none; padding: 0 var(--s-4); border: 2px solid var(--ink); border-radius: var(--pill); }
.to-top:hover { background: var(--ink); color: #fff; }
.to-top svg { transition: transform var(--t-fast) var(--ease-out); }
.to-top:hover svg { transform: translateY(-2px); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hub__card:hover, .cv-card:hover, .project:hover .project__media img { transform: none; }
}

/* ---------- Forced colours (Windows High Contrast) ---------- */
@media (forced-colors: active) {
  .hub__card, .card, .quote, .finding, .note, .stat, .project__name, .tags li, .badge { border: 1px solid CanvasText; }
  .hub__arrow { border-color: CanvasText; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-nav, .more, .skip-link, .to-top, .demo { display: none !important; }
  .case-hero, .band { background: none !important; }
  a { text-decoration: underline; }
}

/* Case-study imagery */
.case-section img, .band img:not(.hub__icon) { border-radius: var(--r-md); }
.screens img, .phones-row img, .logos img, .principle-card__head img, .persona img, .strategy__item img { border-radius: 0; }

/* Challenge principles (Rewards) */
.cprinciples { display: grid; gap: var(--s-4); }
@media (min-width: 48rem) { .cprinciples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .cprinciples { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cprinciple {
  --accent: var(--emerald);
  padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface);
  border-top: 10px solid var(--accent);
}
.cprinciple h3 { font-size: 1.375rem; }
.cprinciple h4 { margin-top: var(--s-4); font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.06em; }
.cprinciple p, .cprinciple li { color: var(--ink-soft); }
.cprinciple p { margin-top: var(--s-1); }
.cprinciple ul { padding-left: 1.2em; margin: var(--s-1) 0 0; }
.cprinciple li + li { margin-top: var(--s-1); }
.okr .icon-arrow, .okr__nums svg { flex: none; }
@media (min-width: 64rem) {
  .hub--five .hub__card:nth-child(-n+2) { grid-column: span 3; }
}
@media (min-width: 40rem) and (max-width: 63.99rem) {
  .hub--five .hub__card--projects { grid-column: auto; }
  .hub--five .hub__card:last-child { grid-column: 1 / -1; }
}
.media { display: grid; gap: var(--s-2); align-content: start; }
.media img { width: 100%; }
