/* ————————————————————————————————————————
   Charlie John Davison — portfolio
   Warm cream base · one dusty blue trim · hairline grid
   Cormorant (display) · Hanken Grotesk (body) · DM Mono (labels)
   Handwriting: placeholder face, swap via --hand when the real one arrives
   ———————————————————————————————————————— */

@font-face {
  font-family: 'Biro Script';
  src: url('../assets/fonts/BiroScript.otf') format('opentype'),
       url('../assets/fonts/BiroScript.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #F2EDE3;      /* base paper */
  --cream-2: #EAE4D7;    /* tint, plates */
  --paper: #F8F4EC;      /* lighter swatch / cells */
  --blue: #8A9EA3;       /* the one trim colour */
  --blue-deep: #6E8389;  /* blue for small text only (contrast) */
  --ink: #3A3631;        /* warm charcoal, never black */
  --mute: #857E74;
  --line: rgba(58, 54, 49, 0.16);

  --serif: 'EB Garamond', 'Times New Roman', Georgia, serif;
  --sans: 'EB Garamond', 'Times New Roman', Georgia, serif;
  --mono: 'DM Mono', 'SF Mono', Menlo, monospace;
  --hand: 'Biro Script', 'Bradley Hand', cursive;

  --wrap: 78rem;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --gap: clamp(1rem, 1.6vw, 1.4rem);
  --block: clamp(5rem, 10vw, 9rem);

  --shadow: 0 18px 44px rgba(58, 54, 49, 0.12), 0 2px 6px rgba(58, 54, 49, 0.05);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  letter-spacing: -0.025em;
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--blue); color: var(--paper); }

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--blue); outline-offset: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

/* ————— type roles ————— */

.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


.mono {
  font-family: var(--mono);
  letter-spacing: 0.12em;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

.hand {
  font-family: var(--hand);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--blue-deep);
}

.title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.title em { font-style: normal; font-weight: 400; }

.lede {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.9vw, 1.6rem);
  line-height: 1.45;
}

.link {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--blue);
  padding-bottom: 0.25em;
  transition: color 0.9s var(--ease), border-color 0.9s var(--ease);
}

.link:hover { color: var(--blue-deep); }

/* ————— header: floats on the hero, becomes a cream block on scroll ————— */

.head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.9s var(--ease), border-color 0.9s var(--ease);
}

.head__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: calc(clamp(1.2rem, 2.2vw, 1.9rem) - 4px);
  padding-bottom: calc(clamp(1.2rem, 2.2vw, 1.9rem) - 4px);
}

.logo { display: block; }

.logo__img { height: 2.5rem; width: auto; display: none; }
.logo__img--light { display: block; }
.head.is-solid .logo__img--light,
.head.is-menu .logo__img--light { display: none; }
.head.is-solid .logo__img--dark,
.head.is-menu .logo__img--dark { display: block; }

/* two-bar burger */

.burger {
  --bar: rgba(248, 244, 236, 0.92);
  position: relative;
  z-index: 2;
  width: 2.1rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.42rem;
}

.burger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--bar);
  transition: transform 0.9s var(--ease), opacity 0.9s var(--ease), background 0.9s var(--ease);
}

.head.is-solid .burger { --bar: var(--ink); }
.head--static .burger { --bar: var(--ink); }

.burger[aria-expanded="true"] { --bar: var(--ink); }
/* both bars meet at the centre and cross at right angles: a true X */
.burger[aria-expanded="true"] span:first-child { transform: translateY(calc(0.21rem + 0.5px)) rotate(45deg) scaleX(0.82); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(calc(-0.21rem - 0.5px)) rotate(-45deg) scaleX(0.82); }

/* full-screen menu */

.menu {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: var(--cream);
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }

.menu__in {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 8vw, 5rem);
}

.menu__list { list-style: none; }

.menu__list a {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--ink);
  transition: color 0.9s var(--ease);
}

.menu__list a:hover { color: var(--blue-deep); }

.menu__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.6rem;
}

@media (prefers-reduced-motion: reduce) {
  .menu, .burger span { transition: none; }
}

.head.is-solid { background: var(--cream); border-color: var(--line); }
.head.is-solid .nav a { color: var(--mute); }
.head.is-solid .nav a:hover, .head.is-solid .nav a[aria-current] { color: var(--blue-deep); }
.nav a:hover { color: var(--paper); }

/* sub-pages: no hero, so the bar is solid from the start and content clears it */
/* clear the fixed bar exactly: logo height + its padding + hairline */
.head--static ~ main {
  padding-top: calc(2.5rem + 2 * (clamp(1.2rem, 2.2vw, 1.9rem) - 4px) + 1px);
}

