/* Hallmark · component: footer + newsletter form · genre: modern-minimal · theme: existing ViriHub dark · macrostructure: Ft7 newsletter-first triptych utility
 * states: default · hover · focus · active · disabled · loading · error · success
 * contrast: pass (40–41) · honest: pass (46) · chrome: pass (47) · tokens: pass (48)
 * responsive: pass (34, 49–57) · slop: pass (1–58 applicable gates)
 */
/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */

footer.vh-footer-enhanced .vh-footer-shell {
  display: grid !important;
  grid-template-columns: minmax(17rem, 0.72fr) minmax(22rem, 1fr) minmax(31rem, 1.3fr);
  grid-template-areas:
    "about newsletter nav"
    "bottom bottom bottom";
  column-gap: clamp(2rem, 3.5vw, 4.5rem);
  row-gap: clamp(2rem, 3vw, 3rem);
  align-items: start;
  padding-block: clamp(2.5rem, 4vw, 4rem) 1.75rem !important;
}

footer.vh-footer-enhanced .vh-footer-top {
  display: contents !important;
}

footer.vh-footer-enhanced .vh-footer-about {
  grid-area: about;
  max-width: 38rem !important;
  margin: 0 !important;
  padding-top: 0;
}

footer.vh-footer-enhanced .vh-footer-about p {
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.7;
  text-wrap: pretty;
}

footer.vh-footer-enhanced .vh-footer-nav {
  grid-area: nav;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  align-self: start;
  gap: clamp(1.5rem, 2.5vw, 3rem) !important;
}

footer.vh-footer-enhanced .vh-footer-nav h3 {
  margin-bottom: 0.75rem !important;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}

footer.vh-footer-enhanced .vh-footer-nav a {
  font-size: 1rem;
  line-height: 1.45;
  white-space: nowrap;
}

footer.vh-footer-enhanced .vh-footer-bottom {
  grid-area: bottom;
  padding-top: 0 !important;
  border-top: 0 !important;
}

footer.vh-footer-enhanced .vh-footer-bottom-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem) !important;
  align-items: center !important;
}

footer.vh-footer-enhanced .vh-footer-logo {
  justify-self: start;
}

footer.vh-footer-enhanced .vh-footer-social {
  justify-self: center;
}

footer.vh-footer-enhanced .vh-footer-legal {
  justify-self: end;
  text-align: right;
}

.vh-newsletter {
  --vh-news-paper: var(--background, oklch(12% 0.014 190));
  --vh-news-panel: var(--card, oklch(16% 0.018 190));
  --vh-news-ink: var(--foreground, oklch(95% 0.012 180));
  --vh-news-muted: var(--muted-foreground, oklch(70% 0.022 180));
  --vh-news-rule: var(--border, oklch(28% 0.025 185));
  --vh-news-accent: var(--primary, oklch(70% 0.15 170));
  --vh-news-accent-ink: oklch(12% 0.025 175);
  --vh-news-error: oklch(66% 0.2 28);
  --vh-news-success: oklch(72% 0.15 160);
  --vh-news-focus: oklch(82% 0.15 175);
  --vh-news-space-xs: 0.25rem;
  --vh-news-space-sm: 0.5rem;
  --vh-news-space-md: 1rem;
  --vh-news-space-lg: 1.5rem;
  --vh-news-space-xl: 2rem;
  --vh-news-radius-sm: 0.375rem;
  --vh-news-radius-md: 0.625rem;
  --vh-news-dur-fast: 140ms;
  --vh-news-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  grid-area: newsletter;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--vh-news-space-sm);
  align-items: start;
  margin-block: 0;
  padding-block: 0;
  border: 0;
  color: var(--vh-news-ink);
}

.vh-newsletter-copy,
.vh-newsletter-form,
.vh-newsletter-fields,
.vh-newsletter-fields label {
  min-width: 0;
}

