/* =====================================================================
   H View footer — matches the gradient header
   Save as /assets/footer.css (linked from header_html in app.php)
   ===================================================================== */

/* ---------- The H View Brief: gradient sign-up card ---------- */
.hv-brief {
  position: relative;
  z-index: 2;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 28px 48px;
  align-items: center;
  margin: clamp(48px, 6vw, 80px) 0 -72px;
  padding: clamp(28px, 3.4vw, 44px) clamp(24px, 4vw, 52px);
  border-radius: 28px;
  background: var(--grad, linear-gradient(105deg, #1E4CFF 0%, #6553D9 55%, #D81B76 100%));
  color: #fff;
  font-family: var(--hv-sans, 'Mukta', system-ui, sans-serif);
  box-shadow: 0 30px 60px -30px rgba(40, 30, 140, .55);
}

/* soft light shapes inside the card */
.hv-brief::before,
.hv-brief::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.hv-brief::before { width: 340px; height: 340px; right: -90px; top: -170px; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); }
.hv-brief::after { width: 260px; height: 260px; left: 32%; bottom: -170px; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%); }

.hv-brief-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font: 700 24px/1 var(--hv-script, 'Dancing Script', cursive);
  color: #FFE1F0;
}

.hv-brief h2 {
  margin: 0 0 8px;
  font: 600 clamp(26px, 2.8vw, 38px)/1.08 var(--hv-serif, 'Newsreader', Georgia, serif);
  letter-spacing: -.015em;
  color: #fff;
}

.hv-brief p { margin: 0; max-width: 46ch; font-size: 16.5px; line-height: 1.55; color: #EEF0FF; }

/* Email form: one clean white pill. The rules are scoped tightly and reset
   everything, so the theme's general input/button styles cannot add borders. */
.hv-brief-action { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.hv-brief .hv-brief-form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 6px 6px 6px 18px;
  box-sizing: border-box;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 18px 36px -18px rgba(10, 23, 53, .55);
  transition: box-shadow .2s;
}

.hv-brief .hv-brief-form:focus-within {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .45), 0 18px 36px -18px rgba(10, 23, 53, .55);
}

