/**
 * BigCommerce SEO Agency - Portfolio Frontend Styles
 * Self-contained styles for Browser Mockups, Bento Grid, and Filter Chips
 */

:root {
  --bc-p-ink: #121417;
  --bc-p-muted: #5e6573;
  --bc-p-subtle: #878f9f;
  --bc-p-line: rgba(18, 20, 23, 0.1);
  --bc-p-line-strong: rgba(18, 20, 23, 0.22);
  --bc-p-soft: #f4efe6;
  --bc-p-r-lg: 20px;
  --bc-p-mono: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bc-p-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

.bc-portfolio-container {
  width: 100%;
  position: relative;
  box-sizing: border-box;
}

.bc-portfolio-container * {
  box-sizing: border-box;
}

/* ==========================================================================
   Filter Chips
   ========================================================================== */
.bc-portfolio-container .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.bc-portfolio-container .chip {
  position: relative;
  display: inline-flex;
}

.bc-portfolio-container .chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.bc-portfolio-container .chip label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--bc-p-line);
  color: var(--bc-p-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.bc-portfolio-container .chip label:hover {
  background: var(--bc-p-soft);
  color: var(--bc-p-ink);
  border-color: var(--bc-p-line-strong);
}

.bc-portfolio-container .chip input[type="radio"]:checked + label {
  background: var(--bc-p-ink);
  color: #ffffff;
  border-color: var(--bc-p-ink);
  box-shadow: 0 2px 8px rgba(18, 20, 23, 0.16);
}

/* ==========================================================================
   Grid Layouts: 2/3-Column Portfolio Grid & 3-Column Bento Grid
   ========================================================================== */
.bc-portfolio-container .pgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(36px, 3.4vw, 52px) clamp(20px, 2.4vw, 32px);
}

.bc-portfolio-container .pgrid.one {
  grid-template-columns: minmax(0, 1fr);
  max-width: 880px;
}

@media (min-width: 1800px) {
  .bc-portfolio-container .pgrid:not(.one) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.bc-portfolio-container .bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(30px, 3vw, 44px) clamp(18px, 2vw, 28px);
}

.bc-portfolio-container .bento .pcard.lead {
  grid-column: span 2;
  grid-row: span 2;
}

.bc-portfolio-container .bento .pcard.lead .browser {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bc-portfolio-container .bento .pcard.lead .scr {
  position: relative;
  flex: 1;
  aspect-ratio: auto;
  min-height: 300px;
}

.bc-portfolio-container .bento .pcard.lead .scr picture {
  position: absolute;
  inset: 0;
}

.bc-portfolio-container .bento .pcard.lead h3 {
  font-size: clamp(24px, 2.2vw, 32px);
}

@media (max-width: 1100px) {
  .bc-portfolio-container .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bc-portfolio-container .bento .pcard.lead {
    grid-row: auto;
  }
  .bc-portfolio-container .bento .pcard.lead .scr {
    flex: none;
    aspect-ratio: 16/10;
    min-height: 0;
  }
  .bc-portfolio-container .bento .pcard.lead .scr picture {
    position: static;
  }
}

@media (max-width: 760px) {
  .bc-portfolio-container .pgrid,
  .bc-portfolio-container .bento {
    grid-template-columns: minmax(0, 1fr);
  }
  .bc-portfolio-container .bento .pcard.lead {
    grid-column: auto;
  }
}

/* ==========================================================================
   Portfolio Card (.pcard)
   ========================================================================== */
.bc-portfolio-container .pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.bc-portfolio-container .pcard[hidden] {
  display: none !important;
}

.bc-portfolio-container .pcard .stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--tint, #eeebe6);
  border-radius: var(--bc-p-r-lg);
  padding: clamp(18px, 2.4vw, 34px) clamp(18px, 2.4vw, 34px) 0;
  overflow: hidden;
  isolation: isolate;
}

.bc-portfolio-container .pcard .stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(110% 70% at 50% 0%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 62%);
}

.bc-portfolio-container .pcard .browser {
  border-radius: 12px 12px 0 0;
  border-bottom: 0;
  border: 1px solid var(--bc-p-line);
  box-shadow: 0 1px 2px rgba(18, 20, 23, 0.08), 0 30px 60px -28px rgba(18, 20, 23, 0.5);
  transform: translateY(8px);
  transition: transform 0.6s var(--bc-p-ease-out), box-shadow 0.6s var(--bc-p-ease-out);
  overflow: hidden;
  background: #ffffff;
}

.bc-portfolio-container .browser .chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  background: #f4efe6;
  border-bottom: 1px solid var(--bc-p-line);
}

.bc-portfolio-container .browser .chrome i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(18, 20, 23, 0.22);
  display: block;
  flex: none;
}

