/* HandyCode design system chrome (2026-11 new design, hc-27x5):
   navbar, mobile menu, sticky install bar, footer. Loaded on EVERY page
   (EN + ES, inner pages still Bootstrap). Deliberately contains no global
   reset - only rules scoped under its own component classes so it cannot
   fight Bootstrap. Homepage extras live in home.css. */

:root {
  --hc-teal: #0a7ea4;
  --hc-teal-hover: #085f7a;
  --hc-teal-tint: #e9f4f8;
  --hc-teal-light: #6db8d4;
  --hc-charcoal: #11181c;
  --hc-ink: #0f1e24;
  --hc-ink-accent: #14262e;
  --hc-on-ink-body: #a9c2cd;
  --hc-on-ink-eyebrow: #7fb6cf;
  --hc-text-strong: #12232b;
  --hc-text-body: #56616a;
  --hc-text-muted: #5b6773; /* AA on white (5.8:1) and surface-alt (5.4:1) */
  --hc-surface: #ffffff;
  --hc-border: #e4e9ee;
  --hc-border-soft: #eceff3;
  --hc-content-max: 1200px;
  --hc-edge: max(24px, calc((100% - var(--hc-content-max)) / 2));
  --hc-shadow-lg: 0 10px 15px -3px rgba(17, 24, 28, 0.08), 0 4px 6px -4px rgba(17, 24, 28, 0.08);
  --hc-shadow-2xl: 0 25px 50px -12px rgba(17, 24, 28, 0.25);
}

/* ---------- Navbar ---------- */

.hc-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px var(--hc-edge);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--hc-border-soft);
}
.hc-nav * { margin: 0; padding: 0; }
.hc-nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.hc-nav .brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  object-fit: cover;
}
.hc-nav .brand-name { font-size: 17px; font-weight: 700; color: var(--hc-text-strong); letter-spacing: -0.2px; }
.hc-nav-links { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.hc-nav-links a { color: #3a424a; text-decoration: none; }
.hc-nav-links a:hover { color: var(--hc-teal); }
.hc-nav-cta { display: flex; align-items: center; gap: 14px; }
.hc-nav-hamburger { display: none; color: var(--hc-text-strong); font-size: 20px; padding: 4px; border: 0; background: none; cursor: pointer; }
.hc-nav-mobile { display: none; flex-direction: column; gap: 2px; padding: 4px var(--hc-edge) 18px; background: var(--hc-surface); border-bottom: 0.5px solid var(--hc-border-soft); position: sticky; top: 61px; z-index: 49; }
.hc-nav-mobile a { padding: 10px 0; font-size: 16px; color: #3a424a; text-decoration: none; }
.hc-nav-mobile .hc-btn { width: 100%; margin-top: 12px; color: #fff; }
.hc-nav-mobile.is-open { display: flex; }
@media (max-width: 880px) {
  .hc-nav-links, .hc-nav-cta .hc-btn { display: none; }
  .hc-nav-hamburger { display: block; }
}

/* Buttons (the chrome needs one; inner pages keep Bootstrap .btn) */
.hc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 40px;
  padding-inline: 18px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  background: var(--hc-teal);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.hc-btn:hover { background: var(--hc-teal-hover); color: #fff; }

/* ---------- Sticky install bar (mobile) ---------- */

.install-bar {
  display: none;
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom)); /* clear the iOS home indicator */
  z-index: 60;
  align-items: center;
  gap: 10px;
  background: rgba(17, 24, 28, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px 12px;
  transform: translateY(calc(100% + 28px + env(safe-area-inset-bottom)));
  transition: transform 0.25s ease;
  box-shadow: var(--hc-shadow-2xl);
}
.install-bar.is-visible { transform: translateY(0); }
.install-bar img { border-radius: 8px; width: 34px; height: 34px; }
.install-bar-text { flex: 1; font-size: 13px; color: #cfd8de; line-height: 1.25; min-width: 0; }
.install-bar-text strong { color: #fff; }
@media (max-width: 959px) {
  .install-bar { display: flex; }
  /* Bottom clearance so the sticky bar never sits over the footer's last
     line at full scroll (bar ~54px + 12px gap + safe area). Applied on the
     footer wrapper so it works on every page, not just the homepage. */
  .hc-footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ---------- Footer ---------- */

.hc-footer { background: var(--hc-charcoal); color: #b7bdc2; border-top: 0.5px solid #2a3238; }
.hc-footer * { box-sizing: border-box; }
.hc-footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 40px;
  padding: 56px var(--hc-edge) 40px;
}
.hc-footer-brand { max-width: 320px; display: flex; flex-direction: column; gap: 12px; }
.hc-footer-brand .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.hc-footer-brand .brand-mark { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.hc-footer-brand .brand-name { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.2px; }
.hc-footer-brand p { font-size: 13.5px; line-height: 1.6; color: #8f979e; margin: 0; }
.hc-footer-cols { display: flex; flex-wrap: wrap; gap: 56px; }
.hc-footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.hc-footer-col .h { font-size: 12px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.hc-footer-col a { color: inherit; text-decoration: none; }
.hc-footer-col a:hover { color: var(--hc-teal-light); }
.hc-footer-badges {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding: 28px var(--hc-edge) 32px;
  border-top: 0.5px solid #2a3238;
}
.hc-footer-badges-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #7d858c; }
.hc-footer-badges img { border-radius: 8px; background: #fff; }
.hc-footer-legal { padding: 0 var(--hc-edge) 32px; font-size: 12.5px; color: #7d858c; }
.hc-footer-legal a { color: #7d858c; text-decoration: underline; }
