/* Black Friday campaign page, www.taminfalat.com/campaign/blackfriday/
   Built from the designer's 2880px artwork: on a 1440px screen every measure below is the
   artwork's own, in --u (1px there). On a narrower screen --u shrinks so the middle column keeps
   the same proportions (686u, the three examples side by side, must fit); the banner and the
   manager at his desk run the full width on a computer and keep a readable height on a phone. */

@font-face {
  font-family: "Kalameh";
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/kalameh-light.woff2") format("woff2");
}
@font-face {
  font-family: "Kalameh";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/kalameh-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Kalameh";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/kalameh-medium.woff2") format("woff2");
}
@font-face {
  font-family: "Kalameh";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/kalameh-bold.woff2") format("woff2");
}
@font-face {
  font-family: "Kalameh";
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/kalameh-extrabold.woff2") format("woff2");
}
@font-face {
  font-family: "Kalameh";
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/kalameh-black.woff2") format("woff2");
}

:root {
  --bg: #222222;
  --card: #141414;
  --orange: #f59636;
  --white: #ffffff;
  /* 1px on a 1440px screen and wider; smaller below, so 686u always fits with 12px each side */
  --u: min(1px, calc((100vw - 24px) / 686));
  /* the room between two sections: 32px on a phone, growing to 56px on a computer */
  --gap: clamp(32px, calc(2.5vw + 22px), 56px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: "Kalameh", Tahoma, sans-serif;
  font-weight: 300;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

p,
h1,
h2,
ul,
figure {
  margin: 0;
}

/* the pictures overhang their columns a little, as drawn: never a sideways scroll */
main {
  overflow-x: clip;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

/* ---------- the curtain banner ---------- */

.bf-hero img {
  width: 100%;
}

/* ---------- the dark card: the cheapest price is not the lowest cost ---------- */

.bf-intro {
  width: calc(646 * var(--u));
  margin: var(--gap) auto 0;
  padding: calc(36 * var(--u)) calc(24 * var(--u)) calc(26.5 * var(--u));
  border-radius: calc(39 * var(--u));
  background: var(--card);
}

.bf-intro__title {
  color: var(--orange);
  font-size: calc(38.6 * var(--u));
  font-weight: 900;
  line-height: calc(47 * var(--u));
}

.bf-intro__sub {
  color: var(--orange);
  font-size: calc(30 * var(--u));
  font-weight: 500;
  line-height: calc(48 * var(--u));
}

.bf-intro__line {
  font-size: calc(27.5 * var(--u));
  font-weight: 300;
  line-height: calc(48 * var(--u));
}

.bf-intro__line--gap {
  margin-top: calc(23 * var(--u));
  line-height: calc(40 * var(--u));
}

.bf-intro__key {
  color: var(--orange);
  font-size: calc(32.6 * var(--u));
  font-weight: 800;
  line-height: calc(46 * var(--u));
  margin-top: calc(4 * var(--u));
}

.bf-intro__key + .bf-intro__line {
  margin-top: calc(-3.5 * var(--u));
}

/* ---------- the manager at his desk, the full width ---------- */

.bf-manager {
  margin-top: var(--gap);
}

.bf-manager img {
  width: 100%;
}

/* ---------- three examples, side by side ---------- */

.bf-examples__title {
  position: relative;
  left: calc(-15.5 * var(--u)); /* as drawn: a little left of the middle */
  margin-top: var(--gap);
  font-size: calc(29.9 * var(--u));
  font-weight: 800;
  line-height: calc(44 * var(--u));
}

.bf-cols {
  display: grid;
  /* reading from the right: the cups, the tissues, the printer */
  grid-template-columns: calc(203 * var(--u)) calc(228 * var(--u)) calc(255 * var(--u));
  justify-content: center;
  position: relative;
  left: calc(-16.5 * var(--u)); /* as drawn */
  margin-top: calc(41 * var(--u));
}

.bf-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bf-col figcaption {
  align-self: stretch;
  font-size: calc(29 * var(--u));
  font-weight: 300;
  line-height: calc(39.5 * var(--u));
  text-align: right;
  white-space: nowrap;
}

/* the orange rule between two examples, on the right of the second and the third */
.bf-col--rule {
  padding-right: calc(29 * var(--u));
}

.bf-col--rule::before {
  content: "";
  position: absolute;
  top: calc(4 * var(--u));
  right: 0;
  width: calc(1.5 * var(--u));
  height: calc(330 * var(--u));
  background: var(--orange);
}

/* each picture centred under its words, a little wider than its column, as drawn */
.bf-col img {
  flex: none;
  width: calc(249 * var(--u));
  max-width: none;
  margin-top: calc(46 * var(--u));
}

.bf-col--rule img {
  /* centred on the whole column, not on the words beside the rule */
  margin-right: calc(-29 * var(--u));
}

/* ---------- what Tamin Falat gives instead ---------- */

.bf-promise__line,
.bf-promise__key {
  position: relative;
  left: calc(8 * var(--u)); /* as drawn: a little right of the middle */
}

.bf-promise__line {
  font-size: calc(34.5 * var(--u));
  font-weight: 300;
  line-height: calc(54 * var(--u));
}

.bf-promise__line:first-child {
  /* the pictures above end in some 22u of clear space of their own */
  margin-top: calc(var(--gap) - 22 * var(--u));
}

.bf-promise__line:last-of-type {
  line-height: calc(47 * var(--u));
}

.bf-promise__key {
  color: var(--orange);
  font-size: calc(39.5 * var(--u));
  font-weight: 900;
  line-height: calc(62 * var(--u));
}

/* the six promises, on an orange thread from the first dot to the last */
.bf-list {
  position: relative;
  left: calc(-12 * var(--u)); /* as drawn */
  display: inline-block;
  margin-top: calc(40.4 * var(--u));
  padding: 0;
  list-style: none;
  text-align: right;
}

.bf-list::before {
  content: "";
  position: absolute;
  top: calc(23.25 * var(--u));
  bottom: calc(23.25 * var(--u));
  right: calc(8.25 * var(--u));
  width: calc(1.5 * var(--u));
  background: var(--orange);
}

.bf-list li {
  position: relative;
  padding-right: calc(29 * var(--u));
  font-size: calc(30.7 * var(--u));
  font-weight: 300;
  line-height: calc(46.5 * var(--u));
  white-space: nowrap;
}

.bf-list li::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
  margin-top: calc(-9 * var(--u));
  border-radius: 50%;
  background: var(--orange);
}

/* ---------- ask for a quote: the number calls ---------- */

.bf-cta {
  padding-bottom: var(--gap);
}

.bf-cta p {
  margin-top: var(--gap);
  color: var(--orange);
  font-size: calc(30.7 * var(--u));
  font-weight: 800;
  line-height: calc(42.5 * var(--u));
}

.bf-cta__phone {
  display: block;
  width: calc(501.5 * var(--u));
  margin: calc(14.25 * var(--u)) auto 0;
  border-radius: calc(12 * var(--u));
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease;
}

.bf-cta__phone img {
  width: 100%;
}

@media (hover: hover) {
  .bf-cta__phone:hover {
    transform: scale(1.03);
  }
}

.bf-cta__phone:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 6px;
}

/* ---------- the orange line at the foot ---------- */

.bf-strip {
  height: calc(10 * var(--u));
  min-height: 6px;
  background: var(--orange);
}

/* ---------- a phone: the banner and the manager keep a readable height ---------- */

@media (max-width: 767.98px) {
  .bf-hero img {
    height: 180px;
    object-fit: cover;
    object-position: 52% 50%;
  }

  .bf-manager img {
    height: 200px;
    object-fit: cover;
    object-position: 55% 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bf-cta__phone {
    transition: none;
  }
}
