[hidden] { display: none !important; }

/* Project visuals and reusable case-study system */
.project-visual {
  position: relative;
  display: flex;
  min-height: 190px;
  margin-bottom: 28px;
  padding: 24px;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(143, 64, 46, 0.08), rgba(255, 255, 255, 0.82)),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(23, 23, 23, 0.025) 32px);
}

.project-visual::before {
  content: "";
  position: absolute;
  inset: 18px 18px auto auto;
  width: 44%;
  height: 44%;
  border: 1px solid rgba(143, 64, 46, 0.14);
  border-radius: 12px;
  box-shadow: -28px 28px 0 rgba(255, 255, 255, 0.64);
}

.project-visual > * { position: relative; z-index: 1; }
.project-visual span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-visual strong {
  max-width: 18ch;
  margin-top: 4px;
  font-family: "Manrope", sans-serif;
  font-size: 1.18rem;
  line-height: 1.2;
}
.project-visual small { margin-top: 5px; color: var(--muted); }
.project-visual-wide { min-height: 230px; }
.project-visual-compact { min-height: 158px; }
.project-visual-dark {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(217, 144, 121, 0.15), rgba(255, 255, 255, 0.025)),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(255, 255, 255, 0.025) 32px);
}
.project-visual-dark::before { border-color: rgba(255, 255, 255, 0.13); box-shadow: -28px 28px 0 rgba(255,255,255,0.035); }
.project-visual-dark small { color: #aaa49c; }

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.project-link span { transition: transform 180ms ease; }
.project-link:hover span { transform: translateX(4px); }
.project-link-light { color: #e6a58f; }

.case-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 10, 10, 0.52);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 260ms ease;
}
.case-overlay.is-open { opacity: 1; }

.case-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  width: min(820px, 92vw);
  height: 100dvh;
  background: var(--bg);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.22);
  transform: translateX(104%);
  transition: transform 360ms cubic-bezier(.22,.78,.3,1);
}
.case-drawer.is-open { transform: translateX(0); }
body.case-open { overflow: hidden; }

.case-drawer-bar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.95);
  backdrop-filter: blur(14px);
}
.case-kicker {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.case-close {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.case-close span { font-size: 1.55rem; font-weight: 400; }

.case-scroll { height: calc(100dvh - 72px); overflow-y: auto; }
.case-hero { padding: 58px 54px 42px; }
.case-hero h2 {
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 5vw, 5rem);
}
.case-summary {
  max-width: 650px;
  color: #4b4741;
  font-size: 1.16rem;
}
.case-placeholder {
  display: flex;
  min-height: 350px;
  margin-top: 38px;
  padding: 34px;
  overflow: hidden;
  position: relative;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(143, 64, 46, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 72% 25%, rgba(143, 64, 46, 0.16), transparent 14rem),
    linear-gradient(145deg, #f6f0e9, #fff);
}
.case-placeholder::before,
.case-placeholder::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(23,23,23,.09);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
}
.case-placeholder::before { width: 62%; height: 48%; right: 28px; top: 28px; }
.case-placeholder::after { width: 34%; height: 30%; right: 58px; top: 76px; }
.case-placeholder > * { position: relative; z-index: 1; }
.case-placeholder span { color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.case-placeholder strong { margin-top: 5px; font-family: "Manrope", sans-serif; font-size: 1.5rem; }
.case-placeholder small { color: var(--muted); }

.case-content { padding: 10px 54px 72px; }
.case-section {
  padding: 38px 0;
  border-top: 1px solid var(--line);
}
.case-label {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.case-section > p:last-child { max-width: 690px; color: #3f3b36; font-size: 1.08rem; }
.case-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  border-top: 1px solid var(--line);
}
.case-two-column .case-section { border-top: 0; }
.case-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-list li { padding: 6px 0; color: #3f3b36; }
.capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.capability-list span {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: .9rem;
  font-weight: 600;
}
.case-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 12px 0 44px;
}
.gallery-placeholder {
  display: flex;
  min-height: 230px;
  padding: 24px;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(140deg, rgba(143,64,46,.06), rgba(255,255,255,.9)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(23,23,23,.02) 28px);
}
.gallery-placeholder span { color: var(--accent); font-size: .72rem; font-weight: 800; }
.gallery-placeholder strong { margin-top: 4px; font-family: "Manrope", sans-serif; }
.gallery-placeholder small { color: var(--muted); }
.case-lesson {
  padding: 38px;
  border-radius: 22px;
  background: var(--dark);
  color: white;
}
.case-lesson .case-label { color: #d99079; }
.case-lesson blockquote {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .project-visual { min-height: 165px; }
  .case-drawer { width: 100vw; }
  .case-drawer-bar { padding: 0 20px; }
  .case-hero, .case-content { padding-left: 22px; padding-right: 22px; }
  .case-placeholder { min-height: 260px; padding: 24px; }
  .case-two-column, .case-gallery { grid-template-columns: 1fr; gap: 0; }
  .case-gallery { gap: 12px; }
  .gallery-placeholder { min-height: 180px; }
}

.project-image { margin: 0 0 28px; overflow: hidden; border-radius: 18px; border: 1px solid rgba(23,23,23,.12); background: #fff; }
.project-image img { display:block; width:100%; height:auto; }
.project-image-dark { border-color: rgba(255,255,255,.13); box-shadow: 0 20px 50px rgba(0,0,0,.22); }
.case-drawer { width:min(1040px,96vw); }
.case-main-visual { margin:38px 0 0; }
.case-main-visual>img { display:block; width:100%; height:auto; border-radius:24px; border:1px solid var(--line); box-shadow:0 28px 70px rgba(0,0,0,.14); }
.case-main-visual>img.case-main-image-compact { width:min(78%, 590px); margin-inline:auto; }
.case-stories { border-top:1px solid var(--line); }
.case-story { display:grid; grid-template-columns:.72fr 1.28fr; gap:38px; align-items:center; padding:58px 0; border-bottom:1px solid var(--line); }
.case-story-reverse { grid-template-columns:1.28fr .72fr; }
.case-story-reverse .case-story-copy { order:2; }
.case-story-copy h3 { font-size:clamp(1.75rem,3vw,2.6rem); margin-bottom:14px; }
.case-story-copy>p:last-child { color:#45413c; font-size:1.04rem; }
.case-story-media { position:relative; }
.case-story-media img { display:block; width:100%; border-radius:18px; border:1px solid var(--line); box-shadow:0 18px 44px rgba(0,0,0,.11); }
.case-story-media .case-story-secondary { margin-top:14px; }
@media(max-width:760px){.case-main-visual>img.case-main-image-compact{width:92%}.case-story,.case-story-reverse{grid-template-columns:1fr;gap:24px;padding:42px 0}.case-story-reverse .case-story-copy{order:0}.case-main-visual>img{border-radius:16px}.case-drawer{width:100vw}}


/* Availability Platform: intentionally compact so the project does not dominate the portfolio. */
.availability-project-image {
  max-width: 520px;
  margin: 0 0 24px;
  aspect-ratio: 16 / 8.4;
  overflow: hidden;
}
.availability-project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.case-main-image-compact.availability-case-hero {
  display: block;
  width: min(100%, 610px);
  max-height: 330px;
  margin: 32px auto 0;
  object-fit: contain;
  object-position: top center;
  border-radius: 18px;
}
@media (max-width: 700px) {
  .availability-project-image { max-width: 100%; }
  .case-main-image-compact.availability-case-hero { max-height: 250px; }
}
