/* ==========================================================================
   Carmen Leung · KA KA Projects Limited
   carmenleung.com

   Plain CSS. No build step, no framework. Edit this file directly.

   Colours are defined once in the :root block below. Change a value there
   and it updates everywhere on the page.
   ========================================================================== */

:root {
  --font-sans: 'Poppins', sans-serif;

  --radius: 0.375rem;
  --radius-lg: 0.375rem;
  --radius-2xl: calc(0.375rem + 8px);

  --background: oklch(0.9855 0.003 84.6);   /* warm off white page */
  --foreground: oklch(0.2178 0 0);          /* headings, near black */
  --body-copy: oklch(0.389 0.01 286);       /* body text */
  --muted-foreground: oklch(0.575 0.008 286); /* captions, small grey */
  --card: oklch(1 0 0);                     /* reference cards, white */
  --primary: oklch(0.437 0.161 310.8);      /* deep purple accent */
  --primary-foreground: oklch(0.984 0.003 247.858); /* text on purple */
  --secondary: oklch(0.931 0.022 310.6);    /* pale purple tint panels */
  --border: oklch(0.914 0.008 82);          /* hairlines */

  --hero-foreground: oklch(1 0 0);
  --hero-scrim: oklch(0.18 0.006 286 / 62%);
  --hero-surface: oklch(0.24 0.006 286);
}

/* --- base reset ----------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
* { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: inherit; }
img, video { display: block; vertical-align: middle; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  margin: 0;
  letter-spacing: 0;
  /* The full width tint behind "What I do" is drawn with a very wide shadow,
     which leaves a stray pixel of sideways scroll. "clip" removes it without
     creating a scroll container, so the sticky header keeps working. */
  overflow-x: clip;
}

html { scroll-behavior: smooth; scroll-padding-top: 120px; }
::selection { background: var(--secondary); color: var(--foreground); }
a { transition: color 180ms ease; }
a:hover { color: var(--primary); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 5px; }

/* --- header and navigation ------------------------------------------------ */

.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in oklab, var(--secondary) 38%, var(--background)); border-bottom: 1px solid color-mix(in oklab, var(--primary) 16%, transparent); }
.header-inner { max-width: 1200px; padding: 20px 48px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.identity { display: flex; align-items: center; flex-shrink: 0; gap: 11px; }
.header-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid color-mix(in oklab, var(--primary) 22%, transparent); }
.identity-text { display: flex; flex-direction: column; gap: 2px; }
.identity-name { font-size: 16px; font-weight: 600; }
.identity-company { font-size: 12px; color: var(--muted-foreground); }
.desktop-nav { display: flex; align-items: center; gap: 28px; }
.desktop-nav a { font-size: 13px; color: var(--body-copy); padding: 7px 13px; border-radius: 999px; transition: color 180ms ease, background-color 180ms ease; }
.desktop-nav a:hover { color: var(--primary); background: color-mix(in oklab, var(--primary) 7%, transparent); }
.desktop-nav a[aria-current] { color: var(--primary); background: color-mix(in oklab, var(--primary) 11%, transparent); font-weight: 500; }
.menu-button { display: none; align-items: center; justify-content: center; white-space: nowrap; height: 36px; padding: 0 16px; font-size: 12px; font-weight: 400; border-radius: 999px; transition: color 180ms ease, background-color 180ms ease; }
.mobile-nav { display: none; }

/* --- page column and hero ------------------------------------------------- */

