/* Bracketly landing page. Generated HTML comes from web/build.py.
   The look follows the app since 1.3.0, the "arena": a sports hall at night.
   Navy walls, a steel truss with lamps, banners hanging from it, the bracket
   laid out on a light floor, amber for what is happening now. Names and
   headings in Big Shoulders Display, reading text in Big Shoulders Text. */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("/fonts/bigshoulders-display-900.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Big Shoulders Display";
  src: url("/fonts/bigshoulders-display-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Big Shoulders Text";
  src: url("/fonts/bigshoulders-text-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Big Shoulders Text";
  src: url("/fonts/bigshoulders-text-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --night: #131b27; /* the hall */
  --ink: #0e1520; /* deeper bands, text on the floor */
  --panel: #1e2a3a;
  --steel: #2a3646; /* the truss and the rails banners hang from */
  --rail: #3a4859; /* lines on the dark */
  --dim: #9aa6b6;
  --soft: #c9d1dc; /* reading text on the dark */
  --amber: #ffb000; /* what is on now; winners on the floor */
  --amber-tint: #fff0c7;
  --paper: #f2f3f5; /* the floor */
  --floor-line: #c9ced6;
  --floor-muted: #586273;
  --floor-faint: #8c95a3;
  --hangul: "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic";
  --display: "Big Shoulders Display", var(--hangul), system-ui, sans-serif;
  --text: "Big Shoulders Text", var(--hangul), system-ui, sans-serif;
  --wrap: 1120px;
  --pad: 24px;
}

/* Big Shoulders has no Cyrillic or Arabic letters: the system face, not the
   Korean one, takes over. */
html:is(:lang(ru), :lang(ar), :lang(fa)) {
  --display: "Big Shoulders Display", system-ui, sans-serif;
  --text: "Big Shoulders Text", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  font: 500 1.1875rem/1.5 var(--text);
  letter-spacing: 0.005em;
  color: var(--soft);
  background: var(--night);
}

/* Hangul comes from the system face, which reads larger and heavier. */
html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) body {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  word-break: keep-all;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.wrap {
  max-width: calc(var(--wrap) + 2 * var(--pad));
  margin: 0 auto;
  padding: 0 var(--pad);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  line-height: 0.95;
  color: #fff;
  text-wrap: balance;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) h1,
html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) h2,
html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) h3 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* The short amber bar over every heading, as on the store screenshots. */
h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 5px;
  margin-bottom: 20px;
  background: var(--amber);
}

h2 {
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  max-width: 15ch;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) h2 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  max-width: 15em;
}

p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

/* ---------- top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 900 1.875rem/1 var(--display);
  color: #fff;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.lang {
  position: relative;
  font-size: 1.0625rem;
  font-weight: 700;
}

.lang summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 14px;
  border: 1px solid var(--rail);
  color: #fff;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang summary::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 0 3px;
  margin-inline: 10px 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.lang ul {
  position: absolute;
  inset-inline-end: 0;
  z-index: 5;
  margin: 6px 0 0;
  padding: 6px;
  list-style: none;
  min-width: 170px;
  background: var(--panel);
  border: 1px solid var(--rail);
}

.lang li a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--soft);
}

.lang li a:hover,
.lang li a[aria-current] {
  background: var(--steel);
  color: #fff;
}

/* ---------- hero ---------- */

.hero-grid {
  display: grid;
  gap: 26px;
  padding: 44px 0 72px;
}

.hero h1 {
  font-size: clamp(3.5rem, 13vw, 6.25rem);
  line-height: 0.88;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .hero h1 {
  font-size: clamp(2.75rem, 10vw, 4.5rem);
  line-height: 1.1;
  max-width: 7em;
}

.hero .sub {
  max-width: 30em;
  font-size: 1.375rem;
  line-height: 1.45;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .hero .sub {
  font-size: 1.1875rem;
}

.badge {
  display: inline-block;
  margin-top: 26px;
}

.badge img {
  height: 58px;
  width: auto;
}

.hero .demo {
  margin-top: 18px;
}

/* Wide screens: the headline and the pitch side by side, the arena below
   across the whole width, so every name on the floor fits. */
@media (min-width: 1000px) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: 56px;
    padding-top: 52px;
  }

  .hero-side {
    align-self: end;
  }

  .hero .demo {
    grid-column: 1 / -1;
    margin-top: 22px;
  }
}

/* ---------- the arena box in the hero ----------
   A truss with lamps on top, the bracket on the light floor below. Both
   halves of the bracket meet in the final in the middle; when it is decided
   the champion's banner drops from the truss. */

.demo {
  position: relative;
  /* A drawing of a bracket: laid out from the left in every language. */
  direction: ltr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rail);
  background: var(--ink);
  --rig: 112px;
}

