/* =========================================================
   Genesis — Portfolio
   Neo-brutalist, colourful, playful.
   ========================================================= */

:root {
  --ink: #111111;
  --cream: #FFFDF6;
  --red: #FF4B3E;
  --pink: #FFE4EC;
  --pink-deep: #FFD0DD;
  --yellow: #FFE58A;
  --purple: #6C4BF4;
  --lilac: #C9B8FF;
  --sky: #BFE6FF;
  --coral: #FF8F7A;
  --green: #3DBE7A;

  --font-head: "Satoshi", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --border: 3px solid var(--ink);
  --radius: 28px;
  --radius-sm: 16px;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-lg: 10px 10px 0 var(--ink);
  --nav-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--red);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: var(--border);
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

.btn--pink { background: var(--pink); color: var(--ink); }
.btn--pink:hover { background: #fff0f5; }
.btn--ink { background: var(--ink); color: var(--cream); box-shadow: 4px 4px 0 rgba(17, 17, 17, .35); }
.btn--ink:hover { box-shadow: 6px 6px 0 rgba(17, 17, 17, .35); }
.btn--glass {
  background: rgba(255, 255, 255, .2);
  color: var(--ink);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn--glass:hover { background: rgba(255, 255, 255, .34); }
.btn--lg { padding: 18px 34px; font-size: 1.125rem; }
.btn--block { width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
  transition: gap .2s var(--ease), text-underline-offset .2s var(--ease);
}
.text-link:hover { gap: 12px; text-underline-offset: 9px; }
.text-link--light { color: var(--ink); }

.chip {
  display: inline-block;
  padding: 5px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 16px;
}
.nav__inner {
  max-width: 1200px;
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 14px 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1.5px solid rgba(17, 17, 17, .22);
  border-radius: 999px;
  transition: box-shadow .3s, background-color .3s;
}
.nav.is-scrolled .nav__inner {
  background: rgba(255, 253, 246, .6);
  box-shadow: 0 10px 30px rgba(17, 17, 17, .12);
}
.nav__logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.nav__logo span { color: var(--purple); }
.nav__logo--light { color: var(--cream); }
.nav__logo--light span { color: var(--coral); }

.nav__menu { display: flex; align-items: center; gap: 28px; }
.nav__links { display: flex; gap: 6px; }
.nav__links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s;
}
.nav__links a:hover { background: rgba(17, 17, 17, .08); }
.nav__cta { padding: 12px 22px; }

.nav__toggle {
  display: none;
  width: 50px;
  height: 50px;
  padding: 0;
  border: var(--border);
  border-radius: 50%;
  background: var(--pink);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav__toggle span {
  width: 20px;
  height: 3px;
  border-radius: 3px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: 130px 0; position: relative; }
.section__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.035em;
  margin-bottom: 56px;
}
.lead { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; font-weight: 500; }

/* ---------- Hero ---------- */
.hero {
  background: var(--red);
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 80px) 0 100px;
  display: flex;
  align-items: center;
  border-bottom: var(--border);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 56px;
  align-items: center;
}
.eyebrow {
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .16em;
  margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(3rem, 5.2vw, 5.8rem);
  line-height: .92;
  letter-spacing: -.045em;
  margin-bottom: 26px;
}
.hero__hi { display: block; }
.hero__typed { display: inline; }
.cursor {
  display: inline-block;
  width: .08em;
  height: .82em;
  margin-left: .06em;
  background: var(--ink);
  vertical-align: -.04em;
  animation: blink 1s steps(1) infinite;
}
.wave {
  display: inline-block;
  margin-left: .12em;
  font-size: .8em;
  transform-origin: 70% 80%;
  animation: wave 2.4s ease-in-out infinite;
}
.hero__desc {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 500;
  max-width: 34ch;
  margin-bottom: 34px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 52px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 14px;
  max-width: 560px;
}
.stat {
  padding: 16px 18px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .16);
}
.stat__num {
  display: block;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label { display: block; margin-top: 6px; font-size: .85rem; font-weight: 600; line-height: 1.3; }

.hero__media { position: relative; }
.portrait {
  position: relative;
  max-width: 460px;
  margin-left: auto;
  border: var(--border);
  border-radius: 36px;
  overflow: hidden;
  background: var(--pink);
  box-shadow: var(--shadow-lg);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform .5s var(--ease), box-shadow .3s;
}
.portrait:hover { --ty: -6px; box-shadow: 14px 14px 0 var(--ink); }
.portrait img { width: 100%; }
.portrait__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ink);
}
.portrait__caption {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 18px;
  padding: 12px 16px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .3s, transform .3s var(--ease);
  pointer-events: none;
}
.portrait.is-playing .portrait__caption:not(:empty) { opacity: 1; transform: none; }

