/* ============================================
   WORK PAGE — contractor page (/work)
   Requires: shared.css, index.css (aurora, marquee,
   section labels, feature list, typing-bounce)
   ============================================ */

/* ============================================
   HERO
   ============================================ */
.work-hero { position: relative; overflow: hidden; padding: 152px 0 96px; }
.work-hero__inner { position: relative; z-index: 2; }
.work-hero .hero__badge { margin-bottom: 28px; }
.work-hero__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.6rem, 6.4vw, 4.8rem); line-height: 1.04; letter-spacing: -0.025em;
  color: var(--text-dark); max-width: 15ch; margin-bottom: 24px; text-wrap: balance;
}
.work-hero__title em { font-style: italic; font-weight: 400; color: var(--coral-deep); }
.work-hero__lede { font-size: 1.15rem; line-height: 1.7; color: var(--text-body); max-width: 600px; margin-bottom: 36px; }
.work-hero__lede strong { color: var(--text-dark); }

/* Client marquee: names repeat 3x per half (~3000px) so the -50% loop never shows a
   gap on wide screens; the longer track gets a longer cycle to keep the homepage's
   ~58px/s scroll speed. */
.marquee-strip--clients .marquee-inner { animation-duration: 52s; }
/* work.js drives the strip (drag + sideways scroll); the CSS loop above is the no-JS fallback.
   pan-y keeps vertical page scrolling on touch while horizontal swipes reach the drag handler. */
.marquee-strip--js { cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.marquee-strip--js.is-dragging { cursor: grabbing; }
.marquee-strip--js .marquee-inner { animation: none; will-change: transform; }
/* Pinned "Working with" tag: names scroll in from under it, so the strip reads as one line.
   Solid strip colour behind the text, fading out on the right; clicks/drags pass through. */
.marquee-label {
  position: absolute; z-index: 2; top: 0; bottom: 0; left: 0;
  display: flex; align-items: center; padding: 0 64px 0 28px;
  background: linear-gradient(90deg, var(--text-dark) 0%, var(--text-dark) calc(100% - 40px), rgba(45,32,25,0) 100%);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
  color: var(--coral-light); pointer-events: none;
}
@media (max-width: 600px) { .marquee-label { padding: 0 48px 0 20px; background: linear-gradient(90deg, var(--text-dark) 0%, var(--text-dark) calc(100% - 30px), rgba(45,32,25,0) 100%); } }

/* ============================================
   SHARED BITS
   ============================================ */
.work-desc { max-width: 620px; }
.section__title { text-wrap: balance; }

/* ============================================
   OFFERS
   ============================================ */
.offer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
/* Scroll-reveal lives on the cell and the tilt on the card, so neither clobbers the other's transition */
.offer-cell { display: flex; }
.offer-cell > .offer { flex: 1; }
.offer {
  background: var(--bg-card); border: 1px solid var(--border); border-top: 3px solid var(--coral);
  border-radius: var(--radius-md); padding: 28px 24px 30px;
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow 0.35s ease; will-change: transform;
}
.offer:hover { box-shadow: 0 20px 60px rgba(45,32,25,0.1), 0 4px 16px rgba(45,32,25,0.06); }
.offer-cell:nth-child(2) .offer { border-top-color: var(--amber); }
.offer-cell:nth-child(3) .offer { border-top-color: var(--teal); }
.offer-cell:nth-child(4) .offer { border-top-color: var(--plum); }
.offer__title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.25; color: var(--text-dark); }
.offer__price {
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.3;
  color: var(--coral-deep); margin-bottom: 4px;
}
.offer__desc { font-size: 0.95rem; line-height: 1.6; color: var(--text-body); }
.offer-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }
@media (max-width: 1000px) { .offer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .offer-grid { grid-template-columns: 1fr; gap: 14px; } }

/* ============================================
   AGENCY BLOCK
   ============================================ */