.page-column { width: min(760px, calc(100% - 64px)); margin: 0 auto; }
.hero-band { position: relative; isolation: isolate; background: var(--hero-surface); color: var(--hero-foreground); overflow: hidden; }
.hero-background { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-band::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--hero-scrim); }
.hero-band .eyebrow, .hero-band .hero-intro, .hero-band .hero-detail, .hero-band .brand-row { color: var(--hero-foreground); }
.hero { padding-top: 110px; padding-bottom: 105px; }
.eyebrow { font-size: 12px; font-weight: 500; color: var(--primary); margin-bottom: 28px; }
.hero h1 { font-size: 62px; font-weight: 700; line-height: 1.16; margin: 0 0 34px; }
.hero-intro { font-size: 18px; line-height: 1.8; color: var(--body-copy); max-width: 660px; margin-bottom: 16px; }
.hero-detail { font-size: 16px; line-height: 1.8; color: var(--muted-foreground); max-width: 660px; }
.brand-row { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 45px; color: var(--muted-foreground); font-size: 11px; font-weight: 500; }

/* --- sections ------------------------------------------------------------- */

.section { margin-top: 160px; }
/* Tightened gap after sections that end on a caption or an attribution */
.section-tight-top { margin-top: 108px; }
#references.section-tight-top { margin-top: 68px; }
.section-first { margin-top: 0; padding-top: 55px; border-top: 1px solid var(--border); }
.section-label { color: var(--primary); font-size: 12px; margin-bottom: 24px; font-weight: 500; }
.section h2 { font-size: 36px; line-height: 1.3; font-weight: 700; margin: 0 0 32px; }
.body-text { color: var(--body-copy); font-size: 17px; line-height: 1.8; }
.body-text p + p { margin-top: 20px; }

/* --- pull quotes ---------------------------------------------------------- */

.pull-quote { position: relative; margin: 44px 0 0; padding: 18px 8px 4px 68px; }
.pull-quote::before { font-family: Georgia, 'Times New Roman', serif; color: color-mix(in oklab, var(--primary) 55%, transparent); pointer-events: none; user-select: none; line-height: 1; content: '\201C'; position: absolute; top: 0; left: 4px; font-size: 84px; }
.pull-quote p { font-size: 23px; line-height: 1.65; }
.pull-quote > p::before,
.pull-quote > p::after { content: none; }
.quote-credit { margin-top: 18px; font-size: 12px; line-height: 1.7; color: var(--muted-foreground); position: relative; z-index: 1; }
.quote-credit strong { color: var(--body-copy); font-weight: 500; }

/* --- what I do ------------------------------------------------------------ */

.icon-tile { width: 44px; height: 44px; border-radius: var(--radius); background: var(--secondary); border: 1px solid color-mix(in oklab, var(--primary) 14%, transparent); color: var(--primary); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.icon-tile-on-band { background: var(--background); border-color: color-mix(in oklab, var(--primary) 18%, transparent); }
.services-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.service-item { padding: 20px 0; border-top: 1px solid var(--border); }
.service-item:nth-child(-n+2) { border-top: none; padding-top: 2px; }
.service-item p { font-size: 15px; line-height: 1.8; color: var(--body-copy); margin: 0; }
.service-item strong { font-weight: 600; color: var(--foreground); }
.service-item-full { grid-column: 1 / -1; padding-bottom: 0; }
@keyframes card-enter { from { opacity: 0; transform: translateY(16px); } }
.motion-ready .services-list:not(.is-visible) .service-item { opacity: 0; transform: translateY(16px); }
.motion-ready .services-list.is-visible .service-item { animation: card-enter 600ms backwards; animation-delay: var(--card-delay); }
@media (max-width: 700px) {
  .services-list { grid-template-columns: 1fr; }
  .service-item { border-top: 1px solid var(--border); padding: 16px 0; }
  .service-item:first-child { border-top: none; padding-top: 2px; }
  .service-item p { font-size: 14px; line-height: 1.7; }
}

/* --- selected work -------------------------------------------------------- */

.case-block { border-top: 1px solid var(--border); padding-top: 44px; margin-top: 54px; }
.company-label { color: var(--primary); font-size: 12px; font-weight: 500; margin-bottom: 15px; }
.case-block h3 { font-size: 27px; line-height: 1.45; font-weight: 600; margin: 0 0 24px; }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 44px; }
.case-copy { font-size: 15px; line-height: 1.9; color: var(--body-copy); }
.case-copy p + p { margin-top: 20px; }
.result { padding-top: 2px; }
.result-number { font-size: 43px; font-weight: 700; line-height: 1.15; color: var(--primary); }
.result-unit { font-size: 23px; font-weight: 600; color: var(--primary); margin-top: 3px; }
.result-caption { font-size: 12px; line-height: 1.8; color: var(--muted-foreground); margin-top: 18px; }
.work-figure { margin-top: 34px; }
.work-figure img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.work-figure-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.work-figure-duo img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.work-figure-full img { aspect-ratio: auto; border: 1px solid var(--border); }
.work-figure-product { max-width: 680px; margin-left: auto; margin-right: auto; }
.work-figure-product img { background: #ffffff; }
@media (max-width: 640px) { .work-figure-duo { grid-template-columns: 1fr; } .work-figure-duo img { aspect-ratio: 4 / 3; } }
.nike-video-figure video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); background: var(--secondary); }
.figure-credit { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 11px; color: var(--muted-foreground); }
.figure-credit a { border-bottom: 1px solid var(--border); }

