/* ==========================================================================
   /hear-from-you — section-specific styles
   Extends the existing campaign CSS in /css/styles.css.
   ========================================================================== */

/* Body must not inherit the homepage's fixed-section overflow behavior */
body { overflow-x: hidden; }

/* Prominent nav link (matches "Tell Me Something" CTA emphasis) */
.nav-desktop .nav-prominent {
  color: var(--amber) !important;
  border: 1px solid rgba(240, 160, 20, 0.4);
  padding: 0.35rem 0.85rem;
  border-radius: 2px;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.nav-desktop .nav-prominent:hover {
  background: rgba(240, 160, 20, 0.1);
  border-color: var(--amber);
  color: var(--amber) !important;
}
.nav-drawer .drawer-prominent {
  color: var(--amber) !important;
}

/* HERO */
.hfy-hero {
  padding: 90px 22px 50px;
  background: var(--blue-navy);
  border-bottom: 1px solid rgba(240, 160, 20, 0.12);
  position: relative;
  overflow: hidden;
}
.hfy-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240, 160, 20, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 160, 20, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.hfy-hero-inner {
  max-width: 660px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hfy-headline {
  font-family: var(--fd);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.hfy-headline em {
  color: var(--amber);
  font-style: normal;
}
.hfy-headline-sub {
  font-family: var(--fd);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.1;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}
.hfy-headline-sub em {
  color: var(--amber);
  font-style: italic;
}
.hfy-sub {
  font-family: var(--fd);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(0.98rem, 1.8vw, 1.15rem);
  color: rgba(245, 240, 232, 0.78);
  line-height: 1.5;
  max-width: 540px;
  margin-bottom: 1.6rem;
}
.hfy-signature {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.hfy-sig-script {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--amber);
}
.hfy-sig-line {
  font-family: var(--fm);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: rgba(168, 168, 184, 0.55);
  text-transform: uppercase;
}

/* SHARED SECTION */
.hfy-section {
  padding: 2.6rem 22px;
  border-top: 1px solid rgba(240, 160, 20, 0.1);
}
.hfy-section-scroll { padding-bottom: 1.6rem; }
.hfy-h2 {
  font-family: var(--fd);
  font-weight: 900;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.hfy-section-desc {
  font-family: var(--fb);
  color: var(--ash);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 1.4rem;
}

/* SCROLL */
.hfy-scroll-window {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  height: 60vh;
  min-height: 360px;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(13,45,86,0.4), rgba(8,31,58,0.2));
  border: 1px solid rgba(240, 160, 20, 0.12);
  outline: none;
  scrollbar-width: thin;                            /* Firefox */
  scrollbar-color: rgba(240,160,20,0.5) rgba(8,31,58,0.4);
  -webkit-overflow-scrolling: touch;
}
.hfy-scroll-window::-webkit-scrollbar { width: 8px; }
.hfy-scroll-window::-webkit-scrollbar-track {
  background: rgba(8, 31, 58, 0.4);
  border-radius: 4px;
}
.hfy-scroll-window::-webkit-scrollbar-thumb {
  background: rgba(240, 160, 20, 0.5);
  border-radius: 4px;
}
.hfy-scroll-window::-webkit-scrollbar-thumb:hover {
  background: rgba(240, 160, 20, 0.75);
}
.hfy-scroll-window:focus-visible {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(240, 160, 20, 0.25);
}
/* Edge fades removed — cards now scroll through cleanly with no overlay. */
.hfy-scroll-window::before,
.hfy-scroll-window::after { content: none; display: none; }
.hfy-scroll-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 16px;
  will-change: transform;
}
.hfy-scroll-loading {
  color: var(--ash);
  font-family: var(--fm);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 40px;
}
.hfy-card {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, #f5f0e8, #ede5d6);
  color: var(--blue-navy);
  border: 1px solid rgba(8, 31, 58, 0.08);
  border-left: 3px solid var(--amber);
  border-radius: 3px;
  padding: 16px 18px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
/* Card width variants kick in only on wider viewports to break the grid feel */
.hfy-card.size-95,
.hfy-card.size-90,
.hfy-card.size-100 { width: 100%; align-self: stretch; }
.hfy-card::before {
  content: '\201C';
  position: absolute;
  top: -6px;
  left: 6px;
  font-family: 'Barlow Condensed', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--amber);
  opacity: 0.18;
  line-height: 1;
  pointer-events: none;
}
.hfy-card.fresh {
  background: linear-gradient(180deg, #fff8e6, #f0dca0);
  animation: hfyFreshFade 2s ease forwards;
}
@keyframes hfyFreshFade {
  to { background: linear-gradient(180deg, #f5f0e8, #ede5d6); }
}
.hfy-card-tag {
  display: block;
  font-family: var(--fm);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: rgba(8, 31, 58, 0.45);
  text-transform: uppercase;
  margin-top: 8px;
}
.hfy-scroll-foot {
  text-align: center;
  font-family: var(--fm);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--ash);
  text-transform: uppercase;
  margin-top: 12px;
}

/* Section heading column matches the inner content widths on desktop */
@media (min-width: 768px) {
  .hfy-section { max-width: 1100px; margin: 0 auto; }
  .hfy-section-form > .s-label,
  .hfy-section-form > .hfy-h2,
  .hfy-section-poll > .s-label,
  .hfy-section-poll > .hfy-h2,
  .hfy-section-poll > .hfy-section-desc { max-width: 620px; margin-left: auto; margin-right: auto; }
  .hfy-section-scroll > .s-label,
  .hfy-section-scroll > .hfy-h2,
  .hfy-section-scroll > .hfy-section-desc { max-width: 720px; margin-left: auto; margin-right: auto; }
}

/* FORM */
.hfy-form {
  max-width: 620px;
  margin: 0 auto;
  background: var(--blue-mid);
  border: 1px solid rgba(240, 160, 20, 0.15);
  border-radius: 4px;
  padding: 22px 18px;
}
@media (min-width: 600px) {
  .hfy-form { padding: 28px 26px; }
}
.hfy-form label {
  display: block;
  font-family: var(--fm);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--ash);
  text-transform: uppercase;
  margin: 1.2rem 0 0.4rem;
}
.hfy-form label:first-child { margin-top: 0; }
.hfy-form label .req {
  color: var(--amber);
  font-weight: 700;
  margin-left: 4px;
}
.hfy-form label .opt {
  color: rgba(168, 168, 184, 0.5);
  margin-left: 4px;
}
.hfy-form input[type="text"],
.hfy-form input[type="email"],
.hfy-form textarea {
  width: 100%;
  background: var(--blue-navy);
  border: 1px solid rgba(240, 160, 20, 0.18);
  color: var(--cream);
  font-family: var(--fb);
  font-size: 16px;
  padding: 0.75rem 0.9rem;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.18s;
  -webkit-appearance: none;
}
.hfy-form input:focus,
.hfy-form textarea:focus { border-color: var(--amber); }
.hfy-form input::placeholder,
.hfy-form textarea::placeholder { color: rgba(168, 168, 184, 0.45); }
.hfy-form textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}
.hfy-char-count {
  font-family: var(--fm);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--ash);
  text-align: right;
  margin-top: 4px;
}
.hfy-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.hfy-form button[type="submit"] {
  margin-top: 1.4rem;
  width: 100%;
}
.hfy-form-note {
  font-family: var(--fb);
  font-size: 0.78rem;
  color: var(--ash);
  line-height: 1.55;
  margin-top: 0.8rem;
  text-align: center;
}
.hfy-form-error {
  margin-top: 0.8rem;
  padding: 10px 14px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 3px;
  color: #fca5a5;
  font-family: var(--fm);
  font-size: 0.78rem;
  line-height: 1.5;
}
.hfy-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hfy-form-success {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  background: var(--blue-mid);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 4px;
  padding: 36px 28px;
  animation: hfySlideUp 0.4s var(--ease);
}
.hfy-form-success h3 {
  font-family: var(--fd);
  font-weight: 900;
  font-size: 1.6rem;
  text-transform: uppercase;
  color: var(--white);
  margin: 0.4rem 0 0.8rem;
  line-height: 1;
}
.hfy-form-success p { color: var(--ash); line-height: 1.6; }
@keyframes hfySlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* POLL */
.hfy-poll-form,
.hfy-poll-results {
  max-width: 620px;
  margin: 0 auto;
  background: var(--blue-mid);
  border: 1px solid rgba(240, 160, 20, 0.15);
  border-radius: 4px;
  padding: 22px 18px;
}
@media (min-width: 600px) {
  .hfy-poll-form,
  .hfy-poll-results { padding: 24px 26px; }
}
.hfy-poll-q {
  font-family: var(--fd);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 1.2rem;
  line-height: 1.3;
}
.hfy-poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.4rem;
}
.hfy-poll-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--blue-navy);
  border: 1px solid rgba(240, 160, 20, 0.12);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.95rem;
  color: var(--cream);
}
.hfy-poll-opt:hover { border-color: var(--amber); }
.hfy-poll-opt input[type="radio"] {
  margin: 0;
  accent-color: var(--amber);
  cursor: pointer;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.hfy-poll-opt:has(input:checked) {
  background: rgba(240, 160, 20, 0.08);
  border-color: var(--amber);
}

.hfy-poll-results-label {
  font-family: var(--fm);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}
.hfy-poll-bars { display: flex; flex-direction: column; gap: 12px; }
.hfy-poll-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.hfy-poll-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--fb);
  font-size: 0.88rem;
  color: var(--cream);
}
.hfy-poll-bar-count {
  font-family: var(--fm);
  font-size: 0.7rem;
  color: var(--ash);
  letter-spacing: 0.04em;
}
.hfy-poll-bar-track {
  height: 10px;
  background: var(--blue-navy);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.hfy-poll-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.hfy-poll-bar-fill.choice-strongly_approve { background: #16a34a; }
.hfy-poll-bar-fill.choice-approve { background: #4ade80; }
.hfy-poll-bar-fill.choice-neutral { background: #a8a8b8; }
.hfy-poll-bar-fill.choice-disapprove { background: #f97316; }
.hfy-poll-bar-fill.choice-strongly_disapprove { background: #dc2626; }
.hfy-poll-bar.yours .hfy-poll-bar-label {
  color: var(--amber);
}
.hfy-poll-bar.yours .hfy-poll-bar-label::after {
  content: ' · your vote';
  color: var(--amber);
  font-family: var(--fm);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hfy-poll-meta {
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--ash);
  text-transform: uppercase;
  margin-top: 1.2rem;
}

.hfy-poll-disclaimer {
  max-width: 620px;
  margin: 1.2rem auto 0;
  text-align: center;
  font-family: var(--fb);
  font-style: italic;
  font-size: 0.78rem;
  color: rgba(168, 168, 184, 0.55);
}

/* FOOTER CTA */
.hfy-section-footer-cta { text-align: center; }
.hfy-section-footer-cta .hfy-section-desc { margin-left: auto; margin-right: auto; }
.hfy-cta-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}

/* DESKTOP */
@media (min-width: 768px) {
  .hfy-hero { padding: 100px 5vw 40px; }
  .hfy-section { padding: 3.2rem 5vw; }
  .hfy-section-scroll { padding-bottom: 2rem; }
  .hfy-scroll-window { height: clamp(400px, 50vh, 520px); }
  .hfy-scroll-track { padding: 24px 20px; gap: 12px; }
  .hfy-card { padding: 16px 22px 16px 48px; font-size: 0.98rem; }
  .hfy-card::before { font-size: 2.8rem; top: -6px; left: 10px; opacity: 0.22; }
  .hfy-card.size-95 { width: 95%; align-self: center; }
  .hfy-card.size-90 { width: 90%; align-self: flex-end; }
  .hfy-card.size-100 { width: 100%; align-self: flex-start; }
  .hfy-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hfy-cta-row { flex-direction: row; max-width: none; justify-content: center; }
  .hfy-cta-row .btn { min-width: 200px; }
}

/* Reduced motion — only disable the fresh-card flash, keep the wall scrolling.
   The wall IS the content; freezing it would hide concerns from mobile users. */
@media (prefers-reduced-motion: reduce) {
  .hfy-card.fresh { animation: none; }
}

/* Optimistic just-submitted card (briefly shown before server refresh) */
.hfy-card.hfy-card-pending {
  border-left-color: #4ade80;
  background: linear-gradient(180deg, #fff8e6, #f0dca0);
  box-shadow: 0 6px 22px rgba(74, 222, 128, 0.25);
}
.hfy-card.hfy-card-pending .hfy-card-tag { color: #2a7a3a; font-weight: 700; }
