/* KITE case studies — "The Kite Journey": a red string runs from the kite down through every milestone to the spool on the grass.
   Palette: sky #BDEFFA · blue #0798D1 · red #ED1728 · yellow #FFBF32 · black #101010 */
html:has(body.page-case-studies) { scroll-behavior: smooth; }
.cs-page { position: relative; background: linear-gradient(180deg, rgba(177,228,251,0) 0, #b1e4fb 300px) bottom / 100% calc(100vw * .3333 + 300px) no-repeat, linear-gradient(180deg, #BDEFFA 0%, #CFF3FB 55%, #BDEFFA 100%); color: #101010; overflow-x: clip; font-family: 'Poppins', sans-serif; }
@media (min-width: 769px) { .cs-page { padding-left: 84px; } }

/* sky */
.cs-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.cs-cloud { position: absolute; width: var(--w, 180px); aspect-ratio: 2.1 / 1; background: #fff; opacity: .92; border-radius: 999px;
  filter: drop-shadow(0 8px 14px rgba(16,100,150,.08)); animation: csDrift var(--t, 60s) linear infinite; animation-delay: var(--d, 0s); }
.cs-cloud::before, .cs-cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cs-cloud::before { width: 46%; aspect-ratio: 1; left: 14%; top: -34%; }
.cs-cloud::after { width: 58%; aspect-ratio: 1; left: 36%; top: -52%; }
@keyframes csDrift { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }

/* the string (sits behind the content) */
.cs-string { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.cs-string path { fill: none; stroke: #ED1728; stroke-width: 3.5; stroke-linecap: round; }
.cs-string .ghost { stroke: rgba(237,23,40,.22); stroke-width: 2.5; stroke-dasharray: 1 11; }

/* hero */
.cs-hero { position: relative; z-index: 2; max-width: 1360px; margin: 0 auto; padding: clamp(120px, 12vw, 160px) clamp(20px, 4vw, 56px) clamp(70px, 9vw, 130px); min-height: clamp(420px, 44vw, 600px); }
.cs-kicker { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 700; letter-spacing: .2em; }
.cs-kicker::after { content: ""; width: 38px; height: 2px; background: #ED1728; }
.cs-title { font-weight: 800; line-height: 1.02; letter-spacing: -.035em; font-size: clamp(2.8rem, 6.4vw, 6rem); margin: 18px 0 20px; color: #101010; max-width: 8.2em; }
.cs-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em .04em .1em; margin-right: .16em; }
.cs-title .w > span { display: inline-block; transform: translateY(110%) rotate(5deg); animation: csRise .9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * .12s + .15s); }
.cs-title .red { color: #ED1728; position: relative; }
.cs-title .red::after { content: ""; position: absolute; left: .04em; right: .04em; bottom: .02em; height: .07em; border-radius: 99px; background: #FFBF32; }
@keyframes csRise { to { transform: none; } }
.cs-sub { max-width: 430px; font-size: clamp(14px, 1.25vw, 17px); line-height: 1.55; margin: 0; }
.cs-scroll { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; font-size: 14px; font-weight: 700; color: #101010; text-decoration: none; }
.cs-scroll i { width: 38px; height: 38px; border: 1.8px solid #101010; border-radius: 50%; display: inline-grid; place-items: center; transition: background .2s, color .2s, transform .2s; }
.cs-scroll:hover i { background: #101010; color: #fff; transform: scale(1.08); }

.cs-kite { position: absolute; right: clamp(8px, 10vw, 190px); top: clamp(70px, 7vw, 100px); width: clamp(120px, 15vw, 230px); aspect-ratio: 200 / 244; animation: csFloat 6s ease-in-out infinite; }
.cs-kite-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 12px 14px rgba(10,70,110,.2)); }
.cs-kite-wind { position: absolute; right: -22%; top: -4%; width: 34%; }
.cs-kite-tip { position: absolute; left: 50%; top: 99%; width: 1px; height: 1px; }
@keyframes csFloat { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }

/* journey */
.cs-journey { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }
.cs-item { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr); align-items: center; gap: clamp(36px, 6vw, 96px); margin: 0 0 clamp(60px, 8vw, 120px); }
.cs-item.is-flip { grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr); }
.cs-item.is-flip .cs-card-wrap { order: 2; }

/* organic image frame: photo in one irregular shape, an accent blob peeking out behind it */
.cs-card-wrap { position: relative; perspective: 1200px; }
.cs-frame { display: block; position: relative; aspect-ratio: 16 / 10; text-decoration: none; transform-style: preserve-3d; transition: transform .25s ease-out;
  filter: drop-shadow(0 22px 26px rgba(10, 70, 110, .22)); will-change: transform; }
.cs-blob { position: absolute; inset: 0; background: var(--blob, #FFBF32); clip-path: url(#cs-shape-b); transform: translate(-5%, -7%) rotate(-4deg) scale(1.03); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.is-flip .cs-blob { transform: translate(5%, 7%) rotate(4deg) scale(1.03); }
.cs-frame:hover .cs-blob, .cs-frame.is-live .cs-blob { transform: translate(-7%, -9%) rotate(-6deg) scale(1.05); }
.is-flip .cs-frame:hover .cs-blob, .is-flip .cs-frame.is-live .cs-blob { transform: translate(7%, 9%) rotate(6deg) scale(1.05); }
.cs-img { position: absolute; inset: 0; clip-path: url(#cs-shape-a); background: #fff; }
.cs-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.cs-frame:hover .cs-img img, .cs-frame.is-live .cs-img img { transform: scale(1.05); }
.cs-frame:focus-visible { outline: 3px solid #101010; outline-offset: 8px; border-radius: 24px; }
.cs-tick { position: absolute; width: 44px; left: -22px; bottom: 6%; pointer-events: none; }
.is-flip .cs-tick { left: auto; right: -22px; transform: scaleX(-1); }

/* text side */
.cs-side { position: relative; }
.cs-badge { position: absolute; left: clamp(-70px, -5vw, -44px); top: -6px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--badge, #ED1728); color: #fff; font-weight: 800; font-size: 17px; box-shadow: 0 0 0 5px rgba(255,255,255,.55), 0 8px 16px rgba(10,70,110,.2); z-index: 3; }
.is-flip .cs-badge { left: auto; right: clamp(-70px, -5vw, -44px); }
.cs-cat { display: inline-block; margin: 0 0 12px; padding: 5px 14px; border-radius: 6px; background: var(--pill, #ED1728); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.cs-name { font-weight: 800; font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1; letter-spacing: -.035em; margin: 0 0 12px; }
.cs-line { font-size: clamp(14px, 1.3vw, 17px); line-height: 1.5; margin: 0 0 16px; max-width: 24em; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cs-tags li { font-size: 12px; font-weight: 500; padding: 6px 15px; border: 1.5px solid #101010; border-radius: 999px; background: rgba(255,255,255,.45); }
.cs-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-weight: 700; font-size: 14px; color: #101010; text-decoration: none; border-bottom: 2px solid #ED1728; padding-bottom: 3px; }
.cs-more span { transition: transform .2s; display: inline-block; }
.cs-more:hover span { transform: translate(3px, -3px); }

/* reveal (only when JS is running) */
.js .cs-item .cs-card-wrap { opacity: 0; transform: translateX(-70px) rotate(-2deg) scale(.95); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.8,.2,1); }
.js .cs-item.is-flip .cs-card-wrap { transform: translateX(70px) rotate(2deg) scale(.95); }
.js .cs-item .cs-side > :not(.cs-badge) { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.js .cs-item.is-in .cs-card-wrap { opacity: 1; transform: none; }
.js .cs-item.is-in .cs-side > :not(.cs-badge) { opacity: 1; transform: none; }
.js .cs-item.is-in .cs-side > :nth-child(3) { transition-delay: .12s; }
.js .cs-item.is-in .cs-side > :nth-child(4) { transition-delay: .2s; }
.js .cs-item.is-in .cs-side > :nth-child(5) { transition-delay: .28s; }
.js .cs-item.is-in .cs-side > :nth-child(6) { transition-delay: .36s; }

/* destination */
.cs-end { position: relative; margin-left: 0; z-index: 2; margin-top: clamp(10px, 4vw, 60px); padding: clamp(30px, 5vw, 70px) clamp(20px, 4vw, 56px) calc(100vw * .275); }
.cs-end-card { position: relative; z-index: 3; max-width: 760px; margin: 0 0 0 auto; background: #FFBF32; text-align: center; padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 70px); clip-path: url(#contact-blob); filter: drop-shadow(0 18px 24px rgba(10,70,110,.18)); }
.cs-end-card h2 { font-weight: 800; font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1.02; letter-spacing: -.03em; color: #ED1728; margin: 0 0 14px; }
.cs-end-card p { margin: 0 auto 26px; max-width: 420px; font-size: clamp(14px, 1.3vw, 17px); }
.cs-end-btn { display: inline-flex; gap: 10px; align-items: center; background: #101010; color: #fff; text-decoration: none; font-weight: 700; padding: 15px 34px; border-radius: 999px; transition: transform .2s, background .2s; }
.cs-end-btn:hover { background: #ED1728; transform: translateY(-2px); }
.cs-wind { position: absolute; width: 90px; left: 8%; top: 20%; opacity: .9; }
.cs-village { position: absolute; left: 0; width: 100vw; bottom: 0; z-index: 2; display: block; line-height: 0; pointer-events: none; }
.cs-village img { width: 100vw; max-width: none; height: auto; display: block; }
.cs-spool-pt { position: absolute; left: 35.3%; bottom: calc(100vw * .3333); width: 1px; height: 1px; }

@media (min-width: 769px) { .cs-end { max-width: none; width: 100vw; box-sizing: border-box; margin-left: -84px; padding-left: calc(84px + clamp(20px, 4vw, 56px)); } }
@media (min-width: 901px) { .cs-end { padding-right: 8.5vw; } .cs-end-card { width: 52vw; max-width: 100%; box-sizing: border-box; } }

/* tablet / mobile: one column, image above text, simpler string */
@media (max-width: 900px) {
  .cs-hero { min-height: 0; padding-bottom: 60px; }
  .cs-kite { position: relative; right: auto; top: auto; margin: 24px 0 0 auto; width: clamp(110px, 32vw, 170px); }
  .cs-title { font-size: clamp(2.5rem, 11vw, 4rem); }
  .cs-item, .cs-item.is-flip { grid-template-columns: 1fr; gap: 28px; }
  .cs-item.is-flip .cs-card-wrap { order: 0; }
  .cs-card-wrap { margin: 0 8px; }
  .cs-side { padding-left: 58px; }
  .cs-badge, .is-flip .cs-badge { position: absolute; left: 0; right: auto; top: -4px; width: 42px; height: 42px; }
  .cs-tick { display: none; }
  /* rise from below instead of sliding in from the side: nothing starts outside the viewport */
  .js .cs-item .cs-card-wrap, .js .cs-item.is-flip .cs-card-wrap { transform: translateY(44px) scale(.96); }
  .js .cs-item.is-in .cs-card-wrap { transform: none; }
  .cs-end-card { margin: 0 auto; }
  .cs-end { padding-bottom: calc(100vw * .52 + 20px); }
  .cs-page { background-size: 100% calc(100vw * .52 + 300px), auto; }
  .cs-spool-pt { left: 58.8%; bottom: calc(100vw * .52); }
  .cs-wind { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-cloud, .cs-kite { animation: none; }
  .cs-title .w > span { animation: none; transform: none; }
  .js .cs-item .cs-card-wrap, .js .cs-item .cs-side > * { opacity: 1 !important; transform: none !important; transition: none; }
  .cs-frame, .cs-blob, .cs-img img { transition: none; }
  html:has(body.page-case-studies) { scroll-behavior: auto; }
}

/* brand heading font (Sour Gummy) for the case-studies headings; body copy stays Poppins */
.cs-page .cs-title, .cs-page .cs-title *,
.cs-page .cs-name,
.cs-page .cs-end-card h2,
.cs-page .cs-badge { font-family: 'Sour Gummy', sans-serif !important; }
.cs-page .cs-title { font-weight: 800; letter-spacing: -.01em; line-height: 1.05; }
.cs-page .cs-name { font-weight: 800; letter-spacing: -.005em; line-height: 1.05; }
.cs-page .cs-end-card h2 { font-weight: 800; letter-spacing: 0; }
@media (max-width: 640px) {
  .cs-page .cs-title { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  .cs-page .cs-name { font-size: clamp(2rem, 9.5vw, 2.6rem); }
}

/* photo kite: the page's red string continues from where the kite's own tail string leaves the picture */
.cs-kite { width: clamp(150px, 18vw, 270px); aspect-ratio: 487 / 597; }
.cs-kite-svg { object-fit: contain; filter: drop-shadow(0 12px 14px rgba(10,70,110,.12)); }
.cs-kite-tip { left: 97.5%; top: 99.5%; }
@media (max-width: 640px) { .cs-kite { width: clamp(150px, 40vw, 190px); } }

/* sway around the point where the kite's string meets the page string, so the two never drift apart */
.cs-kite { transform-origin: 97.5% 99.5%; animation: csSway 6s ease-in-out infinite; }
@keyframes csSway { 0%,100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@media (prefers-reduced-motion: reduce) { .cs-kite { animation: none; } }