.rig {
  position: relative;
  height: var(--rig);
  background: url("/img/truss.png") center top / auto 182px repeat-x var(--night);
  transition: height 0.6s ease;
}

.floor {
  background: var(--paper);
  padding: 26px 20px 24px;
}

.bk {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 14px;
  row-gap: 32px;
}

.lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.lines path {
  fill: none;
  stroke: var(--floor-line);
  stroke-width: 2;
}

.lines path.w {
  stroke: var(--ink);
  stroke-width: 3;
}

/* Phones: the floor runs top to bottom, as in the app. */
.m0 {
  grid-area: 1 / 1;
}
.m1 {
  grid-area: 1 / 2;
}
.m4,
.m6,
.m5 {
  grid-column: 1 / 3;
  justify-self: center;
  width: calc(50% - 7px);
}
.m4 {
  grid-row: 2;
}
.m6 {
  grid-row: 3;
}
.m5 {
  grid-row: 4;
}
.m2 {
  grid-area: 5 / 1;
}
.m3 {
  grid-area: 5 / 2;
}

/* Wider: left half, final, right half. */
@media (min-width: 640px) {
  .floor {
    padding: 28px 22px;
  }

  .bk {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 64px;
  }

  .m0 {
    grid-area: 1 / 1;
  }
  .m1 {
    grid-area: 2 / 1;
  }
  .m2 {
    grid-area: 1 / 5;
  }
  .m3 {
    grid-area: 2 / 5;
  }
  .m4,
  .m6,
  .m5 {
    grid-row: 1 / 3;
    align-self: center;
    width: auto;
    justify-self: stretch;
  }
  .m4 {
    grid-column: 2;
  }
  .m6 {
    grid-column: 3;
  }
  .m5 {
    grid-column: 4;
  }
}

.match {
  position: relative;
  z-index: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--floor-line);
}

.match.m6 {
  border: 2px solid var(--ink);
}

.cap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--ink);
  color: #fff;
  font: 700 0.9375rem/1.2 var(--display);
}

.cap .ic {
  width: 15px;
  height: 15px;
  color: var(--amber);
}

.side {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 0 8px;
  border: 0;
  background: #fff;
  color: var(--ink);
  font: 700 1rem/1.1 var(--text);
  text-align: start;
  cursor: pointer;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .side {
  font-size: 0.875rem;
  font-weight: 600;
}

.side + .side {
  border-top: 1px solid var(--floor-line);
}

.chip {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--c, transparent);
  color: #fff;
  font: 900 0.875rem/1 var(--display);
}

.side.tbd .chip {
  border: 1.5px dashed var(--floor-line);
}

.side .nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side:not(:disabled):hover {
  background: var(--amber-tint);
}

.side:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -5px;
}

.side.win,
.side.win:not(:disabled):hover {
  background: var(--amber);
}

.side.lose {
  color: var(--floor-faint);
}

.side.lose .chip {
  opacity: 0.4;
}

.side:disabled {
  cursor: default;
}

.side:disabled:not(.win):not(.lose) {
  color: var(--floor-muted);
}

/* The champion's banner: hidden above the box until the final is decided. */
.banner {
  position: absolute;
  top: 40px;
  left: 50%;
  z-index: 3;
  width: 116px;
  margin-left: -58px;
  transform: translateY(-160%);
  visibility: hidden;
  transition:
    transform 0.9s cubic-bezier(0.2, 1.25, 0.4, 1),
    visibility 0s 0.9s;
}

.banner::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 20px;
  right: 20px;
  height: 80px;
  border: 0 solid var(--dim);
  border-width: 0 2px;
}

.demo.done .banner {
  transform: none;
  visibility: visible;
  transition: transform 0.9s cubic-bezier(0.2, 1.25, 0.4, 1);
}

.banner .flag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 146px;
  padding: 12px 8px 34px;
  background: var(--c, #00765f);
  color: #fff;
  text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 20px), 0 100%);
}

.banner .ic {
  width: 24px;
  height: 24px;
}

.b-l {
  font: 700 0.875rem/1.2 var(--display);
  opacity: 0.9;
}

