/* ==================================================================
   Portfolio — two-column sticky sidebar + full-height project cards.
   Layout, type scale and colour values measured off the reference.
   ================================================================== */

/* If you buy/download Apfel Grotezk (it's free from collletttivo.it)
   drop the .woff2 files in assets/fonts/ and uncomment this block.
   Everything already asks for "Apfel Grotezk" first.

@font-face { font-family:"Apfel Grotezk"; src:url("assets/fonts/ApfelGrotezk-Regular.woff2") format("woff2"); font-weight:400; font-display:swap; }
@font-face { font-family:"Apfel Grotezk"; src:url("assets/fonts/ApfelGrotezk-Mittel.woff2")  format("woff2"); font-weight:500; font-display:swap; }
@font-face { font-family:"Apfel Grotezk"; src:url("assets/fonts/ApfelGrotezk-Fett.woff2")    format("woff2"); font-weight:700; font-display:swap; }
*/

:root {
  /* colour tokens */
  --ink: #212121;
  --ink-70: rgba(33, 33, 33, 0.7);
  --ink-30: rgba(33, 33, 33, 0.3);
  --ink-10: rgba(33, 33, 33, 0.1);
  --dark: #212121;
  --dark-2: #2e2e2e;
  --paper: #ffffff;
  --paper-70: rgba(255, 255, 255, 0.7);
  --paper-30: rgba(255, 255, 255, 0.3);
  --grey: #f5f5f5;
  --accent: #2aabee;
  --accent-lt: #62c1f5;
  --accent-tint: rgba(98, 193, 245, 0.2);
  --hairline: rgba(10, 10, 10, 0.1);

  /* geometry */
  --r-xl: 24px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;
  --gap: 24px;

  /* type */
  --font-display:
    'Apfel Grotezk', 'Schibsted Grotesk', ui-sans-serif, system-ui,
    -apple-system, 'Segoe UI', sans-serif;
  --font-ui:
    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* motion */
  --pop: 420ms cubic-bezier(0.16, 1.02, 0.28, 1);
  --swift: 260ms cubic-bezier(0.22, 0.75, 0.28, 1);
  --calm: 180ms ease;
}

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

/* flex/grid display rules would otherwise beat the UA's [hidden] rule */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
figure {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ==================================================================
   PAGE SHELL
   ================================================================== */

.page {
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.hero {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--gap);
  width: 100%;
  padding: 24px 24px 0;
  overflow: clip;
}

/* ==================================================================
   PROJECTS COLUMN
   ================================================================== */

.projects {
  flex: 1 0 0px;
  width: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border-radius: var(--r-xl);
  overflow: clip;
}

/* Each card is one viewport tall and clips a 300vh inner track.
   The content block is sticky inside that track, so it holds still
   while the card window slides past it. */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  padding: 12px;
  border-radius: var(--r-xl);
  overflow: clip;
  isolation: isolate;
  background: #e9e9ef;
}

.card__track {
  position: absolute;
  top: calc(50% - 150vh);
  left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 300vh;
  overflow: clip;
}

.card__bgwrap {
  position: absolute;
  top: calc(50% - 50vh);
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  overflow: clip;
}
.card__bg,
.card__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}
.card__bg {
  background: var(--card-bg, linear-gradient(160deg, #dfe4ff, #8a7bf0));
  background-size: cover;
  background-position: center;
}
/* the shader canvas sits over the flat gradient, which stays as the
   fallback whenever WebGL isn't available */
.card__canvas {
  display: block;
  opacity: 0;
  transition: opacity 600ms ease;
}
.card.has-canvas .card__canvas {
  opacity: 1;
}

/* scroll-linked dim, so a card recedes as the next one rides over it */
.card__veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  background: #0d0a1c;
  opacity: 0;
}

.card__content {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  height: 100vh;
  /* tight frame — the thumbnail is the point, not the margin */
  padding: 12px;
}

/* Fixed thumbnail box — deliberately NOT fluid, so the artwork reads at
   the same size on every desktop width instead of rescaling with the
   viewport. max-width only engages on cards physically too narrow for
   800px, and aspect-ratio keeps the crop identical when it does. */
.card__shot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 780px;
  max-width: 100%;
  aspect-ratio: 1672 / 941;
}
.card__shot img,
.card__shot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-md);
  box-shadow: 0 24px 60px -24px rgba(20, 16, 50, 0.45);
  transition: transform 700ms cubic-bezier(0.22, 0.75, 0.28, 1);
}
.card__shot--contain img,
.card__shot--contain video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: none;
}
.card:hover .card__shot img,
.card:hover .card__shot video {
  transform: translateY(-8px);
}

