/* Sunset Solutions: Our Work page.
   Rhythm: opening (night) -> order form (daylight) -> website (night) -> fare calculator (daylight) -> invitation (night).
   Shared scenery lives in daylight.css. Only transform and opacity animate. */

/* ---------- Opening ---------- */
.work-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(56px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); background: var(--night); color: var(--ivory);
}
.work-hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: -60%; width: min(1200px, 170vw); aspect-ratio: 1; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(233, 30, 99, .34), rgba(255, 122, 24, .16) 50%, rgba(255, 122, 24, 0));
}
.work-hero .eyebrow { color: rgba(251, 247, 242, .62); }
.work-hero h1 { margin-top: 18px; max-width: 18ch; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.06; color: var(--ivory); text-wrap: balance; }
.work-hero h1 em { display: block; font-style: normal; color: var(--sun); }
.work-hero .lead { margin-top: 20px; color: rgba(251, 247, 242, .76); max-width: 40rem; }
.js .work-hero .wrap > * { animation: work-rise .8s cubic-bezier(.22, 1, .36, 1) both; }
.js .work-hero .wrap > :nth-child(2) { animation-delay: .08s; }
.js .work-hero .wrap > :nth-child(3) { animation-delay: .16s; }
.js .work-hero .wrap > :nth-child(4) { animation-delay: .26s; }