.bc-portfolio-container .browser .chrome span {
  margin-left: 10px;
  font-size: 12px;
  color: var(--bc-p-muted);
  font-family: var(--bc-p-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bc-portfolio-container .pcard .scr {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f4efe6;
  position: relative;
}

.bc-portfolio-container .pcard .scr picture {
  display: block;
  height: 100%;
}

.bc-portfolio-container .pcard .scr img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 0;
  transform: none;
  transition: object-position 1.1s var(--bc-p-ease-out);
  display: block;
}

.bc-portfolio-container .pcard:hover .browser,
.bc-portfolio-container .pcard:focus-within .browser {
  transform: translateY(0);
}

/* Hover Auto-Scroll for Store Screenshot */
.bc-portfolio-container .pcard.scrolls:hover .scr img,
.bc-portfolio-container .pcard.scrolls:focus-within .scr img {
  object-position: 50% 100%;
  transition: object-position var(--dur, 7s) cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

@media (prefers-reduced-motion: reduce) {
  .bc-portfolio-container .pcard.scrolls:hover .scr img,
  .bc-portfolio-container .pcard.scrolls:focus-within .scr img {
    object-position: 50% 0;
  }
}

/* Metadata & Text */
.bc-portfolio-container .pmeta {
  padding: 18px 2px 0;
  display: grid;
  gap: 7px;
  justify-items: start;
}

.bc-portfolio-container .ptags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--bc-p-subtle);
  font-weight: 500;
  margin: 0;
}

.bc-portfolio-container .ptags span:not(:last-child)::after {
  content: "/";
  margin-left: 12px;
  opacity: 0.5;
}

.bc-portfolio-container .pcard h3 {
  font-size: clamp(20px, 1.6vw, 24px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 3px 0 0;
  font-weight: 800;
}

.bc-portfolio-container .plink {
  color: var(--bc-p-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.bc-portfolio-container .plink:hover {
  color: #305ddd;
}

.bc-portfolio-container .plink .go {
  width: 18px;
  height: 18px;
  opacity: 0.65;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.bc-portfolio-container .pcard:hover .plink .go {
  opacity: 1;
  transform: translate(2px, -2px);
}

.bc-portfolio-container .pline {
  color: var(--bc-p-muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.bc-portfolio-container .pline strong {
  color: var(--bc-p-ink);
  font-weight: 700;
}


/* ==========================================================================
   Single Portfolio Hero Photo Section (Matches Index Page Style)
   ========================================================================== */
.bc-case-hero {
  position: relative;
  min-height: clamp(300px, 36vw, 390px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  background: #151311;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(40px, 5vw, 64px) clamp(20px, 4vw, 40px);
}

.bc-case-hero > picture,
.bc-case-hero > picture img,
.bc-case-hero > .bc-hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  z-index: -2;
}

.bc-case-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(12, 11, 10, 0.94) 0%, rgba(12, 11, 10, 0.85) 45%, rgba(12, 11, 10, 0.68) 75%, rgba(12, 11, 10, 0.42) 100%),
              linear-gradient(0deg, rgba(12, 11, 10, 0.72) 0%, rgba(12, 11, 10, 0) 45%);
}

.bc-case-hero .bc-hero-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.bc-case-hero .crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 24px;
}

.bc-case-hero .crumbs a {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.bc-case-hero .crumbs a:hover {
  opacity: 1;
  text-decoration: underline;
}

.bc-case-hero .bc-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 18px;
}

.bc-case-hero .bc-hero-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.bc-case-hero .bc-hero-tags .tag-industry {
  background: rgba(48, 93, 221, 0.25);
  color: #93b5ff;
  border: 1px solid rgba(48, 93, 221, 0.4);
}

.bc-case-hero .bc-hero-tags .tag-location {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.bc-case-hero .bc-hero-tags .tag-verified {
  background: rgba(46, 160, 67, 0.15);
  color: #56d364;
  border: 1px solid rgba(46, 160, 67, 0.3);
}

.bc-case-hero h1 {
  color: #ffffff !important;
  font-size: clamp(34px, 4.5vw, 62px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.05 !important;
  margin: 0 0 20px !important;
  max-width: 22ch;
}

.bc-case-hero .bc-hero-metrics {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 4px solid #305ddd;
  border-radius: 0 12px 12px 0;
  padding: 18px 24px;
  margin-bottom: 28px;
  max-width: 780px;
}

.bc-case-hero .bc-hero-metrics p {
  color: #ffffff;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.5;
  margin: 0;
}

.bc-case-hero .bc-hero-metrics strong {
  color: #ffffff;
  font-weight: 800;
}

.bc-case-hero .bc-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.bc-case-hero .btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #305ddd !important;
  color: #ffffff !important;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(48, 93, 221, 0.35);
}

.bc-case-hero .btn-hero-primary:hover {
  background: #2348b5 !important;
  transform: translateY(-1px);
}

.bc-case-hero .btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.bc-case-hero .btn-hero-ghost:hover {
  background: #ffffff !important;
  color: #121417 !important;
  border-color: #ffffff !important;
}

.bc-case-hero .bc-hero-domain {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-family: var(--bc-p-mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}
