/* ==========================================================
   Quan Yuan — Home (dark creator theme)
   ========================================================== */
:root {
  --bg: #0C0C0C;
  --ink: #D7E2EA;
  --white: #FFFFFF;
  --line-dark: rgba(12, 12, 12, 0.15);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --radius-xl: clamp(40px, 5vw, 60px);
}

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

html, body { background: var(--bg); }
html { scroll-behavior: smooth; }
body {
  font-family: 'Kanit', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.main { background: var(--bg); overflow-x: clip; }

.hero-heading {
  background: linear-gradient(180deg, #646973 0%, #BBCCD7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title {
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.025em;
  text-align: center;
  font-size: clamp(2.4rem, 7vw, 104px);
}

/* ---------- FadeIn ---------- */
.fade {
  opacity: 0;
  transform: translate3d(var(--fx, 0), var(--fy, 30px), 0);
  transition: opacity var(--fd, 0.7s) var(--ease) var(--fdelay, 0s),
              transform var(--fd, 0.7s) var(--ease) var(--fdelay, 0s);
}
.fade.in { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn-contact {
  display: inline-block;
  border-radius: 999px;
  background: linear-gradient(123deg, #18011F 7%, #B600A8 37%, #7621B0 72%, #BE4C00 100%);
  box-shadow: 0px 4px 4px rgba(181, 1, 167, 0.25), 4px 4px 12px #7721B1 inset;
  outline: 2px solid #fff;
  outline-offset: -3px;
  color: #fff;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  padding: 12px 32px;
  font-size: 0.75rem;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}
.btn-contact:hover { transform: translateY(-2px); filter: brightness(1.12); }

.btn-ghost {
  display: inline-block;
  border-radius: 999px;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  padding: 12px 32px;
  font-size: 0.875rem;
  transition: background 0.2s;
}
.btn-ghost:hover { background: rgba(215, 226, 234, 0.1); }

@media (min-width: 640px) {
  .btn-contact { padding: 14px 40px; font-size: 0.875rem; }
  .btn-ghost { padding: 14px 40px; font-size: 1rem; }
}
@media (min-width: 768px) {
  .btn-contact { padding: 16px 48px; font-size: 1rem; }
}

/* ==========================================================
   1. HERO — full-bleed looping video, centred copy,
      soft feathered fade into the next section
   ========================================================== */
.hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  background: var(--bg);
  isolation: isolate;
}
/* Media layer: its own compositing layer so Safari keeps the video
   underneath the scrim, nav and copy. */
.hero-media {
  position: absolute;
  left: 0; right: 0; top: 0;
  bottom: -14vh;                       /* bleeds into the next section */
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg) url("../images/hero-poster.jpg") center top / cover no-repeat;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  /* long, soft feathered edge (no hard line between sections) */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 52%, rgba(0,0,0,0.82) 64%, rgba(0,0,0,0.45) 78%, rgba(0,0,0,0.14) 90%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 52%, rgba(0,0,0,0.82) 64%, rgba(0,0,0,0.45) 78%, rgba(0,0,0,0.14) 90%, transparent 100%);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* a blurred wash of the video's colours that drifts past the edge */
.hero-glow {
  position: absolute;
  left: -10%; right: -10%;
  bottom: -6%;
  height: 46%;
  background:
    radial-gradient(42% 60% at 30% 55%, rgba(122, 86, 230, 0.32), transparent 70%),
    radial-gradient(36% 55% at 62% 50%, rgba(255, 150, 64, 0.20), transparent 70%),
    radial-gradient(40% 60% at 82% 60%, rgba(64, 110, 255, 0.24), transparent 70%);
  -webkit-filter: blur(48px);
  filter: blur(48px);
}
/* legibility scrim behind the centred copy */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(60% 46% at 50% 50%, rgba(12,12,12,0.55) 0%, rgba(12,12,12,0.25) 60%, rgba(12,12,12,0) 100%),
    linear-gradient(180deg, rgba(12,12,12,0.45) 0%, rgba(12,12,12,0) 20%);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
/* film grain */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  padding: 24px 24px 0;
}
.nav a {
  color: var(--ink);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}
.nav a:hover { opacity: 0.7; }

/* ---------- Copy (centred) ---------- */
.hero-copy {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: min(92vw, 980px);
  -webkit-transform: translate3d(-50%, -50%, 0);
  transform: translate3d(-50%, -50%, 0);
  text-align: center;
}
.hero-copy > * {
  opacity: 0;
  -webkit-animation: heroIn 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation: heroIn 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-copy > :nth-child(2) { -webkit-animation-delay: 0.12s; animation-delay: 0.12s; }
.hero-copy > :nth-child(3) { -webkit-animation-delay: 0.24s; animation-delay: 0.24s; }
@-webkit-keyframes heroIn {
  from { opacity: 0; -webkit-transform: translateY(16px); transform: translateY(16px); }
  to   { opacity: 1; -webkit-transform: none; transform: none; }
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.hero-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.92;
  font-size: clamp(3rem, 9vw, 10.5rem);
}
.hero-lead {
  margin-top: clamp(22px, 2.6vw, 40px);
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-size: clamp(1.25rem, 2.1vw, 2rem);
}
.hero-tagline {
  margin: clamp(10px, 1vw, 16px) auto 0;
  max-width: 560px;
  color: var(--ink);
  font-weight: 300;
  line-height: 1.6;
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  opacity: 0.85;
}

@media (min-width: 640px) {
  .nav { padding: 24px 40px 0; }
}
@media (min-width: 768px) {
  .nav { padding-top: 32px; }
  .nav a { font-size: 1.125rem; }
}
@media (min-width: 1024px) {
  .nav a { font-size: 1.4rem; }
}
@media (max-width: 767px) {
  .hero-title { font-size: clamp(2.6rem, 13vw, 4.6rem); }
  .hero-tagline { max-width: 340px; }
  .hero-media { bottom: -10vh; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy > * { -webkit-animation: none; animation: none; opacity: 1; }
}

/* ==========================================================
   2. MARQUEE
   ========================================================== */
.marquee {
  position: relative;
  z-index: 2;
  margin-top: -6vh;
  padding: 0 0 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.marquee-row {
  display: flex;
  gap: 12px;
  width: max-content;
  will-change: transform;
}
.marquee-row img {
  width: 420px;
  height: 270px;
  object-fit: cover;
  border-radius: 16px;
  flex-shrink: 0;
  background: #1a1a1a;
}
@media (max-width: 639px) {
  .marquee-row img { width: 300px; height: 193px; }
}

/* ==========================================================
   3. ABOUT
   ========================================================== */
.about {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  overflow: hidden;
}
.about-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  position: relative;
  z-index: 2;
}
.about-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.animated-text {
  color: var(--ink);
  font-weight: 500;
  text-align: center;
  line-height: 1.625;
  max-width: 560px;
  font-size: clamp(1rem, 2vw, 1.35rem);
}
.animated-text .ch { position: relative; display: inline; }
.animated-text .ch-ghost { visibility: hidden; }
.animated-text .ch-live { position: absolute; left: 0; top: 0; opacity: 0.2; }

.about-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

.deco {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.deco img { display: block; width: 100%; height: auto; }
.deco-tl { width: 64px; top: 4%; left: 3%; }
.deco-bl { width: 170px; bottom: 10%; left: 2%; }
.deco-tr { width: 120px; top: 4%; right: 1%; }
.deco-br { width: 130px; bottom: 8%; right: 3%; }

@media (min-width: 640px) {
  .about { padding: 80px 32px; }
  .about-inner { gap: 80px; }
  .about-copy { gap: 56px; }
  .deco-tl { width: 84px; left: 4%; }
  .deco-bl { width: 230px; left: 4%; }
  .deco-tr { width: 160px; right: 2%; }
  .deco-br { width: 170px; right: 6%; }
}
@media (min-width: 768px) {
  .about { padding: 80px 40px; }
  .about-inner { gap: 96px; }
  .about-copy { gap: 64px; }
  .deco-tl { width: 110px; left: 7%; }
  .deco-bl { width: 300px; left: 6%; }
  .deco-tr { width: 210px; right: 4%; }
  .deco-br { width: 220px; right: 10%; }
}
@media (max-width: 639px) {
  .deco { opacity: 0.45; }
}

/* ==========================================================
   4. SERVICES (Expertise)
   ========================================================== */
.services {
  background: var(--white);
  color: var(--bg);
  border-radius: 40px 40px 0 0;
  padding: 80px 20px 120px;
}
.services .section-title { color: var(--bg); margin-bottom: 64px; }
.svc-list { max-width: 64rem; margin: 0 auto; list-style: none; }
.svc-item {
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 4vw, 56px);
  padding: 32px 0;
  border-top: 1px solid var(--line-dark);
}
.svc-item:last-child { border-bottom: 1px solid var(--line-dark); }
.svc-num {
  font-weight: 900;
  line-height: 0.85;
  font-size: clamp(2.4rem, 6.5vw, 96px);
  color: var(--bg);
  flex-shrink: 0;
  min-width: 1.2em;
}
.svc-body { display: flex; flex-direction: column; gap: 10px; padding-top: 0.4em; }
.svc-name {
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(1rem, 2.2vw, 2.1rem);
  line-height: 1.2;
}
.svc-desc {
  font-weight: 300;
  line-height: 1.625;
  max-width: 42rem;
  font-size: clamp(0.85rem, 1.6vw, 1.25rem);
  opacity: 0.6;
}
@media (min-width: 640px) {
  .services { border-radius: 50px 50px 0 0; padding: 96px 32px 140px; }
  .services .section-title { margin-bottom: 80px; }
  .svc-item { padding: 40px 0; }
}
@media (min-width: 768px) {
  .services { border-radius: 60px 60px 0 0; padding: 128px 40px 170px; }
  .services .section-title { margin-bottom: 112px; }
  .svc-item { padding: 48px 0; }
}

/* ==========================================================
   5. PROJECTS (sticky stacking cards)
   ========================================================== */
.projects {
  position: relative;
  z-index: 10;
  background: var(--bg);
  border-radius: 40px 40px 0 0;
  margin-top: -40px;
  padding: 80px 16px 40px;
}
.projects .section-title { margin-bottom: 40px; }
.stack { max-width: 1080px; margin: 0 auto; }
/* All cards share .stack as their sticky container, so each new card
   slides up over the previous ones instead of scrolling them away. */
.stack-slot { display: contents; }
/* scroll distance between cards (a pseudo-element, not a margin, so it
   does not shorten how long each sticky card stays pinned) */
.stack-slot::after { content: ""; display: block; height: 32vh; }
.stack-slot:nth-last-child(2)::after { display: none; }
.stack-end { height: 30vh; }
.stack-card {
  position: sticky;
  top: calc(84px + var(--i) * 16px);
  border-radius: 32px;
  border: 2px solid var(--ink);
  background: var(--bg);
  padding: 14px;
  transform-origin: top center;
  will-change: transform;
}
.card-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 8px 14px;
  flex-wrap: wrap;
}
.card-id { display: flex; align-items: flex-end; gap: clamp(14px, 2.5vw, 32px); min-width: 0; }
.card-num {
  font-weight: 900;
  line-height: 0.85;
  font-size: clamp(2rem, 4vw, 60px);
}
.card-meta { display: flex; flex-direction: column; gap: 4px; padding-bottom: 4px; min-width: 0; }
.card-cat {
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: clamp(0.7rem, 1vw, 0.95rem);
  opacity: 0.6;
}
.card-name {
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.1;
  font-size: clamp(1rem, 1.8vw, 1.7rem);
}
.card-grid { display: flex; gap: 10px; }
.card-col2 { width: 100%; }
.card-grid img {
  width: 100%;
  object-fit: cover;
  border-radius: 22px;
  background: #1a1a1a;
}
/* Image height is derived from the viewport so the pinned card (plus the
   peeking edges of the cards stacked behind it) fills the screen without
   overflowing: 100vh - sticky top - stack offsets - card header - padding. */
.card-col2 img {
  height: clamp(200px, min(calc(100vh - 330px), 118vw), 560px);
  height: clamp(200px, min(calc(100svh - 330px), 118vw), 560px);
}
@media (min-width: 640px) {
  .card-col2 img {
    height: clamp(240px, calc(100vh - 330px), 640px);
    height: clamp(240px, calc(100svh - 330px), 640px);
  }
}
@media (min-width: 768px) {
  .card-col2 img {
    height: clamp(260px, calc(100vh - 350px), 720px);
    height: clamp(260px, calc(100svh - 350px), 720px);
  }
}
.card-link { display: block; }
.card-link:hover .card-grid img { filter: brightness(1.06); }

@media (min-width: 640px) {
  .projects { border-radius: 50px 50px 0 0; margin-top: -48px; padding: 96px 32px 40px; }
  .stack-card { border-radius: 40px; padding: 20px; }
  .card-grid img { border-radius: 30px; }
}
@media (min-width: 768px) {
  .projects { border-radius: 60px 60px 0 0; margin-top: -56px; padding: 120px 40px 40px; }
  .projects .section-title { margin-bottom: 64px; }
  .stack-card { border-radius: 48px; padding: 24px; top: calc(110px + var(--i) * 20px); }
  .card-grid img { border-radius: 36px; }
}
@media (max-width: 639px) {
  .card-top .btn-ghost { padding: 8px 20px; font-size: 0.75rem; }
}

/* ---------- More work ---------- */
.more { padding: 80px 16px 120px; max-width: 1280px; margin: 0 auto; }
.more-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 32px;
  padding: 0 4px;
  flex-wrap: wrap;
}
.more-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  font-size: clamp(1.8rem, 3.6vw, 48px);
}
.more-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .more-grid { grid-template-columns: repeat(2, 1fr); } .more { padding: 96px 32px 140px; } }
@media (min-width: 1024px) { .more-grid { grid-template-columns: repeat(3, 1fr); } .more { padding: 120px 40px 160px; } }
.tile { display: block; }
.tile-img {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #1a1a1a;
  border: 1px solid rgba(215, 226, 234, 0.12);
}
.tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.tile:hover .tile-img img { transform: scale(1.05); }
.tile-cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 8px 8px;
}
.tile-name { font-weight: 500; text-transform: uppercase; font-size: 1rem; line-height: 1.2; }
.tile-cat { font-weight: 300; font-size: 0.8rem; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }

