/*
 * holaeliot site chrome: header, language menu, footer, comic buttons.
 * Comic devices used everywhere: ink outlines and hard offset shadows, like a printed panel.
 */
:root {
  --he-ink: #102a56;
  --he-blue: #155eef;
  --he-blue-deep: #0b3fb3;
  --he-orange: #ff8a34;
  --he-yellow: #ffd65a;
  --he-sky: #ddf3ff;
  --he-paper: #fffdf8;
  --he-line: 3px;
  --he-pop: 5px 5px 0 var(--he-ink);
  --he-pop-sm: 3px 3px 0 var(--he-ink);
  --he-dots: radial-gradient(rgba(16, 42, 86, 0.13) 1.2px, transparent 1.7px) 0 0 / 11px 11px;
}

body {
  background: var(--he-paper);
}

/* HolaEliot: the house comic font (fonts/bubbles/, SIL OFL), for the lander's big lines */
@font-face {
  font-family: "HolaEliot";
  src: url("../fonts/bubbles/HolaEliot-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "HolaEliot";
  src: url("../fonts/bubbles/HolaEliot-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* the footer stays at the bottom of the window on short pages (e.g. no comic published yet) */
body:not(.is-comic-page) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

body:not(.is-comic-page) > main {
  flex: 1 0 auto;
}

body:not(.is-comic-page) > .site-footer {
  margin-top: auto;
}

:focus-visible {
  outline: 3px solid var(--he-orange);
  outline-offset: 3px;
}

/* ---------- header ---------- */
.he-header {
  background: var(--he-paper);
  border-bottom: var(--he-line) solid var(--he-ink);
}

.he-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.he-brand img {
  width: 60px;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.he-brand:hover img {
  transform: rotate(-6deg) scale(1.05);
}

.he-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.he-nav > a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--he-ink);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
}

.he-nav > a:hover {
  background: var(--he-sky);
}

.he-lang {
  position: relative;
  margin-left: 6px;
}

.he-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 1rem var(--font-display);
  color: var(--he-ink);
  background: #fff;
  border: 2px solid var(--he-ink);
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  box-shadow: var(--he-pop-sm);
  cursor: pointer;
}

.he-lang-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.he-lang-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--he-ink);
}

.he-lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: #fff;
  border: 2px solid var(--he-ink);
  border-radius: 16px;
  box-shadow: var(--he-pop);
  z-index: 30;
}

.he-lang-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--he-ink);
  font-weight: 700;
  text-decoration: none;
}

.he-lang-list a:hover,
.he-lang-list a[aria-current="true"] {
  background: var(--he-sky);
}

.he-lang-code {
  font: 700 0.8rem var(--font-display);
  background: var(--he-ink);
  color: #fff;
  border-radius: 6px;
  padding: 2px 6px;
  min-width: 30px;
  text-align: center;
}

.he-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  color: var(--he-ink);
  cursor: pointer;
}

.he-nav-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

@media (max-width: 760px) {
  .he-nav-toggle {
    display: inline-flex;
    border: 2px solid var(--he-ink);
    box-shadow: var(--he-pop-sm);
    background: #fff;
  }
  .he-nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: #fff;
    border: 2px solid var(--he-ink);
    border-radius: 18px;
    box-shadow: var(--he-pop);
  }
  .he-nav.open {
    display: flex;
  }
  .he-header-inner {
    position: relative;
    min-height: 64px;
  }
  .he-brand img {
    width: 50px;
  }
  .he-lang {
    margin: 4px 0 0;
  }
  .he-lang-list {
    position: static;
    margin-top: 8px;
    box-shadow: none;
  }
}

/* ---------- buttons ---------- */
.he-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 1.08rem/1.1 var(--font-display);
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 999px;
  border: var(--he-line) solid var(--he-ink);
  box-shadow: var(--he-pop);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.he-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--he-ink);
}

.he-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--he-ink);
}

.he-btn-primary {
  background: var(--he-blue);
  color: #fff;
}

.he-btn-ghost {
  background: #fff;
  color: var(--he-ink);
}

.he-btn-amazon {
  background: #ffd814;
  color: #0f1111;
}

.he-btn-big {
  font-size: 1.22rem;
  padding: 16px 34px;
}

/* ---------- footer: logo, social icons, © ---------- */
.he-footer {
  margin-top: 0;
  padding: 36px 0 26px;
  background: var(--he-ink);
  color: #fff;
}

.he-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
}

.he-footer-brand img {
  display: block;
  width: 84px;
}

.he-footer .footer-social {
  justify-content: flex-end;
  margin: 0;
}

.he-footer .footer-social-link {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.he-footer-legal {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

@media (max-width: 560px) {
  .he-footer-inner {
    justify-content: center;
    text-align: center;
  }
  .he-footer .footer-social {
    justify-content: center;
  }
}

/* page titles of inner pages keep the comic outline */
.page-hero h1,
.comic-hero h1,
.cb-hero h1 {
  font-family: var(--font-display);
}

@media (prefers-reduced-motion: reduce) {
  .he-btn,
  .he-brand img {
    transition: none;
  }
}