.play-btn {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  border: var(--border);
  border-radius: 999px;
  background: var(--cream);
  font-family: var(--font-head);
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.play-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.play-btn__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  border: 2.5px solid var(--ink);
}
.play-btn__icon svg { width: 20px; height: 20px; fill: var(--ink); }
.play-btn .icon-stop { display: none; }
.portrait.is-playing .play-btn .icon-play { display: none; }
.portrait.is-playing .play-btn .icon-stop { display: block; }
.portrait.is-playing .play-btn__icon { animation: pulse 1.2s ease-in-out infinite; }

.sticker {
  position: absolute;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--ink);
  animation: float 5s ease-in-out infinite;
  pointer-events: none;
}
.sticker--one { width: 84px; height: 84px; top: -26px; right: -14px; background: var(--yellow); font-size: 1.4rem; }
.sticker--two { width: 70px; height: 70px; bottom: 64px; left: -24px; background: var(--sky); font-size: 1.8rem; animation-delay: -2.5s; }

/* ---------- About ---------- */
.about { background: var(--pink); border-bottom: var(--border); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.about__grid .section__title { margin-bottom: 0; }
.about__body { display: grid; gap: 22px; padding-top: 10px; }
.about__body p:not(.lead) { font-size: 1.1rem; max-width: 56ch; }
.about__body .text-link { justify-self: start; margin-top: 6px; }

/* ---------- Work ---------- */
.work { background: var(--yellow); border-bottom: var(--border); }
.work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}
.project {
  position: relative;
  display: flex;
  flex-direction: column;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .8s var(--ease);
}
.project:hover,
.project:focus-within { transform: translate(-4px, -4px); box-shadow: 10px 10px 0 var(--ink); }
.project__thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: var(--border);
}
.project__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.project:hover .project__thumb img { transform: scale(1.04); }
.project__body {
  position: relative;
  padding: 24px 90px 28px 26px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.project__body .chip { justify-self: start; }
.project__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.project__link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
}
.project__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.project__link:focus-visible { outline: none; }
.project:has(.project__link:focus-visible) { outline: 3px solid var(--purple); outline-offset: 4px; }
.project__body p { font-size: 1rem; color: #2c2c2c; }
.arrow-btn {
  position: absolute;
  right: 24px;
  bottom: 26px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  background: var(--pink);
  font-size: 1.4rem;
  font-weight: 700;
  transition: transform .3s var(--ease), background-color .3s;
}
.project:hover .arrow-btn { transform: rotate(45deg); background: var(--coral); }

/* ---------- Services ---------- */
.services { background: var(--purple); color: var(--cream); border-bottom: var(--border); }
.services__grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.services .section__title { margin-bottom: 24px; }
.services__intro { font-size: 1.15rem; max-width: 40ch; opacity: .92; }

.accordion { display: grid; gap: 18px; }
.acc {
  border: var(--border);
  border-radius: 24px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.acc:nth-child(2) { background: var(--pink); }
.acc:nth-child(3) { background: var(--sky); }
.acc__heading { margin: 0; }
.acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 26px;
  border: 0;
  background: none;
  text-align: left;
}
.acc__num { font-family: var(--font-head); font-weight: 700; font-size: .95rem; opacity: .6; }
.acc__title {
  flex: 1;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -.01em;
}
.acc__icon {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  border: var(--border);
  border-radius: 50%;
  background: var(--yellow);
  transition: transform .35s var(--ease), background-color .3s;
}
.acc__icon::before,
.acc__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 3px;
  border-radius: 3px;
  background: var(--ink);
  transform: translate(-50%, -50%);
}
.acc__icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .35s var(--ease); }
.acc__btn[aria-expanded="true"] .acc__icon { transform: rotate(180deg); background: var(--coral); }
.acc__btn[aria-expanded="true"] .acc__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease);
}
.acc__panel.is-open { grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; min-height: 0; }
.acc__inner p { padding: 0 26px 14px 64px; font-size: 1.02rem; }
.acc__inner .text-link { margin: 0 26px 26px 64px; font-size: 1rem; }
.acc__panel[hidden] { display: none; }

