/* ================================================
   KAFFE CASE STUDY — Custom components
   Matches Omaze + Southwest + Samsung + Bud Light + Olay template
   ================================================ */

/* ========== Accent color — Kaffe green ========== */
.kaffe-page{
  --kf-accent:#4caf50;
  --kf-accent-dim:rgba(76,175,80,.6);
}
html.light .kaffe-page{
  --kf-accent:#388e3c;
  --kf-accent-dim:rgba(56,142,60,.6);
}

/* ========== Hero overrides ========== */
.kaffe-page .proj-hero{
  padding-top:120px;
}
.kaffe-page .proj-hero-inner{
  margin-bottom:24px;
}
.kaffe-page .proj-title{
  font-size:clamp(28px,4vw,44px);
}
.kf-tagline{
  font-size:clamp(15px,1.6vw,20px) !important;
  max-width:640px;
}

/* Tighter spacing from hero to content */
.kaffe-page .proj-content{
  padding-top:48px;
}

/* ========== Hero image ========== */
.kf-hero-img{
  max-width:730px;
  margin:0 auto;
  padding:0 var(--gutter);
}
.kf-hero-img img{
  border-radius:16px;
  width:100%;
  height:auto;
  object-fit:contain;
  aspect-ratio:auto !important;
}

/* ========== Section titles — bold, white, uppercase ========== */
.kaffe-page .proj-section-title{
  font-size:clamp(16px,1.6vw,20px);
  font-weight:700;
  color:#fff;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-family:var(--font);
  margin-bottom:24px;
}
html.light .kaffe-page .proj-section-title{color:#111}

/* ========== Subsection titles ========== */
.kf-subsection-title{
  font-size:clamp(15px,1.4vw,18px);
  font-weight:600;
  color:rgba(255,255,255,.9);
  margin-bottom:16px;
  font-family:var(--font);
}
html.light .kf-subsection-title{color:rgba(0,0,0,.85)}

/* ========== Numbered accent ========== */
.kf-built-num{
  display:block;
  font-family:var(--font);
  font-size:32px;
  font-weight:800;
  letter-spacing:-.02em;
  color:var(--kf-accent);
  margin-bottom:16px;
  opacity:1;
}
html.light .kf-built-num{color:#111}

/* ========== Section images & videos ========== */
.kf-section-img{
  margin:0;
  border-radius:16px;
  overflow:hidden;
}
.kf-section-img img{
  width:100%;
  height:auto;
  display:block;
  border-radius:16px;
  object-fit:cover;
}
.kf-section-img video{
  width:100%;
  height:auto;
  display:block;
  border-radius:16px;
}

/* ========== Placeholder blocks ========== */
.kf-placeholder{
  width:100%;
  aspect-ratio:16/9;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border:1px dashed rgba(255,255,255,.15);
  display:flex;
  align-items:center;
  justify-content:center;
}
.kf-placeholder span{
  font-family:var(--mono);
  font-size:13px;
  color:var(--muted);
  letter-spacing:.04em;
}
html.light .kf-placeholder{
  background:rgba(0,0,0,.03);
  border-color:rgba(0,0,0,.12);
}

/* ========== Persona cards ========== */
.kf-persona-group{
  display:flex;
  flex-direction:column;
  gap:48px;
}
.kf-persona{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:32px;
  align-items:start;
}
.kf-persona-img{
  width:100%;
  aspect-ratio:1/1;
  border-radius:16px;
  overflow:hidden;
}
.kf-persona-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:16px;
}
.kf-persona-img .kf-placeholder{
  aspect-ratio:1/1;
  height:100%;
}
.kf-persona-info h4{
  font-size:18px;
  font-weight:700;
  color:#fff;
  margin-bottom:4px;
}
.kf-persona-info .kf-persona-role{
  display:block;
  font-family:var(--mono);
  font-size:12px;
  font-weight:500;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--kf-accent);
  margin-bottom:16px;
}
.kf-persona-info p{
  font-size:15px;
  color:rgba(255,255,255,.8);
  line-height:1.7;
  margin:0 0 16px;
}
.kf-persona-quote{
  font-size:15px;
  font-style:italic;
  color:rgba(255,255,255,.5);
  line-height:1.6;
  padding-left:16px;
  border-left:2px solid var(--kf-accent);
}
html.light .kf-persona-info h4{color:#111}
html.light .kf-persona-info p{color:rgba(0,0,0,.7)}
html.light .kf-persona-quote{color:rgba(0,0,0,.45)}

/* ========== Flow cards (Two flows, one system) ========== */
.kf-flow-group{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}
.kf-flow-card{
  padding:28px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 8px 32px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.05);
}
.kf-flow-card h4{
  font-size:16px;
  font-weight:700;
  color:#fff;
  margin-bottom:12px;
}
.kf-flow-sequence{
  font-family:var(--mono);
  font-size:13px;
  color:rgba(255,255,255,.6);
  line-height:1.8;
  margin:0;
  letter-spacing:.02em;
}
html.light .kf-flow-card{
  background:rgba(255,255,255,.5);
  border-color:rgba(0,0,0,.06);
  box-shadow:0 8px 32px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.8);
}
html.light .kf-flow-card h4{color:#111}
html.light .kf-flow-sequence{color:rgba(0,0,0,.5)}

/* ========== Decision media — 80% width on desktop for phone-sized videos ========== */
@media(min-width:811px){
  .kf-decision-media{
    max-width:80%;
    margin-left:auto;
    margin-right:auto;
  }
  /* Duo keeps full width so side-by-side items stay large */
  .kf-decision-duo{
    max-width:100%;
  }
  .kf-decision-duo .kf-decision-media{
    max-width:100%;
  }
}

/* ========== Key Design Decisions — text + media blocks ========== */
.kf-decision{
  display:flex;
  flex-direction:column;
  gap:24px;
}
.kf-decision-text h4{
  font-size:16px;
  font-weight:700;
  color:#fff;
  margin-bottom:8px;
}
.kf-decision-text p{
  font-size:15px;
  color:rgba(255,255,255,.8);
  line-height:1.7;
  margin:0;
}
html.light .kf-decision-text h4{color:#111}
html.light .kf-decision-text p{color:rgba(0,0,0,.7)}

.kf-decision-media{
  margin:0;
  border-radius:16px;
  overflow:hidden;
}
.kf-decision-media img,
.kf-decision-media video{
  width:100%;
  height:auto;
  display:block;
  border-radius:16px;
}

/* Decision duo — side by side media */
.kf-decision-duo{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}
.kf-duo-item{
  margin:0;
  border-radius:16px;
  overflow:hidden;
}
.kf-duo-item img,
.kf-duo-item video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:16px;
}

/* ========== Lo-fi / Hi-fi comparison — side by side ========== */
.kf-comparison{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}
.kf-comparison-item{
  margin:0;
  border-radius:16px;
  overflow:hidden;
}
.kf-comparison-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:16px;
}