.card__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(780px, 96%);
  color: var(--card-copy, #fff);
  text-align: center;
  text-shadow: 0 2px 20px rgba(18, 14, 30, 0.14);
}
.card__title {
  width: 100%;
  font-size: clamp(22px, 2.8vw, 40px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.card__description {
  max-width: 62ch;
  font-family: var(--font-ui);
  font-size: clamp(14px, 1.15vw, 16px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ==================================================================
   SIDEBAR
   ================================================================== */

.sidebar {
  position: sticky;
  top: 24px;
  z-index: 1;
  flex: 0.5 0 0px;
  width: 1px;
  min-width: 456px;
  height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--gap);
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  overflow: visible;
}

/* ---- pills ------------------------------------------------------ */

/* The sidebar is a flex container, and flex items paint as though they
   were z-index:0 — so the pill cluster and the CTA must out-rank the
   name/tagline explicitly, or their overlays land underneath. Don't
   rely on the panel's own z-index: any transform on an ancestor traps
   it in a new stacking context. */
.navpills {
  position: relative;
  z-index: 30;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}
.pillgroup {
  position: relative;
}

.pill {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 50px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  font-size: 16px;
  line-height: 19.2px;
  color: var(--ink);
  transition:
    background var(--swift),
    color var(--swift),
    border-color var(--swift),
    transform var(--swift);
}
.pill:hover {
  background: var(--grey);
  transform: translateY(-1px);
}
.pillgroup.is-open .pill {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}
.pillgroup[data-panel='faqs'].is-open .pill {
  background: var(--accent);
  border-color: var(--accent);
}
.pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- morphing panels -------------------------------------------- */

.panel {
  position: absolute;
  top: 55px;
  z-index: 20;
  width: 300px;
  padding: 24px;
  border-radius: 48px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  filter: blur(6px);
  transform: translateX(-50%) scale(0.14);
  transform-origin: 50% -34px;
  transition:
    opacity 240ms ease,
    filter 240ms ease,
    border-radius var(--pop),
    transform var(--pop),
    visibility 0s linear 420ms;
}
.pillgroup.is-open .panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  filter: none;
  border-radius: var(--r-xl);
  transform: translateX(-50%) scale(1);
  transition:
    opacity 200ms ease,
    filter 200ms ease,
    border-radius var(--pop),
    transform var(--pop),
    visibility 0s;
}
.panel__inner {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 200ms ease 90ms,
    transform 260ms ease 90ms;
}
.pillgroup.is-open .panel__inner {
  opacity: 1;
  transform: none;
}

.panel--about {
  left: 100%;
  background: var(--dark);
  border: 1px solid var(--dark-2);
  color: #fff;
}
.panel--faqs {
  left: -18%;
  background: var(--accent);
  border: 1px solid var(--accent-lt);
  color: #fff;
  width: 296px;
}

.panel__rule {
  height: 1px;
  width: 100%;
  background: var(--dark-2);
}
.panel__rule--light {
  background: var(--paper-30);
}
.panel__rule--dark {
  background: var(--dark-2);
}

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

.ab-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.ab-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px;
  border-radius: var(--r-lg);
  background: var(--dark-2);
  animation: sway 6s ease-in-out infinite;
}
@keyframes sway {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-5deg);
  }
}
.ab-emoji {
  font-size: 48px;
  line-height: 48px;
  letter-spacing: -0.25px;
}
.ab-photo {
  width: 87px;
  height: 87px;
  border-radius: 11px;
  overflow: hidden;
  background: #3a3a3a;
}
.ab-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ab-bio {
  font-size: 16px;
  line-height: 19.2px;
  color: #fff;
}

