/* ==========================================================================
   Duke's Folder — "What We Do" section, Blue Monster Graphics homepage
   All selectors prefixed .sf so nothing collides with the site stylesheets.

   Two modes:
   - default (no JS, or reduced motion): the folder's inside page is shown as a
     normal, static services section.
   - .sf--live (added by duke-folder.js): a tall scroll track with a sticky stage;
     scrolling dives the camera into Duke's folder, which then swings open.
   ========================================================================== */

.sf {
  --sf-navy: #1F365C;
  --sf-gold: #D6B89A;
  --sf-gold-text: #A9825A;
  --sf-eyebrow: #785737;
  --sf-cream: #F6F3EE;
  --sf-paper: #FBF8F2;
  --sf-head: 72px;          /* sticky site header height, measured by JS */
  --sf-pw: 560px;           /* folder page width  */
  --sf-ph: 720px;           /* folder page height */
  position: relative;
  background: var(--sf-cream);
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  color: #333333;
}
.sf *, .sf *::before, .sf *::after { box-sizing: border-box; }

/* ---------- static (default) layout ---------- */
.sf-track { position: relative; }
.sf-stage { position: relative; padding: 72px 16px; display: flex; justify-content: center; }
.sf-video, .sf-intro, .sf-desk, .sf-cover, .sf-shadow, .sf-progress { display: none; }
.sf-folder { position: relative; width: 100%; max-width: 760px; }
.sf-spread { position: relative; }
.sf-page {
  position: relative;
  width: 100%;
  border-radius: 6px 14px 14px 6px;
  background: var(--sf-paper);
  box-shadow: 0 24px 50px rgba(31,54,92,.12);
  padding: 46px 44px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- page content ---------- */
.sf .sf-eyebrow {
  margin: 0;
  font: 600 12px/1.4 Montserrat, Arial, sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sf-eyebrow);
}
.sf h2.sf-title {
  margin: 0;
  font: 900 30px/1.15 Montserrat, "Arial Black", Arial, sans-serif;
  color: var(--sf-navy);
  text-transform: none;
  text-wrap: balance;
}
.sf h2.sf-title span { color: var(--sf-gold-text); }
.sf-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sf-list li { margin: 0; }
.sf .sf-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 10px;
  border-radius: 8px;
  border-bottom: 1px solid #ECE4D6;
  text-decoration: none;
  color: var(--sf-navy);
  transition: background-color .16s;
}
.sf .sf-row:hover { background: #EFE8DC; color: var(--sf-navy); }
.sf .sf-row:focus-visible { outline: 3px solid var(--sf-gold); outline-offset: 2px; }
.sf-ico {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #F1EADF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sf-ico img { width: 34px; height: 34px; object-fit: contain; display: block; }
.sf-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sf-txt strong { font: 700 16px/1.3 Montserrat, Arial, sans-serif; color: var(--sf-navy); }
.sf-txt span { font-size: 13px; line-height: 1.4; color: #6B6B6B; }
.sf-chev { flex: none; color: var(--sf-gold-text); }
.sf .sf-note { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: #555555; }
.sf .sf-note a { color: var(--sf-navy); text-decoration: underline; text-underline-offset: 3px; }
.sf .sf-cta {
  margin-top: 10px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 4px;
  background: var(--sf-gold);
  color: var(--sf-navy);
  font: 700 13px/1 Montserrat, Arial, sans-serif;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .15s, transform .15s;
}
.sf .sf-cta:hover { background: #E9D5C0; color: var(--sf-navy); transform: translateY(-2px); }
.sf .sf-cta:focus-visible { outline: 3px solid var(--sf-navy); outline-offset: 3px; }

/* ---------- live (scroll-driven) mode ---------- */
.sf--live .sf-track { height: 330vh; }
.sf--live .sf-stage {
  position: sticky;
  top: var(--sf-head);
  height: calc(100vh - var(--sf-head));
  height: calc(100svh - var(--sf-head));
  padding: 0;
  overflow: hidden;
  display: block;
}
.sf--live .sf-video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  background: var(--sf-cream);
  will-change: transform;
}
.sf--live .sf-intro {
  display: flex;
  position: absolute;
  right: max(48px, 6vw);
  top: 0;
  bottom: 0;
  width: min(480px, 38vw);
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  will-change: opacity, transform;
}
.sf .sf-intro h2 {
  margin: 0;
  font: 900 clamp(32px, 3.4vw, 46px)/1.12 Montserrat, "Arial Black", Arial, sans-serif;
  color: var(--sf-navy);
  text-transform: none;
  text-wrap: balance;
}
.sf .sf-intro h2 span { color: var(--sf-gold-text); }
.sf .sf-intro p { margin: 0; font-size: 18px; line-height: 1.7; color: #555555; }
.sf .sf-intro .sf-hint { font: 700 14px/1.3 Montserrat, Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: var(--sf-navy); }
.sf--live .sf-desk {
  display: block;
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 55%, #2A4673, #1F365C 55%, #142540);
  opacity: 0;
}
.sf--live .sf-folder {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--sf-pw) * 2);
  height: var(--sf-ph);
  max-width: none;
  margin: calc(var(--sf-ph) / -2) 0 0 calc(var(--sf-pw) * -1);
  perspective: 2400px;
  opacity: 0;
  pointer-events: none;
}
.sf--live .sf-spread { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.sf--live .sf-shadow {
  display: block;
  position: absolute;
  left: var(--sf-pw);
  top: 24px;
  width: var(--sf-pw);
  height: calc(var(--sf-ph) - 30px);
  border-radius: 14px;
  background: rgba(0,0,0,.35);
  filter: blur(18px);
  opacity: 0;
}
.sf--live .sf-page {
  position: absolute;
  left: var(--sf-pw);
  top: 0;
  width: var(--sf-pw);
  height: var(--sf-ph);
  border-radius: 4px 14px 14px 4px;
  box-shadow: inset 14px 0 18px -14px rgba(0,0,0,.35);
  overflow: hidden;
}
.sf--live .sf-row,
.sf--live .sf-note,
.sf--live .sf-cta { will-change: opacity, transform; }

.sf--live .sf-cover {
  display: block;
  position: absolute;
  left: var(--sf-pw);
  top: 0;
  width: var(--sf-pw);
  height: var(--sf-ph);
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  will-change: transform;
}
.sf-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 6px 14px 14px 6px;
}
.sf-front {
  background: radial-gradient(ellipse 90% 70% at 30% 20%, #2B2D33, #141518 60%, #0B0C0E);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), inset 18px 0 22px -16px rgba(0,0,0,.8);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sf-front img { width: 54%; max-width: 300px; height: auto; filter: grayscale(1) brightness(.32) contrast(1.4); mix-blend-mode: screen; opacity: .9; }
.sf-stitch { position: absolute; inset: 18px; border: 2px dashed rgba(255,255,255,.10); border-radius: 4px 10px 10px 4px; }
.sf-back {
  transform: rotateY(180deg);
  border-radius: 14px 4px 4px 14px;
  background: radial-gradient(ellipse 90% 70% at 70% 20%, #24395E, #182B4A 60%, #10203A);
  box-shadow: inset -14px 0 18px -14px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 40px 44px;
}
.sf-back .sf-stitch { border-color: rgba(214,184,154,.22); border-radius: 10px 4px 4px 10px; }
.sf-back-copy { position: relative; display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.sf-back-copy span:first-child { font: 600 12px/1 Montserrat, Arial, sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--sf-gold); }
.sf-back-copy span:last-child { font: 800 26px/1.25 Montserrat, Arial, sans-serif; color: #FFFFFF; }
.sf-pocket {
  position: relative;
  height: 32%;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(#1A2E50, #14243F);
  border-top: 2px solid rgba(214,184,154,.35);
  box-shadow: 0 -8px 16px rgba(0,0,0,.25);
}
.sf-card {
  position: absolute;
  left: 8%;
  top: -84px;
  width: 300px;
  max-width: 78%;
  height: 172px;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  transform: rotate(-4deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
  font-size: 12px;
  color: var(--sf-navy);
}
.sf-card img { width: 170px; max-width: 80%; height: auto; }
.sf-card b { font-weight: 600; display: block; }

.sf--live .sf-progress {
  display: block;
  position: absolute;
  right: 22px;
  top: 18%;
  bottom: 18%;
  width: 4px;
  border-radius: 2px;
  background: rgba(31,54,92,.15);
}
.sf-progress i { display: block; width: 100%; height: 0; border-radius: 2px; background: var(--sf-gold); }

/* ---------- phones: one page at a time ---------- */
@media (max-width: 760px) {
  .sf { --sf-pw: min(92vw, 520px); --sf-ph: 640px; }
  .sf-stage { padding: 48px 12px; }
  .sf-page { padding: 28px 18px 22px; gap: 10px; }
  .sf h2.sf-title { font-size: 24px; }
  .sf .sf-row { padding: 8px 6px; gap: 12px; }
  .sf-ico { width: 40px; height: 40px; }
  .sf-ico img { width: 28px; height: 28px; }
  .sf-txt strong { font-size: 15px; }
  .sf-txt span { font-size: 12px; }
  .sf--live .sf-video { object-position: 50% 50%; }
  .sf--live .sf-intro {
    left: 16px;
    right: 16px;
    width: auto;
    top: 0;
    bottom: auto;
    padding: 24px 0 60px;
    background: linear-gradient(var(--sf-cream) 70%, rgba(246,243,238,0));
    gap: 10px;
  }
  .sf .sf-intro p { font-size: 15px; }
  .sf--live .sf-page .sf-note { display: none; }
  .sf-back { padding: 0 22px 28px; }
  .sf-back-copy span:last-child { font-size: 19px; }
  .sf-card { height: 140px; top: -70px; }
  .sf--live .sf-progress { right: 8px; }
}
