/* Homepage field-study layout. Scoped so Cupper pages stay as they are. */

html:has(body.home) {
  font-size: 16px;
  background: #100c0b;
}

body.home {
  margin: 0;
  color: #f3ece4;
  background:
    radial-gradient(1200px 700px at 70% 0%, rgba(120, 42, 24, 0.35), transparent 60%),
    #100c0b;
  font-family: Outfit, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  line-height: 1.5;
}

body.home * + * {
  margin-top: 0;
}

body.home a {
  border-bottom: 0;
  color: inherit;
  text-decoration: none;
}

body.home img {
  max-height: none;
}

/* Cupper's dark-theme invert targets the sidebar shell. This page has none. */
body.home {
  filter: none !important;
}

.home-canvas {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 0.4rem 0 3.5rem;
}

.site-bar--inverse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: none;
  margin: 0;
  padding: 1.15rem 0.15rem 1rem;
}

.site-burger {
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.15rem;
  border: 0;
  background: transparent;
  color: #f3ece4;
  cursor: pointer;
}

.site-bar--inverse .site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1.15rem 1.5rem;
}

.site-bar--inverse .site-nav a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-bar--inverse .site-logo img {
  width: auto;
  height: 34px;
  max-width: 8.5rem;
}

.site-bar--inverse .site-nav a {
  color: #e6ddd4;
}

.site-bar--inverse .site-nav a:hover,
.site-bar--inverse .site-nav a[aria-current="page"] {
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 1.2fr);
  align-items: center;
  min-height: 0;
  border: 1px solid rgba(186, 98, 72, 0.55);
  background: #140f0d;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 3.2rem 2.4rem 3rem 2.6rem;
}

.eyebrow,
.study figcaption,
.home-foot,
.num {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c4b3a8;
}

.eyebrow {
  margin-bottom: 1.35rem;
}

.hero h1 {
  max-width: 11ch;
  margin: 0 0 1.15rem;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 5.6vw, 5.15rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.025em;
  color: #f6f1ea;
}

.lede {
  max-width: 34rem;
  margin: 0 0 1.8rem;
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.45;
  color: #ddd2c8;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.05rem;
  background: #e23b2c;
  color: #fff8f5;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cta span {
  transition: transform 0.2s ease;
}

.cta:hover {
  background: #f04a3a;
}

.cta:hover span {
  transform: translateX(4px);
}

.study {
  position: relative;
  align-self: stretch;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  min-height: 0;
  margin: 0;
  background: #140f0d;
  overflow: hidden;
}

.study img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: none !important;
  transform: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.18) 12%, rgba(0, 0, 0, 0.72) 28%, #000 48%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.18) 12%, rgba(0, 0, 0, 0.72) 28%, #000 48%);
}

.study figcaption {
  position: absolute;
  right: 1rem;
  bottom: 0.85rem;
  z-index: 2;
  display: flex;
  gap: 1.1rem;
  margin: 0;
  color: rgba(255, 236, 220, 0.78);
}

.selected {
  padding-top: 1.35rem;
}

.practices {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0.6rem 0 0;
  padding: 0;
  border: 0;
}

.practice-row {
  display: grid;
  grid-template-columns: 40% 1fr 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

.practice-lead,
.practice-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.45rem;
  min-height: 0;
  padding: 1.15rem 1.1rem;
  border: 1px solid rgba(176, 98, 74, 0.55);
  color: #f4eee8;
}

.practice-card {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.15;
}

.practice-card.has-thumb {
  padding-right: 46%;
}

.practice-card img {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
  width: auto;
  height: calc(100% - 1.4rem);
  max-width: 42%;
  max-height: none;
  object-fit: contain;
  object-position: right center;
}

.practice-card.is-cover {
  aspect-ratio: 1200 / 678;
  padding: 0.75rem 0.85rem 0.7rem;
  background: transparent;
  color: #f4eee8;
}

.practice-card.is-cover > span {
  position: static;
  color: inherit;
  white-space: normal;
  margin: 0 0 0.55rem;
}

.practice-card.is-cover img {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  height: 0;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
}

.practice-card:hover,
.practice-lead:hover .name {
  color: #fff;
}

.practices a:hover .name {
  color: #fff;
}

.practices a:hover .arrow {
  transform: translateX(4px);
}

.name {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.desc {
  color: #cbbfb4;
  font-size: 0.95rem;
  line-height: 1.4;
}

.arrow {
  justify-self: end;
  color: #e7d9ce;
  transition: transform 0.2s ease;
}

.home-foot {
  display: flex;
  gap: 1.4rem;
  margin-top: 2.4rem;
  padding: 0 0.15rem;
}

.home-foot a:hover,
.home-nav a:focus-visible,
.home-brand:focus-visible,
.cta:focus-visible,
.practices a:focus-visible {
  outline: 2px solid #e7d3c4;
  outline-offset: 4px;
}

@media (max-width: 860px) {
  .home-canvas {
    width: min(100% - 1.5rem, 1120px);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    padding: 2rem 1.35rem 1.6rem;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  .study {
    min-height: 0;
    aspect-ratio: 3 / 2;
  }

  .study img {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 10%, #000 34%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 10%, #000 34%);
  }

  .practice-row {
    grid-template-columns: 1fr 1fr;
  }

  .practice-lead {
    grid-column: 1 / -1;
    min-height: 8.5rem;
  }

  .practice-card {
    aspect-ratio: 1;
  }
}

@media (max-width: 800px) {
  .site-bar--inverse {
    justify-content: flex-start;
    gap: 0.65rem;
  }

  .site-burger {
    display: inline-flex;
  }

  .site-bar--inverse .site-nav {
    display: none;
    position: fixed;
    top: 3.4rem;
    left: 0;
    z-index: 40;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.15rem;
    width: min(16rem, 84vw);
    height: calc(100vh - 3.4rem);
    margin: 0;
    padding: 4.25rem 1.25rem 1.5rem;
    background: #120e0c;
    border-right: 1px solid rgba(186, 98, 72, 0.55);
  }

  .site-bar--inverse .site-nav.is-open {
    display: flex;
  }

  .site-bar--inverse .site-nav a {
    font-size: 0.95rem;
    padding: 0.7rem 0;
  }

  .study figcaption {
    left: 0.8rem;
    right: 0.8rem;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
  }
}
