/*
 * worldbeercollection.com — "almost back" page.
 *
 * The old site (Dec 2013) was a fixed 980px layout. Every measurement of the
 * old layout is written in "design pixels" as calc(N * var(--u)):
 *   - viewport >= 980px: --u = 1px, so it renders exactly like the original,
 *     centred, with white space left and right (the black menu bar runs full width);
 *   - narrower: --u shrinks so the whole old layout scales to the screen width.
 * The announcement (.notice) uses real pixels so it stays readable on phones.
 */

@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/open-sans-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/open-sans-latin-italic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --u: min(1px, 100cqw / 980);
  --brown: #9e6816;
  --line: #dedede;
  --bar: #212121;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: #555;
  font: normal 13px "Open Sans", Arial, sans-serif;
  letter-spacing: 0.1px;
  word-spacing: 1px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

.site { container-type: inline-size; }

img { display: block; }

/* ------------------------------------------------------------------ header */

.main-header {
  /* white, then the 33px black menu bar along the bottom, full width */
  background: linear-gradient(to bottom, #fff calc(192 * var(--u)), var(--bar) 0);
}

.header-inner {
  position: relative;
  width: calc(980 * var(--u));
  height: calc(225 * var(--u));
  margin: 0 auto;
}

.logo { margin: 0 auto; width: calc(485 * var(--u)); }
.logo img { width: 100%; height: auto; }

.main-menu {
  position: absolute;
  left: calc(5 * var(--u));
  bottom: 0;
  display: flex;
  gap: calc(25 * var(--u));
}
.main-menu a {
  display: block;
  height: calc(27 * var(--u));
  color: #fff;
  font-size: calc(16 * var(--u));
  line-height: calc(22 * var(--u));
  text-decoration: none;
  letter-spacing: 0.1px;
}
.main-menu a:hover { color: #ddd; }
.main-menu a.active {
  background: url("/assets/img/menu-active.png") no-repeat bottom center / calc(9 * var(--u)) calc(5 * var(--u));
}

.search {
  position: absolute;
  top: calc(199 * var(--u));
  right: calc(220 * var(--u));
  width: calc(300 * var(--u));
  height: calc(20 * var(--u));
  padding-left: calc(35 * var(--u));
  border-radius: calc(20 * var(--u));
  background: #464646 url("/assets/img/search-white.png") no-repeat calc(8 * var(--u)) calc(3 * var(--u)) / calc(15 * var(--u)) calc(15 * var(--u));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .1), 0 1px 3px rgba(0, 0, 0, .2) inset;
  color: #dedede;
  font-size: calc(11 * var(--u));
  font-weight: 700;
  line-height: calc(20 * var(--u));
  text-decoration: none;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .3);
}

.login {
  position: absolute;
  top: calc(203 * var(--u));
  right: calc(5 * var(--u));
  color: #fff;
  font-size: calc(13 * var(--u));
  line-height: calc(18 * var(--u));
  text-decoration: none;
}

/* ------------------------------------------------------------------ page */

.page {
  width: calc(980 * var(--u));
  margin: 0 auto;
}

/* the three gentlemen (top2.jpg already holds the panels and headings); hazed with the rest */
.topnav {
  position: relative;
  height: calc(415 * var(--u));
  background: url("/assets/img/top2.jpg") no-repeat 0 0 / 100% 100%;
  font-size: calc(13 * var(--u));
  line-height: normal;
}
.topnav > div { position: absolute; top: calc(120 * var(--u)); }
.topnav strong { font-weight: 700; }
.blog-text { left: calc(100 * var(--u)); text-align: right; }
.collection-text { left: calc(355 * var(--u)); }
.interactive-text { left: calc(680 * var(--u)); }

.topnav > .crew {
  top: auto;
  bottom: calc(10 * var(--u));
  color: #888;
  font-size: calc(10 * var(--u));
  line-height: calc(12 * var(--u));
}
.blog-crew { left: calc(230 * var(--u)); }
.collection-crew { left: calc(340 * var(--u)); }
.interactive-crew { left: calc(690 * var(--u)); }


/* ------------------------------------------------------------------ haze */

.ghost-wrap { position: relative; }

.ghost {
  height: calc(2135 * var(--u));
  overflow: hidden;
  filter: blur(max(1.5px, 2.2 * var(--u)));
  clip-path: inset(0);
  pointer-events: none;
  user-select: none;
}

.veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, .35) 0,
    rgba(255, 255, 255, .45) calc(415 * var(--u)),
    rgba(255, 255, 255, .55) calc(915 * var(--u)),
    rgba(255, 255, 255, .85) calc(1715 * var(--u)),
    #fff 100%);
}

/* ------------------------------------------------------------------ old content (under the haze) */

