/* ============================================================
   kensargenthouse.css — scoped styles for Ken Sargent House
   ============================================================ */

.ksh-showcase {
  width: min(1400px, 96vw);
  margin: 24px auto 0;
}

/* ── Media hero (full-bleed YouTube teaser) ── */
.ksh-showcase .media-hero {
  width: 100vw;
  margin: 24px calc(50% - 50vw) 18px;
}

.ksh-showcase .media-hero .frame {
  position: relative;
  width: 100%;
  height: 72vh;
  min-height: 420px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.12);
}

.ksh-showcase .media-hero iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 0;
  outline: 0;
  transform: translate(-50%, -50%);
}

@media (min-aspect-ratio: 16 / 9) {
  .ksh-showcase .media-hero iframe { width: 100vw; height: 56.25vw; }
}
@media (max-aspect-ratio: 16 / 9) {
  .ksh-showcase .media-hero iframe { width: 177.78vh; height: 100vh; }
}

/* ── Feature blocks (image + copy, alternating) ── */
.feature {
  width: min(1400px, 96vw);
  margin: 28px auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: center;
}

.feature.alt {
  grid-template-columns: 0.95fr 1.05fr;
}

.feature.alt .media { order: 2; }
.feature.alt .copy  { order: 1; }

.feature .media {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.12);
  min-height: 360px;
}

.feature .media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature .copy { padding: 8px; }

.feature .fx-title {
  margin: 0 0 10px;
  font: 800 clamp(20px, 2.8vw, 30px) / 1.2 "Poppins", "Inter", system-ui, sans-serif;
  color: #0f172a;
}

.feature .fx-lead {
  margin: 0;
  color: #475569;
  font: 500 clamp(14px, 1.55vw, 16px) / 1.65 "Inter", system-ui, sans-serif;
}

/* Half-bleed right */
.feature .media.bleed-right {
  margin-right: calc(50% - 50vw);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
}

/* Half-bleed left */
.feature .media.bleed-left {
  margin-left: calc(50% - 50vw);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: none;
}

/* ── Full-bleed photo ── */
.full-bleed-photo {
  width: 100vw;
  margin: 28px calc(50% - 50vw);
}

.full-bleed-photo .frame {
  position: relative;
  min-height: 70vh;
  height: 100vh;
  background: #000;
  overflow: hidden;
}

.full-bleed-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Scroll-reveal for feature blocks ── */
.feature[data-reveal] .fx-title,
.feature[data-reveal] .fx-lead {
  opacity: 0;
  transform: translateY(10px);
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.feature[data-reveal].is-in .fx-title,
.feature[data-reveal].is-in .fx-lead {
  opacity: 1;
  transform: none;
}

.feature[data-reveal].is-in .fx-lead { transition-delay: 0.08s; }

/* ── Responsive: stack on mobile ── */
@media (max-width: 900px) {
  .feature,
  .feature.alt {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature .media,
  .feature .media.bleed-right,
  .feature .media.bleed-left {
    margin: 0;
    min-height: 260px;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.12);
  }

  .feature .media { order: -1; }

  .ksh-showcase .media-hero .frame {
    height: 56vh;
    min-height: 300px;
  }

  .full-bleed-photo .frame {
    min-height: 50vh;
    height: 70vh;
  }
}

/* ── Donate button ── */
.ksh-donate-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 0 40px;
}

.btn-unique-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 26px;
  border-radius: 9999px;
  background: #ff7a1a;
  border: 1px solid #ff7a1a;
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 122, 26, 0.28);
  text-decoration: none;
  font: 600 15px / 1 "Inter", system-ui, sans-serif;
}

.btn-unique-donate:hover { filter: brightness(0.96); }
.btn-unique-donate:focus-visible {
  outline: none;
  box-shadow: 0 0 0 6px rgba(255, 122, 26, 0.28);
}

/* ── Naming table: badges + taken rows ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 9999px;
  font: 600 12px / 1 "Inter", system-ui;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #334155;
}

.badge-named {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.naming-table tbody tr[data-pano] { cursor: pointer; }
.naming-table tbody tr.active     { background: #eef2ff; }
tr.taken .avail { color: #ef4444; font-weight: 700; }

/* ── Survey panel ── */
#survey-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#survey-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

#survey-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(600px, 90vw);
  height: 100%;
  background: #fff;
  color: #1b0825;
  z-index: 1001;
  transition: right 0.4s ease;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
  padding: 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

#survey-panel.open { right: 0; }

#survey-close {
  background: none;
  border: 0;
  font-size: 28px;
  align-self: flex-end;
  cursor: pointer;
}

.survey-section { margin-top: 14px; }

.survey-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 600px) {
  .survey-grid { grid-template-columns: repeat(2, 1fr); }
}

.survey-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9f9f9;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  cursor: pointer;
  font-size: 0.92rem;
}

.survey-progress {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding: 10px 0;
  border-bottom: 2px solid #eee;
  margin: 12px 0;
}

.survey-progress .t {
  font-size: 0.8rem;
  text-align: center;
  color: #555;
  margin-bottom: 4px;
}

.survey-progress .bar {
  height: 8px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
}

.survey-progress .bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fff, #fa9828);
  transition: width 0.3s ease;
}

.survey-input,
.survey-textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.survey-textarea {
  min-height: 90px;
  resize: vertical;
}

.survey-consent {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #ddd;
}

.survey-submit {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  background: #000;
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .feature[data-reveal] .fx-title,
  .feature[data-reveal] .fx-lead {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
