/* =========================================================
   FC RAKIB — 3D Portfolio
   ========================================================= */

:root {
  /* Warm white + soft orange. (--violet / --cyan / --pink are the accent slots used across the file) */
  --bg: #fffaf5;
  --bg-2: #fff3e8;
  --surface: rgba(28, 25, 23, 0.03);
  --surface-2: #fff4ea;
  --border: rgba(28, 25, 23, 0.08);
  --border-strong: rgba(28, 25, 23, 0.15);
  --text: #1c1917;
  --muted: #6b625b;
  --violet: #f97316; /* main orange */
  --cyan: #c2410c;   /* deep orange for small accent text (readable on white) */
  --pink: #fb923c;   /* light orange */
  --gold: #f97316;
  --grad: linear-gradient(120deg, #ea580c 0%, #f97316 55%, #fb923c 100%);
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 12px 32px -16px rgba(28, 25, 23, 0.14);
  --radius: 22px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Lenis smooth scroll (it animates the scroll itself, so the CSS smooth scroll must be off) */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent], .lenis .chat__log, .lenis .pf-card { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--violet); color: #fff; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes shine { to { background-position: 200% center; } }

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: grid;
  place-content: center;
  gap: 20px;
  justify-items: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.loader.hide { opacity: 0; visibility: hidden; }
.loader__logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: 0.04em;
}
.loader__logo span, .nav__logo span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.loader__bar {
  width: 180px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.loader__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  transition: width 0.3s ease;
}

/* ---------- WebGL canvas ---------- */
#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main, .footer { position: relative; z-index: 2; }

/* ---------- Avatar + speech bubble ---------- */
#avatar {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 40;
  pointer-events: none;
}
.bubble {
  position: fixed;
  top: 0; left: 0;
  z-index: 45;
  pointer-events: none;
  margin-top: -8px;
  padding: 11px 18px;
  border-radius: 18px;
  background: #fff;
  color: #1c1917;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  width: max-content;
  max-width: min(360px, 72vw);
  box-shadow: 0 14px 36px -14px rgba(234, 88, 12, 0.45), 0 0 0 1px rgba(28, 25, 23, 0.07);
  opacity: 0;
  transition: opacity 0.4s;
  will-change: transform;
}
.bubble.show { opacity: 1; pointer-events: auto; cursor: pointer; }
.bubble.show:hover { box-shadow: 0 14px 36px -10px rgba(234, 88, 12, 0.6), 0 0 0 2px rgba(249, 115, 22, 0.35); }
.bubble__ask {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-left: 10px;
  padding: 3px 9px;
  border: 0;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: 2px;
  cursor: pointer;
}

/* ---------- Character extras: sound toggle, confetti, sleepy Z's, card shadow ---------- */
.sfx-toggle {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 55;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.sfx-toggle:hover { transform: scale(1.08); border-color: var(--violet); }
.sfx-toggle.on { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); }
.fx-confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }
.fx-z {
  position: fixed;
  z-index: 46;
  pointer-events: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: #cfd6ff;
  text-shadow: 0 0 12px rgba(124, 92, 255, 0.9);
  animation: fx-z 2.5s ease-out forwards;
}
@keyframes fx-z {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5) rotate(-10deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), -90px) scale(1.4) rotate(12deg); }
}
.card-shadow {
  position: fixed;
  top: 0; left: 0;
  z-index: 39; /* above the cards, below the character */
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(farthest-side at var(--o, 50% 0%), rgba(60, 30, 10, 0.28), rgba(60, 30, 10, 0.1) 50%, rgba(60, 30, 10, 0));
  will-change: transform, opacity;
}

/* ---------- "Ask me" chat ---------- */
.chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 65;
  width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -24px rgba(28, 25, 23, 0.3);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.chat.open { opacity: 1; transform: none; pointer-events: auto; }
.chat--left { right: auto; left: 18px; bottom: 72px; }
.chat__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); font-family: var(--font-head); }
.chat__dot { width: 9px; height: 9px; border-radius: 50%; background: #2dd4a7; box-shadow: 0 0 10px #2dd4a7; }
.chat__close { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 4px 6px; }
.chat__close:hover { color: var(--text); }
.chat__log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.chat__msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 0.92rem; line-height: 1.45; }
.chat__msg--bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.chat__msg--me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.chat__msg--typing { color: var(--muted); letter-spacing: 3px; }
.chat__action { display: block; margin-top: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--cyan); background: none; color: var(--cyan); font-size: 0.82rem; cursor: pointer; }
.chat__action:hover { background: rgba(249, 115, 22, 0.08); }
.chat__chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.chat__chips button { flex: none; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 0.8rem; cursor: pointer; white-space: nowrap; }
.chat__chips button:hover { border-color: var(--violet); }
.chat__form { display: flex; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--border); }
.chat__input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg); outline: none; }
.chat__input:focus { border-color: var(--violet); }
.chat__send { width: 42px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; cursor: pointer; }
@media (max-width: 600px) {
  .sfx-toggle { left: 12px; bottom: 12px; width: 38px; height: 38px; }
  .chat, .chat--left { right: 12px; left: auto; bottom: 12px; }
}
.bubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  right: 14%;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 3px;
  transform: rotate(45deg);
}
.bubble--right::after { right: auto; left: 14%; }
.bubble--below { margin-top: 0; }
/* While the visitor is carrying the character around */
.avatar-grabbing, .avatar-grabbing * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.bubble--below::after { bottom: auto; top: -7px; }
.bubble span { position: relative; z-index: 1; }