.ab-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}
.ab-listTitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  margin-left: -8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 16px;
  line-height: 19.2px;
  color: #fff;
}
.ab-list li {
  font-size: 16px;
  line-height: 19.2px;
  color: var(--paper-70);
}

.ab-bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ab-logosTitle {
  font-size: 16px;
  line-height: 19.2px;
  color: var(--paper-70);
}
.ab-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  opacity: 0.8;
}
.ab-logos li {
  padding: 4px 10px;
  border: 1px solid var(--dark-2);
  border-radius: 999px;
  font-size: 13px;
  line-height: 18px;
  color: var(--paper-70);
}

/* ---- faqs panel -------------------------------------------------- */

.faq-title {
  font-size: 16px;
  line-height: 19.2px;
  font-weight: 700;
  color: #fff;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  font-size: 16px;
  line-height: 19.2px;
  color: #fff;
}
.faq__q svg {
  flex: 0 0 auto;
  margin-top: 1px;
  transition: transform var(--swift);
}
.faq.is-open .faq__q svg {
  transform: rotate(45deg);
}
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--pop);
}
.faq.is-open .faq__a {
  grid-template-rows: 1fr;
}
.faq__a > div {
  overflow: hidden;
}
.faq__a p {
  padding-top: 6px;
  font-size: 15px;
  line-height: 19px;
  color: rgba(255, 255, 255, 0.82);
}

/* ==================================================================
   NAME · TAGLINE · SERVICES
   ================================================================== */

.details {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}
.details__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap);
  width: 100%;
}
.idblock {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap);
  width: 100%;
}

.badges {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 8px 16px;
}
.badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 19px;
  color: var(--ink);
}
.badge svg {
  flex: 0 0 auto;
  color: var(--accent);
}

.bigname {
  font-size: clamp(58px, 6.9vw, 100px);
  line-height: 0.8;
  letter-spacing: -0.055em;
  font-weight: 700;
  color: var(--ink);
}
.bigname span {
  display: block;
}

/* ---- tagline with the hover words ------------------------------- */

.tagline {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  gap: 8px 5px;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.hw {
  display: inline-flex;
  align-items: baseline;
  isolation: isolate;
}
.hw__inner {
  position: relative;
  display: inline-block;
}
.hw__punct {
  color: var(--ink);
}
.hw__word {
  position: relative;
  z-index: 2;
  color: var(--ink);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
  padding-bottom: 1px;
  transition:
    color var(--swift),
    background-size var(--swift);
}
/* the shimmer copy that sweeps across on hover */
.hw__shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    100deg,
    rgba(33, 33, 33, 0) 28%,
    var(--accent) 48%,
    rgba(33, 33, 33, 0) 68%
  );
  background-size: 260% 100%;
  background-position: 120% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 160ms ease;
}
.hw:hover .hw__shine {
  opacity: 1;
  animation: sweep 900ms cubic-bezier(0.3, 0.6, 0.3, 1);
}
@keyframes sweep {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -40% 0;
  }
}
.hw:hover .hw__word {
  background-size: 100% 2px;
}

/* the little card that pops up above the word */
.hw__art {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  z-index: 4;
  width: 104px;
  height: 96px;
  margin-left: -52px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--grey);
  border: 1px solid var(--hairline);
  box-shadow: 0 12px 24px rgba(33, 33, 33, 0.16);
  opacity: 0;
  transform: translateY(10px) scale(0.82) rotate(-6deg);
  transform-origin: 50% 100%;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform var(--pop);
}
.hw__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hw:hover .hw__art {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(-4deg);
}

.hw--plain .hw__word {
  color: var(--ink-70);
  background-size: 100% 1px;
}
.hw--plain:hover .hw__word {
  color: var(--ink);
}

.tagline__punct {
  color: var(--ink);
}

/* ---- services box ----------------------------------------------- */