/* --- recent work ---------------------------------------------------------- */

.recent-intro { color: var(--muted-foreground); font-size: 14px; margin-top: -12px; margin-bottom: 36px; }
.recent-block { padding: 36px 0; border-top: 1px solid var(--border); }
.recent-block h3 { font-size: 21px; font-weight: 600; line-height: 1.55; margin-bottom: 20px; }
.recent-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.recent-site-link { color: var(--primary); text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--primary) 35%, transparent); white-space: nowrap; }
.recent-site-link:hover { border-bottom-color: var(--primary); }
.recent-result { margin-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 24px 28px; border-radius: var(--radius-lg); background: var(--secondary); border: 1px solid color-mix(in oklab, var(--primary) 14%, transparent); }
.recent-result .result-number { font-size: 43px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.recent-result .result-caption { margin-top: 0; font-size: 13px; line-height: 1.7; max-width: 48ch; }
.recent-result .result-divider { display: none; }
.result-steps { display: flex; align-items: flex-start; gap: 28px; }
.result-step { position: relative; text-align: center; }
.result-step .result-number { font-size: 43px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.result-step-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground); margin-top: 6px; }
.result-step-arrow { position: absolute; top: 10px; right: -21px; color: color-mix(in oklab, var(--primary) 45%, transparent); font-size: 14px; }
@media (min-width: 768px) {
  .recent-result { flex-direction: row; align-items: center; gap: 24px; }
  .recent-result .result-divider { display: block; flex: none; width: 1px; height: 40px; background: color-mix(in oklab, var(--primary) 24%, transparent); }
}
/* On narrow phones the four step funnel is wider than the screen at full size,
   so it scales down rather than forcing the page to scroll sideways. */
@media (max-width: 430px) {
  .recent-result { padding: 20px 18px; }
  .result-steps { gap: 12px; }
  .result-step .result-number { font-size: 30px; }
  .result-step-label { font-size: 10px; letter-spacing: 0.04em; }
  .result-step-arrow { top: 6px; right: -11px; font-size: 12px; }
}

/* --- how I work ----------------------------------------------------------- */

.work-band { background: var(--secondary); margin-top: 72px; padding: 70px 0 40px; }
.work-band .section { margin-top: 0; }
.working-block { padding-top: 24px; margin-top: 28px; border-top: 1px solid var(--border); }
.working-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.working-head h3 { font-size: 18px; font-weight: 600; margin: 0; }
.working-block p { font-size: 16px; line-height: 1.8; color: var(--body-copy); }

/* --- references ----------------------------------------------------------- */