/* ---------- Cursor ---------- */
.cursor, .cursor-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 999;
  pointer-events: none;
  border-radius: 50%;
  transform: translate3d(-100px, -100px, 0);
  display: none;
}
.cursor {
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(28, 25, 23, 0.35);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), background 0.3s, border-color 0.3s;
}
.cursor.hover {
  width: 70px; height: 70px;
  margin: -35px 0 0 -35px;
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.8);
  box-shadow: 0 0 18px -4px rgba(249, 115, 22, 0.5);
}
.cursor-dot {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  .cursor, .cursor-dot { display: block; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: calc(100% - 32px);
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 14px 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.nav__logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  font-size: 0.93rem;
  color: var(--muted);
  position: relative;
  transition: color 0.3s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__links a:hover, .nav__links a.active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 13px;
  width: 18px; height: 1.5px;
  background: var(--text);
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle.open span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle.open span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  color: #fff;
  background: var(--grad);
  background-size: 200% auto;
  border: none;
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 30px -12px rgba(234, 88, 12, 0.55);
  transition: background-position 0.6s var(--ease), box-shadow 0.4s, transform 0.3s var(--ease);
  will-change: transform;
}
.btn:hover { background-position: right center; box-shadow: 0 14px 38px -10px rgba(234, 88, 12, 0.65); }
.btn svg { transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--ghost {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.btn--ghost:hover { background: #fff4ea; border-color: rgba(249, 115, 22, 0.4); box-shadow: none; }
.btn--small { padding: 10px 20px; font-size: 0.9rem; }
.btn--full { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 130px 0 90px;
}
.hero__inner { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2dd4a7;
  box-shadow: 0 0 0 0 rgba(45, 212, 167, 0.7);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(45, 212, 167, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 167, 0); }
}

.hero__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(3.2rem, 10vw, 8.2rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.hero__title .line { display: block; }

.hero__nick {
  margin-top: 18px;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--muted);
}
.hero__nick strong {
  color: var(--text);
  padding: 2px 12px;
  border-radius: 8px;
  color: var(--cyan);
  background: #fff1e6;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.hero__typed {
  margin-top: 22px;
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 500;
}
.typed { color: var(--cyan); }
.caret {
  color: var(--pink);
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__lead {
  margin-top: 20px;
  max-width: 540px;
  color: var(--muted);
  font-size: 1.07rem;
}
.hero__lead strong { color: var(--text); font-weight: 600; }

.hero__actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-hint__mouse {
  width: 22px; height: 34px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-hint__mouse span {
  width: 3px; height: 7px;
  border-radius: 2px;
  background: var(--text);
  animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 26px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-color: transparent;
  background: var(--grad);
  box-shadow: 0 18px 40px -24px rgba(234, 88, 12, 0.6);
  transform: rotate(-1.5deg) scale(1.03);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee span {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.85);
}
.marquee span:nth-of-type(odd) { color: #fff; -webkit-text-stroke: 0; }
.marquee i { font-style: normal; color: #fff3e8; font-size: 1.3rem; }
@keyframes marquee { to { transform: translateX(-50%); } }



/* ---------- Sections ---------- */
.section { padding: 140px 0; position: relative; }

.section-head { max-width: 720px; margin-bottom: 64px; }
.section-label {
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.section-sub { color: var(--muted); font-size: 1.07rem; max-width: 560px; }

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: center;
}
.about__text p { color: var(--muted); margin-bottom: 18px; font-size: 1.05rem; }
.about__points { list-style: none; margin-top: 28px; display: grid; gap: 14px; }
.about__points li { display: flex; gap: 14px; align-items: flex-start; }
.about__points li span {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  background: #fff1e6;
  color: var(--cyan);
  border: 1px solid rgba(249, 115, 22, 0.3);
  margin-top: 2px;
}

.about__card-wrap { perspective: 1200px; }
.profile-card {
  position: relative;
  padding: 44px 32px 32px;
  border-radius: 28px;
  background: linear-gradient(160deg, #fff4ea, #ffffff 45%, #fff6ee);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
  transform-style: preserve-3d;
}
.profile-card__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(245, 190, 90, 0.16), transparent 50%);
}
.profile-card__avatar {
  width: 150px; height: 150px;
  margin: 0 auto 24px;
  border-radius: 50%;
  padding: 4px;
  background: var(--grad);
  transform: translateZ(60px);
  box-shadow: 0 20px 50px -18px rgba(234, 88, 12, 0.55);
}
.profile-card__avatar span, .profile-card__avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg-2);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 700;
  object-fit: cover;
}
.profile-card h3 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  transform: translateZ(40px);
}
.profile-card__nick { color: var(--cyan); font-weight: 500; transform: translateZ(30px); }
.profile-card__role { color: var(--muted); margin-top: 6px; transform: translateZ(30px); }
.profile-card__tags {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  transform: translateZ(25px);
}
.profile-card__tags span, .chips span {
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.profile-card__status {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Tilt base ---------- */
.tilt {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s, box-shadow 0.4s;
  will-change: transform;
}

/* ---------- Golden neon light that follows the cursor across the cards ---------- */
/* inner glow (::before) + a neon line on the card's edge nearest the cursor (::after, border-only via mask) */
.tilt::before,
.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.tilt::before {
  background:
    radial-gradient(140px circle at var(--mx, 50%) var(--my, 50%), rgba(251, 146, 60, 0.12), transparent 70%),
    radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(251, 146, 60, 0.08), rgba(251, 146, 60, 0.02) 40%, transparent 70%);
}
.tilt::after {
  z-index: 3;
  padding: 1.5px; /* neon line thickness */
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), #ea580c, var(--gold) 22%, rgba(251, 146, 60, 0.45) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.tilt:hover::before,
.tilt:hover::after { opacity: 1; }
.tilt:hover {
  border-color: rgba(249, 115, 22, 0.25) !important;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 26px 60px -28px rgba(234, 88, 12, 0.4);
}

/* ---------- Services (minimalist: one thin-lined grid; small line icon, name, one line) ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px; /* the 1px gaps show the grid's background as hairline dividers */
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.svc {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 26px 30px;
  background: #fff;
  transition: background 0.35s var(--ease);
}
.svc:hover { background: #fffaf5; }
.svc__icon {
  width: 24px; height: 24px;
  margin-bottom: 12px;
  fill: none;
  stroke: var(--violet);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}
.svc:hover .svc__icon { transform: translateY(-3px); }
.svc h3 { font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; }
.svc p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
/* "Need it all?" — the last cell, a quiet orange link */
.svc--cta { background: #fff7f0; justify-content: center; }
.svc--cta:hover { background: #fff1e6; }
.svc__link {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.92rem;
}
.svc__link svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.svc--cta:hover .svc__link svg { transform: translateX(4px); }

/* ---------- Open positions ("We're hiring" team cards + application form) ---------- */
.team-card.team-card--hiring { border-style: dashed; border-color: rgba(249, 115, 22, 0.35); background: linear-gradient(160deg, #fffaf5, #fff 55%); }
.hiring-badge {
  position: absolute;
  top: 18px; right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 9px;
  border-radius: 999px;
  background: #fff1e6;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hiring-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); animation: pulse-dot 1.8s ease-in-out infinite; }
@keyframes pulse-dot { 50% { opacity: 0.35; transform: scale(0.8); } }
/* the Apply button is always visible (not only on hover) and filled orange */
.team-card .team-card__btn.team-card__btn--apply { opacity: 1; transform: translateZ(30px); background: var(--grad); border-color: transparent; color: #fff; }

.apply {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(28, 25, 23, 0.45);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.apply.open { opacity: 1; }
.apply__panel {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  padding: 32px 30px 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.5);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s var(--ease);
}
.apply.open .apply__panel { transform: none; }
.apply__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.apply__close:hover { background: #fff1e6; transform: rotate(90deg); }
.apply__eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }
.apply__title { font-family: var(--font-head); font-size: 1.6rem; line-height: 1.15; }
.apply__sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 4px; }
.apply__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.apply__done { display: grid; justify-items: center; gap: 10px; padding: 24px 0 10px; text-align: center; }
.apply__tick { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #fff; font-size: 1.6rem; font-weight: 700; }
@media (max-width: 600px) { .apply__panel { padding: 26px 18px 20px; } .apply__row { grid-template-columns: 1fr; } }

/* ---------- Our Work (random mix of websites / logos / videos; tiles crossfade to new work) ---------- */
/* continuously moving belt: two big pieces in view (one on phones), gliding right → left */
.work__viewport {
  overflow: hidden;
  margin: -14px;
  padding: 14px; /* (room for the hover lift/shadow) */
  /* soft fade at both edges so work glides in and out */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.work__track { display: flex; gap: 18px; will-change: transform; touch-action: pan-y; cursor: grab; user-select: none; }
.work__track:active { cursor: grabbing; }
.work-slide { flex: 0 0 calc((100% - 18px) / 2); }
.work-tile.work-slide { aspect-ratio: 16 / 10; }
/* bigger slides → bigger caption, always visible */
.work-slide .work-tile__caption { opacity: 1; transform: none; padding: 40px 18px 14px; }
.work-slide .work-tile__caption strong { font-size: 1.1rem; }
.work-slide .work-tile__caption em { font-size: 0.82rem; }
.work-slide .work-tile__chip { top: 14px; left: 14px; }
.work-slide .work-tile__go { top: 14px; right: 14px; width: 34px; height: 34px; }
.work-slide .work-tile__play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.work-slide .work-tile__face--logo img { inset: 14% 18% 26%; width: 64%; height: 60%; }
.work-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}
.work-tile:hover { transform: translateY(-4px); border-color: rgba(249, 115, 22, 0.35); box-shadow: 0 20px 40px -24px rgba(234, 88, 12, 0.45); }
.work-tile__face {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
.work-tile__face.is-in { opacity: 1; }
.work-tile__face img, .work-tile__face video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.7s var(--ease);
}
.work-tile__face video { object-position: center 30%; background: #f1ece6; }
.work-tile:hover .work-tile__face img, .work-tile:hover .work-tile__face video { transform: scale(1.04); }
/* logos sit centred on white */
.work-tile__face--logo img { inset: 16% 14% 22%; width: 72%; height: 62%; object-fit: contain; object-position: center; }
.work-tile__face--logo { cursor: zoom-in; }
/* type chip (top-left) */
.work-tile__chip {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px -6px rgba(28, 25, 23, 0.3);
}
/* caption: slides up on hover (always shown on touch screens) */
.work-tile__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: grid;
  padding: 26px 12px 10px;
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 45%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.work-tile:hover .work-tile__caption, .work-tile__face:focus-visible .work-tile__caption { opacity: 1; transform: none; }
@media (hover: none) {
  /* touch screens: caption always shown, but just the name, kept small */
  .work-tile__caption { opacity: 1; transform: none; padding: 16px 10px 7px; }
  .work-tile__caption em { display: none; }
  .work-tile__caption strong { font-size: 0.8rem; }
  .work-tile__face--logo img { inset: 18% 12% 26%; height: 56%; }
}
.work-tile__caption strong { font-family: var(--font-head); font-size: 0.92rem; line-height: 1.25; }
.work-tile__caption em { font-style: normal; font-size: 0.74rem; color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* video play badge + website "open" arrow */
.work-tile__play {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 2;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--grad);
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px -8px rgba(234, 88, 12, 0.6);
  transition: transform 0.3s var(--ease);
}
.work-tile__play svg { margin-left: 2px; }
.work-tile:hover .work-tile__play { transform: scale(1.12); }
.work-tile__go {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--cyan);
  box-shadow: 0 4px 12px -6px rgba(28, 25, 23, 0.35);
  transition: background 0.3s, color 0.3s;
}
.work-tile:hover .work-tile__go { background: var(--violet); color: #fff; }
.work-tile__face:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
@media (max-width: 700px) {
  .work-slide { flex-basis: 100%; }
  .work-slide .work-tile__caption { padding: 30px 14px 12px; }
  .work-slide .work-tile__caption strong { font-size: 1rem; }
  .work-slide .work-tile__caption em { display: block; }
}

/* (still used by the team cards, socials and profile/portfolio chips) */
.team-card__avatar svg, .socials svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; transform: translateZ(20px); }

/* ---------- Team ---------- */
.team__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  perspective: 1400px;
}
.team-card {
  padding: 34px 30px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.team-card:hover { border-color: var(--border-strong); }
.team-card__avatar {
  width: 70px; height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--a), var(--b));
  box-shadow: 0 14px 40px -12px var(--a);
  transform: translateZ(50px);
}
.team-card__avatar svg { width: 30px; height: 30px; }
/* Team member photo instead of an icon (also used in the portfolio panel header) */
/* Round portrait: thin orange gradient ring > white ring > photo cropped close on the face */
.team-card__avatar--photo,
.pf-head__avatar:has(.team-photo) {
  position: relative;
  width: 96px; height: 96px;
  padding: 2.5px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--a), var(--b));
  box-shadow: 0 16px 34px -16px rgba(234, 88, 12, 0.6);
  overflow: visible;
}
.pf-head__avatar:has(.team-photo) { width: 80px; height: 80px; }
.team-photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #fff;
  overflow: hidden;
  background: #eef1f6;
}
.team-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.32); /* zoom in on the face (the original photo has lots of background) */
  transform-origin: 50% 36%;
  transition: transform 0.6s var(--ease);
}
.team-card:hover .team-photo img { transform: scale(1.4); }
/* little role badge on the ring */
.team-photo__badge {
  position: absolute;
  right: -2px; bottom: 2px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad);
  border: 2.5px solid #fff;
  box-shadow: 0 6px 14px -6px rgba(234, 88, 12, 0.7);
}
.team-card__avatar .team-photo__badge svg,
.pf-head__avatar .team-photo__badge svg { width: 13px; height: 13px; fill: #fff; stroke: none; }

/* ---------- Photo card: the photo sits in its own rounded frame at the top (fully clear, no fade),
   the text sits below it on white — neither covers the other ---------- */
.team-card--cover { padding-top: 14px; }
.team-card--cover .team-card__avatar--photo {
  width: auto;
  height: 250px;
  margin: 0 -16px 26px; /* the card has 30px side padding: this leaves a neat 14px frame all round */
  padding: 0;
  border-radius: 16px;
  background: #eef1f6;
  box-shadow: 0 12px 26px -16px rgba(28, 25, 23, 0.4);
  transform: none; /* (a 3D lift would enlarge it and spoil the even frame) */
}
.team-card--cover .team-photo { position: relative; border: 0; border-radius: inherit; background: none; }
.team-card--cover .team-photo img {
  transform: none;
  transform-origin: 50% 30%;
  object-position: 50% 22%;
}
.team-card--cover:hover .team-photo img { transform: scale(1.05); }
/* soft optical shadow: a faint edge line and a gentle vignette, so the photo sits in the frame */
.team-card--cover .team-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(28, 25, 23, 0.06), inset 0 -40px 50px -40px rgba(28, 25, 23, 0.35);
}
/* play badge on the photo's bottom edge */
.team-card--cover .team-photo__badge { z-index: 2; right: 16px; bottom: -18px; width: 38px; height: 38px; border-width: 3px; }
.team-card--cover .team-photo__badge svg { width: 15px; height: 15px; }
/* Round photos (already a circle with a white ring on black): show the circle on a soft, blurred,
   zoomed-in copy of the same photo, so the frame is filled without black corners */
.team-card--cover .team-photo--round { overflow: hidden; isolation: isolate; }
.team-card--cover .team-photo--round::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  background: var(--photo) center 45% / 170% no-repeat;
  filter: blur(18px) saturate(1.1) brightness(0.95);
}
.team-card--cover .team-photo--round img {
  /* a centred square, so the circular cut-out lines up with the photo itself */
  position: absolute;
  top: 12px;
  left: 50%;
  width: auto;
  height: calc(100% - 24px);
  aspect-ratio: 1;
  object-fit: cover;
  transform: translateX(-50%);
  /* cut exactly along the photo's own white ring (centre 49.8% / 49.4%, outer edge 95.2% of the half-width) */
  -webkit-mask-image: radial-gradient(circle closest-side at 49.8% 49.4%, #000 94.4%, transparent 95.2%);
  mask-image: radial-gradient(circle closest-side at 49.8% 49.4%, #000 94.4%, transparent 95.2%);
}
.team-card--cover:hover .team-photo--round img { transform: translateX(-50%) scale(1.04); }
/* Founder photo: a tall portrait with lots of white above the head — frame it on the face */
.team-card--cover .team-photo--founder img { object-position: 50% 26%; }
/* About section profile photo: same portrait, cropped to the face inside the round ring */
.profile-card__avatar img { object-position: 50% 30%; transform: scale(1.5); transform-origin: 50% 32%; }
.profile-card__avatar { overflow: hidden; }
/* line-drawn badge icons (e.g. the designer's pen) */
.team-card__avatar .team-photo__badge--line svg,
.pf-head__avatar .team-photo__badge--line svg { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* deeper, layered shadow under the whole card on hover */
.team-card--cover:hover {
  box-shadow:
    0 1px 2px rgba(28, 25, 23, 0.05),
    0 10px 24px -12px rgba(28, 25, 23, 0.18),
    0 34px 70px -34px rgba(234, 88, 12, 0.35) !important;
}
@media (max-width: 600px) { .team-card--cover .team-card__avatar--photo { height: 270px; } }
.team-card h3 { font-family: var(--font-head); font-size: 1.3rem; transform: translateZ(30px); }
.team-card__role {
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 500;
  margin: 4px 0 12px;
  transform: translateZ(25px);
}
.team-card > p:not(.team-card__role) { color: var(--muted); font-size: 0.94rem; transform: translateZ(20px); }

/* "See Portfolio" button — slides up on hover (always visible on touch screens) */
.team-card { display: flex; flex-direction: column; }
.team-card > p:not(.team-card__role) { flex: 1; }
.team-card__btn {
  align-self: flex-start;
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  background: #fff4ea;
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px) translateZ(30px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), background 0.3s, border-color 0.3s;
}
.team-card:hover .team-card__btn, .team-card__btn:focus-visible { opacity: 1; transform: translateY(0) translateZ(30px); }
.team-card__btn:hover { background: var(--grad); border-color: transparent; color: #fff; }
.team-card__btn svg { transition: transform 0.3s var(--ease); }
.team-card__btn:hover svg { transform: translateX(3px); }
@media (hover: none) { .team-card__btn { opacity: 1; transform: none; } }
/* Lit up when the avatar points it out */
.team-card.is-hinted .team-card__btn {
  opacity: 1;
  transform: translateY(0) translateZ(30px);
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  animation: hintPulse 1.1s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.55), 0 8px 24px -8px rgba(234, 88, 12, 0.6); }
  50% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0), 0 8px 24px -8px rgba(234, 88, 12, 0.6); }
}

/* ---------- Portfolio flip panel ---------- */
.pf-lock, .pf-lock body { overflow: hidden; }
.pf-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(28, 25, 23, 0.38);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.pf-backdrop.open { opacity: 1; }
.pf-card {
  position: fixed;
  z-index: 61;
  perspective: 1800px;
  transition: left 0.75s var(--ease), top 0.75s var(--ease), width 0.75s var(--ease), height 0.75s var(--ease);
}
.pf-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.75s var(--ease);
}
.pf-card.open .pf-inner { transform: rotateY(180deg); }
.pf-face {
  position: absolute;
  inset: 0;
  margin: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
}
.pf-front { background: #fff; }
/* The flipped-away front face would otherwise still catch clicks meant for the back (e.g. the ✕) */
.pf-card.open .pf-front { pointer-events: none; }
.pf-back {
  transform: rotateY(180deg) translateZ(1px);
  overflow-y: auto;
  background: linear-gradient(160deg, #fff1e6, #ffffff 35%, #ffffff 70%, #fff6ee);
  border: 1px solid var(--border);
  box-shadow: 0 40px 120px -40px rgba(28, 25, 23, 0.45);
}
.pf-back__inner { padding: 36px 40px 40px; display: grid; gap: 30px; }
.pf-back h3 {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}
.pf-head { display: flex; align-items: center; gap: 20px; }
.pf-head__avatar {
  flex-shrink: 0;
  width: 72px; height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--a), var(--b));
  box-shadow: 0 14px 40px -12px var(--a);
}
.pf-head__avatar svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pf-head__role { color: var(--cyan); font-size: 0.9rem; font-weight: 500; }
.pf-head__name { font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.1; }
.pf-close {
  margin-left: auto;
  align-self: flex-start;
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s var(--ease);
}
.pf-close:hover { background: #fff1e6; transform: rotate(90deg); }
.pf-about { color: var(--muted); font-size: 1.05rem; max-width: 720px; }
.pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chips span {
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.pf-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.pf-list li { position: relative; padding-left: 20px; color: var(--muted); font-size: 0.95rem; }
.pf-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a), var(--b));
}
.pf-work { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pf-work__item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.pf-work__item:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.pf-work__item img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s var(--ease); }
a.pf-work__item:hover img { transform: scale(1.04); }
/* Grouped portfolios (Websites / Landing pages): a small heading per row, 3 bigger tiles per row */
.pf-group + .pf-group { margin-top: 22px; }
.pf-group h4 {
  margin-bottom: 10px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.pf-work--sites { grid-template-columns: repeat(3, 1fr); }
.pf-work--sites .pf-work__item { aspect-ratio: 16 / 10; }
@media (max-width: 760px) { .pf-work--sites { grid-template-columns: repeat(2, 1fr); } }
/* live-site tiles: a small "open" arrow in the corner */
a.pf-work__item::after {
  content: "↗";
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--cyan);
  font-weight: 700;
  box-shadow: 0 6px 16px -8px rgba(28, 25, 23, 0.4);
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s;
}
a.pf-work__item:hover::after { transform: rotate(45deg); background: var(--violet); color: #fff; }
/* Portfolios with videos use portrait tiles (UGC / reels are vertical) */
.pf-work--tall .pf-work__item { aspect-ratio: 3 / 4; }
/* Video tiles (button): first frame as thumbnail, silent preview on hover, play badge */
.pf-work__item--video { display: block; width: 100%; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.pf-work__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #f1ece6; }
.pf-work__play {
  position: absolute;
  top: 50%; left: 50%;
  width: 46px; height: 46px;
  margin: -32px 0 0 -23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--grad);
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px -8px rgba(234, 88, 12, 0.6);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.pf-work__play svg { margin-left: 2px; }
.pf-work__item--video:hover .pf-work__play { transform: scale(1.12); }
.pf-work__item--video:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* "6+ years of experience" highlight above the timeline */
.pf-years {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff4ea, #ffffff);
  border: 1px solid rgba(249, 115, 22, 0.2);
}
.pf-years__num {
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pf-years__num sup { font-size: 1.4rem; vertical-align: 0.9rem; }
.pf-years__label { font-size: 0.9rem; line-height: 1.35; color: var(--muted); }
/* Experience timeline (orange dots on a thin line) */
.pf-timeline { list-style: none; position: relative; display: grid; gap: 18px; padding-left: 22px; }
.pf-timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--violet), rgba(249, 115, 22, 0.12));
}
.pf-timeline li { position: relative; display: grid; gap: 2px; }
.pf-timeline li::before {
  content: "";
  position: absolute;
  left: -22px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--violet);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}