/* ========== What Shipped — stylized achievement section ========== */
.kf-shipped{
  padding:40px;
  border-radius:20px;
  background:rgba(255,255,255,.03);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 12px 48px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.06);
}
.kf-shipped-header{
  margin-bottom:32px;
  padding-bottom:20px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.kf-shipped-header .proj-section-title{
  margin-bottom:0;
}
.kf-shipped-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}
.kf-shipped-item{
  padding:24px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  transition:border-color .2s ease;
}
.kf-shipped-item:hover{
  border-color:var(--kf-accent-dim);
}
.kf-shipped-item--wide{
  grid-column:1 / -1;
}
.kf-shipped-stat{
  display:block;
  font-family:var(--font);
  font-size:36px;
  font-weight:800;
  letter-spacing:-.03em;
  color:var(--kf-accent);
  margin-bottom:8px;
  line-height:1;
}
.kf-shipped-item p{
  font-size:14px;
  color:rgba(255,255,255,.7);
  line-height:1.6;
  margin:0;
}
html.light .kf-shipped{
  background:rgba(255,255,255,.5);
  border-color:rgba(0,0,0,.06);
  box-shadow:0 12px 48px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.8);
}
html.light .kf-shipped-header{
  border-bottom-color:rgba(0,0,0,.08);
}
html.light .kf-shipped-item{
  background:rgba(255,255,255,.4);
  border-color:rgba(0,0,0,.06);
}
html.light .kf-shipped-item:hover{
  border-color:var(--kf-accent-dim);
}
html.light .kf-shipped-stat{color:#111}
html.light .kf-shipped-item p{color:rgba(0,0,0,.6)}

/* ========== Lightbox ========== */
.kf-lightbox-trigger{
  cursor:zoom-in;
}
.kf-lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(0,0,0,.92);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px;
  cursor:zoom-out;
  opacity:0;
  transition:opacity .3s ease;
}
.kf-lightbox.is-active{opacity:1}
.kf-lightbox img{
  max-width:100%;
  max-height:100%;
  border-radius:12px;
  object-fit:contain;
}
.kf-lightbox-close{
  position:absolute;
  top:24px;right:24px;
  width:40px;height:40px;
  border:none;
  background:rgba(255,255,255,.1);
  border-radius:50%;
  color:#fff;
  font-size:20px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .2s ease;
}
.kf-lightbox-close:hover{background:rgba(255,255,255,.2)}

/* ========== Click-to-play video ========== */
.kf-video-player{
  position:relative;
  cursor:pointer;
}
.kf-video-player video{
  width:100%;
  height:auto;
  display:block;
  border-radius:16px;
}
.kf-play-btn{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.15);
  border:none;padding:0;
  cursor:pointer;
  z-index:2;
  border-radius:16px;
  transition:opacity .3s ease, background .3s ease;
}
.kf-play-btn:hover{
  background:rgba(0,0,0,.25);
}
.kf-play-btn svg{
  transition:transform .3s ease;
  flex-shrink:0;
}
.kf-play-btn:hover svg{transform:scale(1.1)}
.kf-video-player.is-playing .kf-play-btn{
  opacity:0;
  pointer-events:none;
}

/* ========== Title break — hidden on desktop, shown on mobile ========== */
.kf-title-break{display:none}

/* ========== Responsive ========== */
@media(max-width:810px){
  .kf-hero-img{max-width:100%}
  .kf-title-break{display:block}
  .kf-persona{
    grid-template-columns:120px 1fr;
    gap:20px;
  }
  .kf-flow-group{grid-template-columns:1fr}
  .kf-decision-duo{grid-template-columns:1fr}
  .kf-shipped{padding:28px}
  .kf-shipped-grid{grid-template-columns:1fr}
  .kf-shipped-item--wide{grid-column:auto}
  .kf-comparison{grid-template-columns:1fr}
}
@media(max-width:480px){
  .kf-play-btn svg{width:48px;height:48px}
  .kf-persona{
    grid-template-columns:1fr;
    gap:16px;
  }
  .kf-persona-img{
    max-width:140px;
  }
  .kf-flow-group{grid-template-columns:1fr}
  .kf-decision-duo{grid-template-columns:1fr}
  .kf-shipped{padding:20px}
  .kf-shipped-grid{gap:16px}
  .kf-shipped-stat{font-size:28px}
}