/* ---------- Process ---------- */
.process { background: var(--sky); }
.process__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.step {
  padding: 28px 24px 30px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .8s var(--ease);
}
.step:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 9px 9px 0 var(--ink); }
.step { background: var(--step-bg, var(--pink)); }
.step__num {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 42px;
  border: var(--border);
  border-radius: 50%;
  background: var(--cream);
  font-family: var(--font-head);
  font-weight: 900;
}
.step h3 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.8rem;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}
.step p { font-size: .98rem; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  border-block: var(--border);
  padding: 26px 0;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee var(--marquee-speed, 32s) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; flex-shrink: 0; }
.marquee__list li {
  display: flex;
  align-items: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.marquee__list li::after {
  content: "·";
  margin: 0 .7em;
  color: var(--coral);
}
.marquee__list li:nth-child(3n+2) { color: var(--yellow); }
.marquee__list li:nth-child(3n) { color: var(--pink-deep); }

/* ---------- Contact ---------- */
.contact { background: var(--contact-bg, var(--coral)); padding: 150px 0; }
.contact__inner { text-align: center; display: grid; justify-items: center; gap: 30px; }
.contact__title { margin-bottom: 0; font-size: clamp(3rem, 8vw, 6.6rem); }
.contact__email {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.8vw, 2rem);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
  overflow-wrap: anywhere;
  transition: text-underline-offset .2s var(--ease);
}
.contact__email:hover { text-underline-offset: 12px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--cream); padding: 36px 0; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer p { font-size: .95rem; opacity: .8; }
.footer__mail { font-weight: 600; text-decoration: none; opacity: .9; overflow-wrap: anywhere; }
.footer__mail:hover { text-decoration: underline; }

/* ---------- Modals ---------- */
.modal {
  width: min(880px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: auto;
  overscroll-behavior: contain;
}
.modal--form { width: min(640px, calc(100% - 32px)); background: var(--pink); }
.modal[open] { animation: modalIn .45s var(--ease); }
.modal::backdrop {
  background: rgba(17, 17, 17, .55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal__box { position: relative; padding: 40px; }
.modal__close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  width: 46px;
  height: 46px;
  margin: -14px -14px 0 12px;
  border: var(--border);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .2s var(--ease), background-color .2s;
}
.modal__close:hover { transform: rotate(90deg); background: var(--coral); }
.modal__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 14px 0 14px;
}
.modal--form .modal__title { margin-top: 0; }
.modal__desc { font-size: 1.05rem; margin-bottom: 22px; max-width: 62ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tags li {
  padding: 5px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--sky);
  font-size: .85rem;
  font-weight: 600;
}
.tags li:nth-child(3n+2) { background: var(--pink); }
.tags li:nth-child(3n) { background: var(--lilac); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gallery img {
  width: 100%;
  border: var(--border);
  border-radius: 18px;
}
.gallery img:first-child { grid-column: 1 / -1; }

/* ---------- Form ---------- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .95rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--cream);
  font-size: 1rem;
  transition: box-shadow .2s, border-color .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 44px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--purple);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #C4211A; box-shadow: 4px 4px 0 #C4211A; }
.field__error { min-height: 0; font-size: .85rem; font-weight: 600; color: #B01E17; }
.field__error:empty { display: none; }
.form__note { font-weight: 600; text-align: center; }
.form__note:empty { display: none; }

/* ---------- Floating assistant ---------- */
.buddy {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transition: opacity .3s, transform .3s var(--ease);
}
.buddy.is-hidden { opacity: 0; transform: translateY(30px) scale(.8); pointer-events: none; }
.buddy__bubble {
  position: relative;
  margin-bottom: 10px;
  margin-right: 60px;
  padding: 12px 16px;
  border: var(--border);
  border-radius: 18px 18px 4px 18px;
  background: var(--cream);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.3;
  box-shadow: 4px 4px 0 var(--ink);
  animation: bubbleIn .6s var(--ease) 1.5s both;
  transition: opacity .3s, transform .3s var(--ease);
}
.buddy__bubble.is-hidden { opacity: 0; transform: translateY(8px) scale(.9); }
.buddy__char {
  width: 92px;
  height: 92px;
  padding: 0;
  border: 0;
  background: none;
  animation: bob 3s ease-in-out infinite;
  filter: drop-shadow(4px 4px 0 rgba(17, 17, 17, .9));
  transition: transform .2s var(--ease);
}
.buddy__char:hover { animation-play-state: paused; transform: scale(1.08) rotate(-4deg); }
.buddy__char svg { width: 100%; height: 100%; overflow: visible; }
.buddy__char .pupil { transition: transform .15s ease-out; }
.buddy__arm--right { transform-origin: 98px 70px; animation: armWave 2.4s ease-in-out infinite; }
.buddy__close {
  position: absolute;
  right: -6px;
  bottom: 74px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--cream);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
  transition: background-color .2s;
}
.buddy__close:hover { background: var(--coral); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 90;
  width: 54px;
  height: 54px;
  border: var(--border);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity .3s, transform .3s var(--ease), visibility .3s, box-shadow .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }

/* ---------- Scroll reveal & intro (only when JS runs) ---------- */
.js .reveal,
.js .reveal-left,
.js .reveal-right {
  opacity: 0;
  transition: opacity .8s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s);
}
.js .reveal { transform: translateY(46px); }
.js .reveal-left { transform: translateX(-80px) rotate(-2deg); }
.js .reveal-right { transform: translateX(80px) rotate(2deg); }
.js .reveal.in-view,
.js .reveal-left.in-view,
.js .reveal-right.in-view { opacity: 1; transform: none; }