/* Jump cards: one per project */
.work-jump { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: clamp(32px, 5vw, 48px); max-width: 860px; }
.work-jump a {
  display: grid; gap: 6px; padding: 16px 18px; border-radius: 16px; text-decoration: none; color: var(--ivory);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(251, 247, 242, .14); transition: transform 250ms ease-out;
}
.work-jump a:hover { transform: translateY(-2px); border-color: rgba(255, 154, 92, .55); }
.wj-kind { font: 500 .6875rem/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
.wj-name { font: 500 1rem/1.3 var(--head); }

/* ---------- Case studies ---------- */
.case-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(36px, 7vw, 104px); }
.case-grid.flip .case-media { order: 2; }
.case-media { min-width: 0; display: flex; justify-content: center; }
.case-text { min-width: 0; }
.case h2 { margin-top: 12px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
.case .kind { margin-top: 10px; font-weight: 500; font-size: .9375rem; color: #B0174F; }
.dark.case .kind { color: var(--sun); }
.case dl { margin: 26px 0 0; display: grid; gap: 18px; }
.case dt { font: 500 .75rem/1.4 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.case dd { margin: 4px 0 0; max-width: 34rem; }
.dark.case dt { color: rgba(251, 247, 242, .55); }
.dark.case dd { color: rgba(251, 247, 242, .86); }
.case .links { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 24px; }

.does-title { margin-top: 28px; font-size: 1.0625rem; }
.does { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.does li { position: relative; padding-left: 28px; max-width: 34rem; }
.does li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #E91E63, #FF7A18);
}
.does li::after {
  content: ""; position: absolute; left: 5px; top: calc(.3em + 5px); width: 8px; height: 4.5px;
  border-left: 1.5px solid var(--night); border-bottom: 1.5px solid var(--night); transform: rotate(-45deg);
}

/* Order form video: poster card with a play button; the video loads only when asked for */
.video-card {
  position: relative; width: min(100%, 460px); aspect-ratio: 1080 / 1350; border-radius: 26px; overflow: hidden;
  background: #FFE3D6; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 60px 100px -50px rgba(176, 23, 79, .75);
  border: 6px solid #fff;
}
.video-card img, .video-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card.tall { width: min(100%, 320px); aspect-ratio: 540 / 960; }
.video-wrap { display: grid; justify-items: center; gap: 22px; min-width: 0; width: 100%; }
/* Big play button in the middle of each video */
.play-big {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(23, 18, 28, 0) 40%, rgba(23, 18, 28, .28));
}
.play-ic {
  position: relative; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%;
  background: linear-gradient(135deg, #E91E63, #FF7A18); border: 4px solid #fff;
  box-shadow: 0 24px 48px -16px rgba(23, 18, 28, .7); transition: transform 250ms ease-out;
}
.play-ic svg { width: 34px; height: 34px; fill: #fff; margin-left: 5px; }
.play-ic::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .85); animation: play-ping 2.2s ease-out infinite; }
.play-big:hover .play-ic { transform: scale(1.08); }
/* Clear button under each video */
.watch-btn { gap: 10px; white-space: nowrap; }
.watch-btn small { font-size: .8125rem; opacity: .75; font-weight: 400; }
.watch-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(23, 18, 28, .9); }
.watch-ic svg { width: 12px; height: 12px; fill: #fff; margin-left: 2px; }
.case-split-text { min-width: 0; }
.case-split-text .links { margin-top: 24px; }

/* Client mark at the top of a case study. White-background artwork is blended into light
   sections; on the night sections it sits in a white tile so the logo keeps its own edges. */
.case-brand { display: inline-flex; width: fit-content; align-items: center; margin-bottom: 18px; mix-blend-mode: multiply; }
.case-brand img { display: block; width: auto; height: 88px; }
.dark .case-brand {
  mix-blend-mode: normal; padding: 11px 14px; border-radius: 16px; background: #FBF7F2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 26px 44px -30px rgba(0, 0, 0, .75);
}
/* Marks that already sit on a white field keep their own white tile on light sections too */
.case-brand--tile {
  mix-blend-mode: normal; padding: 10px 12px; border-radius: 15px; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 22px 36px -30px rgba(176, 23, 79, .55);
}
@media (max-width: 640px) {
  .case-brand { margin-bottom: 14px; }
  .case-brand img { height: 68px; }
  .dark .case-brand { padding: 9px 11px; border-radius: 14px; }
  .case-brand--tile { padding: 8px 10px; border-radius: 13px; }
}

/* Website: four screens in a row (a swipeable strip on phones) */
.case-head { display: grid; gap: 0; max-width: var(--measure); }
.shots-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2.6vw, 32px); margin-top: clamp(36px, 5vw, 56px);
  padding: 30px 0 10px; position: relative;
}
.shots-row::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 120%; height: 120%; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 122, 24, .26), rgba(233, 30, 99, .14) 55%, rgba(233, 30, 99, 0));
}
.shot { margin: 0; display: grid; justify-items: center; gap: 14px; min-width: 0; }
.shot:nth-child(even) { transform: translateY(28px); }
.shot figcaption { font: 500 .75rem/1.4 var(--body); letter-spacing: .14em; text-transform: uppercase; color: rgba(251, 247, 242, .6); }
.case .phone { width: 100%; max-width: 230px; }
.dark .phone { background: #2A2130; border-color: rgba(251, 247, 242, .14); box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 36px 60px -30px rgba(0, 0, 0, .85); }
.case .phone.tilting { transition: none; }
.case-split { display: grid; grid-template-columns: minmax(0, 360px) 1fr; align-items: center; gap: 36px clamp(36px, 7vw, 96px); margin-top: clamp(56px, 7vw, 88px); }

/* JCS: screenshot with a "video coming soon" note */
.jcs-stage { position: relative; display: grid; justify-items: center; padding: 10px 0 30px; }
.jcs-stage .phone { width: min(250px, 60vw); max-width: none; border-color: rgba(233, 30, 99, .14); box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 50px 90px -46px rgba(176, 23, 79, .7); }
.soon {
  position: absolute; bottom: 0; left: 50%; translate: -50% 0; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 11px 18px; border-radius: 999px; background: var(--night); color: var(--ivory); font: 500 .8125rem var(--body);
  box-shadow: 0 20px 40px -20px rgba(23, 18, 28, .8);
}
.ac-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #E91E63, #FF7A18); box-shadow: 0 0 0 4px rgba(233, 30, 99, .2); }
.private { margin-top: 22px; padding: 14px 18px; border-radius: 14px; max-width: 34rem; font-size: .9375rem; color: var(--text); background: rgba(255, 255, 255, .7); border: 1px solid rgba(233, 30, 99, .16); }

/* Client quote, pulled into the case study as the outcome */
.case-quote { position: relative; margin: 26px 0 0; padding-left: 20px; max-width: 34rem; }
.case-quote::before {
  content: ""; position: absolute; left: 0; top: .25em; bottom: .25em; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, #E91E63, #FF7A18);
}
.case-quote blockquote { margin: 0; }
.case-quote blockquote p { font-size: 1.125rem; line-height: 1.55; color: var(--text); }
.case-quote figcaption { margin-top: 12px; font: 500 .8125rem/1.4 var(--body); color: var(--muted); }
.case-quote figcaption span { position: relative; margin-left: 8px; padding-left: 10px; }
.case-quote figcaption span::before { content: ""; position: absolute; left: 0; top: .55em; width: 4px; height: 1px; background: currentColor; opacity: .5; }
.dark .case-quote blockquote p { color: rgba(251, 247, 242, .94); }
.dark .case-quote figcaption { color: rgba(251, 247, 242, .62); }

/* ---------- Invitation (night) ---------- */
.work-next { text-align: center; }
.work-next .wrap { display: grid; justify-items: center; }
.work-next h2 { margin-top: 14px; max-width: 20ch; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; text-wrap: balance; }
.work-next h2 em { font-style: normal; }
.work-next .lead { margin-top: 18px; max-width: 38rem; }
.work-next .actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; margin-top: 30px; }
.section.dark.work-next::after { bottom: auto; top: 70%; height: auto; width: min(1000px, 160vw); aspect-ratio: 1; translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(255, 154, 92, .34), rgba(233, 30, 99, .15) 50%, rgba(233, 30, 99, 0)); }

@keyframes work-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes play-ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- Phones and tablets ---------- */
@media (max-width: 900px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-grid.flip .case-media { order: 0; }
  .case-split { grid-template-columns: 1fr; }
  /* Website screens become a swipeable strip */
  .shots-row {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-left: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(var(--gutter), env(safe-area-inset-right, 0px)));
    padding: 20px max(var(--gutter), env(safe-area-inset-left, 0px)) 16px; scrollbar-width: none;
  }
  .shots-row::-webkit-scrollbar { display: none; }
  .shots-row::before { display: none; }
  .shot { flex: 0 0 min(62vw, 230px); scroll-snap-align: center; }
  .shot:nth-child(even) { transform: none; }
}
@media (max-width: 640px) {
  .work-jump { grid-template-columns: 1fr; }
  .work-jump a { grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; padding: 14px 16px; }
  .play-ic { width: 76px; height: 72px; }
  .play-ic svg { width: 28px; height: 28px; }
  .watch-btn { width: 100%; justify-content: center; }
  .soon { white-space: normal; text-align: left; }
}
