/* iter8 portfolio — shared styles for the Selected Work index + case-study detail.
   Base classes (orb / page / rvl / eyebrow / btn-primary + light theme) come from services.css. */

.pf-wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ── device frames on gradient stages ────────────────────────────── */
/* gradient lives on ::before so content can overlap without being clipped */
.dv-stage { position: relative; border-radius: 22px;
  padding: clamp(34px, 6vw, 74px) clamp(22px, 5vw, 60px);
  display: flex; align-items: center; justify-content: center; }
.dv-stage::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.dv-stage > * { position: relative; z-index: 1; }
.dv-stage.s-navy::before  { background: radial-gradient(125% 135% at 50% -12%, #3345d8 0%, #16149f 34%, #0b0f2c 100%); }
.dv-stage.s-blue::before  { background: radial-gradient(135% 135% at 16% -12%, #41371f00, #2036b6 6%, #14149c 44%, #0a0d24 100%); }
.dv-stage.s-ink::before   { background: radial-gradient(125% 135% at 50% -12%, #24262f 0%, #14141b 46%, #0B0B0F 100%); }
.dv-stage.s-cream::before { background: radial-gradient(125% 135% at 50% -12%, #ffffff 0%, #f1ebe1 46%, #ddd6ca 100%); }

.dv-combo { position: relative; width: 100%; max-width: 780px; }

/* subtle 3D product-shot tilt for the showcase laptops (desktop only) */
@media (min-width: 861px) {
  .dv-lap.dv-tilt { transform: perspective(2600px) rotateY(-17deg) rotateX(4deg); transform-origin: 56% 50%; }
}

/* laptop — realistic MacBook: dark bezel + notch + gloss on an aluminum deck */
.dv-lap { position: relative; width: 100%; }
/* lid: dark aluminum bezel wrapping the display */
.dv-lap .scr { position: relative; border-radius: 17px; overflow: hidden; padding: 10px 10px 11px;
  background: linear-gradient(150deg, #26262c 0%, #16161b 34%, #0e0e12 100%);
  box-shadow: 0 42px 74px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.05); }
.dv-lap .scr img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 6px; }
/* the notch (camera housing) dipping into the top of the display */
.dv-lap .scr::before { content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 88px; height: 13px; background: #0b0b0e; border-radius: 0 0 8px 8px; z-index: 2; }
/* subtle screen gloss */
.dv-lap .scr::after { content: ''; position: absolute; inset: 10px 10px 11px; border-radius: 6px; z-index: 3;
  pointer-events: none; background: linear-gradient(118deg, rgba(255,255,255,0.13), rgba(255,255,255,0) 24%); }
/* base: aluminum deck front edge, wider than the lid, with the finger slot */
.dv-lap .base { position: relative; width: 112%; left: -6%; height: 19px; margin-top: -1px;
  border-radius: 3px 3px 11px 11px;
  background: linear-gradient(180deg, #d3d5da 0%, #b2b4bb 11%, #8f9199 44%, #6c6e75 80%, #4f5157 100%);
  box-shadow: 0 26px 30px rgba(0,0,0,0.42), inset 0 1.5px 0 rgba(255,255,255,0.6); }
/* hinge shadow where the lid meets the deck */
.dv-lap .base::before { content: ''; position: absolute; top: -1px; left: 6.5%; right: 6.5%; height: 3px;
  background: linear-gradient(180deg, rgba(0,0,0,0.42), transparent); border-radius: 2px; }
/* the front finger-slot recess */
.dv-lap .base::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 8px; border-radius: 0 0 9px 9px;
  background: linear-gradient(180deg, #7a7c83, #9c9ea4); box-shadow: inset 0 2px 3px rgba(0,0,0,0.42); }

/* phone */
.dv-phone { position: relative; width: 190px; flex-shrink: 0; border: 7px solid #16161d; border-radius: 32px;
  background: #16161d; overflow: hidden; box-shadow: 0 30px 55px rgba(0,0,0,0.55); }
.dv-phone .notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 46px; height: 5px; border-radius: 3px; background: rgba(250,247,242,0.4); }
.dv-phone img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: 24px; }

/* hero composition: laptop + phone popping out bottom-right */
.dv-combo.with-phone .dv-phone { position: absolute; right: -14px; bottom: -30px; width: 150px; z-index: 3; }

.dv-cap { font-family: 'Geist Mono'; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #888785; text-align: center; margin-top: 40px; }
.dv-2up { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── index: selected work ────────────────────────────────────────── */
.pf-head { padding: 60px 0 6px; }
.pf-head h1 { font-weight: 500; font-size: clamp(38px, 6.4vw, 72px); letter-spacing: -0.045em; line-height: 0.98; margin: 16px 0 20px; }
.pf-head .sub { font-size: 16px; line-height: 1.6; color: #C5C2BA; max-width: 560px; }

.pf-eyebrow { font-family: 'Geist Mono'; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #8FA0E8; margin: 46px 0 18px; }

.pf-featured { display: block; border-radius: 22px; overflow: hidden; position: relative;
  border: 1px solid rgba(250,247,242,0.10); transition: transform 220ms ease, border-color 220ms ease; }
.pf-featured:hover { transform: translateY(-4px); border-color: rgba(58,85,217,0.55); }
.pf-featured .dv-stage { border-radius: 0; }
.pf-featured .meta-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 26px; background: rgba(18,18,24,0.7); border-top: 1px solid rgba(250,247,242,0.08); }
.pf-featured .mb-left { display: flex; flex-direction: column; gap: 10px; }
.pf-featured .ttl { font-weight: 500; font-size: clamp(19px, 2.2vw, 26px); letter-spacing: -0.025em; color: #FAF7F2; }
.pf-featured .tags { display: flex; gap: 7px; flex-wrap: wrap; }
.pf-featured .tags span { font-family: 'Geist Mono'; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #C7D0F5; border: 1px solid rgba(58,85,217,0.4); padding: 5px 9px; border-radius: 999px; }
.pf-featured .view { font-family: 'Geist Mono'; font-size: 11px; letter-spacing: 0.04em; color: #8FA0E8; white-space: nowrap; }
.pf-featured:hover .view { color: #FAF7F2; }

.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pf-card { border: 1px solid rgba(250,247,242,0.09); border-radius: 14px; overflow: hidden; background: rgba(28,28,34,0.5); }
.pf-card .tile { height: 148px; display: flex; align-items: center; justify-content: center; position: relative; }
.pf-card .tile::before { content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 130% at 50% 0%, #1f2fa0, #0c1030); }
.pf-card .tile b { position: relative; font-family: 'Geist Mono'; font-weight: 600; font-size: 42px; color: #C7D0F5; letter-spacing: -0.02em; }
.pf-card .body { padding: 18px 20px 20px; }
.pf-card .body .nm { font-weight: 500; font-size: 15px; color: #FAF7F2; }
.pf-card .body .dsc { font-size: 12.5px; line-height: 1.5; color: #888785; margin-top: 6px; }
.pf-card .body .st { font-family: 'Geist Mono'; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #6f6e6a; margin-top: 14px; }

.pf-cta { padding: 80px 0 70px; text-align: center; }
.pf-cta h2 { font-weight: 500; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.03em; margin-bottom: 24px; text-wrap: balance; }

/* ── detail: case study ──────────────────────────────────────────── */
.cs-back { display: inline-flex; align-items: center; gap: 7px; font-family: 'Geist Mono'; font-size: 11px;
  letter-spacing: 0.04em; color: #8FA0E8; padding: 40px 0 0; }
.cs-back:hover { color: #FAF7F2; }
.cs-head { padding: 22px 0 0; }
.cs-head h1 { font-weight: 500; font-size: clamp(32px, 5.2vw, 60px); letter-spacing: -0.04em; line-height: 1.02; margin: 14px 0 20px; text-wrap: balance; }
.cs-lede { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.6; color: #C5C2BA; max-width: 640px; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.cs-tags span { font-family: 'Geist Mono'; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #C7D0F5; border: 1px solid rgba(58,85,217,0.4); background: rgba(20,40,160,0.14); padding: 6px 11px; border-radius: 999px; }
.cs-meta { margin: 30px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(250,247,242,0.12); }
.cs-meta .m { padding: 16px 2px; border-bottom: 1px solid rgba(250,247,242,0.12); }
.cs-meta dt { font-family: 'Geist Mono'; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #888785; }
.cs-meta dd { font-size: 14px; color: #E5E2DA; margin-top: 7px; }
.cs-meta dd a { color: #8FA0E8; }

.cs-hero { margin-top: 40px; }
.cs-sec { padding: 64px 0 0; }
.cs-sec .lbl { font-family: 'Geist Mono'; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #8FA0E8; margin-bottom: 15px; }
.cs-sec h2 { font-weight: 500; font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 14px; }
.cs-sec p { font-size: 15.5px; line-height: 1.62; color: #A8A59D; max-width: 640px; }
.cs-sec .grp { margin-top: 26px; }

/* brand system panel */
.cs-sys { position: relative; border-radius: 18px; overflow: hidden; padding: clamp(32px, 5vw, 56px);
  background: radial-gradient(125% 135% at 50% -12%, #24262f 0%, #14141b 46%, #0B0B0F 100%);
  display: grid; grid-template-columns: auto 1fr; gap: clamp(30px, 5vw, 56px); align-items: center; }
.cs-sys::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(250,247,242,0.04) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(250,247,242,0.04) 0 1px, transparent 1px 40px);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%); }
.cs-glyph { position: relative; display: flex; flex-direction: column; gap: 12px; z-index: 1; }
.cs-glyph::before { content: ''; position: absolute; inset: -22px; border: 1px dashed rgba(58,85,217,0.55); border-radius: 5px; }
.cs-glyph i { display: block; width: 118px; height: 48px; border-radius: 15px; }
.cs-glyph i.top { background: #FAF7F2; }
.cs-glyph i.bot { background: #1428A0; }
.cs-sysr { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; }
.cs-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.cs-sw { width: 74px; }
.cs-sw .chip { height: 46px; border-radius: 8px; border: 1px solid rgba(250,247,242,0.12); }
.cs-sw .lb { font-family: 'Geist Mono'; font-size: 9px; letter-spacing: 0.02em; color: #888785; margin-top: 7px; }
.cs-typ .big { font-family: 'Geist'; font-weight: 500; font-size: 36px; letter-spacing: -0.03em; color: #FAF7F2; line-height: 1; }
.cs-typ .lb { font-family: 'Geist Mono'; font-size: 10px; letter-spacing: 0.04em; color: #888785; margin-top: 10px; }

/* facts strip */
.cs-facts { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 34px; padding: 24px 0;
  border-top: 1px solid rgba(250,247,242,0.12); border-bottom: 1px solid rgba(250,247,242,0.12); }
.cs-facts .f { font-family: 'Geist Mono'; font-size: 12px; letter-spacing: 0.01em; color: #A8A59D; }
.cs-facts .f b { color: #8FA0E8; font-weight: 600; margin-right: 3px; }

/* next / nav cards */
.cs-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; }
.cs-navcard { border: 1px solid rgba(250,247,242,0.10); border-radius: 14px; padding: 30px 28px;
  transition: border-color 200ms ease, transform 200ms ease; }
.cs-navcard:hover { border-color: rgba(58,85,217,0.55); transform: translateY(-3px); }
.cs-navcard .k { font-family: 'Geist Mono'; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #888785; }
.cs-navcard .t { font-weight: 500; font-size: 20px; letter-spacing: -0.02em; color: #FAF7F2; margin-top: 10px; }
.cs-navcard .t .ar { color: #8FA0E8; margin-left: 4px; }

/* ── responsive ── */
@media (max-width: 760px) {
  .dv-2up { grid-template-columns: 1fr; }
  .dv-combo.with-phone .dv-phone { display: none; }
  .pf-grid { grid-template-columns: 1fr; }
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-sys { grid-template-columns: 1fr; gap: 28px; justify-items: start; }
  .cs-next { grid-template-columns: 1fr; }
}

/* ── light theme (editorial text adapts; device stages stay dark like product shots) ── */
html.light .pf-head .sub, html.light .cs-lede { color: #44443F; }
html.light .pf-eyebrow, html.light .cs-sec .lbl, html.light .cs-back,
html.light .cs-meta dd a, html.light .pf-featured .view { color: #2438C0; }
html.light .pf-featured { border-color: rgba(11,11,15,0.10); }
html.light .pf-featured .meta-bar { background: #FFFFFF; border-top-color: rgba(11,11,15,0.08); }
html.light .pf-featured .ttl { color: #0B0B0F; }
html.light .pf-featured .tags span, html.light .cs-tags span { color: #2438C0; }
html.light .pf-card { background: #FFFFFF; border-color: rgba(11,11,15,0.10); }
html.light .pf-card .body .nm { color: #0B0B0F; }
html.light .pf-card .body .dsc { color: #66655F; }
html.light .cs-sec p { color: #66655F; }
html.light .cs-meta { border-top-color: rgba(11,11,15,0.14); }
html.light .cs-meta .m { border-bottom-color: rgba(11,11,15,0.14); }
html.light .cs-meta dd { color: #1A1A1F; }
html.light .cs-facts { border-color: rgba(11,11,15,0.14); }
html.light .cs-facts .f { color: #66655F; }
html.light .cs-navcard { border-color: rgba(11,11,15,0.10); }
html.light .cs-navcard .t { color: #0B0B0F; }
