/* ===== Base ===== */

:root {
  /* Ground, ink and grain are thebalvenie.com's own */
  --ground: #f5f3df;
  --ink: #180c04;
  --muted: #6b5f52;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ground);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

/* Laid over the whole page, text included, as on thebalvenie.com. It takes no
   pointer events, so the links underneath still work */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/images/grain.png") repeat;
  opacity: 0.25;
  pointer-events: none;
}

a {
  color: inherit;
}

/* ===== Masthead ===== */

/* The name holds the middle of whatever height is left above the footer */
.masthead {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  text-align: center;
}

/* Sized to the logo in the proportion thebalvenie.com's header uses */
.masthead__est {
  display: block;
  width: min(86px, 17vw);
  height: auto;
  /* Matched to the gap below the logo as the eye reads it: the tagline's margin plus the
     space its line-height leaves above the capitals */
  margin-bottom: clamp(31px, 7.8vw, 44px);
}

.masthead__name {
  margin: 0;
}

.masthead__logo {
  display: block;
  width: min(360px, 72vw);
  height: auto;
}

/* thebalvenie.com sets this in its own licensed grotesque; a bold system sans with
   the same tracking stands in for it */
.masthead__tagline {
  margin-top: clamp(28px, 7vw, 40px);
  margin-bottom: 0;
  font-size: clamp(0.72rem, 3.3vw, 0.95rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
  /* Letter-spacing trails the last letter too; this pulls the line back to centre */
  margin-right: -0.14em;
  text-transform: uppercase;
}

/* ===== Footer ===== */

.site-footer {
  padding: 0 20px 32px;
  color: var(--muted);
  text-align: center;
}

/* The links carry 13px of padding above and below to reach a 44px tap target,
   so the gap they read as is 13px wider than the margin below */
.channels ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 28px;
  margin: 0 0 11px;
  padding: 0;
  list-style: none;
}

.channels a {
  display: block;
  padding: 13px 0;
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.4;
  text-decoration: none;
}

.channels a:hover {
  text-decoration: underline;
}

.footer-responsibility {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 26px;
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
}

.footer-legal {
  margin: 20px 0 0;
}

.footer-legal small {
  display: block;
  margin: 2px 0;
  font-size: 0.75rem;
  line-height: 1.6;
}

.footer-legal a {
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--ink);
  text-decoration: underline;
}