@media (prefers-reduced-motion: reduce) {
  .head, .logo, .nav a { transition: none; }
}

/* ————— hero ————— */

.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 32rem;
  overflow: hidden;
}

.hero__line {
  position: absolute;
  left: var(--pad);
  bottom: clamp(1.6rem, 4vh, 2.6rem);
  z-index: 2;
  color: rgba(248, 244, 236, 0.9);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-photo { position: relative; overflow: hidden; }

.about-photo__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(43, 38, 32, 0.38);
}

.about__in {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.about__portrait {
  flex: 0 0 auto;
  width: clamp(11rem, 20vw, 17rem);
  background: var(--paper);
  border: 1px solid rgba(248, 244, 236, 0.35);
  border-radius: 2px;
  padding: 10px;
  box-shadow: 0 18px 44px rgba(30, 28, 24, 0.28);
}

.about__portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 1px;
}

.about__text {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.about__text .mono { color: rgba(248, 244, 236, 0.85); }
.about__text .lede { color: var(--paper); }

/* ————— band dividers (full-bleed section markers) ————— */

.band {
  background: var(--cream-2);
  border-top: 1px solid rgba(58, 54, 49, 0.09);
  border-bottom: 1px solid rgba(58, 54, 49, 0.09);
  padding: clamp(1.1rem, 2vw, 1.5rem) 0;
}

.band__in {
  display: flex;
  align-items: baseline;
  gap: 0.45em;
}

.band--centre .band__in { justify-content: center; }

.band__label {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

.band__hash {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--blue);
  opacity: 0.6;
}

/* ————— section heads (Slow Summer sheet) ————— */

.sec { padding-top: var(--block); padding-bottom: var(--block); }

.sec__head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}

.sec__head .title { grid-column: 1 / 7; white-space: nowrap; }
.sec__head--plain { display: block; }
.sec__head--centre { text-align: center; }
.sec__head--centre .title { white-space: normal; }

.sec__index {
  grid-column: 7 / 13;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--gap);
}

.sec__index a,
.sec__index span {
  display: flex;
  gap: 0.9em;
  padding: 0.55em 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.9s var(--ease);
}

.sec__index a:hover { color: var(--blue-deep); }
.sec__index b { font-weight: 400; color: var(--mute); }

.sec__note { margin-top: 0.6rem; }

/* ————— work grid ————— */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.4rem, 5vw, 4.5rem);
}

.cell { display: flex; flex-direction: column; gap: 1rem; }

.cell__frame {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px;
  transition: border-color 0.9s var(--ease);
}

a.cell:hover .cell__frame { border-color: var(--blue); }

.cell__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  background: var(--cream-2);
}

.cell__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cell__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.2rem 0;
}

.cfoot-logo { height: 1.6rem; width: auto; }
.cfoot-logo--tall { height: 2.5rem; }

.cfoot-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
}

.cell__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
}

.cell__name small {
  display: block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 0.35rem;
}

/* filler plate — cream paper, blue handwriting, until real assets arrive */
.plate {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--cream-2);
  border: 1px solid var(--line);
}

.plate--blue { background: var(--blue); }
.plate--blue .hand { color: var(--paper); }
.plate--blue .mono { color: rgba(248, 244, 236, 0.75); }

.plate .hand { font-size: 1.7rem; }

/* ————— clients grid ————— */

.logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.logos--bare > div {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
}

.logos--bare img {
  width: 100%;
  object-fit: contain;
}

/* optically balanced — the stacked mark reads heavier, so it sits smaller */
.lg--escapology { max-width: 10rem; }
.lg--think-gita { max-width: 8.6rem; }
.lg--p1-padel   { max-width: 9rem; }
.lg--ty-krishna { max-width: 6rem; }

.logos .name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.logos .name small {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  margin-top: 0.4rem;
  opacity: 0.7;
}

/* ————— contact ————— */

.contact {
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 3.5vw, 3rem);
  padding-bottom: clamp(2rem, 3.5vw, 3rem);
  text-align: center;
}

.contact__row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: clamp(3rem, 12vw, 9rem);
  flex-wrap: wrap;
}

.contact__avail { display: block; margin-bottom: 1.6rem; color: var(--blue-deep); }
.contact__mark { display: block; margin-top: 1.5rem; }

/* ————— project pages ————— */

.phead {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  padding-top: clamp(1rem, 3vw, 2.5rem);
  padding-bottom: clamp(2.6rem, 5vw, 4rem);
  align-items: start;
}