.references-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.reference { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 26px 26px 24px; display: flex; flex-direction: column; justify-content: flex-start; gap: 18px; box-shadow: 0 1px 3px color-mix(in oklab, var(--foreground) 5%, transparent); transition: box-shadow 250ms ease, transform 250ms ease; }
.reference:hover { box-shadow: 0 6px 18px color-mix(in oklab, var(--foreground) 9%, transparent); transform: translateY(-2px); }
.reference blockquote { font-size: 14px; line-height: 1.8; color: var(--body-copy); margin: 0; }
.reference-credit { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 4px; }
.initial-avatar { width: 36px; height: 36px; border-radius: 50%; background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; overflow: hidden; }
.initial-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.reference-person-link { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.reference-person-link:hover .reference-name { color: var(--primary); }
.reference-name { font-size: 13px; font-weight: 500; line-height: 1.5; }
.reference-role { font-size: 11px; line-height: 1.6; color: var(--muted-foreground); }
.references-link { text-align: center; margin-top: 8px; }
.references-link a { color: var(--primary); text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--primary) 35%, transparent); }
.references-link a:hover { border-bottom-color: var(--primary); }
@media (min-width: 768px) {
  .references-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
}

/* --- about --------------------------------------------------------------- */

.about-grid { display: grid; grid-template-columns: 180px 1fr; gap: 36px; }
.about-portrait { width: 180px; align-self: start; background: color-mix(in oklab, var(--primary) 14%, white); border-radius: 50%; padding: 10px; }
.about-photo { display: block; border-radius: 50%; overflow: hidden; aspect-ratio: 1 / 1; }
.about-photo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 40%; }

/* --- contact and footer --------------------------------------------------- */

.contact-section { padding-top: 54px; padding-bottom: 100px; border-top: 1px solid var(--border); }
.contact-band { background: var(--primary); margin-top: 108px; padding: 78px 0 96px; }
.contact-band .contact-section { margin-top: 0; border-top: none; padding-top: 0; padding-bottom: 0; }
.contact-band .section-label { color: color-mix(in oklab, var(--primary-foreground) 78%, transparent); }
.contact-band h2, .contact-band .body-text p, .contact-band .contact-email, .contact-band .contact-links a { color: var(--primary-foreground); }
.contact-band .body-text p { color: color-mix(in oklab, var(--primary-foreground) 88%, transparent); }
.contact-band .contact-email { border-bottom-color: color-mix(in oklab, var(--primary-foreground) 55%, transparent); }
.contact-band .contact-email:hover { color: color-mix(in oklab, var(--primary-foreground) 80%, var(--primary)); }
.contact-band .contact-links { color: color-mix(in oklab, var(--primary-foreground) 75%, transparent); }
.contact-band .contact-links a:hover { color: var(--primary-foreground); }
.contact-section h2 { font-size: 48px; margin-bottom: 26px; }
.contact-email { font-size: 29px; font-weight: 500; display: inline-block; margin-top: 32px; border-bottom: 1px solid var(--foreground); padding-bottom: 8px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 26px; font-size: 14px; color: var(--muted-foreground); }
.footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; color: var(--muted-foreground); font-size: 11px; }

/* --- reveal on scroll ----------------------------------------------------- */

.reveal { transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1), transform 900ms cubic-bezier(0.22, 1, 0.36, 1); will-change: opacity, transform; }
.motion-ready .reveal:not(.is-visible) { opacity: 0; transform: translateY(56px) scale(0.985); }
.hero > * { animation: enter 750ms both; }
.hero > :nth-child(2) { animation-delay: 80ms; }
.hero > :nth-child(3) { animation-delay: 160ms; }
.hero > :nth-child(4) { animation-delay: 230ms; }
.hero > :nth-child(5) { animation-delay: 300ms; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* --- nav swaps to a Menu button -------------------------------------------
   The six nav items need about 910px beside the name, so tablets in portrait
   get the Menu button too, not just phones. */

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .site-header .menu-button { display: inline-flex; font-size: 12px; color: var(--primary); background: color-mix(in oklab, var(--primary) 10%, transparent); border: 1px solid color-mix(in oklab, var(--primary) 18%, transparent); }
  .site-header.is-open .mobile-nav { display: flex; flex-wrap: wrap; padding: 10px 48px 20px; gap: 16px 24px; font-size: 13px; }
}

