/* ==========================================================================
   Portfolio additions — Behind The Work, the Studio / Store portal cards and
   the seamless hand-off to madebyeyad.web.app. Loaded after style.css; nothing
   here restyles existing sections.
   ========================================================================== */

/* ---------------------------------------------------------------- Behind The Work */
.btw { background: #000; color: #f3ede1; position: relative; }
.btw .full-bleed-break { height: 78vh; }
.btw-inner { padding: 72px 0 84px; overflow: hidden; }
.btw-head { padding: 0 32px; max-width: 1400px; margin: 0 auto 36px; display: grid; grid-template-columns: auto 1fr; gap: 10px 48px; align-items: end; }
.btw-head .section-number { grid-column: 1 / -1; color: #d02b2a; }
.btw-title { margin: 0; font-family: var(--headings); font-weight: 700; text-transform: uppercase; font-size: clamp(56px, 10vw, 150px); line-height: .86; letter-spacing: -.01em; color: #f3ede1; }
.btw-lede { margin: 0 0 10px; max-width: 360px; color: rgba(243, 237, 225, .6); font-size: 15px; line-height: 1.5; }

.btw-track {
  list-style: none; margin: 0; padding: 0 32px 18px;
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 32px;
  scrollbar-width: thin; scrollbar-color: rgba(243, 237, 225, .25) transparent;
  cursor: grab;
}
.btw-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.btw-step {
  flex: 0 0 clamp(250px, 26vw, 360px); scroll-snap-align: start; position: relative;
  border-top: 1px solid rgba(243, 237, 225, .25); padding-top: 14px;
  opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.btw-step.is-in { opacity: 1; transform: none; }
.btw-step figure { margin: 0 0 16px; aspect-ratio: 4 / 5; overflow: hidden; background: #111; }
.btw-step img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(100%) contrast(1.05); transition: filter .5s ease, transform .9s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.btw-step:hover img { filter: grayscale(0%); transform: scale(1.04); }
.btw-num { position: absolute; top: 24px; left: 10px; font-family: var(--headings); font-size: 12px; font-weight: 700; letter-spacing: .08em; background: #d02b2a; color: #fff; padding: 3px 7px; }
.btw-step h4 { margin: 0 0 6px; font-family: var(--headings); font-size: 30px; line-height: 1; text-transform: uppercase; color: #f3ede1; }
.btw-step p { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(243, 237, 225, .62); max-width: 30ch; }
.btw-step:not(:last-child)::after { content: "\2192"; position: absolute; top: 4px; right: 0; color: rgba(243, 237, 225, .35); font-size: 14px; }

.btw-bridge { max-width: 1400px; margin: 56px auto 0; padding: 0 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; border-top: 1px solid rgba(243, 237, 225, .18); padding-top: 32px; }
.btw-bridge-line { margin: 0; font-family: var(--headings); font-size: clamp(24px, 3.2vw, 44px); text-transform: uppercase; line-height: 1.05; color: #f3ede1; }
.btw-bridge-cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; background: #d02b2a; color: #fff;
  font-family: var(--headings); font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  transition: background .25s ease, transform .25s ease;
}
.btw-bridge-cta:hover { background: #f3ede1; color: #000; transform: translateY(-2px); }
.btw-bridge-cta:focus-visible { outline: 2px solid #f3ede1; outline-offset: 3px; }

html[data-theme="dark"] .btw { filter: invert(1) hue-rotate(180deg); }
html[data-theme="dark"] .btw .full-bleed-break { filter: none; }

@media screen and (max-width: 767px) {
  .btw .full-bleed-break { height: 56vh; min-height: 300px; }
  .btw-inner { padding: 48px 0 56px; }
  .btw-head { grid-template-columns: 1fr; padding: 0 18px; }
  .btw-track { padding: 0 18px 14px; scroll-padding: 0 18px; gap: 14px; }
  .btw-step { flex-basis: 74vw; }
  .btw-bridge { padding: 26px 18px 0; margin-top: 40px; }
  .btw-bridge-cta { width: 100%; justify-content: center; }
}

/* ---------------------------------------------------------------- Studio portal card */
.studio-portal {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1.25fr 1fr; min-height: 440px; margin: 8px 0 34px;
  background: #0b0b0b; color: #f3ede1; text-decoration: none; overflow: hidden; isolation: isolate;
  border: 1px solid #000; box-shadow: 10px 10px 0 #d02b2a;
  transition: box-shadow .35s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
}
.studio-portal:hover { transform: translate(-3px, -3px); box-shadow: 16px 16px 0 #d02b2a; }
.studio-portal:focus-visible { outline: 3px solid #d02b2a; outline-offset: 4px; }
.studio-portal::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: .07; mix-blend-mode: screen;
  background: url("../images/texture/grain.png"); background-size: 180px;
}

.sp-chrome { position: absolute; z-index: 4; top: 0; left: 0; right: 0; height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid rgba(243, 237, 225, .12); background: rgba(0, 0, 0, .55); font: 600 10px/1 var(--paragraph); letter-spacing: .08em; text-transform: uppercase; color: rgba(243, 237, 225, .55); backdrop-filter: blur(6px); }
.sp-chrome i { width: 9px; height: 9px; border-radius: 50%; background: rgba(243, 237, 225, .25); }
.sp-chrome i:first-child { background: #d02b2a; }
.sp-chrome b { margin-left: 10px; font-weight: 600; }
.sp-chrome em { margin-left: auto; font-style: normal; color: #d02b2a; }

.sp-stage { position: relative; min-height: 440px; overflow: hidden; }
.sp-shot { position: absolute; overflow: hidden; background: #1a1a1a; border: 1px solid rgba(243, 237, 225, .15); box-shadow: 0 20px 40px rgba(0, 0, 0, .5); transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .6s ease; }
.sp-shot img, .sp-shot video { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(100%) contrast(1.08); transition: filter .6s ease; }
.studio-portal:hover .sp-shot img, .studio-portal:hover .sp-shot video { filter: grayscale(0%); }
.sp-a { width: 46%; height: 50%; left: 6%; top: 15%; transform: rotate(-4deg); z-index: 2; animation: sp-drift 9s ease-in-out infinite alternate; }
.sp-b { width: 30%; height: 56%; left: 44%; top: 9%; transform: rotate(3deg); z-index: 3; animation: sp-drift 11s ease-in-out -3s infinite alternate; }
.sp-c { width: 52%; height: 36%; left: 24%; top: 53%; transform: rotate(-1deg); z-index: 4; }
.sp-d { width: 24%; height: 38%; left: 74%; top: 48%; transform: rotate(6deg); z-index: 1; animation: sp-drift 10s ease-in-out -5s infinite alternate; }
.sp-e { width: 22%; height: 30%; left: 2%; top: 62%; transform: rotate(-7deg); z-index: 1; animation: sp-drift 12s ease-in-out -2s infinite alternate; }
.studio-portal:hover .sp-a { transform: rotate(-7deg) translate(-12px, -10px) scale(1.04); }
.studio-portal:hover .sp-b { transform: rotate(6deg) translate(10px, -14px) scale(1.04); }
.studio-portal:hover .sp-c { transform: rotate(0deg) translateY(8px) scale(1.06); }
.studio-portal:hover .sp-d { transform: rotate(10deg) translate(14px, 6px); }
.studio-portal:hover .sp-e { transform: rotate(-11deg) translate(-10px, 8px); }
@keyframes sp-drift { from { translate: 0 0; } to { translate: 0 -10px; } }

.sp-timeline { position: absolute; z-index: 5; left: 6%; right: 6%; bottom: 16px; height: 26px; display: flex; gap: 3px; padding: 4px; background: rgba(0, 0, 0, .7); border: 1px solid rgba(243, 237, 225, .15); }
.sp-timeline i { display: block; width: var(--w); background: repeating-linear-gradient(90deg, rgba(208, 43, 42, .85) 0 6px, rgba(208, 43, 42, .6) 6px 7px); }
.sp-timeline i:nth-child(2) { background: repeating-linear-gradient(90deg, rgba(243, 237, 225, .55) 0 6px, rgba(243, 237, 225, .35) 6px 7px); }
.sp-timeline u { position: absolute; top: -6px; bottom: -6px; width: 2px; left: 10%; background: #f3ede1; animation: sp-play 6s linear infinite; }
@keyframes sp-play { from { left: 4%; } to { left: 96%; } }

.sp-copy { position: relative; z-index: 3; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 64px 40px 40px 12px; }
.sp-kicker { font: 700 11px/1 var(--headings); letter-spacing: .16em; text-transform: uppercase; color: #d02b2a; }
.sp-title { font-family: var(--headings); font-weight: 700; text-transform: uppercase; font-size: clamp(64px, 8.4vw, 128px); line-height: .82; letter-spacing: -.01em; color: #f3ede1; }
.sp-apps { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-apps span { font: 700 11px/1 var(--headings); letter-spacing: .1em; text-transform: uppercase; padding: 6px 9px; border: 1px solid rgba(243, 237, 225, .3); color: rgba(243, 237, 225, .85); transition: background .25s ease, color .25s ease, border-color .25s ease; }
.studio-portal:hover .sp-apps span { border-color: #d02b2a; }
.studio-portal:hover .sp-apps span:nth-child(odd) { background: #d02b2a; color: #fff; }
.sp-desc { font-size: 14px; line-height: 1.55; color: rgba(243, 237, 225, .65); max-width: 38ch; }
.sp-cta { align-self: flex-start; display: inline-flex; gap: 10px; align-items: center; margin-top: 4px; padding: 14px 22px; background: #f3ede1; color: #000; font: 700 15px/1 var(--headings); letter-spacing: .08em; text-transform: uppercase; transition: background .25s ease, color .25s ease, gap .25s ease; }
.studio-portal:hover .sp-cta { background: #d02b2a; color: #fff; gap: 16px; }

html[data-theme="dark"] .studio-portal { filter: invert(1) hue-rotate(180deg); }

@media screen and (max-width: 900px) {
  .studio-portal { grid-template-columns: 1fr; box-shadow: 7px 7px 0 #d02b2a; }
  .sp-stage { min-height: 300px; }
  .sp-copy { padding: 8px 22px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-shot, .sp-timeline u { animation: none !important; }
  .studio-portal, .sp-shot { transition: none; }
  .btw-step { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------- hand-off veil */
.eyad-veil { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; opacity: 0; transition: opacity .36s cubic-bezier(.4, 0, .2, 1); }
.eyad-veil.is-on { opacity: 1; pointer-events: auto; }
.eyad-veil.is-off { opacity: 0; transition-duration: .4s; }
html[data-theme="dark"] .eyad-veil { filter: invert(1) hue-rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .eyad-veil { transition-duration: .1s; } }
.sp-chrome em { display: inline-flex; align-items: center; gap: 6px; }
.sp-chrome em::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: sp-live 1.6s ease-in-out infinite; }
@keyframes sp-live { 50% { opacity: .25; } }

/* ---------------------------------------------------------------- Store portal card
   Same build as the Studio card, mirrored: copy on the left, a lookbook of
   tagged photos on the right, and a running ticker instead of a timeline. */
.portals-container { padding-top: 10px; }
.studio-portal--store { grid-template-columns: 1fr 1.25fr; margin-top: 40px; box-shadow: -10px 10px 0 #d02b2a; }
.studio-portal--store:hover { transform: translate(3px, -3px); box-shadow: -16px 16px 0 #d02b2a; }
.studio-portal--store .sp-copy { padding: 64px 12px 40px 40px; }

.st-a { width: 38%; height: 58%; left: 8%; top: 13%; transform: rotate(-5deg); z-index: 3; animation: sp-drift 10s ease-in-out infinite alternate; }
.st-b { width: 34%; height: 62%; left: 40%; top: 8%; transform: rotate(3deg); z-index: 2; animation: sp-drift 12s ease-in-out -4s infinite alternate; }
.st-c { width: 26%; height: 40%; left: 70%; top: 40%; transform: rotate(7deg); z-index: 4; }
.st-d { width: 24%; height: 34%; left: 4%; top: 50%; transform: rotate(-9deg); z-index: 1; animation: sp-drift 11s ease-in-out -2s infinite alternate; }
.st-c img { object-position: 50% 30%; }
.st-b .st-tag { left: 50%; top: 8px; bottom: auto; transform: translateX(-50%); }
.studio-portal--store:hover .st-a { transform: rotate(-8deg) translate(-12px, -8px) scale(1.04); }
.studio-portal--store:hover .st-b { transform: rotate(5deg) translate(6px, -14px) scale(1.04); }
.studio-portal--store:hover .st-c { transform: rotate(11deg) translate(12px, 8px); }
.studio-portal--store:hover .st-d { transform: rotate(-13deg) translate(-8px, 8px); }

.st-tag {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  padding: 5px 8px; background: #f3ede1; color: #000;
  font: 700 10px/1 var(--headings); letter-spacing: .12em; text-transform: uppercase;
  transition: background .25s ease, color .25s ease;
}
.studio-portal--store:hover .st-tag { background: #d02b2a; color: #fff; }

.st-ticker {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 16px;
  display: flex; width: max-content; padding: 7px 0;
  background: #d02b2a; color: #fff;
  font: 700 12px/1 var(--headings); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  animation: st-ticker 30s linear infinite;
}
.st-ticker span { padding-right: 0; }
@keyframes st-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media screen and (max-width: 900px) {
  .studio-portal--store { grid-template-columns: 1fr; box-shadow: -7px 7px 0 #d02b2a; }
  .studio-portal--store .sp-stage { order: -1; }
  .studio-portal--store .sp-copy { padding: 8px 22px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-ticker { animation: none !important; }
}