.agency {
  margin-top: 64px; background: var(--bg-warm); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 48px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px 56px;
}
.agency__pitch, .agency__how { display: flex; flex-direction: column; gap: 14px; }
.agency__label { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-deep); }
.agency__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 1.85rem); line-height: 1.2; letter-spacing: -0.01em; color: var(--text-dark); text-wrap: balance; }
.agency__subtitle { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--text-dark); }
.agency p, .agency li { font-size: 0.98rem; line-height: 1.65; }
.agency strong { color: var(--text-dark); }
.agency a { color: var(--coral-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.agency__points { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.agency__points li { position: relative; padding-left: 22px; }
.agency__points li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; min-height: 32px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1.5px solid var(--coral);
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--coral-deep);
}
.agency__referral { grid-column: 1 / -1; padding-top: 22px; margin-top: 8px; border-top: 1px dashed rgba(45,32,25,0.16); color: var(--text-dark); font-weight: 500; }
@media (max-width: 900px) { .agency { grid-template-columns: 1fr; padding: 36px 28px; gap: 36px; } .agency__referral { margin-top: 0; } }
@media (max-width: 600px) { .agency { padding: 28px 20px; margin-top: 48px; border-radius: var(--radius-md); } }

/* ============================================
   PROOF
   ============================================ */
.proof { background: var(--bg-warm); }
.case { padding-top: 56px; margin-top: 56px; border-top: 1px solid rgba(45,32,25,0.1); }
.proof .section__title + .case { margin-top: 32px; border-top: none; padding-top: 16px; }
.case--split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 64px; align-items: start; }
.case__body { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.case__body > p { font-size: 1.02rem; line-height: 1.75; }
.case__kicker { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-deep); }
.case__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.45rem, 2.8vw, 2rem); line-height: 1.2; letter-spacing: -0.015em; color: var(--text-dark); text-wrap: balance; margin-bottom: 4px; }
.case__aside { display: flex; flex-direction: column; gap: 14px; }
.case__credit { font-size: 0.88rem; line-height: 1.55; color: var(--text-muted); }
.case__reference { font-size: 0.92rem; color: var(--text-muted); }
.case__points { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.case__point {
  position: relative; background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--teal);
  border-radius: var(--radius-sm); padding: 16px 18px; font-size: 0.95rem; line-height: 1.6;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease;
}
/* hover hitbox extender: covers the resting left edge during the +4px slide (same as the homepage feature list) */
.case__point::before { content: ''; position: absolute; top: 0; bottom: 0; left: -4px; right: 0; }
.case__point:hover { transform: translateX(4px); box-shadow: 0 4px 16px rgba(45,32,25,0.06); }
.case__point strong { color: var(--text-dark); }
.case--split:has(.case__points) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) {
  .case--split, .case--split:has(.case__points) { grid-template-columns: 1fr; gap: 36px; }
  .thread { justify-self: start; }
}

/* Figures (count-up) */
.figures { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 18px 36px; margin: 12px 0 8px; padding: 22px 0; border-top: 1px solid rgba(45,32,25,0.1); border-bottom: 1px solid rgba(45,32,25,0.1); }
.figure { display: flex; flex-direction: column; gap: 4px; }
.figure__num {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  line-height: 1.1; letter-spacing: -0.02em; color: var(--text-dark);
  white-space: nowrap;
}
.figure__label { font-size: 0.85rem; line-height: 1.4; color: var(--text-muted); max-width: 14ch; }
@media (max-width: 1100px) { .figures { grid-template-columns: repeat(2, auto); } }
/* Slot-machine digits (built by work.js; same effect as ping-you.js pain stats) */
.slot { display: inline-flex; align-items: flex-start; height: 1.1em; }
.slot__static, .slot__digit { display: inline-block; height: 1.1em; line-height: 1.1em; }
.slot__digit {
  display: inline-flex; justify-content: center; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}
.slot__strip { display: flex; flex-direction: column; align-items: center; transition-property: transform; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
.slot__strip span { display: block; height: 1.1em; line-height: 1.1em; }

/* Text threads (typing replay in work.js) */
.thread {
  margin: 0; width: 100%; max-width: 360px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 28px;
  padding: 18px 16px 20px;
  box-shadow: 0 24px 60px rgba(45,32,25,0.10), 0 4px 14px rgba(45,32,25,0.05);
}
.thread__meta { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--text-muted); text-align: center; margin-bottom: 14px; }
.thread__msgs { position: relative; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 18px; font-size: 0.88rem; line-height: 1.45; overflow-wrap: anywhere; }
.msg--in { align-self: flex-start; background: #F1E8DE; color: var(--text-dark); border-bottom-left-radius: 6px; }
.msg--out { align-self: flex-end; background: var(--text-dark); color: #FFF8F0; border-bottom-right-radius: 6px; }
.msg .tok { font-weight: 700; color: var(--coral-light); white-space: nowrap; }
.thread.is-armed .msg { transition: opacity 0.3s ease, transform 0.5s var(--ease-out-expo); }
.thread.is-armed .msg.is-pending { opacity: 0; transform: translateY(10px) scale(0.96); }
.thread__typing {
  position: absolute; left: 0; display: flex; gap: 4px; align-items: center;
  padding: 11px 14px; border-radius: 18px; border-bottom-left-radius: 6px; background: #F1E8DE;
  opacity: 0; transform: scale(0.9); transform-origin: left bottom;
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out-expo); pointer-events: none;
}
.thread__typing--out { left: auto; right: 0; background: var(--text-dark); border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; transform-origin: right bottom; }
.thread__typing.is-on { opacity: 1; transform: scale(1); }
.thread__typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: typing-bounce 1.4s ease-in-out infinite; }
.thread__typing--out span { background: rgba(255,248,240,0.7); }
.thread__typing span:nth-child(2) { animation-delay: 0.15s; }
.thread__typing span:nth-child(3) { animation-delay: 0.3s; }
.thread--compact { max-width: 320px; }