/* ==========================================================
   6. TESTIMONIALS — auto-scrolling carousel
   ========================================================== */
.testi {
  --testi-pad: 20px;
  --testi-gap: 16px;
  --testi-ease: cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--white);
  color: var(--bg);
  border-radius: 40px 40px 0 0;
  padding: 80px 0 120px;
  overflow: hidden;
}
.testi-head {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 var(--testi-pad);
}
.testi .section-title { color: var(--bg); }
.testi-nav { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.testi-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(13, 33, 44, 0.2);
  background: var(--white);
  color: #0D212C;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.testi-btn:hover { background: #0D212C; color: var(--white); border-color: #0D212C; }
.testi-btn:focus-visible { outline: 2px solid #0D212C; outline-offset: 3px; }

.testi-viewport {
  /* first card lines up with the 1200px content column; cards bleed off the right edge */
  padding-left: max(var(--testi-pad), calc((100% - 1200px) / 2 + var(--testi-pad)));
}
.testi-track {
  display: flex;
  align-items: stretch;
  gap: var(--testi-gap);
  transition: transform 0.8s var(--testi-ease);
  will-change: transform;
  touch-action: pan-y;
}
.testi-track.no-anim, .testi-track.no-anim .quote { transition: none; }
.quote {
  flex: 0 0 calc(100vw - 48px);
  max-width: 427.5px;
  background: var(--white);
  border-radius: 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 32px 24px;
  margin: 12px 0 24px; /* room for the shadow inside the clipped viewport */
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: opacity 0.8s var(--testi-ease), transform 0.8s var(--testi-ease);
}
.quote.is-past { opacity: 0; transform: scale(0.9); }
.quote-mark { color: #0D212C; flex-shrink: 0; }
.quote-text { font-weight: 300; line-height: 1.65; font-size: 1rem; color: #0D212C; flex: 1; }
.quote-who { display: flex; align-items: center; gap: 12px; }
.quote-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #0D212C, #3A5563);
  color: #F6FCFF; font-weight: 500; font-size: 0.95rem; letter-spacing: 0.02em;
}
.quote-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quote-name { font-weight: 600; font-size: 0.9rem; color: #0D212C; }
.quote-role { font-weight: 300; font-size: 0.85rem; color: #273C46; }

@media (min-width: 640px) {
  .testi { border-radius: 50px 50px 0 0; padding: 96px 0 140px; --testi-pad: 32px; }
}
@media (min-width: 768px) {
  .testi { border-radius: 60px 60px 0 0; padding: 120px 0 170px; --testi-pad: 40px; --testi-gap: 24px; }
  .testi-head { margin-bottom: 64px; }
  .quote { flex-basis: 427.5px; border-radius: 40px; padding: 36px 48px 36px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .testi-track, .quote { transition: none; }
}

/* ==========================================================
   7. FOOTER / CTA
   ========================================================== */
.footer {
  position: relative;
  z-index: 10;
  background: var(--bg);
  border-radius: 40px 40px 0 0;
  margin-top: -40px;
  padding: 96px 24px 32px;
  text-align: center;
}
.footer-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.95;
  font-size: clamp(2.6rem, 8vw, 120px);
}
.footer-sub {
  margin: 24px auto 40px;
  max-width: 520px;
  font-weight: 300;
  line-height: 1.6;
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  opacity: 0.8;
}
.footer-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.footer-bar {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid rgba(215, 226, 234, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a:hover { opacity: 0.7; }
@media (min-width: 640px) { .footer { border-radius: 50px 50px 0 0; margin-top: -48px; padding: 120px 40px 32px; } }
@media (min-width: 768px) { .footer { border-radius: 60px 60px 0 0; margin-top: -56px; padding: 160px 40px 40px; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { opacity: 1; transform: none; transition: none; }
  .animated-text .ch-live { opacity: 1 !important; }
  .stack-card { transform: none !important; }
}

/* ---------- Portfolio page ---------- */
.work-page { padding: 0 16px 56px; max-width: 1280px; margin: 0 auto; }
.work-group + .work-group { margin-top: 96px; }
.work-group-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding: 0 4px 20px; margin-bottom: 24px;
  border-bottom: 1px solid rgba(215, 226, 234, 0.15);
}
.work-group-title { font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; font-size: clamp(0.85rem, 1.2vw, 1.05rem); }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.feature-grid .tile-img { border-radius: 36px; }
.feature-grid .tile-name { font-size: clamp(1.1rem, 1.8vw, 1.5rem); }
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } .work-page { padding: 0 40px 64px; } }

/* ---------- Contact page ---------- */
.contact-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px 56px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-eyebrow {
  font-weight: 300; text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.8rem; opacity: 0.6;
}
.contact-link { display: flex; flex-direction: column; gap: 6px; width: fit-content; color: var(--ink); }
.contact-link-label { font-weight: 300; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; opacity: 0.55; }
.contact-link-value {
  position: relative;
  font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em;
  word-break: break-word;
  padding-bottom: 10px;
}
.contact-link-value::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 40px; height: 2px; background: currentColor;
  transition: width 0.35s var(--ease);
}
.contact-link:hover .contact-link-value::after { width: 100%; }

.contact-title {
  font-weight: 900; text-transform: uppercase; letter-spacing: -0.025em;
  line-height: 0.95; font-size: clamp(2.4rem, 5vw, 4.5rem);
  margin-bottom: clamp(28px, 3vw, 40px);
}
.contact-form { display: flex; flex-direction: column; gap: 22px; }
.cf-field { display: flex; flex-direction: column; gap: 10px; }
.cf-label { font-size: 0.95rem; font-weight: 400; color: var(--ink); opacity: 0.85; }
.cf-input {
  width: 100%;
  font: inherit; font-weight: 300; font-size: 1rem;
  color: var(--white);
  background: rgba(215, 226, 234, 0.04);
  border: 1px solid rgba(215, 226, 234, 0.2);
  border-radius: 14px;
  padding: 15px 18px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.cf-input::placeholder { color: rgba(215, 226, 234, 0.4); }
.cf-input:hover { border-color: rgba(215, 226, 234, 0.35); }
.cf-input:focus { border-color: var(--ink); background: rgba(215, 226, 234, 0.07); box-shadow: 0 0 0 4px rgba(215, 226, 234, 0.08); }
.cf-input[aria-invalid="true"] { border-color: #ff8a7a; }
.cf-textarea { resize: vertical; min-height: 140px; }
.cf-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-send {
  margin-top: 6px;
  width: 100%;
  font: inherit; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.95rem;
  color: var(--bg);
  background: var(--ink);
  border: 0; border-radius: 14px;
  padding: 17px 24px;
  cursor: pointer;
  box-shadow: 0 14px 30px -12px rgba(215, 226, 234, 0.35);
  transition: transform 0.2s var(--ease), filter 0.2s, opacity 0.2s;
}
.cf-send:hover { transform: translateY(-2px); filter: brightness(1.08); }
.cf-send:disabled { opacity: 0.55; cursor: progress; transform: none; }
.cf-status { min-height: 1.5em; font-weight: 300; font-size: 0.95rem; }
.cf-status.is-ok { color: #9be3b0; }
.cf-status.is-error { color: #ff8a7a; }
.cf-status a { color: inherit; text-decoration: underline; }


@media (min-width: 900px) {
  .contact-page {
    grid-template-columns: 1fr minmax(0, 560px);
    gap: 80px;
    padding: 72px 40px 72px;
  }
  .contact-info { padding-top: 12px; }
}