/* --- phones and small tablets --------------------------------------------- */

@media (max-width: 700px) {
  html { scroll-padding-top: 110px; }
  .header-inner { padding: 17px 24px; }
  .site-header.is-open .mobile-nav { padding: 10px 24px 20px; }
  .page-column { width: calc(100% - 48px); }
  .hero { padding-top: 52px; padding-bottom: 52px; }
  .hero h1 { font-size: 36px; line-height: 1.2; margin-bottom: 28px; }
  .hero h1 br { display: none; }
  .hero-intro { font-size: 17px; }
  .hero-detail { font-size: 15px; }
  .brand-row { gap: 16px; font-size: 10px; margin-top: 34px; }
  .section { margin-top: 96px; }
  .section-tight-top { margin-top: 64px; }
  #references.section-tight-top { margin-top: 44px; }
  .section-first { margin-top: 0; padding-top: 42px; }
  .section h2 { font-size: 30px; }
  .body-text { font-size: 16px; }
  .pull-quote { margin-top: 36px; padding: 14px 8px 4px 52px; }
  .pull-quote::before { font-size: 60px; top: 0; left: 2px; }
  .pull-quote p { font-size: 21px; }
  .case-grid { grid-template-columns: 1fr; gap: 28px; }
  .case-block h3 { font-size: 24px; }
  .result { max-width: 270px; }
  .result-caption { margin-top: 12px; }
  .work-band { margin-top: 28px; padding: 52px 0 28px; }
  .contact-band { margin-top: 64px; padding: 56px 0 72px; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-section h2 { font-size: 38px; }
  .contact-email { font-size: 20px; }
  .footer-inner { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-ready .reveal:not(.is-visible) { opacity: 1; transform: none; }
}

/* --- email popup ---------------------------------------------------------- */

.email-dialog-overlay { position: fixed; inset: 0; z-index: 60; background: color-mix(in oklab, var(--foreground) 42%, transparent); display: flex; align-items: center; justify-content: center; padding: 24px; animation: email-overlay-in 180ms ease; }
.email-dialog-overlay[hidden] { display: none; }
@keyframes email-overlay-in { from { opacity: 0; } to { opacity: 1; } }
.email-dialog { position: relative; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px 34px 30px; width: min(420px, 100%); box-shadow: 0 24px 60px color-mix(in oklab, var(--foreground) 25%, transparent); text-align: center; animation: email-dialog-in 220ms ease; outline: none; }
@keyframes email-dialog-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.email-dialog-close { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted-foreground); cursor: pointer; padding: 6px; }
.email-dialog-close:hover { color: var(--primary); }
.email-dialog-label { font-size: 12px; font-weight: 500; color: var(--primary); margin-bottom: 8px; }
.email-dialog-address { font-size: 21px; font-weight: 600; word-break: break-all; margin-bottom: 24px; }
.email-dialog-actions { display: flex; flex-direction: column; gap: 10px; }
.email-dialog-option { display: block; width: 100%; padding: 13px 18px; border-radius: var(--radius); font-size: 15px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--background); color: var(--foreground); transition: border-color 200ms ease, background 200ms ease; }
.email-dialog-option:hover { border-color: color-mix(in oklab, var(--primary) 30%, transparent); background: color-mix(in oklab, var(--primary) 6%, transparent); }
.email-dialog-option-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); text-decoration: none; }
.email-dialog-option-primary:hover { background: color-mix(in oklab, var(--primary) 88%, black); border-color: var(--primary); }
@media (prefers-reduced-motion: reduce) { .email-dialog-overlay, .email-dialog { animation: none; } }

/* --- full bleed tint behind What I do ------------------------------------- */

.section-tinted { background: var(--secondary); box-shadow: 0 0 0 100vmax var(--secondary); clip-path: inset(-56px -100vmax); padding-top: 0; padding-bottom: 0; }
#services.section-tinted { margin-top: 164px; margin-bottom: 56px; }
