/* =====================================================================
   H View footer — matches the gradient header
   Save as /assets/footer.css (linked from header_html in app.php as footer.css?v=20261017-footer4)
   ===================================================================== */

/* ---------- 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; }

/* Brand column + four link columns, all starting on the same top line */
.hv-footer .hv-footer-grid {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 40px 36px;
  padding-bottom: 52px;
}

/* ---------- Brand column ---------- */
.hv-footer-brand { min-width: 0; }
.hv-footer-logo { display: inline-block; line-height: 0; }
.hv-footer-logo img { display: block; width: auto; height: 64px; max-width: 220px; object-fit: contain; object-position: left center; }
.hv-footer .hv-footer-slogan { margin: 10px 0 12px; font: 700 26px/1.1 var(--hv-script, 'Dancing Script', cursive); color: #173D82; }
.hv-footer .hv-footer-desc { margin: 0 0 12px; max-width: 34ch; font-size: 15.5px; line-height: 1.6; color: #394D69; }
.hv-footer .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; }

/* Social icons: same size, same shape, brand glyphs */
.hv-footer .hv-footer-social { display: flex; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.hv-footer .hv-footer-social li { margin: 0; padding: 0; list-style: none; }
.hv-footer .hv-footer-social a {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid #E3E7F0; border-radius: 50%;
  background: #fff; color: #0A1735;
  box-shadow: 0 6px 14px -10px rgba(10, 23, 53, .35);
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.hv-footer .hv-footer-social svg { display: block; width: 18px; height: 18px; }
.hv-footer .hv-footer-social a:hover,
.hv-footer .hv-footer-social a:focus-visible { border-color: transparent; color: #fff; background: var(--grad, linear-gradient(135deg, #1E4CFF, #D81B76)); transform: translateY(-2px); }

/* ---------- Link columns (details: plain columns on desktop, folding groups on phones) ---------- */
.hv-footer-col { min-width: 0; margin: 0; padding: 0; }
.hv-footer .hv-footer-col > summary {
  display: block;
  margin: 0 0 18px;
  padding: 6px 0 0;                 /* lines the heading up with the top of the logo */
  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: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue, #1E4CFF) 0 50%, var(--pink, #D81B76) 50% 100%);
}

/* One link per line in every column */
.hv-footer .hv-footer-col ul { display: flex; flex-direction: column; gap: 11px; margin: 0; padding: 0; list-style: none; }
.hv-footer .hv-footer-col li { display: block; margin: 0; padding: 0; list-style: none; }
.hv-footer .hv-footer-col a { display: inline-block; font-size: 15px; font-weight: 500; line-height: 1.35; color: #394D69; transition: color .2s; }
.hv-footer .hv-footer-col a:hover,
.hv-footer .hv-footer-col a:focus-visible { color: var(--pink, #D81B76); }

/* ---------- 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;
  box-sizing: border-box;
  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 .hv-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hv-footer-brand { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 40px; align-items: start; }
  .hv-footer-brand > .hv-footer-logo,
  .hv-footer-brand > .hv-footer-slogan { grid-column: 1; }
  .hv-footer-brand > .hv-footer-desc,
  .hv-footer-brand > .hv-footer-founders,
  .hv-footer-brand > .hv-footer-social { grid-column: 2; }
  .hv-footer-brand > .hv-footer-desc { grid-row: 1; margin-top: 6px; }
  .hv-footer-brand > .hv-footer-founders { grid-row: 2; }
  .hv-footer-brand > .hv-footer-social { grid-row: 3; margin-top: 16px; }
}

@media (max-width: 900px) {
  .hv-brief { grid-template-columns: 1fr; }
  .hv-footer .hv-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hv-footer-brand { display: block; }
}

/* ---------- 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 .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: 56px; object-position: center; }
  .hv-footer .hv-footer-desc, .hv-footer .hv-footer-founders { margin-inline: auto; }
  .hv-footer .hv-footer-social { justify-content: center; }

  /* Folding link groups */
  .hv-footer-col { border-top: 1px solid #E3E7EF; }
  .hv-footer-col:last-of-type { border-bottom: 1px solid #E3E7EF; }
  .hv-footer .hv-footer-col > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    margin: 0;
    padding: 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 .hv-footer-col ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 2px 0 18px; }
  .hv-footer .hv-footer-col a { display: flex; align-items: center; min-height: 32px; }

  .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;
  }
}

/* Phones: the older theme stylesheet (style.css) turns every .subscribe-form into a column below 540px,
 * which stretched the round pill into a big oval. The Brief form gets its own phone layout instead:
 * a rounded white box with the envelope and email field on one line and a full-width button below. */
@media (max-width: 540px) {
  .hv-brief .hv-brief-form { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 4px; padding: 6px; border-radius: 18px; }
  .hv-brief .hv-brief-icon { padding-left: 10px; }
  .hv-brief .hv-brief-form input[type="email"] { flex: 1 1 calc(100% - 40px); width: auto; height: 46px; padding: 0 8px; line-height: 46px; text-align: left; }
  .hv-brief .hv-brief-form button { flex: 1 1 100%; width: 100%; height: 48px; border-radius: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .hv-brief .hv-brief-form button, .hv-totop, .hv-footer-col > summary::after, .hv-footer .hv-footer-social a { transition: none; }
}