/* Kin Hospitality — case studies. Loaded after styles.css */

/* Home: three case study cards */
.work-grid.cases-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cases-3 .case, .cases-3 .case + .case { padding: 40px 32px 36px; display: flex; flex-direction: column; }
.cases-3 .case:first-child { padding-left: 0; }
.cases-3 .case:last-child { padding-right: 0; }
.cases-3 .case h3 { font-size: clamp(30px, 2.6vw, 38px); }
.case .when { font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--sage); margin: -4px 0 14px; }
.cases-3 .case .scope { margin-bottom: 28px; }
.case .text-link { color: var(--chalk); margin-top: auto; align-self: flex-start; }
.case .text-link:hover { color: var(--sage); }

/* Case study hero */
.cs-hero { background: var(--pine); color: var(--chalk); padding-top: clamp(36px, 5vw, 72px); padding-bottom: clamp(56px, 8vw, 104px); }
.cs-back { display: inline-block; color: var(--sage); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: .06em; margin-bottom: clamp(28px, 4vw, 52px); }
.cs-back::before { content: "\2190\00a0"; }
.cs-back:hover { color: var(--chalk); }
.cs-hero .kicker { color: var(--sage); }
.cs-hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(48px, 7.4vw, 108px); line-height: .98; letter-spacing: -0.01em; margin-bottom: 26px; max-width: 14ch; }
.cs-hero .lead { color: rgba(245,244,239,.84); max-width: 66ch; }
.cs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(36px, 5vw, 64px) 0 0; border-top: 1px solid rgba(245,244,239,.28); }
.cs-facts > div { padding: 20px 24px 0 0; min-width: 0; }
.cs-facts > div + div { padding-left: 24px; border-left: 1px solid rgba(245,244,239,.18); }
.cs-facts dt { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--sage); margin-bottom: 8px; }
.cs-facts dd { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.45; }

/* Brief */
.cs-brief { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.cs-brief > * { min-width: 0; }
.cs-brief h2 { margin: 0; }
.cs-brief .lead { color: var(--ink); margin-bottom: 18px; }
.cs-brief p { color: var(--ink-soft); max-width: 64ch; }

/* What we did */
.cs-work { background: var(--chalk-2); }
.pillar-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-grid .pillar p { margin-bottom: 18px; }
.cs-grid .pillar ul { margin-top: 0; }

/* Timeline */
.cs-timeline { border-top: 1px solid var(--line); }
.cs-timeline .when { display: block; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }

/* Results */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--line); border: 2px solid var(--line); }
.stat { background: var(--chalk); padding: 32px 28px 30px; min-width: 0; }
.stat-num { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 5vw, 68px); line-height: 1; color: var(--green); margin-bottom: 14px; }
.stat p { margin: 0; color: var(--ink-soft); font-size: 15px; max-width: 34ch; }
.cs-note { margin-top: 24px; color: var(--ink-soft); font-size: 15px; max-width: 70ch; }
.cs-source { margin-top: 10px; font-size: 12px; letter-spacing: .04em; color: var(--ink-soft); }