.services {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--ink-10);
  border-radius: var(--r-md);
}
.services__label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  background: var(--accent-tint);
  font-size: 16px;
  line-height: 19.2px;
  color: var(--ink-70);
}
.services__label svg {
  flex: 0 0 auto;
  color: var(--accent);
}
.services__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 10px;
  width: 100%;
}
.services__grid span {
  font-size: 16px;
  line-height: 19.2px;
  color: var(--ink);
}

/* ==================================================================
   CTA · CONTACT POPUP · EMAIL · SOCIALS
   ================================================================== */

/* above .details so the contact popup clears the name and tagline */
.ctablock {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  width: 100%;
}

/* whichever cluster currently owns an open overlay jumps to the front,
   so the pills never float on top of the contact popup and vice versa */
.navpills.is-front,
.ctablock.is-front {
  z-index: 40;
}
.ctawrap {
  position: relative;
  width: 100%;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--accent);
  box-shadow:
    inset 10px 10px 7px -3px var(--accent-lt),
    inset -10px -10px 7px -3px var(--accent-lt);
  transition:
    transform var(--swift),
    box-shadow var(--swift),
    filter var(--swift);
}
.cta__label {
  font-size: 28px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 14px 14px 10px -3px var(--accent-lt),
    inset -14px -14px 10px -3px var(--accent-lt),
    0 10px 24px -10px rgba(42, 171, 238, 0.65);
}
.cta:active {
  transform: translateY(0) scale(0.99);
}
.cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.contactpop {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 30;
  width: 328px;
  /* on short viewports it would otherwise run off the top of the screen */
  max-height: calc(100vh - 132px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  border-radius: 44px;
  background: var(--dark);
  box-shadow:
    0 0 10px 10px rgba(33, 33, 33, 0.1),
    0 30px 60px -30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  filter: blur(6px);
  transform: translateX(-50%) scale(0.16);
  transform-origin: 50% calc(100% + 40px);
  transition:
    opacity 240ms ease,
    filter 240ms ease,
    border-radius var(--pop),
    transform var(--pop),
    visibility 0s linear 420ms;
}
.ctawrap.is-open .contactpop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  filter: none;
  border-radius: var(--r-lg);
  transform: translateX(-50%) scale(1);
  transition:
    opacity 200ms ease,
    filter 200ms ease,
    border-radius var(--pop),
    transform var(--pop),
    visibility 0s;
}
.contactpop__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 200ms ease 90ms,
    transform 260ms ease 90ms;
}
.ctawrap.is-open .contactpop__inner {
  opacity: 1;
  transform: none;
}

.cp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cp-spots {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  line-height: 19.2px;
  color: var(--accent);
}
.cp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(42, 171, 238, 0.7);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(42, 171, 238, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(42, 171, 238, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(42, 171, 238, 0);
  }
}
.cp-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  line-height: 19.2px;
  color: var(--paper-70);
  transition: color var(--calm);
}
.cp-toggle:hover {
  color: #fff;
}
.cp-toggle svg {
  transition: transform var(--swift);
}
.cp-toggle:hover svg {
  transform: translateX(3px);
}

.cp-body {
  position: relative;
}
.cp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.field__label {
  font-size: 16px;
  line-height: 19.2px;
  color: #fff;
}
.field__box {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--dark-2);
  border: 1px solid transparent;
  transition:
    border-color var(--calm),
    background var(--calm);
}
.field__box:focus-within {
  border-color: var(--accent);
  background: #333;
}
.field__box input,
.field__box textarea {
  width: 100%;
  border: 0;
  outline: none;
  background: none;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 16.8px;
  resize: none;
}
.field__box textarea {
  min-height: 76px;
}
.field__box ::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.check__box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: var(--paper-30);
  color: transparent;
  transition:
    background var(--calm),
    color var(--calm);
}
.check input:checked + .check__box {
  background: var(--accent);
  color: #fff;
}
.check input:focus-visible + .check__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.check__label {
  font-size: 16px;
  line-height: 19.2px;
  color: #fff;
}

.cp-submit {
  align-self: flex-start;
  padding: 12px 16px;
  border-radius: 35px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 19.2px;
  transition:
    transform var(--swift),
    background var(--swift);
}
.cp-submit:hover {
  transform: translateY(-2px);
  background: var(--grey);
}
.cp-submit:active {
  transform: none;
}