.beersearch {
  position: relative;
  height: calc(36 * var(--u));
  margin-top: calc(25 * var(--u));
  border-top: 1px solid var(--line);
}
.show-btn {
  position: absolute;
  top: calc(4 * var(--u));
  right: calc(305 * var(--u));
  width: calc(60 * var(--u));
  height: calc(25 * var(--u));
  border-radius: calc(4 * var(--u));
  background: var(--brown);
  color: #fff;
  font-size: calc(12 * var(--u));
  font-weight: 700;
  line-height: calc(25 * var(--u));
  text-align: center;
}
.counter-postfix {
  position: absolute;
  top: calc(3 * var(--u));
  right: calc(60 * var(--u));
  width: calc(100 * var(--u));
  color: #3e3e3e;
  font-size: calc(12 * var(--u));
  font-weight: 700;
  line-height: calc(15 * var(--u));
}

.main-wrapper {
  display: flex;
  justify-content: space-between;
  padding-top: calc(12 * var(--u));
  font-size: calc(12 * var(--u));
  line-height: calc(18 * var(--u));
}
.main-content { width: calc(608 * var(--u)); }
.sidebar { width: calc(361 * var(--u)); }

.teaser {
  width: calc(535 * var(--u));
  padding-bottom: calc(24 * var(--u));
  margin-bottom: calc(40 * var(--u));
  border-bottom: 1px solid var(--line);
}
.the-title {
  display: flex;
  align-items: flex-start;
  min-height: calc(24 * var(--u));
  text-transform: uppercase;
}
.the-title .label {
  display: flex;
  flex-direction: column;
  width: calc(62 * var(--u));
  margin-left: calc(-1 * var(--u));
  flex: none;
  color: var(--brown);
}
.the-title .type {
  font-size: calc(17 * var(--u));
  line-height: calc(20 * var(--u));
  letter-spacing: calc(-0.2 * var(--u));
}
.the-title .type-blog { letter-spacing: calc(1.8 * var(--u)); }
.the-title .date {
  font-size: calc(8 * var(--u));
  line-height: calc(8 * var(--u));
  letter-spacing: calc(-0.2 * var(--u));
}
.the-title .title {
  width: calc(460 * var(--u));
  margin: calc(-4 * var(--u)) 0 calc(12 * var(--u)) calc(4 * var(--u));
  color: #1c1c1c;
  font-size: calc(24 * var(--u));
  line-height: calc(30 * var(--u));
  letter-spacing: calc(0.5 * var(--u));
}