.vh-newsletter-copy h2 {
  margin: 0;
  color: var(--vh-news-ink);
  font-size: clamp(1.125rem, 1.35vw, 1.3rem);
  font-style: normal;
  font-weight: 650;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.vh-newsletter-copy p {
  max-width: 34rem;
  margin: var(--vh-news-space-sm) 0 0;
  color: var(--vh-news-muted);
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.vh-newsletter-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.625rem;
}

.vh-newsletter input[type="email"] {
  width: 100%;
  min-height: 3rem;
  padding: 0 var(--vh-news-space-md);
  border: 1px solid var(--vh-news-rule);
  border-radius: var(--vh-news-radius-sm);
  outline: 2px solid transparent;
  outline-offset: 2px;
  background: var(--vh-news-panel);
  color: var(--vh-news-ink);
  transition: border-color var(--vh-news-dur-fast) var(--vh-news-ease-out);
}

.vh-newsletter input[type="email"]::placeholder {
  color: var(--vh-news-muted);
}

.vh-newsletter input[type="email"]:hover {
  border-color: var(--vh-news-muted);
}

.vh-newsletter input[type="email"]:focus-visible,
.vh-newsletter input[type="checkbox"]:focus-visible,
.vh-newsletter button:focus-visible {
  outline: 2px solid var(--vh-news-focus);
  outline-offset: 2px;
}

.vh-newsletter button {
  min-width: 6.75rem;
  min-height: 3rem;
  padding: 0 var(--vh-news-space-lg);
  border: 1px solid var(--vh-news-accent);
  border-radius: var(--vh-news-radius-sm);
  background: var(--vh-news-accent);
  color: var(--vh-news-accent-ink);
  font-weight: 700;
  white-space: nowrap;
  transition: transform var(--vh-news-dur-fast) var(--vh-news-ease-out), opacity var(--vh-news-dur-fast) var(--vh-news-ease-out);
}

.vh-newsletter button:hover {
  transform: translateY(-1px);
}

.vh-newsletter button:active {
  transform: translateY(0);
}

.vh-newsletter button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.vh-newsletter-form[data-state="loading"] button {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.vh-newsletter-consent {
  display: flex;
  gap: var(--vh-news-space-sm);
  align-items: flex-start;
  margin-top: var(--vh-news-space-sm);
  color: var(--vh-news-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.vh-newsletter-consent span {
  text-wrap: pretty;
}

.vh-newsletter-consent input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  accent-color: var(--vh-news-accent);
  flex: 0 0 auto;
}

.vh-newsletter-status,
.vh-newsletter-result {
  margin: var(--vh-news-space-sm) 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.vh-newsletter-status {
  min-height: 1lh;
}

.vh-newsletter-form[data-state="error"] .vh-newsletter-status,
.vh-newsletter-result.is-invalid {
  color: var(--vh-news-error);
}

.vh-newsletter-form[data-state="success"] .vh-newsletter-status,
.vh-newsletter-result.is-confirmed,
.vh-newsletter-result.is-unsubscribed {
  color: var(--vh-news-success);
}

footer.vh-footer-enhanced .vh-footer-social-label,
footer.vh-footer-enhanced .vh-footer-legal {
  font-size: 0.875rem;
}

.vh-newsletter-result {
  grid-column: 1 / -1;
  margin: 0;
  padding: var(--vh-news-space-sm) var(--vh-news-space-md);
  border-left: 2px solid currentColor;
  background: color-mix(in oklch, currentColor 8%, transparent);
}

.vh-newsletter-honeypot,
.vh-newsletter-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;
}

@media (max-width: 1320px) {
  footer.vh-footer-enhanced .vh-footer-shell {
    grid-template-columns: minmax(18rem, 0.78fr) minmax(30rem, 1.22fr);
    grid-template-areas:
      "about nav"
      "newsletter nav"
      "bottom bottom";
    row-gap: 2rem;
  }

  footer.vh-footer-enhanced .vh-footer-nav {
    max-width: 44rem;
    justify-self: end;
  }
}

@media (max-width: 900px) {
  footer.vh-footer-enhanced .vh-footer-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "about"
      "nav"
      "newsletter"
      "bottom";
  }

  footer.vh-footer-enhanced .vh-footer-nav {
    max-width: none;
    justify-self: stretch;
  }

  .vh-newsletter {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--vh-news-space-md);
    align-items: start;
  }

  footer.vh-footer-enhanced .vh-footer-bottom-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  footer.vh-footer-enhanced .vh-footer-social {
    justify-self: end;
  }

  footer.vh-footer-enhanced .vh-footer-legal {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  footer.vh-footer-enhanced .vh-footer-shell {
    padding-block: 2.25rem 1.5rem !important;
  }

  footer.vh-footer-enhanced .vh-footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2rem 1.5rem !important;
  }

  footer.vh-footer-enhanced .vh-footer-nav a {
    font-size: 0.9375rem;
  }

  footer.vh-footer-enhanced .vh-footer-bottom-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 1.25rem !important;
  }

  footer.vh-footer-enhanced .vh-footer-social,
  footer.vh-footer-enhanced .vh-footer-legal {
    grid-column: auto;
    justify-self: start;
    text-align: left;
  }

  .vh-newsletter-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .vh-newsletter button {
    width: 100%;
  }
}

@media (max-width: 360px) {
  footer.vh-footer-enhanced .vh-footer-nav {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vh-newsletter button,
  .vh-newsletter input[type="email"] {
    transition-duration: 0ms;
  }
}