.phead__logo { height: 2.6rem; width: auto; }
.phead__logo--tall { height: 4.2rem; }

.phead__main { grid-column: 1 / 8; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.phead__aside { grid-column: 9 / 13; display: flex; flex-direction: column; gap: 1.2rem; align-items: flex-start; }
.phead__aside p { color: var(--mute); font-size: 0.9rem; }

.phead .title { font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.25; }

.pfig { margin-top: var(--gap); }

.vwrap { position: relative; }

.vwrap video { display: block; }

.vwatch {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-radius: 2px;
  padding: 0.75em 1.5em;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.9s var(--ease), color 0.9s var(--ease), opacity 0.9s var(--ease);
}



.vwrap.is-playing .vwatch { opacity: 0; pointer-events: none; }

.pfig img, .pfig video {
  width: 100%;
  border-radius: 2px;
  box-shadow: var(--shadow);
  background: var(--cream-2);
}

.pfig figcaption { margin-top: 0.9rem; }

.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: var(--gap); }
.pgrid .pfig { margin-top: 0; }

.pplate { aspect-ratio: 16 / 10; }
.pplate--tall { aspect-ratio: 4 / 5; }
.pplate--video { aspect-ratio: 16 / 9; }

.pnext {
  margin-top: var(--block);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  padding-bottom: var(--block);
}

/* ————— reveal (quiet) ————— */

.js .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; transition: none; }
}

/* ————— responsive ————— */

@media (max-width: 820px) {
  .hero { height: 100svh; min-height: 24rem; }

  .sec__head { display: block; }
  .sec__index { margin-top: 1.4rem; grid-template-columns: 1fr; }

  .grid { grid-template-columns: 1fr; }
  .about__in { flex-direction: column; align-items: flex-start; }
  .logos { grid-template-columns: repeat(2, 1fr); gap: clamp(2rem, 8vw, 3rem) 2rem; }


  .phead { display: block; }
  .phead__aside { margin-top: 1.8rem; }
  .pgrid { grid-template-columns: 1fr; }
}

/* band label that is also a link (album → Photos) */
a.band__label { transition: color 0.9s var(--ease); }
a.band__label:hover { color: var(--ink); }

/* ————— launch fixes ————— */

/* menu links were landing with the section label hidden behind the fixed bar */
[id] { scroll-margin-top: calc(2.5rem + 2 * (clamp(1.2rem, 2.2vw, 1.9rem) - 4px)); }

/* thumb-sized hit areas without changing how anything looks */
.burger { box-sizing: content-box; padding: 0.7rem; margin: -0.7rem; }
.contact__row .link, .menu__foot .link, .pnext .link { padding-top: 0.7em; padding-bottom: 0.55em; }

@media (max-width: 820px) {
  /* long craft labels drop under the logo instead of squeezing it */
  .cell__foot { flex-wrap: wrap; row-gap: 0.5rem; }
  .contact__row { flex-direction: column; align-items: center; gap: 0.4rem; }
}

/* a single portrait frame closing an album */
.pfig--narrow { max-width: min(575px, 100%); margin-inline: auto; }

/* ————— work cards: image held in a narrow dark border, fading into the card ————— */

.cards {
  --card: #1D1A17;
  --edge: 2px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.2vw, 2rem);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 3 / 4;
  padding: var(--edge);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 22px 50px rgba(40, 34, 28, 0.22), 0 2px 6px rgba(40, 34, 28, 0.12);
}

.card__img {
  position: relative;
  flex: 0 0 62%;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}

.card__img img { width: 100%; height: 100%; object-fit: cover; }

/* the fade lives on the image, so the dark border stays crisp around it */
.card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(29, 26, 23, 0) 42%, rgba(29, 26, 23, 0.7) 76%, var(--card) 100%);
}

