/* Swift-IT tenant global CSS — served at /_assets/t/swiftit/styles.css and loaded
 * via settings.headLinks. Ports the design handoff's <style> block: resets,
 * interaction classes (hover/keyframes/reveal/cursor), and responsive collapse.
 * Design tokens come from the tenant theme as --brand-* variables. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--brand-paper); color: var(--brand-ink); font-family: var(--font-body), sans-serif; -webkit-font-smoothing: antialiased; }
main { display: block; }
::selection { background: var(--brand-ac); color: var(--brand-ink); }

/* ---- Custom cursor (pointer:fine only; created by behaviors.js) ---- */
/* Hide the native arrow everywhere only once behaviors.js has mounted the custom
 * cursor (body.si-cursor) so a JS failure never leaves a pointer-less page.
 * `body.si-cursor *` (specificity 0,0,2) beats the UA `a{cursor:pointer}`. */
@media (pointer: fine) { body.si-cursor, body.si-cursor * { cursor: none; } }
.cur-ring, .cur-dot { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; mix-blend-mode: difference; }
.cur-ring { width: 34px; height: 34px; border: 1px solid #fff; border-radius: 50%; margin: -17px 0 0 -17px; transition: width .2s ease, height .2s ease, margin .2s ease; }
.cur-dot { width: 5px; height: 5px; background: #fff; border-radius: 50%; margin: -2.5px 0 0 -2.5px; }
.cur-coord { position: fixed; z-index: 9999; pointer-events: none; font-family: var(--font-mono), monospace; font-size: 10px; color: var(--brand-ink); opacity: .5; transform: translate(16px, 16px); }
@media (pointer: coarse) { .cur-ring, .cur-dot, .cur-coord { display: none; } }

.mag { display: inline-flex; will-change: transform; }

/* ---- Sticky cinematic photo band ---- */
/* Pins BELOW the 70px fixed nav so the image never slides under it before sticking. */
.band { border-top: 1px solid var(--brand-line); position: sticky; top: 70px; z-index: 0; background: var(--brand-ink); }
.band__frame { position: relative; width: 100%; height: clamp(380px, 62vh, 640px); overflow: hidden; }
.band__img { position: absolute; left: 0; top: 0; width: 100%; height: 134%; object-fit: cover; object-position: center 40%; will-change: transform; }
.band__grid { position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(236,238,237,0.10) 1px, transparent 0); background-size: 30px 30px; mix-blend-mode: screen; }
.band__vig { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,14,13,0.28) 0%, transparent 36%); }
.band__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 52%; background: linear-gradient(to top, rgba(11,14,13,0.62) 0%, rgba(11,14,13,0.14) 50%, transparent 100%); }
.band__br { position: absolute; width: 26px; height: 26px; z-index: 3; }
/* Brackets at the true image corners; the band pins below the nav so they always clear it. */
.band__br--tl { left: 24px; top: 24px; border-top: 3px solid var(--brand-ac); border-left: 3px solid var(--brand-ac); }
.band__br--tr { right: 24px; top: 24px; border-top: 3px solid var(--brand-ac); border-right: 3px solid var(--brand-ac); }
.band__plate { position: absolute; left: 0; right: 0; top: 0; z-index: 3; max-width: 1320px; margin: 0 auto; padding: 56px 32px 26px; }
.band__plate span { font-family: var(--font-mono), monospace; font-size: 12px; letter-spacing: 0.14em; color: var(--brand-paper); text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.band__cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; max-width: 1320px; margin: 0 auto; padding: 0 32px 40px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.band__quote { font-weight: 700; font-size: clamp(22px, 3vw, 40px); letter-spacing: -0.025em; line-height: 1.05; margin: 0; color: var(--brand-paper); max-width: 680px; text-shadow: 0 2px 18px rgba(0,0,0,0.45); }
.band__coord { font-family: var(--font-mono), monospace; font-size: 12px; color: var(--brand-ac); white-space: nowrap; text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
/* The band pins at z-index:0; every section after it must be opaque and stacked
 * above so it scrolls up and covers the band (else the band shows through). */
#expertise, #approach, #tech, #contact { position: relative; z-index: 1; }
#approach, #contact { background: var(--brand-paper); }

/* ---- Nav links ---- */
.navlink { position: relative; }
.navlink::after { content: ''; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0; background: var(--brand-ink); transition: width .28s cubic-bezier(.2,.7,.2,1); }
.navlink:hover::after { width: 100%; }
.navlink:hover { color: var(--brand-ink) !important; }
/* Scroll-spy: the in-view section's anchor keeps a live, animated indicator.
   The underline slides in (width transition) as the active section changes, then
   gently pulses so it reads as "live" while you keep scrolling. */
.navlink.is-active { color: var(--brand-ink) !important; }
.navlink.is-active > span:first-child { color: var(--brand-ac); }
.navlink.is-active::after { width: 100%; background: var(--brand-ac); animation: navunderline 2.2s ease-in-out infinite; }
@keyframes navunderline { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.si-mobile-menu a.is-active { color: var(--brand-ink); }
@media (prefers-reduced-motion: reduce) { .navlink.is-active::after { animation: none; } }

/* ---- Reveals (initial hidden state; behaviors.js animates in, with a safety timer) ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.16,.8,.3,1), transform .8s cubic-bezier(.16,.8,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Hero intro (CSS-driven; .si-in is toggled on <body> after mount) ---- */
[data-hero-title] .hl { transform: translateY(120%); }
.si-in [data-hero-title] .hl { transform: translateY(0); transition: transform .95s cubic-bezier(.16,.8,.3,1); }
.si-in [data-hero-title] span:nth-child(1) .hl { transition-delay: .10s; }
.si-in [data-hero-title] span:nth-child(2) .hl { transition-delay: .19s; }
.si-in [data-hero-title] span:nth-child(3) .hl { transition-delay: .28s; }
[data-hero-eyebrow], [data-hero-sub], [data-hero-rail] { opacity: 0; transform: translateY(20px); }
.si-in [data-hero-eyebrow], .si-in [data-hero-sub], .si-in [data-hero-rail] { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }
.si-in [data-hero-sub] { transition-delay: .42s; }
.si-in [data-hero-rail] { transition-delay: .52s; }

/* ---- Expertise overlay title ----
 * Black letters with a white outline (text-stroke). paint-order puts the stroke
 * behind the fill, so on the light panels it's just clean black text (the white
 * outline is hidden behind the fill / invisible on light); over a hovered-dark
 * panel the white outline shows and keeps the title legible. No JS, no blending. */
.si-blend { color: var(--brand-ink); -webkit-text-stroke: 2px #fff; paint-order: stroke fill; }

/* ---- Expertise panels ---- */
.exp-panel { transition: background .35s ease; }
.exp-panel:hover { background: var(--brand-ink); }
.exp-panel:hover .ep-t, .exp-panel:hover .ep-d { color: var(--brand-paper) !important; }
.exp-panel:hover .ep-n { color: var(--brand-ac) !important; }
.exp-panel:hover .ep-ix { -webkit-text-stroke-color: #2a302d !important; }

/* ---- Marquee chips ---- */
.marquee-track { display: flex; gap: 14px; width: max-content; will-change: transform; }
.marquee-track .chip { font-family: var(--font-mono), monospace; font-size: 14px; color: var(--brand-on-dark); border: 1px solid var(--brand-panel); padding: 9px 16px; white-space: nowrap; transition: border-color .2s ease, color .2s ease; }
.marquee-track .chip:hover { border-color: var(--brand-ac); color: var(--brand-ac); }

/* ---- Buttons ---- */
.btn-fill { transition: box-shadow .18s ease; }
.btn-fill:hover { box-shadow: 5px 5px 0 var(--brand-ink); }
.btn-out { transition: background .18s ease, color .18s ease; }
.btn-out:hover { background: color-mix(in oklch, var(--brand-ink) 8%, transparent); border-color: var(--brand-ink); }
.contact-cell { transition: background .2s ease, color .2s ease; }
.contact-cell:hover { background: var(--brand-ink); color: var(--brand-paper); }

/* ---- Mobile nav (hamburger + drop-down) ---- */
.si-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; cursor: pointer; }
.si-burger span { display: block; width: 22px; height: 2px; background: var(--brand-ink); transition: transform .25s ease, opacity .2s ease; }
[data-nav].si-open .si-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
[data-nav].si-open .si-burger span:nth-child(2) { opacity: 0; }
[data-nav].si-open .si-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.si-mobile-menu { display: none; flex-direction: column; background: var(--brand-paper); border-top: 1px solid var(--brand-line); }
.si-mobile-menu a { font-family: var(--font-mono), monospace; font-size: 14px; letter-spacing: 0.06em; color: var(--brand-ink); text-decoration: none; padding: 16px 24px; border-bottom: 1px solid var(--brand-line); display: flex; align-items: baseline; }
.si-mobile-menu .si-mobile-cta { background: var(--brand-ac); font-weight: 600; border-bottom: none; }

/* ---- Approach pipeline timeline (horizontal line + nodes desktop; vertical on mobile) ---- */
.si-pipe { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); column-gap: 30px; }
.si-stage { position: relative; padding-right: 22px; }
.si-node-row { position: relative; height: 22px; margin-bottom: 34px; }
.pipe-node { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-paper); border: 2px solid var(--brand-ink); display: flex; align-items: center; justify-content: center; z-index: 1; }
.pipe-node span { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-line); display: block; transition: background .25s ease; }
.pipe-seg { position: absolute; top: 10px; left: 11px; width: calc(100% + 30px); height: 2px; background: var(--brand-line); z-index: 0; transition: background .25s ease; }
.si-stage:last-child .pipe-seg { display: none; }

/* ---- Work / product pages ---- */
.navlink-cell { transition: background .2s ease, color .2s ease; }
.navlink-cell:hover { background: color-mix(in oklch, var(--brand-ink) 6%, transparent); color: var(--brand-ink) !important; }
/* 50/50 columns so the text↕mockup divider lines up across stacked rows
 * (mirrored 1fr/1.05fr ratios put the dividers at different x → misaligned). */
.pcard { display: grid; grid-template-columns: 1fr 1fr; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.pcard--mockleft .pcard__mock { order: -1; } /* desktop: place mockup on the left */
.pcard:hover { transform: translateY(-6px); }
.pcard:hover .pshot { transform: scale(1.02); }
.pshot { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.shot { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.shotwrap:hover .shot { transform: translateY(-5px); }
.feat { transition: background .3s ease, color .3s ease; }
.feat:hover { background: var(--brand-ink); }
.feat:hover .ft, .feat:hover .fd { color: var(--brand-paper) !important; }
.feat:hover .fn { color: var(--brand-ac) !important; }
/* Hero intro for work/product pages — CSS keyframes with `backwards` fill so the
 * resting state is visible even if animations are skipped (no JS dependency). */
.lmask { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
@keyframes scLineUp { from { transform: translateY(120%); } to { transform: translateY(0); } }
@keyframes scIntro { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.lup { display: block; animation: scLineUp 1s cubic-bezier(.16,.8,.3,1) backwards; }
.lmask:nth-child(2) .lup { animation-delay: .09s; }
.intro { animation: scIntro .85s cubic-bezier(.16,.8,.3,1) backwards; }
.intro.d1 { animation-delay: .05s; }
.intro.d2 { animation-delay: .30s; }
.intro.d3 { animation-delay: .40s; }
.intro.d4 { animation-delay: .50s; }
.intro.d5 { animation-delay: .60s; }
@keyframes caret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
.caret { animation: caret 1.05s step-end infinite; }
/* Radiating "available" status dot (used by hero + product/work badges). */
@keyframes navpulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--brand-ac) 65%, transparent); } 60% { box-shadow: 0 0 0 5px transparent; } }
.nav-pulse { animation: navpulse 2.4s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .lup, .intro { animation: none; } .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .si-nav-links { display: none !important; }
  /* Hide the WORK + CONTACT destination cells (both are in the drop-down) so the
   * hamburger sits at the furthest right of the bar. With the links hidden, push
   * the lone burger to the end of its (flex:1) cell. */
  .contact-cell, .navlink-cell { display: none !important; }
  .si-links-cell { justify-content: flex-end !important; padding-right: 16px !important; }
  .si-burger { display: inline-flex; }
  [data-nav].si-open .si-mobile-menu { display: flex; }
  .si-about-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .si-about-body { columns: 1 !important; }

  /* Pipeline goes vertical: line + nodes on the left, cards stacked on the right. */
  .si-pipe { grid-template-columns: 1fr; column-gap: 0; }
  .si-stage { display: grid; grid-template-columns: 22px 1fr; column-gap: 20px; padding-right: 0; }
  .si-node-row { height: 22px; margin-bottom: 0; }
  .si-stage-card { padding-bottom: 40px; }
  .pipe-seg { top: 11px; left: 10px; width: 2px; height: 100%; }

  /* Work / product pages */
  .pcard, .pcard--mockleft { grid-template-columns: 1fr !important; }
  .pcard--mockleft .pcard__mock { order: 0 !important; } /* mobile: every row stacks text → image */
  .pcard__mock { border-left: none !important; border-right: none !important; }
  .si-idea-grid, .si-note { grid-template-columns: 1fr !important; gap: 24px !important; }
  .si-feat-grid { grid-template-columns: 1fr 1fr !important; }
  .si-feat-grid > .feat { border-right: none !important; }
  .si-dark-cards { grid-template-columns: 1fr 1fr !important; }
  .si-report-2 { grid-template-columns: 1fr !important; }
  .si-editor-body { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .si-rail { grid-template-columns: 1fr 1fr !important; }
  .si-rail > div:nth-child(2) { border-right: none !important; }
  #about > div > div, #approach > div > div, #contact > div > div { padding-left: 24px !important; padding-right: 24px !important; }

  /* Work / product pages */
  .si-idea-body { columns: 1 !important; }
  .si-feat-grid { grid-template-columns: 1fr !important; }
  .si-dark-cards { grid-template-columns: 1fr !important; }
  .si-meta-strip { grid-template-columns: 1fr 1fr !important; }
}

/* Rich-text prose (richtext props rendered via the Prose helper). Plain text
   renders inline; rich HTML keeps tidy paragraph spacing + styled links. */
.si-prose > p { margin: 0; }
.si-prose > p + p { margin-top: 0.9em; }
.si-prose > ul, .si-prose > ol { margin: 0.6em 0; padding-left: 1.3em; }
.si-prose a { color: var(--brand-ac-deep); text-decoration: underline; text-underline-offset: 2px; }
.si-prose strong, .si-prose b { font-weight: 700; }
