/* ============================================
   BRANDON JOH — layer on top of the CREATEXODUS system
   Same frame, glass, type and motion. Differences:
   graphite + signal-blue palette, a stacked hero over a loop of
   client websites, live-site showcases (browser + phone frames
   that scroll on hover) in place of the 16:9 reel, and an
   accordion for the client work.
   ============================================ */

:root {
  --hero-0: #0a0b0d;
  --hero-1: #16191e;
  --hero-2: #1f2a38;
  --accent: #3d7bff;
}
::selection { background: #1b3a7a; color: #fff; }

/* ---- Wordmark (text instead of an image logo) ---- */
.wordmark {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}
.nav-logo { height: auto; margin-top: -4px; color: inherit; }
.nav-logo .wordmark { display: block; padding-left: 0.32em; }
.nav.on-light .nav-logo { color: #151515; }
.footer-logo { height: auto; }
.footer-logo .wordmark { font-size: 15px; color: var(--dark-text); }

/* ---- Hero: createxodus layout, over a wall of client imagery ---- */
.hero-video { filter: saturate(0.8) brightness(0.4) contrast(1.05) blur(1.5px); }
.hero-tint {
  background:
    radial-gradient(ellipse 55% 42% at 50% 50%, rgba(10,11,13,0.72), transparent 80%),
    linear-gradient(180deg, rgba(10,11,13,0.55) 0%, rgba(10,11,13,0.15) 35%, rgba(10,11,13,0.2) 60%, rgba(10,11,13,0.75) 100%);
}
.hero-shade { background: var(--hero-0); }
.hero-meta a { border-bottom: 1px solid rgba(255,255,255,0.35); transition: border-color 0.3s; }
.hero-meta a:hover { border-color: #fff; }

/* ============================================
   LIVE-SITE FRAMES
   A browser window and a phone, each holding a full-page capture
   that scrolls through on hover (and drifts on its own on touch).
   ============================================ */
.browser {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 24px 70px rgba(0,0,0,0.18);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 38px;
  padding: 0 14px;
  background: linear-gradient(180deg, #f4f5f7, #e9ebef);
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots i { width: 10px; height: 10px; border-radius: 50%; background: #d3d6dc; }
.browser-url {
  flex: 1;
  max-width: 360px;
  margin: 0 auto;
  height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.85);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-view, .phone-view {
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
}
.browser-view { aspect-ratio: 16 / 10; }
.browser-view img, .phone-view img {
  width: 100%;
  height: auto;
  display: block;
  transform: translateY(0);
  transition: transform 1.2s var(--ease);
  will-change: transform;
}
.browser:hover .browser-view img,
.phone:hover .phone-view img {
  transform: translateY(calc(-100% + var(--view-h, 0px)));
  transition: transform var(--scroll-dur, 9s) cubic-bezier(0.45, 0, 0.25, 1);
}

.phone {
  position: relative;
  padding: 10px;
  border-radius: 44px;
  background: #0d0e10;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 0 1px rgba(0,0,0,0.25), 0 30px 70px rgba(0,0,0,0.25);
}
.phone::before {
  content: '';
  position: absolute;
  top: 18px; left: 50%;
  width: 86px; height: 24px;
  margin-left: -43px;
  border-radius: 20px;
  background: #0d0e10;
  z-index: 2;
}
.phone-view { aspect-ratio: 9 / 19.5; border-radius: 34px; }

.frame-cap {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-top: 14px;
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.frame-cap b { font-weight: 500; color: var(--ink); }
.frame-cap a { color: var(--ink); border-bottom: 1px solid var(--rule); }
.frame-cap a:hover { border-color: var(--ink); }

/* ============================================
   CLIENT WORK — accordion rows
   ============================================ */
.dw { border-top: 1px solid var(--rule); }
.dw-item { border-bottom: 1px solid var(--rule); }
.dw-item summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  cursor: pointer;
  transition: padding-left 0.5s var(--ease);
}
.dw-item summary::-webkit-details-marker { display: none; }
.dw-item summary:hover { padding-left: 10px; }
.dw-plus { position: relative; width: 12px; height: 12px; justify-self: end; }
.dw-plus::before, .dw-plus::after {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: var(--ink); transition: transform 0.5s var(--ease);
}
.dw-plus::after { transform: rotate(90deg); }
.dw-item[open] .dw-plus::after { transform: rotate(0deg); }
.dw-body { padding: 0 0 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 20px; }
.dw-body ul, .dw-body .dw-link { grid-column: 2; }
.dw-body ul { display: grid; gap: 10px; }
.dw-body li {
  position: relative;
  padding-left: 18px;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.dw-body li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 8px; height: 1px; background: var(--accent); }
.dw-link {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 0;
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink-4);
  transition: border-color 0.3s;
}
.dw-link:hover { border-color: var(--ink); }
.dw-item[open] .dw-body { animation: dwIn 0.6s var(--ease); }
@keyframes dwIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.about-photo img { filter: none; object-position: 50% 30%; }
.footer-credit { color: #d0d0d0; border-bottom: 1px solid rgba(255,255,255,0.3); transition: color 0.3s, border-color 0.3s; }
.footer-credit:hover { color: #fff; border-color: #fff; }
.form-note.is-warn { color: #c0392b; }

/* ============================================
   PROJECT PAGES
   ============================================ */
.proj-hero { background:
    radial-gradient(ellipse 70% 80% at 15% 10%, var(--hero-2) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 90% 90%, #12233f 0%, transparent 60%),
    radial-gradient(ellipse 80% 70% at 50% 50%, var(--hero-1), var(--hero-0) 100%); }
.proj-hero--image { background: var(--hero-0); }
.proj-hero-bg { position: absolute; inset: 0; z-index: 0; }
.proj-hero-bg { overflow: hidden; }
.proj-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: 0.5; filter: grayscale(0.35) blur(14px); transform: scale(1.12); }
.proj-hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,11,13,0.5) 0%, rgba(10,11,13,0.3) 35%, rgba(10,11,13,0.94) 100%); }
.proj-lede {
  max-width: 62ch;
  margin-top: 26px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: rgba(242,244,248,0.8);
}
.proj-site-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px;
  padding: 4px 0;
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.35);
  transition: border-color 0.3s;
}
.proj-site-link:hover { border-color: #fff; }

/* Split blocks inside the light media card */
.proj-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 9fr);
  gap: clamp(32px, 6vw, 110px);
  padding: clamp(10px, 2vh, 24px) 0 clamp(40px, 6vh, 72px);
}
.proj-split + .proj-split { border-top: 1px solid var(--rule); padding-top: clamp(40px, 6vh, 72px); }
.proj-split .eyebrow { display: block; margin-bottom: 10px; }
.proj-split h2 {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.02em; line-height: 1.05;
  color: var(--ink);
  margin-bottom: 18px;
}
.proj-split .prose { max-width: 420px; }
.work-list { list-style: none; border-top: 1px solid var(--rule); }
.work-list li {
  position: relative;
  padding: 18px 0 18px 46px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.work-list li span { position: absolute; left: 0; top: 21px; font-family: var(--sans); font-size: 11px; letter-spacing: 0.04em; color: var(--accent); }

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat { padding: 24px 18px 24px 0; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--rule); }
.stat b { display: block; font-family: var(--display); font-weight: 300; font-size: clamp(28px, 3.2vw, 46px); line-height: 1; color: var(--ink); margin-bottom: 12px; }
.stat span { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.fact-list { border-top: 1px solid var(--rule); }
.fact-list .row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px;
  padding: 20px 0; border-bottom: 1px solid var(--rule);
}
.fact-list .row-a { font-family: var(--sans); font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink); }
.fact-list .row-c { font-family: var(--serif); font-size: 14px; letter-spacing: 0.02em; color: var(--ink-2); text-align: right; }
@media (max-width: 768px) { .fact-list .row { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; } .fact-list .row-c { text-align: left; font-size: 13.5px; } }
.proj-note { margin-top: 14px; font-family: var(--serif); font-size: 12px; line-height: 1.5; color: var(--ink-3); letter-spacing: 0.02em; }

.proj-frames { display: grid; grid-template-columns: minmax(0, 3.3fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.proj-frames--solo { grid-template-columns: 1fr; max-width: 1100px; width: 100%; margin-left: auto; margin-right: auto; }
.proj-frames + .proj-frames { margin-top: clamp(28px, 4vh, 48px); }

.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.flow-step { padding: 26px 20px 26px 0; }
.flow-step + .flow-step { padding-left: 20px; border-left: 1px solid var(--rule); }
.flow-step i { display: block; font-style: normal; font-size: 11px; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 26px; }
.flow-step b { display: block; font-weight: 500; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
.flow-step span { font-family: var(--serif); font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }

/* ---- Galleries built from each client's own material ---- */
.proj-media-half.is-wide { aspect-ratio: 3 / 2; }
.proj-media-third.is-wide { aspect-ratio: 4 / 3; }
.proj-media-full.is-pano { aspect-ratio: 21 / 9; }
.proj-media-half.is-contain, .proj-media-third.is-contain { background: #fff; }
.proj-media-half.is-contain img, .proj-media-third.is-contain img { object-fit: contain; height: 100% !important; margin: 0 !important; }
.gal-cap { display: flex; justify-content: space-between; gap: 16px; margin-top: -4px; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.gal-cap b { font-weight: 500; color: var(--ink); }
.proj-media-heading small { display: block; margin-top: 8px; font-family: var(--serif); font-size: 13px; letter-spacing: 0.02em; color: var(--ink-3); }

/* Video thumbnails (YouTube) */
.yt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.yt-card { display: block; }
.yt-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--tile); }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.yt-card:hover .yt-thumb img { transform: scale(1.04); }
.yt-thumb::after {
  content: ''; position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='14' viewBox='0 0 12 14'%3E%3Cpath d='M1 1l10 6-10 6z' fill='%23fff'/%3E%3C/svg%3E") 55% 50% no-repeat;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transform: scale(0.9); transition: opacity 0.4s, transform 0.5s var(--ease);
}
.yt-card:hover .yt-thumb::after { opacity: 1; transform: none; }
.yt-title { display: block; margin-top: 10px; font-size: 12px; letter-spacing: 0.02em; color: var(--ink); line-height: 1.35; }

/* Products on white */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.product { display: block; }
.product-img { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(0,0,0,0.05); }
.product-img img { width: 86%; height: 86%; object-fit: contain; transition: transform 0.7s var(--ease); }
.product:hover .product-img img { transform: scale(1.04); }
.product-img--fill { aspect-ratio: 5 / 7; }
.product-img--fill img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.product b { display: block; margin-top: 10px; font-weight: 500; font-size: 12px; letter-spacing: 0.02em; color: var(--ink); }
.product span { display: block; margin-top: 2px; font-family: var(--serif); font-size: 12px; color: var(--ink-3); }

/* People */
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.team-card .team-img { aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--tile); }
.team-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.team-card b { display: block; margin-top: 10px; font-weight: 500; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.team-card span { display: block; margin-top: 2px; font-family: var(--serif); font-size: 12px; color: var(--ink-3); }

/* Listing flyers */
.flyer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.flyer { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 14px 40px rgba(0,0,0,0.08); }
.flyer img { width: 100%; height: auto; display: block; }

/* Outbound links under the project hero */
.proj-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 22px; }
.proj-links .proj-site-link { margin-top: 0; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .proj-split { grid-template-columns: 1fr; gap: 24px; }
  .flow { grid-template-columns: 1fr 1fr; }
  .product-grid, .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yt-grid, .flyer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-step:nth-child(3) { padding-left: 0; border-left: 0; }
  .flow-step:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 768px) {
  .wordmark { font-size: 10.5px; letter-spacing: 0.26em; }
  .browser { border-radius: 12px; }
  .browser-bar { height: 28px; gap: 10px; }
  .browser-dots i { width: 8px; height: 8px; }
  .browser-url { font-size: 10px; height: 18px; }
  .dw-item summary { grid-template-columns: 1fr auto; gap: 6px 16px; padding: 18px 0; }
  .dw-item summary .row-b { grid-column: 1 / -1; order: 3; }
  .dw-body { grid-template-columns: 1fr; }
  .dw-body ul, .dw-body .dw-link { grid-column: 1; }
  .dw-body li { font-size: 13px; }
  .proj-frames { grid-template-columns: 1fr; }
  .proj-frames .phone { width: 100%; max-width: 280px; margin: 0 auto; }
  .stat-row { grid-template-columns: 1fr; }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .work-list li { font-size: 13.5px; padding-left: 38px; }
  .flow { grid-template-columns: 1fr; }
  .flow-step, .flow-step + .flow-step { padding: 20px 0; border-left: 0; }
  .flow-step + .flow-step { border-top: 1px solid var(--rule); }
  .flow-step i { margin-bottom: 10px; }
  .yt-grid, .flyer-grid { grid-template-columns: 1fr; }
  .proj-media-full.is-pano { aspect-ratio: 4 / 3; }
}
@media (hover: none) {
  .browser-view img, .phone-view img { animation: frameDrift 30s ease-in-out infinite alternate; }
}
@keyframes frameDrift { from { transform: translateY(0); } to { transform: translateY(calc(-100% + var(--view-h, 0px))); } }
@media (prefers-reduced-motion: reduce) {
  .browser-view img, .phone-view img { animation: none !important; transition: none !important; }
}