/* after the reveal finishes, hand transform back to hover states */
.js .project.in-view.revealed { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.js .step.in-view.revealed { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.js .project.in-view:hover,
.js .project.in-view:focus-within { transform: translate(-4px, -4px); }
.js .step.in-view:hover { transform: translate(-3px, -3px) rotate(-1deg); }

.js .intro { opacity: 0; transform: translateY(28px); }
.js.is-loaded .intro {
  opacity: 1;
  transform: none;
  transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s);
}

/* ---------- Keyframes ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(16deg); }
  20%, 40% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-12px) rotate(6deg); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(30px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes armWave {
  0%, 70%, 100% { transform: rotate(0); }
  78%, 92% { transform: rotate(-22deg); }
  85% { transform: rotate(10deg); }
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(10px) scale(.85); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav__menu { gap: 16px; }
}

@media (max-width: 900px) {
  :root { --nav-h: 66px; }
  .section { padding: 96px 0; }
  .section__title { margin-bottom: 40px; }

  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 20px;
    border: var(--border);
    border-radius: 24px;
    background: var(--cream);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .25s, transform .3s var(--ease), visibility .25s;
  }
  .nav__menu.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links { flex-direction: column; gap: 2px; }
  .nav__links a { padding: 12px 14px; font-size: 1.15rem; font-family: var(--font-head); font-weight: 700; }
  .nav__cta { width: 100%; padding: 14px 22px; }

  .hero { padding: calc(var(--nav-h) + 64px) 0 80px; min-height: 0; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 64px; }
  .portrait { margin: 0 auto; max-width: 420px; }
  .sticker--one { right: 4%; }
  .sticker--two { left: 4%; }

  .about__grid,
  .services__grid { grid-template-columns: 1fr; gap: 32px; }
  .work__grid { gap: 28px; }
}

@media (max-width: 700px) {
  .work__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .container { padding: 0 16px; }
  .nav { top: 10px; padding: 0 12px; }
  .nav__inner { padding: 0 8px 0 20px; }
  .section { padding: 80px 0; }
  .contact { padding: 100px 0; }

  .hero__title { font-size: clamp(2.5rem, 12.5vw, 3.4rem); }
  .hero__typed { white-space: normal; }
  .hero__actions .btn { flex: 1 1 auto; }
  .stats { gap: 10px; }
  .stat { padding: 12px 10px; }
  .stat__label { font-size: .75rem; }

  .project__body { padding: 20px 20px 84px; }
  .arrow-btn { right: 20px; bottom: 20px; width: 46px; height: 46px; }
  .project__title { font-size: 1.5rem; }

  .acc__btn { padding: 20px 18px; gap: 12px; }
  .acc__num { display: none; }
  .acc__inner p { padding: 0 18px 12px; }
  .acc__inner .text-link { margin: 0 18px 22px; }

  .process__grid { grid-template-columns: 1fr; }
  .step__num { margin-bottom: 24px; }

  .modal__box { padding: 28px 20px; }
  .modal__close { margin: -8px -6px 0 10px; }

  .buddy { right: 14px; bottom: 14px; }
  .buddy__char { width: 72px; height: 72px; }
  .buddy__bubble { font-size: .85rem; margin-right: 44px; padding: 10px 12px; }
  .buddy__close { bottom: 58px; }
  .to-top { left: 14px; bottom: 14px; width: 48px; height: 48px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .cursor { animation: none; }
  .js .reveal,
  .js .reveal-left,
  .js .reveal-right,
  .js .intro { opacity: 1; transform: none; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee__list[aria-hidden="true"] { display: none; }
  .marquee__list { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
}

/* =========================================================
   CMS additions — dynamic content helpers
   ========================================================= */
.hero__line { display: block; }
.hero__grid--solo { grid-template-columns: minmax(0, 1fr); }
.nav__logo-img { height: 40px; width: auto; }

main > .section:first-child,
main > .preview-bar + .section { padding-top: calc(var(--nav-h) + 110px); }
main > .marquee:first-child { margin-top: calc(var(--nav-h) + 40px); }

/* Rich text from the CMS editor */
.rich > * + * { margin-top: .9em; }
.rich a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.rich ul, .rich ol { padding-left: 1.3em; }
.rich ul { list-style: disc; }
.rich ol { list-style: decimal; }
.rich li + li { margin-top: .25em; }
.about__body .rich { font-size: 1.1rem; max-width: 56ch; }
.about__body .lead.rich { font-size: clamp(1.2rem, 2vw, 1.45rem); }
.acc__inner .rich { padding: 0 26px 14px 64px; font-size: 1.02rem; }
.acc__inner .rich p { padding: 0; }
.acc__num--icon { font-size: 1.4rem; opacity: 1; }

.about__side { display: grid; gap: 32px; align-content: start; }
.about__image img {
  width: 100%;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-note {
  padding: 28px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  font-weight: 600;
  box-shadow: var(--shadow);
}

/* Project cards: the title is a real link (works without JS), opened in the modal with JS */
.project__link {
  text-decoration: none;
  color: inherit;
}
.project__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--lilac);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 6rem;
}