/* ============================================
   DEMO LINE
   ============================================ */
.try-section { padding-bottom: 40px; }
.try {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--text-dark); color: rgba(255,255,255,0.78);
  border-radius: var(--radius-lg); padding: 64px 56px;
}
.try::before {
  content: ''; position: absolute; z-index: -1; width: 520px; height: 520px; right: -140px; top: -220px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,107,74,0.35), transparent 70%); filter: blur(30px);
}
.try__label { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral-light); margin-bottom: 12px; }
.try__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; letter-spacing: -0.02em; color: #fff; margin-bottom: 8px; }
.try__num {
  display: inline-block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 7vw, 4.4rem); line-height: 1.1; letter-spacing: -0.02em;
  color: var(--coral); margin-bottom: 18px;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: rgba(255,107,74,0.35);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.try__num:hover { color: var(--coral-light); text-decoration-color: var(--coral-light); }
.try__text { font-size: 1.08rem; line-height: 1.65; max-width: 560px; }
@media (max-width: 600px) { .try { padding: 40px 24px; border-radius: var(--radius-md); } }

/* ============================================
   PRODUCTION
   ============================================ */
.ops__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 36px 0 0; }
.ops__list li { line-height: 1.6; }
.ops__list strong { color: var(--text-dark); }
@media (max-width: 800px) { .ops__list { grid-template-columns: 1fr; } }

/* ============================================
   ABOUT
   ============================================ */
.me { padding-top: 40px; }
.me__layout { display: grid; grid-template-columns: 112px minmax(0, 640px); gap: 40px; align-items: start; }
.me__photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg-card); box-shadow: 0 8px 28px rgba(45,32,25,0.12); }
.me__body { display: flex; flex-direction: column; }
.me__body .section__title { margin-bottom: 16px; }
.me__body p:not(.section__label) { font-size: 1.05rem; line-height: 1.75; margin-bottom: 14px; }
@media (max-width: 600px) { .me__layout { grid-template-columns: 1fr; gap: 20px; } .me__photo { width: 88px; height: 88px; } }

/* ============================================
   CTA
   ============================================ */
.work-cta { text-align: center; padding-top: 72px; }
.work-cta .container { display: flex; flex-direction: column; align-items: center; }
.work-cta__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--text-dark); max-width: 18ch; text-wrap: balance; margin-bottom: 16px; }
.work-cta__text { font-size: 1.08rem; line-height: 1.7; max-width: 520px; margin-bottom: 32px; }
.work-cta__contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 36px; font-size: 0.95rem; font-weight: 500; color: var(--text-dark); }
.work-cta__contact a { color: var(--coral-deep); transition: color 0.2s ease; }
.work-cta__contact a:hover { color: var(--coral); }

/* ============================================
   SMALL SCREENS
   ============================================ */
@media (max-width: 600px) {
  .work-hero { padding: 116px 0 64px; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .case { padding-top: 44px; margin-top: 44px; }
  .figures { gap: 18px 24px; }
}

/* ============================================
   REDUCED MOTION
   No aurora drift, no marquee scroll, no reveals;
   work.js skips the count-up and thread replay.
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .case__point, .products__features li { transition: none; }
  .case__point:hover, .products__features li:hover { transform: none; }
  .aurora-blob, .marquee-inner, .marquee-star, .hero__badge svg, .btn--primary::after { animation: none; }
  .btn, .btn__arrow { transition: none; }
}