.cp-status {
  font-size: 14px;
  line-height: 18px;
  color: var(--accent);
  min-height: 18px;
}

.cp-call iframe {
  width: 100%;
  height: 350px;
  border: 0;
  border-radius: var(--r-md);
  background: #fff;
}

/* ---- email + socials --------------------------------------------- */

.contactrow {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.emailbtn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 44px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  font-size: 16px;
  line-height: 19.2px;
  color: var(--ink);
  overflow: hidden;
  transition:
    background var(--swift),
    transform var(--swift),
    border-color var(--swift);
}
.emailbtn:hover {
  background: var(--grey);
  transform: translateY(-1px);
}
.emailbtn__icon {
  flex: 0 0 auto;
  color: var(--ink-70);
}
.emailbtn__text,
.emailbtn__copied {
  transition:
    opacity var(--calm),
    transform var(--calm);
}
.emailbtn__copied {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  opacity: 0;
  transform: translateY(100%);
}
.emailbtn.is-copied .emailbtn__copied {
  opacity: 1;
  transform: none;
}

.socials {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--hairline);
  color: var(--ink);
  transition:
    background var(--swift),
    transform var(--swift),
    color var(--swift);
}
.social:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

/* ==================================================================
   FOOTER
   ================================================================== */

.footerwrap {
  display: flex;
  gap: var(--gap);
  width: 100%;
  padding: 24px;
  overflow: clip;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  flex: 1 0 0px;
  width: 1px;
  height: 60vh;
  min-height: 420px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
}

.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.footer__meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  line-height: 19.2px;
}
.footer__time {
  padding: 0 2px;
  border-radius: 8px;
  letter-spacing: -0.16px;
  font-variant-numeric: tabular-nums;
}
.footer__slash,
.footer__place {
  color: var(--ink);
}
.footer__quote {
  font-size: 16px;
  line-height: 19.2px;
  color: var(--ink-70);
  text-align: right;
}

/* stickers */
.stickers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.sticker {
  width: var(--s, 108px);
  height: var(--s, 108px);
  /* kept on `transform` (not the standalone `rotate` property) so GSAP
     decomposes it and drives rotation + drag x/y in one matrix */
  transform: rotate(var(--rot, 0deg));
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.sticker.is-held {
  cursor: grabbing;
}
.sticker svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(33, 33, 33, 0.14));
  transition: filter 250ms ease;
}
.sticker.is-held svg {
  filter: drop-shadow(0 18px 26px rgba(33, 33, 33, 0.24));
}

.footer__row--bottom {
  align-items: center;
}
.footer__copy {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  font-size: 16px;
  line-height: 19.2px;
  color: var(--ink-70);
}
.footer__mark {
  width: 24px;
  height: 15px;
  border-radius: 4px;
  background: var(--ink);
  flex: 0 0 auto;
}
.footer__built {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
}
.footer__top {
  flex: 1 1 0;
  display: flex;
  justify-content: flex-end;
}

.totop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  transition:
    transform var(--swift),
    background var(--swift);
}
.totop:hover {
  transform: translateY(-3px);
  background: #1f9ad9;
}

/* Blocks the page behind an open overlay. It must stay BELOW .sidebar
   (z-index:1) or it covers the panels and swallows their clicks — the
   close-on-outside logic lives in main.js, not on this element. z-0
   still paints above the project cards, which are z-auto and earlier
   in the DOM. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* ==================================================================
   ONEKO — the cursor cat and its toggle pill
   ================================================================== */

.neko {
  position: fixed;
  top: 0;
  left: 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
  will-change: transform;
}
.neko--clickable {
  pointer-events: auto;
  cursor: pointer;
}
.neko:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nekopill {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}
.nekopill--bottom-left {
  bottom: 16px;
  left: 16px;
}
.nekopill--bottom-right {
  bottom: 16px;
  right: 16px;
}
.nekopill--top-left {
  top: 16px;
  left: 16px;
}
.nekopill--top-right {
  top: 16px;
  right: 16px;
}

