/* =========================================================
   F.E.A Distilling Co. | Coming Soon
   Layout is built on a 1925 x 1092 design grid (the landing comp).
   --u = one design pixel, scaled to fit the viewport.
   ========================================================= */

:root {
  --vh: 1vh;
  --bg: #10202c;
  /* Desktop: scale by whichever side runs out first */
  --u: min(calc(100vw / 1925), calc(var(--vh) * 100 / 1092));
}

@supports (height: 1svh) {
  :root { --vh: 1svh; }
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Page ---------- */

.landing {
  position: relative;
  min-height: 100vh;
  min-height: calc(var(--vh) * 100);
  overflow: hidden;
  background: var(--bg) url("assets/corn-field.webp") center / cover no-repeat;
}

/* ---------- Left column ---------- */

.intro {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: calc(647 * var(--u));
  min-height: 100vh;
  min-height: calc(var(--vh) * 100);
  margin-left: calc(164 * var(--u));
  padding-top: calc(var(--vh) * 18.6);
  padding-bottom: calc(var(--vh) * 17.85);
}

.intro__logo {
  margin: 0;
  width: 100%;
}

.intro__logo img { width: 100%; }

.brands {
  display: flex;
  align-items: flex-start;
  margin: calc(82 * var(--u)) 0 0;
  padding: 0;
  list-style: none;
}

.brands__item--sweet-bottom {
  width: calc(150 * var(--u));
  margin-top: calc(2 * var(--u));
}

.brands__item--after-dark {
  width: calc(156 * var(--u));
  margin-left: calc(96 * var(--u));
}

.brands__item--campfire {
  width: calc(128 * var(--u));
  margin-top: calc(2 * var(--u));
  margin-left: calc(114 * var(--u));
}

.brands__item img { width: 100%; }

.intro__status {
  margin: auto 0 0 calc(13 * var(--u));
  padding-top: calc(80 * var(--u)); /* minimum breathing room on short screens */
  width: calc(603 * var(--u));
}

.intro__status img { width: 100%; }

/* ---------- Right scene (glow, barrel, products) ---------- */

.scene {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  width: calc(971 * var(--u));
  aspect-ratio: 971 / 872;
}

.scene img { position: absolute; }

.scene__glow {
  left: -8.29%;
  top: -11.83%;
  width: 123.83%;
  max-width: none;
  pointer-events: none;
}

.scene__barrel {
  left: 0;
  bottom: 0;
  width: 100%;
}

.scene__products {
  left: 15.3%;
  top: 0;
  width: 81.63%;
}

/* =========================================================
   Portrait (phones, tablets held upright): stack and center
   ========================================================= */

@media (orientation: portrait) {
  :root {
    /* Design pixels now scale off the column width (logo = 647) */
    --col: min(84vw, 520px);
    --u: calc(var(--col) / 647);
  }

  .landing {
    display: flex;
    flex-direction: column;
    background-position: 62% center;
  }

  .intro {
    width: var(--col);
    min-height: 0;
    margin: 0 auto;
    padding-top: max(calc(var(--vh) * 7), 36px);
    padding-bottom: calc(var(--vh) * 5);
  }

  .brands {
    justify-content: space-between;
    align-items: center;
  }

  .brands__item--sweet-bottom,
  .brands__item--after-dark,
  .brands__item--campfire {
    margin: 0;
  }

  .brands__item--after-dark { margin-top: calc(-8 * var(--u)); }

  .intro__status {
    margin: calc(96 * var(--u)) auto 0;
    padding-top: 0;
  }

  .scene {
    position: relative;
    right: auto;
    bottom: auto;
    order: 2; /* barrel sits at the bottom of the stack */
    left: 50%;
    width: min(122vw, calc(var(--vh) * 56));
    margin-top: auto;
    transform: translateX(-53.6%); /* centers the bottles, not the barrel */
  }
}