.pf-timeline__period {
  justify-self: start;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff1e6;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pf-timeline strong { font-family: var(--font-head); font-size: 1.05rem; margin-top: 4px; }
.pf-timeline em { font-style: normal; font-size: 0.88rem; color: var(--cyan); }
.pf-timeline p { margin-top: 4px; font-size: 0.9rem; color: var(--muted); }

/* Services cards (for team members without a portfolio) */
.pf-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pf-service {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
}
.pf-service:hover { transform: translateY(-4px); border-color: rgba(249, 115, 22, 0.35); box-shadow: 0 16px 30px -18px rgba(234, 88, 12, 0.4); }
.pf-service__icon {
  width: 40px; height: 40px;
  margin-bottom: 6px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--a), var(--b));
  box-shadow: 0 10px 20px -10px var(--a);
}
.pf-service__icon svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pf-service strong { font-family: var(--font-head); font-size: 1rem; }
.pf-service p { font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 760px) { .pf-services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .pf-services { grid-template-columns: 1fr; } }

/* Logo wall (designer's portfolio): white tiles, logo centred, lift + orange edge on hover */
.pf-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff1e6;
  color: var(--cyan);
  font-size: 0.72rem;
  letter-spacing: 0;
  vertical-align: 1px;
}
.pf-logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pf-logo {
  position: relative;
  min-width: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  cursor: zoom-in;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
}
/* (absolutely placed so a big logo file can never stretch its tile) */
.pf-logo img {
  position: absolute;
  inset: 14px 16px;
  width: calc(100% - 32px);
  height: calc(100% - 28px);
  object-fit: contain;
  transition: transform 0.35s var(--ease);
}
.pf-logo:hover { transform: translateY(-4px); border-color: rgba(249, 115, 22, 0.4); box-shadow: 0 16px 30px -18px rgba(234, 88, 12, 0.45); }
.pf-logo:hover img { transform: scale(1.04); }
.pf-logo:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pf-logo--more { display: none; }
.pf-logos--all .pf-logo--more { display: block; animation: pfLogoIn 0.4s var(--ease) both; }
@keyframes pfLogoIn { from { opacity: 0; transform: translateY(10px); } }
.pf-logos__more { display: flex; justify-content: center; margin-top: 16px; }
@media (max-width: 760px) { .pf-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Enlarged logo viewer */
.pf-logo-view {
  width: min(880px, 92vw);
  padding: 30px 30px 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.6);
}
.pf-logo-view__stage { display: grid; place-items: center; height: min(56vh, 460px); margin: 0; padding: 10px 46px; }
.pf-logo-view__stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pf-logo-view__caption { margin-top: 12px; text-align: center; font-size: 0.85rem; color: var(--muted); }
.pf-logo-view__nav {
  position: absolute;
  top: 50%;
  width: 44px; height: 44px;
  margin-top: -32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.pf-logo-view__nav:hover { background: var(--grad); color: #fff; border-color: transparent; }
.pf-logo-view__nav--prev { left: 12px; }
.pf-logo-view__nav--next { right: 12px; }
@media (max-width: 600px) { .pf-logo-view { padding: 22px 12px 14px; } .pf-logo-view__stage { padding: 8px 40px; } }

/* Full-screen video player */
.pf-video {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(28, 25, 23, 0.82);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.pf-video.open { opacity: 1; }
.pf-video__frame { position: relative; max-width: min(960px, 100%); max-height: 100%; }
.pf-video__frame video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  max-height: calc(100svh - 48px);
  border-radius: 18px;
  background: #000;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.7);
}
.pf-video__close {
  position: absolute;
  top: -14px; right: -14px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s var(--ease);
}
.pf-video__close:hover { transform: rotate(90deg); }
@media (max-width: 600px) { .pf-video__close { top: 8px; right: 8px; } }
/* Placeholder artwork until real project images are added */
.pf-work__art {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at calc(20% + var(--i) * 20%) 30%, color-mix(in srgb, var(--a) 70%, transparent), transparent 55%),
    radial-gradient(circle at 80% calc(90% - var(--i) * 15%), color-mix(in srgb, var(--b) 60%, transparent), transparent 55%),
    var(--bg-2);
}
.pf-work__meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px;
  display: grid;
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 42%, #fff);
}
.pf-work__meta strong { font-family: var(--font-head); font-size: 0.95rem; }
.pf-work__meta em { font-style: normal; font-size: 0.78rem; color: var(--cyan); }
.pf-foot { display: flex; justify-content: flex-end; }