.hv-brief .hv-brief-icon { flex: none; display: grid; place-items: center; color: #6553D9; }

.hv-brief .hv-brief-form input[type="email"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 48px;
  margin: 0;
  padding: 0 8px;
  box-sizing: border-box;
  border: 0 !important;
  border-radius: 0;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #0A1735;
  font: 500 16px/48px var(--hv-sans, 'Mukta', system-ui, sans-serif);
}

.hv-brief .hv-brief-form input[type="email"]::placeholder { color: #6A7590; opacity: 1; }

/* Browser autofill would otherwise paint a yellow/blue box inside the pill */
.hv-brief .hv-brief-form input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px #fff inset !important;
  -webkit-text-fill-color: #0A1735;
}

.hv-brief .hv-brief-form button {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  height: 48px;
  margin: 0;
  padding: 0 26px;
  box-sizing: border-box;
  border: 0 !important;
  border-radius: 999px;
  background: var(--grad, linear-gradient(105deg, #1E4CFF 0%, #6553D9 55%, #D81B76 100%)) !important;
  box-shadow: none;
  color: #fff !important;
  font: 700 15.5px/48px var(--hv-sans, 'Mukta', system-ui, sans-serif);
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: filter .2s, transform .2s;
}

.hv-brief .hv-brief-form button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.hv-brief .hv-brief-form button:active { transform: none; }
.hv-brief .hv-brief-form button:focus-visible { outline: 3px solid #0A1735 !important; outline-offset: 2px; }

.hv-brief .hv-brief-note { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.45; color: #E7EAFF; }

/* ---------- Footer body ---------- */
.hv-footer {
  position: relative;
  padding-top: 128px;
  background: linear-gradient(180deg, #F5F7FC 0%, #FBF6FA 100%);
  border-top: 1px solid #E8ECF2;
  color: #0A1735;
  font-family: var(--hv-sans, 'Mukta', system-ui, sans-serif);
}

.hv-footer a { color: inherit; text-decoration: none; }
.hv-footer :focus-visible { outline: 3px solid var(--blue, #1E4CFF); outline-offset: 2px; border-radius: 6px; }

.hv-footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(4, minmax(0, .8fr)) minmax(260px, 1.4fr);
  gap: 36px 32px;
  padding-bottom: 48px;
}

.hv-footer-logo img { display: block; width: auto; height: 76px; max-width: 240px; object-fit: contain; object-position: left center; }

.hv-footer-slogan { margin: 6px 0 12px; font: 700 26px/1 var(--hv-script, 'Dancing Script', cursive); color: #173D82; }

.hv-footer-desc { margin: 0 0 12px; max-width: 34ch; font-size: 15.5px; line-height: 1.6; color: #394D69; }

.hv-footer-founders { margin: 0; max-width: 36ch; font-size: 14px; line-height: 1.55; color: #56607C; }
.hv-footer-founders a { color: var(--pink, #D81B76); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Link columns (details elements: plain columns on desktop, folding groups on phones) */
.hv-footer-col summary,
.hv-footer-latest h2 {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  font: 600 18px/1.2 var(--hv-serif, 'Newsreader', Georgia, serif);
  color: #0A1735;
  list-style: none;
  cursor: default;
}

.hv-footer-col summary::-webkit-details-marker { display: none; }
.hv-footer-col summary::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-top: 8px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue, #1E4CFF) 0 50%, var(--pink, #D81B76) 50% 100%);
}
.hv-footer-latest h2::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-top: 8px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue, #1E4CFF) 0 50%, var(--pink, #D81B76) 50% 100%);
}

.hv-footer-col ul,
.hv-footer-latest ul { margin: 0; padding: 0; list-style: none; }

.hv-footer-col li + li { margin-top: 8px; }

.hv-footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #394D69;
  transition: color .2s;
}

.hv-footer-col a:hover { color: var(--pink, #D81B76); }

.hv-footer-col a span {
  min-width: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #FDEEF6;
  color: #A3136A;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

/* Just published */
.hv-footer-latest li + li { margin-top: 12px; }

.hv-footer-latest a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.hv-footer-latest img,
.hv-footer-ph {
  display: block;
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #EEF1FF;
}

.hv-footer-ph { display: grid; place-items: center; background: var(--grad, linear-gradient(105deg, #1E4CFF, #D81B76)); color: #fff; font: 700 22px var(--hv-serif, Georgia, serif); }

.hv-footer-latest b {
  display: -webkit-box;
  overflow: hidden;
  font: 600 15px/1.25 var(--hv-serif, 'Newsreader', Georgia, serif);
  color: #0A1735;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color .2s;
}

.hv-footer-latest a:hover b { color: var(--blue, #1E4CFF); }
.hv-footer-latest small { display: block; margin-top: 3px; font-size: 12.5px; color: #6A7590; }

/* ---------- Bottom bar ---------- */
.hv-footer-bar {
  position: relative;
  background: #0A1735;
  color: #C9D2E6;
}

.hv-footer-bar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad, linear-gradient(105deg, #1E4CFF 0%, #6553D9 55%, #D81B76 100%));
}

.hv-footer-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  min-height: 64px;
  padding: 12px 72px 12px 0; /* room for the back-to-top button */
  font-size: 14px;
}

.hv-footer-bar p { margin: 0; }
.hv-footer-bar nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.hv-footer-bar nav a { color: #C9D2E6; }
.hv-footer-bar nav a:hover { color: #fff; }


/* Visually hidden labels: kept for screen readers, never shown */
.hv-brief .sr-only,
.hv-footer .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---------- One back-to-top button for the whole site ---------- */
.hv-totop {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 950;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--grad, linear-gradient(135deg, #1E4CFF, #D81B76));
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(40, 30, 140, .6);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s;
}
.hv-totop.is-on { opacity: 1; visibility: visible; transform: none; }
.hv-totop:hover { transform: translateY(-3px); }
.hv-totop:focus-visible { outline: 3px solid #0A1735; outline-offset: 3px; }

/* ---------- Laptop and tablet ---------- */
@media (max-width: 1180px) {
  .hv-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hv-footer-brand { grid-column: span 2; }
  .hv-footer-latest { grid-column: span 2; }
}

@media (max-width: 900px) {
  .hv-brief { grid-template-columns: 1fr; }
  .hv-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hv-footer-brand, .hv-footer-latest { grid-column: 1 / -1; }
}

/* ---------- Phone ---------- */
@media (max-width: 700px) {
  .hv-brief {
    margin: 40px 0 -56px;
    padding: 26px 20px 22px;
    border-radius: 22px;
    gap: 18px;
    text-align: center;
  }
  .hv-brief p { margin-inline: auto; font-size: 15.5px; }
  .hv-brief .hv-brief-form { padding-left: 14px; }
  .hv-brief .hv-brief-form button { padding: 0 18px; }
  .hv-brief .hv-brief-note { padding-left: 0; text-align: center; }

  .hv-footer { padding-top: 92px; }
  .hv-footer-grid { grid-template-columns: 1fr; gap: 0; padding-bottom: 28px; }

  .hv-footer-brand { display: flex; flex-direction: column; align-items: center; padding-bottom: 24px; text-align: center; }
  .hv-footer-logo img { height: 64px; object-position: center; }
  .hv-footer-desc, .hv-footer-founders { margin-inline: auto; }

  /* Folding link groups */
  .hv-footer-col { border-top: 1px solid #E3E7EF; }
  .hv-footer-col:last-of-type { border-bottom: 1px solid #E3E7EF; }
  .hv-footer-col summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    margin: 0;
    cursor: pointer;
  }
  .hv-footer-col summary::after {
    width: 28px;
    height: 28px;
    margin: 0;
    border-radius: 50%;
    background: #EEF1FF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E4CFF' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
    transition: transform .25s, background-color .25s;
  }
  .hv-footer-col[open] summary::after {
    transform: rotate(45deg);
    background-color: #FDEEF6;
  }
  .hv-footer-col ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 2px 0 18px; }
  .hv-footer-col li + li { margin-top: 0; }
  .hv-footer-col a { min-height: 32px; }

  .hv-footer-latest { padding-top: 24px; }

  .hv-footer-bar-inner { flex-direction: column; justify-content: center; gap: 12px; padding: 18px 56px; text-align: center; }
  .hv-footer-bar nav { justify-content: center; }

  /* Back-to-top sits above the app dock instead of on top of it */
  .hv-totop { right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); width: 44px; height: 44px; }

  /* Keep the phone app dock on screen on every page, even if another script tries to hide it */
  body > .mobile-app-nav {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    z-index: 1100 !important;
  }
}

@media (max-width: 380px) {
  .hv-brief .hv-brief-form { flex-wrap: wrap; padding: 6px; border-radius: 22px; }
  .hv-brief .hv-brief-icon { padding-left: 10px; }
  .hv-brief .hv-brief-form input[type="email"] { flex-basis: calc(100% - 40px); }
  .hv-brief .hv-brief-form button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hv-brief .hv-brief-form button, .hv-totop, .hv-footer-col summary::after { transition: none; }
}