.banner strong {
  font: 900 1.5rem/0.95 var(--display);
  overflow-wrap: anywhere;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .banner strong {
  font-size: 1.25rem;
  line-height: 1.15;
}

/* Phones: there is no room above the final, so the truss grows. */
@media (max-width: 639px) {
  .demo.done {
    --rig: 230px;
  }
}

.demo-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 14px 18px;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.reset {
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber);
  font: 700 1.0625rem/1.4 var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- bands ---------- */

.band {
  padding: 96px 0;
}

.band.deep {
  background: var(--ink);
}

/* The floor, for the band people read item by item. */
.band.court {
  background: var(--paper);
  color: #2b3442;
}

.band.court h2 {
  color: var(--ink);
}

:focus-visible:is(.court *) {
  outline-color: var(--ink);
}

/* ---------- formats: banners hanging from a rail ---------- */

.pennants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 44px 20px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.pennants li {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 30px;
}

/* the rail, one stretch per banner so wrapped rows have their own */
.pennants li::before {
  content: "";
  position: absolute;
  top: 0;
  left: -10px;
  right: -10px;
  height: 6px;
  background: var(--steel);
}

/* the two cords */
.pennants li::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 24%;
  right: 24%;
  height: 24px;
  border: 0 solid var(--rail);
  border-width: 0 2px;
}

.pennants .flag {
  flex: 1;
  padding: 22px 18px 58px;
  background: var(--c);
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 28px), 0 100%);
}

.pennants .ic {
  width: 34px;
  height: 34px;
  color: #fff;
}

.pennants h3 {
  margin-top: 16px;
  font-size: 2rem;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .pennants h3 {
  font-size: 1.375rem;
}

.pennants p {
  margin-top: 10px;
  font-size: 1.0625rem;
  line-height: 1.45;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .pennants p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ---------- screenshots ---------- */

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 24px;
  margin-top: 52px;
  padding-bottom: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.shots figure {
  margin: 0;
  scroll-snap-align: start;
}

.shots img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rail);
  background: var(--panel);
}

.shots figcaption {
  margin-top: 16px;
  font-size: 1.125rem;
  line-height: 1.4;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .shots figcaption {
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- plans: the board ---------- */

.board {
  display: grid;
  gap: 0 48px;
  margin: 52px 0 0;
}

@media (min-width: 760px) {
  .board {
    grid-template-columns: 1fr 1fr;
  }
}

.board div {
  padding: 20px 0 24px;
  border-top: 3px solid var(--ink);
}

.board dt {
  font: 900 1.75rem/1 var(--display);
  color: var(--ink);
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .board dt {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
}

.board dd {
  margin: 10px 0 0;
}

/* ---------- questions ---------- */

.faq {
  max-width: 760px;
  margin-top: 44px;
}

.faq details {
  border-top: 1px solid var(--rail);
}

.faq details:last-child {
  border-bottom: 1px solid var(--rail);
}

.faq summary {
  position: relative;
  padding-block: 20px;
  padding-inline: 0 44px;
  cursor: pointer;
  list-style: none;
  font: 700 1.625rem/1.1 var(--display);
  color: #fff;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .faq summary {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.4;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -8px;
  border-right: 2.5px solid var(--amber);
  border-bottom: 2.5px solid var(--amber);
  transform: rotate(45deg);
}

.faq details[open] summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.faq p {
  padding: 0 0 24px;
  max-width: 40em;
}

/* ---------- closing: back under the lights ---------- */

.closing {
  padding: 230px 0 0;
  background: url("/img/truss.png") center top / auto 560px repeat-x var(--night);
}

.closing h2 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  max-width: 12ch;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .closing h2 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
}

.uses {
  margin-top: 22px;
  max-width: 40em;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 80px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--rail);
  font-size: 1rem;
  color: var(--dim);
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot .langs {
  margin-inline-start: auto;
}

.foot a {
  text-decoration: none;
}

.foot a:hover,
.foot a[aria-current] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- privacy policy and other plain documents ---------- */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px var(--pad) 80px;
}

.doc a.brand {
  margin-bottom: 48px;
  color: #fff;
}

.doc h1 {
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  margin-bottom: 10px;
}

.doc h2 {
  font-size: 1.875rem;
  margin: 44px 0 10px;
  max-width: none;
}

html:is(:lang(ko), :lang(ru), :lang(ar), :lang(fa)) .doc h2 {
  font-size: 1.375rem;
}

.doc h2::before {
  display: none;
}

.doc p,
.doc ul {
  margin: 0 0 14px;
}

.doc .muted {
  color: var(--dim);
  font-size: 1rem;
}

.doc a {
  color: var(--amber);
}

@media (max-width: 639px) {
  .band {
    padding: 72px 0;
  }

  .closing {
    padding-top: 170px;
    background-size: auto 420px;
  }

  .foot .langs {
    margin-inline-start: 0;
  }
}

/* Phones: smaller names on the floor, after the rules they adjust. */
@media (max-width: 639px) {
  .side {
    gap: 6px;
    padding: 0 6px;
    font-size: 0.9375rem;
  }

  .chip {
    width: 22px;
    height: 22px;
  }

  /* a long name takes two lines instead of being cut */
  .side .nm {
    padding: 4px 0;
    white-space: normal;
    text-overflow: clip;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rig,
  .banner,
  .demo.done .banner {
    transition: none;
  }
}