@media (max-width: 760px) {
  .pf-back__inner { padding: 24px 20px 28px; gap: 24px; }
  .pf-cols { grid-template-columns: 1fr; }
  .pf-work { grid-template-columns: repeat(2, 1fr); }
  .pf-head__avatar { width: 56px; height: 56px; border-radius: 18px; }
  .pf-foot .btn { width: 100%; }
}
@media (max-width: 420px) {
  .pf-list { grid-template-columns: 1fr; }
}

/* ---------- Process ---------- */
.process__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
  position: relative;
}
.process__list::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 30px; right: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), var(--pink), transparent);
  opacity: 0.6;
}
.process-step { position: relative; padding-top: 0; }
.process-step__num {
  width: 68px; height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  margin-bottom: 26px;
  position: relative;
  box-shadow: 0 0 0 6px var(--bg);
}
.process-step__num { background: #fff; box-shadow: 0 0 0 6px var(--bg), var(--shadow) !important; }
.process-step:hover .process-step__num { background: var(--grad); border-color: transparent; color: #fff; }
.process-step h3 { font-family: var(--font-head); font-size: 1.35rem; margin-bottom: 10px; }
.process-step p { color: var(--muted); font-size: 0.95rem; }

.why {
  margin-top: 90px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.why__item { padding: 36px 32px; }
.why__item + .why__item { border-left: 1px solid var(--border); }
.why__item h3 { font-family: var(--font-head); font-size: 1.25rem; margin-bottom: 8px; }
.why__item p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact__info > p { color: var(--muted); font-size: 1.07rem; max-width: 460px; }
.contact__links { margin-top: 36px; display: grid; gap: 12px; max-width: 420px; }
.contact__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.contact__link:hover { border-color: rgba(249, 115, 22, 0.45); transform: translateX(6px); }
.contact__link-label { color: var(--muted); font-size: 0.85rem; }
.contact__link-value { font-weight: 500; word-break: break-all; text-align: right; }

.socials { display: flex; gap: 12px; margin-top: 30px; }
.socials a {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  background: #fff;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.socials a:hover { background: var(--violet); border-color: var(--violet); color: #fff; }
.socials svg { width: 20px; height: 20px; }

.contact__form {
  padding: 40px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 30px 70px -36px rgba(28, 25, 23, 0.28);
  display: grid;
  gap: 18px;
}
.field { position: relative; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 24px 18px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  outline: none;
  resize: vertical;
  transition: border-color 0.3s, background 0.3s;
  appearance: none;
  -webkit-appearance: none;
}
.field select { cursor: pointer; }
.field select option { background: var(--bg-2); color: var(--text); }
.field::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.field:has(select)::after {
  right: 20px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--violet);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.field label {
  position: absolute;
  left: 19px;
  top: 17px;
  color: var(--muted);
  pointer-events: none;
  transition: transform 0.25s var(--ease), font-size 0.25s, color 0.25s, top 0.25s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field select:valid + label {
  top: 7px;
  font-size: 0.74rem;
  color: var(--cyan);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #ff5d7a; }
.form-note { font-size: 0.9rem; color: var(--muted); min-height: 1.4em; text-align: center; }
.form-note.ok { color: #059669; }
.form-note.err { color: #dc2626; }
.form-note a { text-decoration: underline; text-underline-offset: 2px; }
.form-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.btn.is-sending { opacity: 0.7; cursor: progress; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
  background: #fff;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer p { color: var(--muted); font-size: 0.9rem; }
.footer__top { color: var(--muted); font-size: 0.9rem; transition: color 0.3s; }
.footer__top:hover { color: var(--text); }
.footer__credit { margin-top: 14px; font-size: 0.75rem; color: var(--muted); opacity: 0.7; }
.footer__credit a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.tilt.reveal.in { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav__links {
    position: fixed;
    top: 76px;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 12px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.35s, transform 0.35s var(--ease), visibility 0.35s;
  }
  .nav__links.open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 14px 18px; font-size: 1.1rem; color: var(--text); }
  .nav__links a::after { display: none; }
  .nav__toggle { display: block; }
  .nav__cta { margin-left: auto; }
  .nav { background: rgba(255, 255, 255, 0.92); border-color: var(--border); box-shadow: var(--shadow); }

  #webgl { opacity: 0.85; }
  .section { padding: 100px 0; }
  .about__grid, .contact__grid { grid-template-columns: 1fr; gap: 56px; }
  .about__card-wrap { max-width: 420px; }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .process__list { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .process__list::before { display: none; }
  .why { grid-template-columns: 1fr; }
  .why__item + .why__item { border-left: none; border-top: 1px solid var(--border); }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .nav { top: 10px; width: calc(100% - 20px); padding: 8px 8px 8px 18px; gap: 10px; }
  .nav__links { top: 68px; }
  .nav__cta { display: none; }
  .bubble { font-size: 0.85rem; padding: 8px 13px; border-radius: 14px; max-width: min(260px, 70vw); }
  .bubble__ask { margin-left: 6px; padding: 2px 7px; font-size: 0.8rem; }
  .bubble__ask-label { display: none; }
  .hero { padding: 110px 0 100px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .team__grid, .process__list { grid-template-columns: 1fr; }
  .svc { padding: 20px 16px 22px; }
  .svc h3 { font-size: 0.98rem; }
  .svc p { font-size: 0.84rem; }
  .contact__form { padding: 26px 20px; }
  .section-head { margin-bottom: 44px; }
  .footer__inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