.card__body {
  position: relative;
  z-index: 1;
  margin-top: 0.3rem;                       /* the mark sits up in the fade, close to the image */
  padding: 0 clamp(1.1rem, 1.9vw, 1.7rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.card__logo { height: 1.9rem; width: auto; max-width: 100%; }
.card__logo--tall { height: 3rem; }

.card__name {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--cream);
}

.card__line {
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(242, 237, 227, 0.72);
  text-wrap: balance;          /* one line, or two of even length: never a stray word */
}

.nb { white-space: nowrap; }

.card__craft {
  margin-top: auto;
  padding: 0 clamp(1.1rem, 1.9vw, 1.7rem) clamp(1.1rem, 1.8vw, 1.5rem);
  color: rgba(242, 237, 227, 0.55);
}

@media (max-width: 1100px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px)  { .cards { grid-template-columns: 1fr; } .card { aspect-ratio: 4 / 5; } }

.card__logo--sig { height: 2.7rem; }

/* card awaiting its image */
.card__img--blank { background: #26221E; }
.card__logo--wide { height: 2.35rem; }
.card__pic--faces { object-position: center 27%; }

/* responsive YouTube frame */
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: 2px; overflow: hidden; box-shadow: var(--shadow); background: #1D1A17; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ————— about: portrait left, write-up right, signature closing bottom-right ————— */

.about { background: #EEE8DC; }

.about__in {
  display: grid;
  grid-template-columns: clamp(15rem, 30vw, 24rem) minmax(0, 1fr);
  gap: clamp(2.2rem, 6vw, 5.5rem);
  align-items: start;
}

.about__pic img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.about__copy {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-height: 100%;
  max-width: 40rem;
}

.about__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.about__copy p { font-size: 1.12rem; line-height: 1.65; color: var(--ink); }

.about__sig {
  align-self: flex-start;
  height: 5.4rem;
  width: auto;
  margin-top: clamp(0.6rem, 2vw, 1.4rem);
}

/* photo stays beside the text on tablets; it only moves above on phones */
@media (max-width: 820px) {
  .about__in { grid-template-columns: clamp(10rem, 30vw, 15rem) minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 2.4rem); }
  .about__copy p { font-size: 1.02rem; }
}
@media (max-width: 560px) {
  .about__in { grid-template-columns: 1fr; }
  .about__pic { max-width: 13rem; }
}

/* ————— cards never get big: three across from tablet up, and their contents scale with the card ————— */

.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { container-type: inline-size; max-width: 24rem; width: 100%; justify-self: center; }

.card__body { margin-top: 1.4cqw; padding: 0 7.4cqw; gap: clamp(0.45rem, 3.6cqw, 0.85rem); }
.card__logo { height: clamp(1.25rem, 8.5cqw, 1.9rem); }
.card__logo--tall { height: clamp(2rem, 13.4cqw, 3rem); }
.card__logo--wide { height: clamp(1.5rem, 10.5cqw, 2.35rem); }
.card__logo--sig { height: clamp(1.8rem, 12cqw, 2.7rem); }
.card__line { font-size: clamp(0.78rem, 4.4cqw, 0.98rem); line-height: 1.4; }
.card__craft { padding: 0 7.4cqw 5.6cqw; font-size: clamp(0.56rem, 3.1cqw, 0.7rem); }

@media (max-width: 1100px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.8rem, 2vw, 1.4rem); } }
@media (max-width: 820px)  { .card { aspect-ratio: 3 / 4.25; } }
@media (max-width: 600px)  { .cards { grid-template-columns: 1fr; } .card { aspect-ratio: 3 / 4; max-width: 21rem; } }

/* small cards give the text a little more of the card, so a two-line category never crowds the sentence */
.card__craft { line-height: 1.45; }
@container (max-width: 270px) {
  .card__img { flex-basis: 53%; }
  .card__body { gap: 0.4rem; }
}
@media (max-width: 820px) and (min-width: 601px) { .card { aspect-ratio: 3 / 4.4; } }

/* ————— work row: one line of cards, drifting endlessly; swipe or scroll it by hand too ————— */

.sec--loop { padding-inline: 0; }