.nekopill__label {
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.nekoswitch {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #ccc;
  transition: background var(--swift);
}
.nekopill.is-on .nekoswitch {
  background: var(--ink);
}
.nekoswitch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s ease;
}
.nekopill.is-on .nekoswitch__thumb {
  left: 23px;
}
.nekoswitch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* No cat on phones: there is no cursor to follow, and the pill costs
   real estate. cat.js also refuses to start there — this is the belt to
   its braces, for a desktop window dragged down below the breakpoint. */
@media (max-width: 809.98px) {
  .neko,
  .nekopill {
    display: none !important;
  }
}

/* ==================================================================
   RESPONSIVE — same three breakpoints as the reference
   ================================================================== */

@media (max-width: 1199.98px) {
  .hero {
    flex-direction: column;
  }
  .sidebar {
    order: 0;
    position: relative;
    top: auto;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    height: auto;
  }
  .projects {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
  }
  .details {
    gap: 32px;
  }
  .bigname {
    font-size: clamp(56px, 9vw, 88px);
  }
  .card__content {
    padding: 12px;
    gap: 32px;
  }
  .panel--about {
    left: 50%;
  }
  .panel--faqs {
    left: 50%;
  }
  .footer {
    height: auto;
    min-height: 0;
  }

  /* Stacked layouts put the CTA at an arbitrary height, so an upward
     popup runs off the top. Centre it as a real dialog instead. */
  .contactpop {
    position: fixed;
    left: 50%;
    top: 50%;
    bottom: auto;
    width: min(360px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    transform: translate(-50%, -50%) scale(0.16);
    transform-origin: 50% 50%;
  }
  .ctawrap.is-open .contactpop {
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 809.98px) {
  .hero {
    padding: 12px 12px 0;
    gap: 12px;
  }
  .footerwrap {
    padding: 12px;
  }
  .sidebar {
    align-items: flex-start;
    padding: 20px;
    border-radius: 20px;
  }
  .projects {
    border-radius: 0;
    gap: 16px;
    overflow: visible;
  }
  .card {
    height: auto;
    min-height: 0;
    padding: 10px 10px 18px;
    border-radius: 18px;
    background: var(--card-bg, #e9e9ef);
  }
  .card__track {
    position: relative;
    top: auto;
    left: auto;
    height: auto;
    overflow: visible;
  }
  .card__bgwrap {
    display: none;
  }
  .card__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    padding: 0;
    gap: 16px;
  }
  .card__shot {
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 6px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
  }
  .card__shot img,
  .card__shot video,
  .card__shot--contain img,
  .card__shot--contain video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: none;
    transform: none !important;
  }
  .card__meta {
    align-items: flex-start;
    width: 100%;
    padding: 0 6px;
    gap: 7px;
    text-align: left;
    text-shadow: 0 2px 18px rgba(18, 14, 30, 0.16);
  }
  .card__title {
    font-size: clamp(21px, 6vw, 26px);
    white-space: normal;
  }
  .card__description {
    max-width: 38ch;
    font-size: 14px;
    line-height: 1.45;
    text-wrap: pretty;
  }
  .card__canvas,
  .card__veil {
    display: none !important;
  }
  .bigname {
    font-size: clamp(48px, 13vw, 64px);
  }
  .tagline {
    font-size: 18px;
    line-height: 22px;
  }
  .services__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .cta__label {
    font-size: 24px;
    line-height: 24px;
  }
  .contactrow {
    flex-wrap: wrap;
  }
  .emailbtn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .socials {
    margin-left: 0;
  }
  .panel {
    width: min(300px, calc(100vw - 48px));
  }
  .panel--faqs {
    width: min(296px, calc(100vw - 48px));
  }
  .contactpop {
    width: min(328px, calc(100vw - 48px));
  }
  .footer__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .footer__quote {
    text-align: left;
  }
  .footer__row--bottom {
    flex-direction: row;
    align-items: center;
  }
  .footer__built {
    display: none;
  }
  .stickers {
    gap: 12px;
  }
  .sticker {
    width: calc(var(--s, 108px) * 0.62);
    height: calc(var(--s, 108px) * 0.62);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