/* Hero media */
.portrait__placeholder { aspect-ratio: 4 / 5; background: var(--pink); }
.portrait__player {
  position: absolute;
  inset: 0;
  background: var(--ink);
}
.portrait__player video,
.portrait__player iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

/* Modal extras */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips:empty { display: none; }
.modal .rich { margin-bottom: 22px; }
.meta-list { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 22px; }
.meta-list:empty { display: none; }
.meta-list div { display: grid; }
.meta-list dt { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.meta-list dd { margin: 0; font-weight: 600; }
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}
.metrics:empty { display: none; }
.metrics li {
  padding: 16px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--yellow);
}
.metrics strong { display: block; font-family: var(--font-head); font-weight: 900; font-size: 1.8rem; line-height: 1.1; }
.metrics span { font-size: .9rem; font-weight: 600; }
.quote {
  margin: 0 0 26px;
  padding: 20px 24px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--pink);
  font-size: 1.1rem;
  font-weight: 500;
}
.quote cite { display: block; margin-top: 8px; font-style: normal; font-weight: 700; font-size: .95rem; }
.modal__video { margin-bottom: 20px; border: var(--border); border-radius: 18px; overflow: hidden; background: var(--ink); }
.modal__video video, .modal__video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.modal__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.modal__links:empty { display: none; }
.gallery:empty { display: none; }
.gallery figure { margin: 0; }
.gallery figure:first-child { grid-column: 1 / -1; }
.gallery img:first-child { grid-column: auto; }
.gallery figcaption { margin-top: 8px; font-size: .9rem; font-weight: 600; opacity: .8; }
.ratio { position: relative; aspect-ratio: 16 / 9; }
.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Social links */
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: transform .2s var(--ease), background-color .2s;
}
.socials a:hover { transform: translateY(-2px); background: var(--yellow); }
.socials--footer a { background: transparent; color: var(--cream); border-color: rgba(255, 253, 246, .4); padding: 6px 14px; font-size: .88rem; }
.socials--footer a:hover { background: rgba(255, 253, 246, .1); }
.contact__desc { font-size: 1.15rem; max-width: 50ch; font-weight: 500; }