.cards[data-loop] {
  display: flex;
  gap: clamp(1rem, 1.8vw, 1.6rem);
  overflow-x: auto;
  overflow-y: hidden;
  /* the row clips whatever spills outside it, so it is made tall enough to hold the whole
     shadow (22px offset + 50px blur), and the extra height is taken back with a negative margin */
  padding-block: 1.5rem 6rem;
  margin-block: -1rem -2.8rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cards[data-loop]::-webkit-scrollbar { display: none; }

.cards[data-loop] .card {
  flex: 0 0 clamp(15rem, 23vw, 21rem);
  max-width: none;
  aspect-ratio: 3 / 4;
}

/* without the drift (reduced motion, or no script) the row starts at the page margin */
.cards[data-loop]:not(.is-looping) { padding-inline: var(--pad); }

.card__logo--thin { height: clamp(0.95rem, 6.4cqw, 1.45rem); }

/* ————— audio tracks ————— */

.phead__logo--thin { height: 1.5rem; }

.tracks { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-width: 46rem; }

.track {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.track__btn {
  flex: 0 0 auto;
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.9s var(--ease), color 0.9s var(--ease);
}
.track__btn svg { width: 0.7rem; height: 0.8rem; }
.track__btn .i-play { margin-left: 2px; }
.track__btn .i-pause { display: none; }
.track.is-playing .i-play { display: none; }
.track.is-playing .i-pause { display: block; }
.track.is-playing .track__btn { background: var(--ink); color: var(--cream); }
.track__btn:disabled { opacity: 0.35; cursor: default; }

.track__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.track__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.track__name { font-size: 1.3rem; line-height: 1.2; }

.track__bar { position: relative; height: 1px; background: var(--line); cursor: pointer; }
.track__bar::before { content: ''; position: absolute; inset: -0.7rem 0; }      /* easier to hit */
.track__bar i { position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--blue-deep); }

/* ————— Charlie's own work: the one light card in a row of dark ones ————— */

.card--own {
  --card: #F8F4EC;
  background: var(--card);
  box-shadow: 0 22px 50px rgba(40, 34, 28, 0.16), 0 2px 6px rgba(40, 34, 28, 0.08), inset 0 0 0 1px rgba(58, 54, 49, 0.14);
}
.card--own .card__img::after {
  background: linear-gradient(to bottom, rgba(248, 244, 236, 0) 42%, rgba(248, 244, 236, 0.72) 76%, var(--card) 100%);
}
.card--own .card__line { color: rgba(58, 54, 49, 0.78); }
.card--own .card__craft { color: var(--blue-deep); }

/* card sentences in DM Mono (cards only) */
.card__line {
  font-family: var(--mono);
  font-size: clamp(0.62rem, 3.5cqw, 0.78rem);
  line-height: 1.6;
  letter-spacing: 0;
}

/* project page descriptions in DM Mono, matching the card sentences */
.phead__aside p {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  letter-spacing: 0;
  text-wrap: pretty;
}

/* about: the quote, in italic */
.about__quote { margin-top: 0.6rem; }
.about__copy .about__quote p {
  font-style: italic;
  color: rgba(58, 54, 49, 0.72);       /* the body colour, a little lighter */
}
.about__quote cite {
  display: block;
  margin-top: 0.7rem;
  font-style: normal;
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--ink);
}

@media (max-width: 820px) { .about__quote cite { font-size: 1.02rem; } }

.phead__aside p + p { margin-top: -0.4rem; }
.phead__aside em { font-style: italic; }

/* ————— project header: one left-aligned stack (mark, write-up, link) ————— */
.phead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.4rem, 2.4vw, 2rem);
  padding-top: clamp(2.2rem, 4.5vw, 3.6rem);
}
.phead__main, .phead__aside { grid-column: auto; margin-top: 0; }
.phead__aside { gap: 1.1rem; max-width: 38rem; }
.phead__aside p + p { margin-top: -0.2rem; }
.phead__aside .link { margin-top: 0.5rem; }

/* about portrait as a circle */
.about__pic img { border-radius: 50%; }

/* the hum wordmark: wide and heavy, so it sits a little lower than the old signature did */
.logo__img { height: 2.6rem; }
.head__in { padding-top: calc(clamp(1.2rem, 2.2vw, 1.9rem) - 4px); padding-bottom: calc(clamp(1.2rem, 2.2vw, 1.9rem) - 4px); }
.head--static ~ main { padding-top: calc(2.6rem + 2 * (clamp(1.2rem, 2.2vw, 1.9rem) - 4px) + 1px); }
[id] { scroll-margin-top: calc(2.6rem + 2 * (clamp(1.2rem, 2.2vw, 1.9rem) - 4px)); }
.card__logo--hum { height: clamp(1.9rem, 12.5cqw, 2.9rem); }

/* ————— each client card takes a deep tone from its own brand ————— */
.card--tg  { --card: #1C6B79; }   /* Think Gita official teal */
.card--p1  { --card: #052540; }   /* P1 Padel official navy */
.card--tkc { --card: #232740; }   /* Tŷ Krishna official navy */
.card--esc { --card: #2A2725; }   /* Escapology graphite */

/* the fade follows whatever colour the card is */
.card .card__img::after {
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--card) 0%, transparent) 42%,
    color-mix(in srgb, var(--card) 72%, transparent) 76%,
    var(--card) 100%);
}
.card--tg .card__line, .card--p1 .card__line, .card--tkc .card__line { color: rgba(242, 237, 227, 0.82); }
.card--tg .card__craft, .card--p1 .card__craft, .card--tkc .card__craft { color: rgba(242, 237, 227, 0.66); }
