/* ===========================================================
   IamPalski — custom styles layered over Tailwind
   =========================================================== */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Hide scrollbar on the testimonial track */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- Nav ---------- */
[data-nav].is-scrolled nav { box-shadow: 0 10px 40px -18px rgba(20,19,15,0.35); }

.nav-link {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  color: #4d4a44;
  transition: background-color .2s ease, color .2s ease;
}
.nav-link:hover { background: #E9E4D8; color: #14130F; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: #14130F; color: #F3F0E9;
  padding: .8rem 1.5rem; border-radius: 9999px;
  font-size: .9rem; font-weight: 500; line-height: 1; white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}
.btn-primary svg { flex: none; display: block; }
.btn-primary:hover { background: #C2562B; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.5rem; border-radius: 9999px;
  border: 1px solid rgba(20,19,15,.2);
  font-size: .9rem; font-weight: 500; line-height: 1; white-space: nowrap; color: #14130F;
  transition: background-color .2s ease, border-color .2s ease;
}
.btn-ghost:hover { background: #14130F; color: #F3F0E9; border-color: #14130F; }

/* ---------- Eyebrows ---------- */
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: #6E6A61;
}
.eyebrow-dark {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: #928D81;
}

/* ---------- Status dot ---------- */
.status-dot {
  position: relative; display: inline-block; width: 8px; height: 8px;
  border-radius: 9999px; background: #C2562B;
}
.status-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 9999px;
  border: 1px solid #C2562B; opacity: .5;
  animation: dot-pulse 2.4s ease-out 3;
}
@keyframes dot-pulse {
  0% { transform: scale(.6); opacity: .6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Hero inline avatar pill ---------- */
.hero-pill {
  display: inline-grid; place-items: center;
  width: clamp(56px, 9vw, 92px); height: clamp(40px, 6vw, 60px);
  border-radius: 9999px; overflow: hidden;
  background: #E9E4D8; border: 1px solid rgba(20,19,15,.08);
  box-shadow: inset 0 0 0 4px #F3F0E9;
}
.hero-pill img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  filter: grayscale(1) contrast(1.05);
}
.hp-fallback {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-family: "Inter Tight", sans-serif; font-weight: 800;
  font-size: 1rem; color: #6E6A61; background: #DED7C7;
}

/* ---------- About portrait ---------- */
.portrait-frame {
  position: relative;
  width: clamp(230px, 34vw, 320px);
  aspect-ratio: 4 / 5;
  background: #F3F0E9;
  padding: 12px;
  border-radius: 6px;
  transform: rotate(3deg);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.portrait-frame:hover { transform: rotate(0deg); }
.portrait-img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  border-radius: 3px;
  filter: grayscale(1) contrast(1.06);
  transition: filter .4s ease;
}
.portrait-frame:hover .portrait-img { filter: grayscale(0) contrast(1); }
.portrait-fallback {
  display: none;
  position: absolute; inset: 12px;
  border-radius: 3px;
  place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg,#E9E4D8,#E9E4D8 10px,#E3DCCD 10px,#E3DCCD 20px);
  color: #6E6A61; font-size: 12px; line-height: 1.6;
  font-family: "JetBrains Mono", monospace;
}
.portrait-frame.is-empty .portrait-fallback { display: grid; }

/* ---------- Service cards ---------- */
.service-card {
  background: #fff; border: 1px solid rgba(20,19,15,.07);
  border-radius: 1.5rem; padding: 1.25rem 1.25rem 1.6rem;
  transition: transform .3s ease, box-shadow .3s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(20,19,15,.4); }

.service-thumb, .content-thumb {
  position: relative; height: 200px; border-radius: 1rem; overflow: hidden;
  display: grid; place-items: end start;
  filter: grayscale(1); transition: filter .4s ease;
}
.service-card:hover .service-thumb,
.content-card:hover .content-thumb { filter: grayscale(0); }

.content-thumb { height: 170px; }

.thumb-tag {
  margin: .8rem; font-size: 10px; letter-spacing: .15em; text-transform: uppercase;
  background: rgba(243,240,233,.9); color: #14130F;
  padding: .3rem .6rem; border-radius: 9999px;
}

/* platform thumbnail images */
.thumb-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

/* generated monochrome thumbnails — intentional placeholders */
.thumb-a { background:
  radial-gradient(120% 100% at 0% 0%, #2a2722 0%, transparent 55%),
  radial-gradient(120% 120% at 100% 100%, #C2562B 0%, transparent 60%),
  linear-gradient(135deg,#3a352d,#14130F); }
.thumb-b { background:
  radial-gradient(90% 90% at 80% 10%, #4a443a 0%, transparent 60%),
  conic-gradient(from 210deg at 30% 70%, #14130F, #5a5347, #14130F); }
.thumb-c { background:
  radial-gradient(100% 100% at 20% 20%, #C2562B 0%, transparent 45%),
  linear-gradient(160deg,#2a2722,#14130F 70%); }

/* ---------- Ebook ---------- */
.ebook-card {
  display: flex; flex-direction: column;
  padding: 2rem; border-radius: 1.5rem;
  border: 1px solid rgba(20,19,15,.08);
  background: #FAF8F3;
}

.ebook-cover {
  display: block; border-radius: .85rem; overflow: hidden;
  border: 1px solid rgba(20,19,15,.1);
  box-shadow: 0 20px 50px -28px rgba(20,19,15,.5);
  transform: rotate(-1deg);
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease;
}
.ebook-cover:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 30px 60px -28px rgba(20,19,15,.55); }
.ebook-cover img { display: block; width: 100%; height: auto; }

.ebook-cover-placeholder { transform: rotate(0deg); }
.ebook-placeholder-inner {
  display: flex; align-items: center; justify-content: center;
  min-height: 280px; background: #E9E4D8;
  color: #14130F;
}

.ebook-point {
  display: flex; gap: .9rem; align-items: flex-start;
  font-size: .95rem; line-height: 1.55; color: #4d4a44;
}
.ebook-point strong { color: #14130F; font-weight: 600; }
.ebook-bullet {
  flex: none; margin-top: .15rem;
  font-size: 11px; letter-spacing: .05em; color: #C2562B;
}

/* ---------- Project accordion ---------- */
.project-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.5rem 0; text-align: left; cursor: pointer;
  color: #F3F0E9;
}
.project-head:hover .project-meta { color: #C2562B; }
.project-meta {
  display: inline-flex; align-items: center; gap: 1rem;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #928D81;
  transition: color .25s ease;
}
.plus { position: relative; width: 18px; height: 18px; flex: none; }
.plus::before, .plus::after {
  content: ""; position: absolute; background: currentColor; border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.plus::before { left: 0; top: 8px; width: 18px; height: 2px; }
.plus::after  { left: 8px; top: 0; width: 2px; height: 18px; }
.project.open .plus::after { transform: scaleY(0); opacity: 0; }
.project.open .project-head { color: #fff; }

.project-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.project.open .project-body { grid-template-rows: 1fr; }
.project-body-inner {
  overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.project.open .project-body-inner { padding-bottom: 1.75rem; }

.project-link {
  display: inline-flex; align-items: center; gap: .5rem; flex: none;
  font-size: .85rem; font-weight: 500; color: #F3F0E9;
  border: 1px solid rgba(243,240,233,.25); border-radius: 9999px; padding: .6rem 1.1rem;
  transition: background-color .2s ease, color .2s ease;
}
.project-link:hover { background: #C2562B; border-color: #C2562B; color: #fff; }

/* ---------- Testimonials ---------- */
.testimonial {
  flex: 0 0 100%; max-width: 100%;
  background: #fff; border: 1px solid rgba(20,19,15,.07);
  border-radius: 1.75rem; padding: 2rem;
}
@media (min-width: 768px) { .testimonial { flex-basis: 560px; max-width: 560px; } }
.stars { color: #C2562B; letter-spacing: .15em; font-size: .9rem; }
.avatar {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 9999px; background: #14130F; color: #F3F0E9;
  font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: .8rem;
}
.arrow {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 9999px; border: 1px solid rgba(20,19,15,.2); color: #14130F;
  transition: background-color .2s ease, color .2s ease;
}
.arrow:hover { background: #14130F; color: #F3F0E9; }

/* ---------- Hire Me cards ---------- */
.hire-card {
  background: #100F0C;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 1.25rem;
  padding: 2rem;
  display: flex; flex-direction: column; gap: .75rem;
  transition: background-color .3s ease, border-color .3s ease;
}
.hire-card:hover { background: #1B1916; border-color: rgba(194,86,43,.3); }
.hire-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: .85rem;
  background: rgba(194,86,43,.12); color: #C2562B; margin-bottom: .5rem;
}
.hire-title { font-size: 1.15rem; letter-spacing: -.01em; color: #F3F0E9; margin-bottom: .25rem; }
.hire-desc { font-size: .9rem; line-height: 1.65; color: #928D81; flex: 1; }
.hire-list {
  list-style: none; margin-top: .75rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.hire-list li {
  font-size: .82rem; font-family: "JetBrains Mono", monospace;
  letter-spacing: .03em; color: #C2562B;
  padding-left: 1rem; position: relative;
}
.hire-list li::before { content: '→'; position: absolute; left: 0; }
.hire-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  background: #F3F0E9; color: #14130F;
  padding: .85rem 1.75rem; border-radius: 9999px;
  font-size: .9rem; font-weight: 600; white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}
.hire-btn:hover { background: #C2562B; color: #F3F0E9; transform: translateY(-1px); }

/* ---------- Capability tiles ---------- */
.cap-tile {
  position: relative;
  background: #100F0C;
  padding: 1.6rem 1.5rem 1.8rem;
  transition: background-color .3s ease;
}
.cap-tile:hover { background: #1B1916; }
.cap-idx {
  display: inline-block; font-size: 11px; letter-spacing: .05em; color: #C2562B; margin-bottom: 1.4rem;
}
.cap-title {
  font-size: 1.1rem; letter-spacing: -.01em; color: #F3F0E9;
  display: flex; align-items: center; gap: .5rem;
}
.cap-title::after {
  content: ""; width: 14px; height: 14px; flex: none;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 9.5L9.5 2.5M9.5 2.5H4M9.5 2.5V8' stroke='%23C2562B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: 0; transform: translate(-4px,4px); transition: opacity .3s ease, transform .3s ease;
}
.cap-tile:hover .cap-title::after { opacity: 1; transform: none; }
.cap-desc { margin-top: .55rem; font-size: .9rem; line-height: 1.6; color: #928D81; }

/* ---------- Content cards ---------- */
.content-card {
  display: block; background: #fff; border: 1px solid rgba(20,19,15,.07);
  border-radius: 1.5rem; padding: 1.1rem 1.1rem 1.4rem;
  transition: transform .3s ease, box-shadow .3s ease;
}
.content-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(20,19,15,.4); }
.content-cta { display: inline-block; margin-top: 1rem; font-size: .85rem; font-weight: 600; color: #14130F; }
.content-card:hover .content-cta { color: #C2562B; }

/* ---------- Footer social ---------- */
.social {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 9999px; border: 1px solid rgba(20,19,15,.15); color: #14130F;
  transition: background-color .2s ease, color .2s ease;
}
.social:hover { background: #14130F; color: #F3F0E9; }

/* ---------- Scroll reveal (only when JS is active) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  filter: blur(6px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1), filter .8s ease;
}
.js .reveal.in { opacity: 1; transform: none; filter: blur(0); }

/* reveal variants (added by JS) */
.js .reveal-left  { opacity: 0; transform: translateX(-34px); filter: blur(6px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1), filter .8s ease; }
.js .reveal-right { opacity: 0; transform: translateX(34px);  filter: blur(6px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1), filter .8s ease; }
.js .reveal-scale { opacity: 0; transform: scale(.92) translateY(14px); filter: blur(6px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1), filter .8s ease; }
.js .reveal-left.in, .js .reveal-right.in, .js .reveal-scale.in { opacity: 1; transform: none; filter: blur(0); }

/* ===========================================================
   ANIMATION LAYER — ambience, motion, micro-interactions
   =========================================================== */

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, #C2562B, #E07B4C);
  transform-origin: 0 50%; transform: scaleX(0);
  z-index: 100; pointer-events: none;
}

/* ---------- Ambient background orbs ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

/* scroll-parallax background pattern: fine dot grid + faint contour rings */
.bg-pattern, .bg-pattern-rings {
  position: absolute; left: 0; right: 0; top: -20vh; height: 140vh;
  will-change: transform;
}
.bg-pattern {
  background-image: radial-gradient(rgba(20,19,15,.10) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 75%);
}
.bg-pattern-rings {
  background-image:
    radial-gradient(circle at 12% 25%, transparent 118px, rgba(20,19,15,.045) 119px, rgba(20,19,15,.045) 120px, transparent 121px),
    radial-gradient(circle at 12% 25%, transparent 158px, rgba(20,19,15,.04) 159px, rgba(20,19,15,.04) 160px, transparent 161px),
    radial-gradient(circle at 12% 25%, transparent 198px, rgba(20,19,15,.035) 199px, rgba(20,19,15,.035) 200px, transparent 201px),
    radial-gradient(circle at 88% 70%, transparent 138px, rgba(194,86,43,.06) 139px, rgba(194,86,43,.06) 140px, transparent 141px),
    radial-gradient(circle at 88% 70%, transparent 178px, rgba(194,86,43,.05) 179px, rgba(194,86,43,.05) 180px, transparent 181px),
    radial-gradient(circle at 88% 70%, transparent 218px, rgba(194,86,43,.04) 219px, rgba(194,86,43,.04) 220px, transparent 221px);
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: .5;
  will-change: transform;
}
.orb-a {
  width: 44vw; height: 44vw; top: -14vw; right: -10vw;
  background: radial-gradient(circle at 35% 35%, rgba(194,86,43,.16), transparent 65%);
  animation: orb-drift-a 26s ease-in-out infinite alternate;
}
.orb-b {
  width: 36vw; height: 36vw; bottom: -12vw; left: -12vw;
  background: radial-gradient(circle at 60% 40%, rgba(222,196,138,.28), transparent 65%);
  animation: orb-drift-b 32s ease-in-out infinite alternate;
}
.orb-c {
  width: 24vw; height: 24vw; top: 40%; left: 55%;
  background: radial-gradient(circle at 50% 50%, rgba(194,86,43,.09), transparent 65%);
  animation: orb-drift-c 40s ease-in-out infinite alternate;
}
@keyframes orb-drift-a { from { transform: translate(0,0) scale(1); }    to { transform: translate(-7vw,9vh)  scale(1.15); } }
@keyframes orb-drift-b { from { transform: translate(0,0) scale(1.1); }  to { transform: translate(8vw,-7vh)  scale(.95); } }
@keyframes orb-drift-c { from { transform: translate(0,0); }             to { transform: translate(-10vw,-12vh); } }

/* ---------- Nav polish ---------- */
[data-nav] nav { transition: box-shadow .3s ease, transform .35s cubic-bezier(.2,.7,.2,1); }
[data-nav].nav-hidden nav { transform: translateY(-140%); }
.nav-link { position: relative; }
.nav-link::after {
  content: ""; position: absolute; left: 50%; bottom: 4px;
  width: 0; height: 2px; border-radius: 2px; background: #C2562B;
  transform: translateX(-50%); transition: width .28s cubic-bezier(.2,.7,.2,1);
}
.nav-link:hover::after { width: calc(100% - 1.7rem); }

/* logo wiggle */
[data-nav] a[aria-label="IamPalski home"] img { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
[data-nav] a[aria-label="IamPalski home"]:hover img { transform: rotate(-3deg) scale(1.06); }

/* ---------- Buttons: sheen sweep + magnetic base ---------- */
.btn-primary, .hire-btn, .btn-ghost { position: relative; overflow: hidden; will-change: transform; }
.btn-primary::before, .hire-btn::before {
  content: ""; position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.25), transparent);
  transform: skewX(-20deg); transition: left .55s ease;
  pointer-events: none;
}
.btn-primary:hover::before, .hire-btn:hover::before { left: 140%; }
.btn-primary svg, .btn-ghost svg, .hire-btn svg, .project-link svg { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.btn-primary:hover svg, .btn-ghost:hover svg, .hire-btn:hover svg, .project-link:hover svg { transform: translate(2px,-2px); }

/* ---------- Status dot: pulse forever ---------- */
.status-dot::after { animation: dot-pulse 2.4s ease-out infinite; }

/* ---------- Hero pill: gentle bob ---------- */
.hero-pill { animation: pill-bob 5s ease-in-out infinite; }
@keyframes pill-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(2deg); }
}

/* ---------- Ember words: living gradient ---------- */
.text-ember {
  background: linear-gradient(100deg, #C2562B 20%, #E07B4C 40%, #C2562B 60%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: ember-flow 5s ease-in-out infinite;
}
@keyframes ember-flow { 0%,100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }

/* ---------- Portrait: parallax handled by JS, add depth on hover ---------- */
.portrait-frame { will-change: transform; }

/* ---------- Ebook covers: idle float + sheen ---------- */
.ebook-cover { position: relative; }
.ebook-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.28) 50%, transparent 60%);
  background-size: 250% 100%; background-position: 130% 0;
  transition: background-position .8s ease;
  pointer-events: none;
}
.ebook-cover:hover::after { background-position: -30% 0; }
.ebook-cover img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ebook-cover:hover img { transform: scale(1.03); }

/* ebook card lift */
.ebook-card { transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease, border-color .3s ease; }
.ebook-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -34px rgba(20,19,15,.45);
  border-color: rgba(194,86,43,.25);
}
.ebook-bullet { transition: transform .25s cubic-bezier(.34,1.56,.64,1); display: inline-block; }
.ebook-point:hover .ebook-bullet { transform: scale(1.35); }

/* ---------- Projects: row slide + accent bar ---------- */
.project { position: relative; transition: padding-left .35s cubic-bezier(.2,.7,.2,1); }
.project::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 3px; height: 0; border-radius: 3px; background: #C2562B;
  transform: translateY(-50%); transition: height .35s cubic-bezier(.2,.7,.2,1);
}
.project:hover, .project.open { padding-left: 1.1rem; }
.project:hover::before, .project.open::before { height: 55%; }
.project-head .font-display { transition: color .25s ease, letter-spacing .35s cubic-bezier(.2,.7,.2,1); }
.project:hover .project-head .font-display { color: #fff; letter-spacing: .01em; }
.plus { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.project-head:hover .plus { transform: rotate(90deg); }
.project.open .plus { transform: rotate(180deg); }

/* ---------- Testimonials: card life + star shimmer ---------- */
.testimonial { transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease; }
.testimonial:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: 0 26px 50px -30px rgba(20,19,15,.35); }
.testimonial .avatar { transition: transform .3s cubic-bezier(.34,1.56,.64,1), background-color .3s ease; }
.testimonial:hover .avatar { transform: scale(1.12) rotate(-6deg); background: #C2562B; }
.stars { display: inline-block; }
.testimonial:hover .stars { animation: stars-pop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes stars-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.arrow { transition: background-color .2s ease, color .2s ease, transform .2s cubic-bezier(.34,1.56,.64,1); }
.arrow:hover { transform: scale(1.1); }
.arrow:active { transform: scale(.92); }

/* ---------- Hire cards: tilt (JS) + icon life + list cascade ---------- */
.hire-card { will-change: transform; transform-style: preserve-3d; }
.hire-card:hover { box-shadow: 0 24px 60px -30px rgba(0,0,0,.8); }
.hire-icon { transition: transform .35s cubic-bezier(.34,1.56,.64,1), background-color .3s ease, color .3s ease; }
.hire-card:hover .hire-icon {
  transform: translateY(-4px) rotate(-5deg) scale(1.08);
  background: #C2562B; color: #F3F0E9;
}
.hire-list li { transition: transform .3s cubic-bezier(.2,.7,.2,1), color .3s ease; }
.hire-card:hover .hire-list li { transform: translateX(4px); }
.hire-card:hover .hire-list li:nth-child(1) { transition-delay: 0s; }
.hire-card:hover .hire-list li:nth-child(2) { transition-delay: .05s; }
.hire-card:hover .hire-list li:nth-child(3) { transition-delay: .1s; }
.hire-card:hover .hire-list li:nth-child(4) { transition-delay: .15s; }
.hire-list li::before { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.hire-card:hover .hire-list li::before { transform: translateX(3px); }

/* ---------- Content cards: image zoom + tag slide ---------- */
.content-thumb { transform: translateZ(0); }
.content-thumb .thumb-img { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.content-card:hover .thumb-img { transform: scale(1.07); }
.thumb-tag { position: relative; z-index: 1; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.content-card:hover .thumb-tag { transform: translateY(-3px); }
.content-cta { transition: color .25s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
.content-card:hover .content-cta { transform: translateX(4px); }

/* ---------- Footer social: pop ---------- */
.social { transition: background-color .2s ease, color .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1); }
.social:hover { transform: translateY(-3px) rotate(8deg); }

/* ===========================================================
   IMMERSIVE HERO — "the prompt & the response"
   Eyebrow types like a prompt, headline streams in like
   an AI reply, caret blinks, stats run as a live marquee.
   =========================================================== */
.hero-x {
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 7.5rem 0 8.5rem;
}
.hx-inner { will-change: transform; }

/* soft ember glow breathing behind the headline */
.hx-glow {
  position: absolute; left: 50%; top: 42%;
  width: min(70vw, 760px); height: min(48vw, 480px);
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(194,86,43,.14), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  animation: hx-glow-breathe 7s ease-in-out infinite;
}
@keyframes hx-glow-breathe {
  0%, 100% { opacity: .7; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;  transform: translate(-50%, -50%) scale(1.12); }
}

/* --- eyebrow: typed like a prompt --- */
.hx-type-caret {
  display: none; width: 8px; height: 13px; margin-left: 2px;
  background: #C2562B; border-radius: 1px;
  animation: hx-blink .8s step-end infinite;
}
.js .hero-x.is-typing .hx-type-caret,
.js .hero-x.typed .hx-type-caret { display: inline-block; }
.js .hero-x.typed .hx-type-caret { animation: hx-blink .8s step-end 4, hx-caret-out .4s ease 3.2s forwards; }
@keyframes hx-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes hx-caret-out { to { opacity: 0; width: 0; margin-left: 0; } }

/* --- headline: words stream in (delays set inline by JS) --- */
.js .hx-w {
  display: inline-block;
  opacity: 0; transform: translateY(.55em) rotate(1deg); filter: blur(8px);
  animation: hx-word .7s cubic-bezier(.16,.7,.22,1) forwards;
  animation-delay: inherit;
}
@keyframes hx-word {
  to { opacity: 1; transform: translateY(0) rotate(0deg); filter: blur(0); }
}

/* --- headline caret: blinks after the last word, then fades --- */
.hx-caret {
  display: inline-block; vertical-align: baseline;
  width: .09em; height: .78em; margin-left: .08em;
  background: #C2562B; border-radius: .02em;
  opacity: 0;
}
.js .hero-x.typed .hx-caret {
  animation: hx-caret-in .01s linear 1.2s forwards, hx-blink .7s step-end 1.2s 5, hx-caret-out .5s ease 4.9s forwards;
}
@keyframes hx-caret-in { to { opacity: 1; } }

/* "AI builder": constant heartbeat pulse (keeps the flowing gradient too) */
.hero-x h1 .text-ember {
  display: inline-block;
  animation: ember-flow 5s ease-in-out infinite, hero-pulse 2.2s ease-in-out infinite;
}
@keyframes hero-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

/* headshot pill: springs in with its word, then bobs forever */
.js .hero-pill {
  transform: scale(0) rotate(-25deg);
  animation:
    pill-pop .65s cubic-bezier(.34,1.8,.5,1) var(--pill-delay, 1.9s) forwards,
    pill-bob 5s ease-in-out calc(var(--pill-delay, 1.9s) + .75s) infinite;
}
@keyframes pill-pop { to { transform: scale(1) rotate(0deg); } }

/* location pin: drops in with its word */
.js .hero-pin {
  opacity: 0; transform: translateY(-16px) scale(.6);
  animation: pin-drop .55s cubic-bezier(.34,1.7,.5,1) var(--pin-delay, 2.3s) forwards;
}
@keyframes pin-drop {
  60%  { opacity: 1; transform: translateY(2px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* copy & CTAs cascade in after the headline finishes streaming */
.js .hx-sub  { opacity: 0; animation: hero-fade-up .8s cubic-bezier(.2,.65,.3,1) 2.5s forwards; }
.js .hx-ctas { opacity: 0; animation: hero-fade-up .8s cubic-bezier(.2,.65,.3,1) 2.7s forwards; }
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- scroll cue --- */
.hx-scrollcue {
  position: absolute; left: 50%; bottom: 4.6rem;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  transition: opacity .4s ease;
}
.js .hx-scrollcue { opacity: 0; animation: hero-fade-up .8s ease 3s forwards; }
.hx-scrollcue.gone { opacity: 0 !important; }
.hx-scrollline {
  display: block; width: 1px; height: 34px;
  background: linear-gradient(to bottom, rgba(20,19,15,.4), transparent);
  overflow: hidden; position: relative;
}
.hx-scrollline::after {
  content: ""; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%;
  background: #C2562B;
  animation: hx-scroll-drip 1.8s cubic-bezier(.4,0,.6,1) infinite;
}
@keyframes hx-scroll-drip {
  0%   { top: -50%; }
  100% { top: 110%; }
}

/* --- stats marquee along the bottom edge --- */
.hx-marquee {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(20,19,15,.08);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.js .hx-marquee { opacity: 0; animation: hero-fade-up .8s ease 3s forwards; }
.hx-marquee-track {
  display: flex; width: max-content;
  animation: hx-marquee 36s linear infinite;
}
.hx-marquee-half {
  display: flex; align-items: center; gap: 2.4rem;
  padding-right: 2.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(110,106,97,.85);
  white-space: nowrap;
}
.hx-star { color: #C2562B; font-size: 9px; }
@keyframes hx-marquee { to { transform: translateX(-50%); } }
.hero-x:hover .hx-marquee-track { animation-play-state: paused; }

@media (max-width: 640px) {
  .hero-x { padding: 6.5rem 0 7.5rem; }
  .hx-scrollcue { bottom: 4.2rem; }
  /* smaller, jewel-like pill so it never forces ragged wraps */
  .hero-x .hero-pill {
    width: 46px; height: 33px;
    box-shadow: inset 0 0 0 3px #F3F0E9;
  }
  .hero-x h1 { letter-spacing: -0.035em; line-height: 1.02; }
  .hero-x h1 > span.block { margin-bottom: .1em; }
  .hx-glow { width: 90vw; height: 60vw; }
}

@media (prefers-reduced-motion: reduce) {
  .js .hx-w, .js .hero-pill, .js .hero-pin, .js .hx-sub, .js .hx-ctas,
  .js .hx-scrollcue, .js .hx-marquee {
    opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important;
  }
  .hx-type-caret, .hx-caret { display: none !important; animation: none !important; }
  .hx-glow, .hx-marquee-track, .hx-scrollline::after { animation: none !important; }
  .hero-x h1 .text-ember { animation: none; transform: none; }
}

/* ---------- Dark sections: slow ember aurora ---------- */
.bg-dark { position: relative; overflow: hidden; }
.bg-dark::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(38% 45% at 18% 20%, rgba(194,86,43,.10), transparent 70%),
    radial-gradient(30% 38% at 85% 75%, rgba(194,86,43,.07), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate;
  pointer-events: none;
}
.bg-dark > * { position: relative; }
@keyframes aurora {
  from { transform: translate(0,0) rotate(0deg); }
  to   { transform: translate(4%,6%) rotate(3deg); }
}

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #C2562B; outline-offset: 3px; border-radius: 6px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .animate-ping { animation: none; }
  * { transition-duration: .01ms !important; animation: none !important; }
  .orb, .ambient, .bg-dark::before { animation: none !important; }
  .text-ember {
    background: none; -webkit-text-fill-color: initial; color: #C2562B; animation: none;
  }
}