.flash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(14 * var(--u));
  width: calc(530 * var(--u));
  height: calc(330 * var(--u));
  margin-top: calc(6 * var(--u));
  background: #f6f6f6;
  color: #444;
  font-size: calc(12 * var(--u));
  font-family: Arial, sans-serif;
}
.puzzle {
  width: calc(30 * var(--u));
  height: calc(30 * var(--u));
  background: #bdbdbd;
  -webkit-mask: radial-gradient(circle at 50% 12%, #000 22%, transparent 23%) top / 100% 100%,
                radial-gradient(circle at 88% 55%, #000 22%, transparent 23%),
                linear-gradient(#000, #000) 10% 85% / 72% 64% no-repeat;
          mask: radial-gradient(circle at 50% 12%, #000 22%, transparent 23%) top / 100% 100%,
                radial-gradient(circle at 88% 55%, #000 22%, transparent 23%),
                linear-gradient(#000, #000) 10% 85% / 72% 64% no-repeat;
}
.caption { margin: calc(4 * var(--u)) 0 0; color: #333; }

.blog-img { width: calc(530 * var(--u)); height: auto; }
.body { margin: calc(50 * var(--u)) 0 calc(120 * var(--u)); }

.teaser-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: calc(530 * var(--u));
}
.readmore {
  padding: 0 calc(7 * var(--u));
  border: 1px solid #7a500f;
  border-radius: calc(2 * var(--u));
  background: var(--brown);
  color: #fff;
  font-size: calc(11 * var(--u));
  font-weight: 700;
  line-height: calc(16 * var(--u));
}
.share { display: flex; gap: calc(10 * var(--u)); }
.tweet, .lnkd {
  height: calc(20 * var(--u));
  padding: 0 calc(6 * var(--u));
  border-radius: calc(3 * var(--u));
  font-size: calc(11 * var(--u));
  font-weight: 700;
  line-height: calc(20 * var(--u));
}
.tweet { background: #3e95cf; color: #fff; padding-left: calc(22 * var(--u)); }
.lnkd { border: 1px solid #bbb; background: #f2f2f2; color: #333; }
.lnkd b { display: inline-block; margin-right: calc(4 * var(--u)); padding: 0 calc(2 * var(--u)); background: #0e76a8; color: #fff; line-height: calc(13 * var(--u)); }

.sidebar h2 {
  margin: 0 0 calc(14 * var(--u));
  color: #333;
  font-size: calc(18 * var(--u));
  font-weight: 400;
  line-height: calc(24 * var(--u));
  text-transform: uppercase;
}

.login-box {
  height: calc(266 * var(--u));
  padding: calc(18 * var(--u)) calc(11 * var(--u));
  border: 1px solid var(--line);
  border-radius: calc(3 * var(--u));
  background: #f8f8f8;
  color: #333;
}
.login-box h2 { font-size: calc(20 * var(--u)); margin-bottom: calc(16 * var(--u)); }
.login-box p { margin: 0 0 calc(10 * var(--u)); }
.login-box .fb { padding-left: calc(84 * var(--u)); margin: 0; }
.login-box .tw { margin-bottom: calc(6 * var(--u)); }
.icon {
  display: block;
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  background-size: 100% 100%;
}
.icon-fb { background-image: url("/assets/img/facebook-32.png"); }
.icon-tw { background-image: url("/assets/img/twitter-32.png"); }

.likebox { height: calc(300 * var(--u)); }

.follow {
  display: inline-flex;
  align-items: center;
  gap: calc(5 * var(--u));
  height: calc(26 * var(--u));
  padding: 0 calc(9 * var(--u));
  border: 1px solid #ccc;
  border-radius: calc(4 * var(--u));
  background: linear-gradient(#fff, #dedede);
  color: #333;
  font: 700 calc(12 * var(--u)) Arial, sans-serif;
}
.bird {
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
  background: url("/assets/img/twitter-32.png") center / 100% 100%;
}

.activity { margin-top: calc(100 * var(--u)); }
.activity ul { margin: 0; padding: 0; list-style: none; }
.activity li {
  display: flex;
  align-items: flex-start;
  gap: calc(8 * var(--u));
  height: calc(86 * var(--u));
  padding-top: calc(9 * var(--u));
  border-bottom: 1px solid var(--line);
}
.activity li + li { margin-top: 0; }
.activity .avatar { width: calc(50 * var(--u)); height: calc(50 * var(--u)); flex: none; }
.activity .status { width: calc(220 * var(--u)); color: #555; font-size: calc(11 * var(--u)); line-height: calc(16 * var(--u)); overflow-wrap: anywhere; }
.activity .tag { color: var(--brown); }
.activity i { color: #888; font-size: calc(9 * var(--u)); }
.activity .beer { height: calc(50 * var(--u)); width: auto; margin-left: auto; }
.register { margin: calc(14 * var(--u)) 0 0; font-size: calc(11 * var(--u)); line-height: calc(16 * var(--u)); }

.botm { margin-top: calc(90 * var(--u)); }
.botm-row { display: flex; gap: 0; }
.botm-row img { width: calc(145 * var(--u)); height: auto; flex: none; }
.botm .month { display: block; color: #333; font-size: calc(10 * var(--u)); font-weight: 700; text-transform: uppercase; }
.botm .name { display: block; color: #333; font-size: calc(18 * var(--u)); line-height: calc(24 * var(--u)); text-transform: uppercase; }
.botm p { margin: calc(8 * var(--u)) 0 0; font-size: calc(11 * var(--u)); line-height: calc(16 * var(--u)); }

/* ------------------------------------------------------------------ the notice (real pixels) */

.notice-layer {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 16px;
}

.notice {
  position: sticky;
  top: 24px;
  width: 100%;
  max-width: 640px;
  margin-top: calc(415 * var(--u) + clamp(16px, calc(40 * var(--u)), 40px));
  padding: 26px 32px 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brown);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06);
  color: #444;
  font-size: 16px;
  line-height: 1.55;
  text-align: center;
  scroll-margin-top: 24px;
}
.notice .kicker {
  margin: 0 0 6px;
  color: #888;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.notice h2 {
  margin: 0 0 10px;
  color: var(--brown);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.notice p { margin: 0; text-wrap: balance; }
.notice h2 { text-wrap: balance; }
/* brand name keeps its own capitals: W, B and C stand out as in the old logo */
.notice .wbc { display: block; text-transform: none; font-size: 1.15em; letter-spacing: 0; }
.notice .tuned {
  margin-top: 10px;
  color: #212121;
  font-size: 18px;
  font-weight: 700;
}

/* sign-up form */
.signup { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); text-align: left; }
.signup-row { display: flex; gap: 8px; }
.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 16px;
}
.signup input[type="email"]:focus { outline: 2px solid var(--brown); outline-offset: 1px; border-color: var(--brown); }
.signup button {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  background: var(--brown);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.signup button:hover:not(:disabled) { background: #85570f; }
.signup button:disabled { opacity: .6; cursor: default; }
.consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: #444; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent span { text-wrap: pretty; }
.consent input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--brown); }
.notice .fine { margin-top: 8px; color: #888; font-size: 12px; line-height: 1.45; text-wrap: pretty; }
.notice .signup-status { margin: 6px 0 0; font-size: 14px; }
.notice .signup-status:empty { display: none; }
.signup-status.error { color: #b3261e; }
.signup-done { margin: 0; color: #212121; font-size: 16px; font-weight: 600; text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.notice:target { animation: nudge .9s ease; }
@keyframes nudge {
  0%, 100% { transform: none; }
  30% { transform: scale(1.035); box-shadow: 0 16px 50px rgba(158, 104, 22, .35); }
}

@media (max-width: 520px) {
  .signup-row { flex-direction: column; }
  .signup input[type="email"] { flex: none; }
  .notice { padding: 20px 20px 18px; font-size: 15px; }
  .notice h2 { font-size: 20px; }
  .notice .tuned { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .notice:target { animation: none; }
}
