/* Page furniture: header, the name, standing orders, the queue and the footer. */

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--paper);
  background-image: var(--grain);
  border-bottom: 2px solid var(--ink);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
  padding: 0.55rem var(--gutter);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand .wordmark {
  font-size: 2rem;
}

/* A small nod to the second reading: the mark parts into SO VIET under the pointer. */
.brand .wordmark b {
  display: inline-block;
  transition: translate 0.35s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.brand__sub {
  margin-top: 0.34rem;
  padding-left: 0.3em;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  line-height: 1;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2.5rem);
  font-size: 0.9375rem;
  font-weight: 600;
}

.site-nav a:not(.button) {
  padding: 0.35rem 0;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__shop .soon-tag {
  color: var(--red);
}

@media (hover: hover) {
  .site-nav a:not(.button):hover {
    text-decoration: underline;
  }

  .brand:hover .wordmark b {
    translate: 0.13em 0;
  }
}

@media (max-width: 57.99em) {
  .site-nav a:not(.button) {
    display: none;
  }
}

/* ---------- The name, read twice ---------- */

.twice {
  padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(3rem, 6vw, 5.5rem);
  overflow-x: clip;
}

.twice__mark {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(2rem, 4.5vw, 4rem);
  color: var(--ink);
  font-size: clamp(3.75rem, 17.4vw, 19rem);
}

.twice__so,
.twice__viet {
  display: inline-block;
  transition: translate 0.7s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.twice__mark[data-reading="2"] .twice__so {
  translate: -0.14em 0;
}

.twice__mark[data-reading="2"] .twice__viet {
  translate: 0.14em 0;
}

/* On the second reading the E picks up its Vietnamese marks: VIỆT. */
.twice__e {
  position: relative;
  display: inline-block;
}

.twice__tones {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.twice__mark[data-reading="2"] .twice__tones {
  opacity: 1;
  transition: opacity 0.5s ease 0.65s;
}

.twice__text {
  display: grid;
  gap: 1.5rem 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--ink);
}

.twice__title {
  font-size: clamp(2.25rem, 1.2rem + 4.4vw, 4.75rem);
}

.twice__body .lede {
  max-width: 32em;
}

.twice__replay {
  margin-top: 1.25rem;
  padding: 0.25rem 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

@media (min-width: 60em) {
  .twice__text {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

/* ---------- Standing orders ---------- */

.orders {
  padding: clamp(3.5rem, 8vw, 7rem) 0;
}

.orders__title {
  max-width: 13em;
  font-size: clamp(2.25rem, 1.2rem + 4.4vw, 4.75rem);
}

.orders__list {
  display: grid;
  gap: 2.25rem clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(2rem, 5vw, 4rem);
  counter-reset: order;
}

.orders__list li {
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
  counter-increment: order;
}

.orders__list li::before {
  content: counter(order);
  display: block;
  color: var(--red);
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(4.5rem, 9vw, 8rem);
  line-height: 0.85;
}

.orders__list h3 {
  margin-top: 0.9rem;
  font-size: clamp(1.75rem, 2.6vw, 2.375rem);
}

.orders__list p {
  max-width: 26em;
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

@media (min-width: 48em) {
  .orders__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- The queue ---------- */

.queue {
  --focus: var(--label-ink);
  padding-top: clamp(3.5rem, 8vw, 7rem);
  overflow: hidden;
  /* Matched to the left and right edges of the line-up painting below. */
  background: linear-gradient(90deg, #fbe5ca, #f2d4b3);
  color: var(--label-ink);
}

.queue__inner {
  display: grid;
  gap: 2rem 4rem;
  align-items: end;
}

.queue__title {
  font-size: clamp(4rem, 1.5rem + 9vw, 10rem);
}

.queue__copy .lede {
  max-width: 30em;
  margin-top: 1.25rem;
}

.queue__form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.queue__field {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.queue__field input {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--label-ink);
  border-radius: 3px;
  background: #fffaf0;
  color: var(--label-ink);
  color-scheme: light;
  font-size: 1rem;
}

.queue__field input::placeholder {
  color: #6f685b;
}

.queue__note {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
}

.queue__status {
  min-height: 1.6em;
  margin-top: 0.5rem;
  font-weight: 700;
}

.queue__art {
  max-width: 120rem;
  margin: clamp(0.5rem, 2vw, 2rem) auto 0;
}

.queue__art img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 24%);
  mask-image: linear-gradient(to bottom, transparent, #000 24%);
}

@media (min-width: 60em) {
  .queue__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

@media (min-width: 120.01em) {
  .queue__art img {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 24%), linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to bottom, transparent, #000 24%), linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
    mask-composite: intersect;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  --focus: var(--gold);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  background: var(--label-ink);
  color: #e9e0c9;
}

.site-footer__inner {
  display: grid;
  gap: 2.5rem 4rem;
}

.site-footer__mark {
  color: var(--on-colour);
  font-size: clamp(3rem, 6vw, 5rem);
}

.site-footer__mark b {
  color: #f2452f;
}

.site-footer__sub {
  margin-top: 0.75rem;
  font-weight: 600;
}

.site-footer__nav {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  justify-items: start;
  font-weight: 600;
}

.site-footer__nav a {
  text-decoration: none;
}

@media (hover: hover) {
  .site-footer__nav a:hover {
    text-decoration: underline;
  }
}

.site-footer__small {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  max-width: 34em;
  color: #c9c1ac;
  font-size: 0.9375rem;
}

/* Bottom line: copyright, and a printer's colour bar in the four label colours. */
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid #4a463d;
  color: #c9c1ac;
  font-size: 0.9375rem;
}

.site-footer__proof {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.site-footer__proof span {
  width: 1.1rem;
  height: 1.1rem;
}

.site-footer__proof span:nth-child(1) {
  background: var(--label-yellow);
}

.site-footer__proof span:nth-child(2) {
  background: var(--label-red);
}

.site-footer__proof span:nth-child(3) {
  background: var(--label-green);
}

.site-footer__proof span:nth-child(4) {
  background: var(--label-cream);
}

.site-footer__proof svg {
  width: 1.5rem;
  height: 1.5rem;
  margin-left: 0.5rem;
}

@media (min-width: 60em) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1.5fr);
  }
}

/* Reduced motion: the wordmark does not slide. It is simply shown open (see wordmark.js),
   and its Vietnamese marks still fade in. */
@media (prefers-reduced-motion: reduce) {
  .brand .wordmark b,
  .twice__so,
  .twice__viet {
    transition: none;
  }

  .brand:hover .wordmark b {
    translate: none;
  }
}