/* Marquee links & icons */
.marquee__list a { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.marquee__list a:hover span { text-decoration: underline; text-decoration-thickness: 3px; }
.marquee__list li > span, .marquee__list a > span { display: inline-block; }
.marquee__icon { width: 1em; height: 1em; object-fit: contain; margin-right: .3em; border-radius: 6px; }

/* Honeypot */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__note.is-error { color: #B01E17; }
.form__note.is-success { color: #13653b; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* Assistant variants */
.buddy--left { right: auto; left: 22px; align-items: flex-start; }
.buddy--left .buddy__bubble { margin-right: 0; margin-left: 60px; border-radius: 18px 18px 18px 4px; }
.buddy--left .buddy__close { right: auto; left: -6px; }
.buddy--anim-float .buddy__char { animation: float 5s ease-in-out infinite; }
.buddy--anim-wiggle .buddy__char { animation: wiggle 2.6s ease-in-out infinite; }
.buddy--anim-none .buddy__char,
.buddy--anim-none .buddy__arm--right { animation: none; }
a.buddy__char { display: block; }
.buddy__img { width: 100%; height: 100%; object-fit: contain; }
.to-top--right { left: auto; right: 22px; }
@keyframes wiggle {
  0%, 60%, 100% { transform: rotate(0); }
  70% { transform: rotate(-8deg); }
  80% { transform: rotate(8deg); }
  90% { transform: rotate(-4deg); }
}

/* Draft preview banner */
.preview-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 120;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border: var(--border);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: var(--shadow);
  font-size: .95rem;
}
.preview-bar a { font-weight: 700; }

/* Case study page */
.page-inner { background: var(--yellow); }
.case { background: var(--yellow); }
.case__inner { display: grid; gap: 24px; }
.case__back { justify-self: start; font-size: 1rem; }
.case__head { display: flex; align-items: center; gap: 20px; }
.case__logo { width: 72px; height: 72px; object-fit: contain; border: var(--border); border-radius: 18px; background: var(--cream); padding: 8px; }
.case__title { margin: 0; }
.case__lead { max-width: 60ch; }
.case__hero img {
  width: 100%;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.case__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; margin-top: 20px; }
.case__desc { font-size: 1.1rem; }
.case__aside {
  align-self: start;
  padding: 24px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: var(--shadow);
}
.case__aside .tags { margin-bottom: 18px; }
.case__links { display: flex; flex-wrap: wrap; gap: 12px; }
.case__links:empty { display: none; }
.case__video { border: var(--border); border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.case__video video { width: 100%; }
.case__gallery { margin-top: 12px; }
.case__gallery img { width: 100%; border: var(--border); border-radius: 18px; }

/* 404 */
.notfound { background: var(--pink); min-height: 70vh; }
.notfound__inner { display: grid; gap: 22px; justify-items: start; }
.notfound .section__title { margin: 0; }

@media (max-width: 900px) {
  .case__grid { grid-template-columns: 1fr; }
  main > .section:first-child,
  main > .preview-bar + .section { padding-top: calc(var(--nav-h) + 80px); }
}
@media (max-width: 560px) {
  .acc__inner .rich { padding: 0 18px 12px; }
  .buddy--left { left: 14px; }
  .to-top--right { right: 14px; }
  .buddy--left .buddy__bubble { margin-left: 44px; }
  .preview-bar { border-radius: 18px; bottom: 90px; }
}

/* Handwriting heading effect (Hero → Heading animation → Handwriting) */
.ink-word { display: inline-block; white-space: nowrap; }
.ink {
  display: inline-block;
  clip-path: inset(-25% 110% -30% -15%);
  animation: ink .38s cubic-bezier(.3, .7, .3, 1) forwards;
}
@keyframes ink {
  0% { clip-path: inset(-25% 110% -30% -15%); transform: translateY(.03em) rotate(-2deg); }
  100% { clip-path: inset(-25% -15% -30% -15%); transform: none; }
}
.hero__title.is-writing .wave {
  opacity: 0;
  animation: waveIn .45s var(--ease) var(--wave-delay, 1.5s) forwards, wave 2.4s ease-in-out calc(var(--wave-delay, 1.5s) + .45s) infinite;
}
@keyframes waveIn {
  from { opacity: 0; transform: scale(.3) rotate(-25deg); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ink { clip-path: none; animation: none; }
  .hero__title.is-writing .wave { opacity: 1; }
}
