/* The Black Friday holding pages (docs/runbooks/black-friday.md). Served as static
   files without the shop's compiled CSS: the faces are those of
   assets/shop/scss/obsentum/_fonts.scss, the tokens those of obsentum/_variables.scss. */

@font-face {
  font-family: 'MaisonNeue';
  src: url('/assets/shop/fonts/obsentum/MaisonNeueWEB-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'MaisonNeue';
  src: url('/assets/shop/fonts/obsentum/MaisonNeueWEB-Book.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'MaisonNeueExtended';
  src: url('/assets/shop/fonts/obsentum/MaisonNeueExtendedWEB-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'MaisonNeueExtended';
  src: url('/assets/shop/fonts/obsentum/MaisonNeueExtendedWEB-Demi.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'SaolDisplay';
  src: url('/assets/shop/fonts/obsentum/SaolDisplay-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --bf-sans: 'MaisonNeue', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --bf-sans-extended: 'MaisonNeueExtended', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue',
    Arial, sans-serif;
  --bf-serif: 'SaolDisplay', 'Apple Garamond', 'Baskerville', 'Times New Roman', 'Droid Serif', 'Times',
    'Source Serif Pro', serif;
  --bf-black: #000000;
  --bf-white: #ffffff;
  --bf-muted: #b2b2b2;
  --bf-line: #424242;
  --bf-focus: #3b7ae8;
}

html[lang='ro'] body [lang='en'],
html[lang='en'] body [lang='ro'] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bf-black);
  color: var(--bf-white);
  font-family: var(--bf-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

.bf-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 32px 32px 0;
}

.bf-logo {
  grid-column: 2;
  display: block;
  width: 213px;
  height: auto;
  filter: invert(1);
}

.bf-lang {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 4px;
}

.bf-lang[hidden] {
  display: none;
}

.bf-lang button {
  min-width: 40px;
  padding: 8px 6px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--bf-muted);
  font-family: var(--bf-sans);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.07em;
  cursor: pointer;
}

.bf-lang button[aria-pressed='true'] {
  border-bottom-color: var(--bf-white);
  color: var(--bf-white);
}

.bf-lang button:focus-visible {
  outline: 2px solid var(--bf-focus);
  outline-offset: 2px;
}

.bf-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 96px;
}

.bf-eyebrow {
  margin: 0 0 24px;
  font-family: var(--bf-sans-extended);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.bf-title {
  max-width: 920px;
  margin: 0 0 40px;
  font-family: var(--bf-serif);
  font-size: 88px;
  font-weight: 300;
  line-height: 1;
}

.bf-lead {
  max-width: 560px;
  margin: 0;
  color: var(--bf-muted);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
}

.bf-countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0 0 24px;
}

.bf-countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 112px;
  padding: 24px 0 20px;
  border: 0.5px solid var(--bf-line);
}

.bf-countdown__unit[hidden] {
  display: none;
}

.bf-countdown__value {
  font-family: var(--bf-sans-extended);
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.bf-countdown__label {
  margin-top: 12px;
  color: var(--bf-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

@media (max-width: 991.98px) {
  .bf-header {
    padding: 16px 16px 0;
  }

  .bf-logo {
    width: 160px;
  }

  .bf-main {
    padding: 48px 16px 64px;
  }

  .bf-title {
    margin-bottom: 32px;
    font-size: 56px;
  }

  .bf-countdown {
    gap: 8px;
  }

  .bf-countdown__unit {
    min-width: 72px;
    padding: 16px 0 14px;
  }

  .bf-countdown__value {
    font-size: 36px;
  }
}

@media (max-width: 575.98px) {
  .bf-header {
    grid-template-columns: auto 1fr;
  }

  .bf-logo {
    grid-column: 1;
    width: 128px;
  }

  .bf-lang {
    grid-column: 2;
  }

  .bf-title {
    font-size: 44px;
  }

  .bf-countdown {
    width: 100%;
    max-width: 358px;
  }

  .bf-countdown__unit {
    flex: 1 1 0;
    min-width: 0;
  }

  .bf-countdown__value {
    font-size: 30px;
  }

  .bf-countdown__label {
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .bf-lead {
    font-size: 14px;
  }
}

/* The countdown page over the campaign's cortina: the art carries every word, the
   page adds only the countdown, a timing board at the foot of the picture. */

.bf-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Each kind of screen sets its cut and its countdown in one rule, so the two never part:
   landscape and tablet get a board scaled with the cortina (cover) into the gap between
   the cars, a phone gets its own cut and a full-width strip at the foot. */
.bf-cortina {
  /* One pixel of the art shown. */
  --bf-u: max(100vw / 1980, 100vh / 1080);
  /* The small viewport, so a phone's toolbars never cover the foot of the page. */
  min-height: 100svh;
  background: #e6e6e6 url('/black-friday/cortina-1920x1080.jpg') center top / cover no-repeat;
  color: var(--bf-white);
}

.bf-cortina .bf-main {
  justify-content: flex-end;
  padding: 0 16px calc(var(--bf-u) * 16);
}

.bf-cortina .bf-countdown {
  position: relative;
  width: auto;
  max-width: none;
  gap: calc(var(--bf-u) * 40);
  margin: 0;
  padding: calc(var(--bf-u) * 17) calc(var(--bf-u) * 30) calc(var(--bf-u) * 12);
  background: var(--bf-black);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  /* The gap between the cars sits left of the art's centre. */
  transform: translateX(calc(var(--bf-u) * -28));
}

/* The chequered flag's strip along the board's top edge. */
.bf-cortina .bf-countdown::before {
  content: '';
  position: absolute;
  top: calc(var(--bf-u) * -12);
  right: 0;
  left: 0;
  height: calc(var(--bf-u) * 12);
  background: repeating-conic-gradient(var(--bf-black) 0 25%, var(--bf-white) 0 50%) 0 0 /
    calc(var(--bf-u) * 12) calc(var(--bf-u) * 12);
}

.bf-cortina .bf-countdown__unit {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
}

.bf-cortina .bf-countdown__unit + .bf-countdown__unit::before {
  content: ':';
  position: absolute;
  top: 0;
  left: calc(var(--bf-u) * -20);
  font-family: var(--bf-sans-extended);
  font-size: calc(var(--bf-u) * 53);
  font-weight: 600;
  line-height: 1;
  transform: translate(-50%, calc(var(--bf-u) * -4));
}

.bf-cortina .bf-countdown__value {
  font-size: calc(var(--bf-u) * 58);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bf-cortina .bf-countdown__label {
  margin-top: calc(var(--bf-u) * 10);
  color: var(--bf-white);
  font-family: var(--bf-sans-extended);
  font-size: calc(var(--bf-u) * 13);
  font-weight: 600;
  line-height: calc(var(--bf-u) * 16);
  letter-spacing: 0.2em;
}

/* The tablet cut frames the cars closer, its gap 0.9 of the landscape one. */
@media (max-aspect-ratio: 1/1) {
  .bf-cortina {
    --bf-u: calc(max(100vw / 960, 100vh / 1200) * 0.9);
    background-image: url('/black-friday/cortina-960x1200.jpg');
  }
}

/* Wider than 1980:890 the cover crops the art's foot and the board would rise onto the
   car mirrors (art row 738): lift the art, never past the air above its words (row 71). */
@media (min-aspect-ratio: 1980/890) {
  .bf-cortina {
    background-position: center max(100vh - var(--bf-u) * 890, var(--bf-u) * -52);
  }
}

/* A phone held upright. Width tells it from a tablet, whatever height its toolbars leave. */
@media (max-width: 575.98px) and (max-aspect-ratio: 1/1) {
  .bf-cortina {
    background-image: url('/black-friday/cortina-1080x1960.jpg');
  }

  .bf-cortina .bf-main {
    padding: 0;
  }

  .bf-cortina .bf-countdown {
    box-sizing: border-box;
    width: 100%;
    gap: 0;
    padding: 14px 8px 10px;
    transform: none;
  }

  .bf-cortina .bf-countdown::before {
    top: -10px;
    height: 10px;
    background-size: 10px 10px;
  }

  .bf-cortina .bf-countdown__unit {
    flex: 1 1 0;
  }

  .bf-cortina .bf-countdown__unit + .bf-countdown__unit::before {
    left: 0;
    font-size: 30px;
    transform: translate(-50%, -2px);
  }

  .bf-cortina .bf-countdown__value {
    font-size: 34px;
  }

  .bf-cortina .bf-countdown__label {
    margin-top: 6px;
    font-size: 9px;
    line-height: 16px;
    letter-spacing: 0.12em;
  }
}