/* More case studies */
.cs-next { border-top: 1px solid var(--line); }
.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.next-grid > * { min-width: 0; }
.next-card { display: flex; flex-direction: column; gap: 8px; padding: 30px; border: 1.5px solid var(--ink); text-decoration: none; color: var(--ink); transition: background .2s, color .2s; }
.next-card:hover { background: var(--ink); color: var(--chalk); }
.next-card .place { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
.next-card:hover .place { color: var(--sage); }
.next-name { font-family: var(--serif); font-size: clamp(28px, 2.6vw, 36px); font-weight: 500; line-height: 1.1; }
.next-card .text-link { align-self: flex-start; margin-top: 10px; color: inherit; }

/* Call to action */
.cs-cta { background: var(--pine); color: var(--chalk); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; }
.cs-cta .kicker { color: var(--sage); }
.cs-cta h2 { margin-bottom: 14px; }
.cs-cta .lead { color: rgba(245,244,239,.8); margin: 0; }
.cs-cta .btn-primary { background: var(--chalk); color: var(--pine); border-color: var(--chalk); }
.cs-cta .btn-primary:hover { background: var(--sage); border-color: var(--sage); color: var(--pine); }

/* Responsive */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .work-grid.cases-3 { grid-template-columns: minmax(0, 1fr); }
  .cases-3 .case, .cases-3 .case + .case, .cases-3 .case:first-child, .cases-3 .case:last-child { padding: 32px 0; }
  .cs-facts { grid-template-columns: 1fr 1fr; }
  .cs-facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .cs-facts > div { padding-bottom: 20px; }
  .pillar-grid.three { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .cs-brief { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .cs-facts { grid-template-columns: minmax(0, 1fr); }
  .cs-facts > div, .cs-facts > div + div { padding: 16px 0; border-left: 0; }
  .cs-facts > div + div { border-top: 1px solid rgba(245,244,239,.18); }
  .stats, .next-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-cta .btn { width: 100%; }
}

/* Photography */
/* Home: case card photos */
.case-media { margin: 0 0 26px; overflow: hidden; background: rgba(245,244,239,.08); }
.case-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s ease; }
.case:hover .case-media img { transform: scale(1.03); }

/* Case study: lead photo, straddling the hero */
.cs-hero:has(+ .cs-photo) { padding-bottom: clamp(40px, 5vw, 72px); }
.cs-photo { margin: 0; padding: 0 var(--gutter); background: linear-gradient(to bottom, var(--pine) 0, var(--pine) 40%, var(--chalk) 40%, var(--chalk) 100%); }
.cs-photo img { width: 100%; height: clamp(280px, 50vw, 720px); object-fit: cover; }

/* Case study: gallery */
.cs-gallery { padding-bottom: 0; }
.cs-gallery .section-head { margin-bottom: clamp(24px, 3vw, 36px); }
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.gallery figure { margin: 0; min-width: 0; overflow: hidden; background: var(--chalk-2); height: clamp(220px, 30vw, 440px); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .g-12 { grid-column: span 12; height: clamp(240px, 40vw, 600px); }
.gallery .g-7 { grid-column: span 7; }
.gallery .g-5 { grid-column: span 5; }
.gallery .g-3 { grid-column: span 3; height: auto; aspect-ratio: 3 / 4; }

/* More case studies: card photos */
.next-media { display: block; margin: -30px -30px 14px; overflow: hidden; }
.next-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s ease; }
.next-card:hover .next-media img { transform: scale(1.03); }

@media (max-width: 700px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gallery .g-12, .gallery .g-7, .gallery .g-5 { grid-column: 1 / -1; height: clamp(220px, 62vw, 380px); }
  .gallery .g-3 { grid-column: span 1; }
  .cs-photo img { height: clamp(240px, 70vw, 420px); }
}
@media (prefers-reduced-motion: reduce) {
  .case-media img, .next-media img { transition: none; }
  .case:hover .case-media img, .next-card:hover .next-media img { transform: none; }
}

/* Equal card photo heights (home case cards have uneven side padding) */
.cases-3 .case-media img { aspect-ratio: auto; height: clamp(200px, 18vw, 300px); }
@media (max-width: 960px) {
  .cases-3 .case-media img { height: auto; aspect-ratio: 16 / 10; }
}

/* Five case study cards on the home page: three, then two */
.work-grid.cases-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cases-5 .case, .cases-5 .case + .case { grid-column: span 2; padding: 40px 32px 36px; }
.cases-5 .case:nth-child(n+4) { grid-column: span 3; }
.cases-5 .case:nth-child(1), .cases-5 .case:nth-child(4) { padding-left: 0; }
.cases-5 .case:nth-child(3), .cases-5 .case:nth-child(5) { padding-right: 0; }
@media (max-width: 960px) {
  .work-grid.cases-5 { grid-template-columns: minmax(0, 1fr); }
  .cases-5 .case:nth-child(n) { grid-column: auto; padding: 32px 0; }
}

/* Align case cards: photo, place, name, date, description, tags and link line up across each row */
@supports (grid-template-rows: subgrid) {
  .work-grid.cases-5 .case { display: grid; grid-template-rows: subgrid; grid-row: span 7; row-gap: 0; }
  .work-grid.cases-5 .case .scope { align-self: start; align-content: flex-start; }
  .work-grid.cases-5 .case .text-link { align-self: end; justify-self: start; }
}
/* Four ways to work */
.engage-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.engage-grid.four .engage { padding: 30px 24px; }
.engage-grid.four .engage h3 { font-size: 23px; }
@media (max-width: 1180px) { .engage-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .engage-grid.four { grid-template-columns: minmax(0, 1fr); } }

/* The team behind Kin */
.team { background: var(--chalk-2); }
.team-intro { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: start; margin-bottom: clamp(36px, 5vw, 56px); }
.team-intro > * { min-width: 0; }
.team-intro h2 { margin: 0; }
.team-intro .lead { color: var(--ink); }
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.team-grid article { padding: 28px 28px 8px 0; min-width: 0; }
.team-grid article + article { padding-left: 28px; border-left: 1px solid var(--line); }
.team-grid .num { font-family: var(--serif); font-size: 36px; color: var(--green); line-height: 1; display: block; margin-bottom: 16px; }
.team-grid h3 { font-size: 19px; }
.team-grid p { color: var(--ink-soft); font-size: 15px; }
.team .belief { margin: clamp(36px, 5vw, 56px) 0 0; font-family: var(--serif); font-size: clamp(26px, 2.6vw, 36px); line-height: 1.2; color: var(--ink); padding-left: 28px; border-left: 2px solid var(--green); max-width: 34ch; }
.team-join { margin: 28px 0 0; color: var(--ink-soft); font-size: 15px; }
.team-join .text-link { margin-left: 8px; }
@media (max-width: 1080px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-grid article:nth-child(3) { padding-left: 0; border-left: 0; }
  .team-grid article { padding-bottom: 24px; }
}
@media (max-width: 900px) { .team-intro { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .team-grid article, .team-grid article + article { padding: 22px 0; border-left: 0; }
  .team-grid article + article { border-top: 1px solid var(--line); }
}
