/* Sauce Table introduction: one evening, in a few cuts. Photography from the approved Sauce
   direction leads; type is Sauce's (Bricolage 800 display, Inter, IBM Plex Sans Arabic).
   The page is complete without motion: the opening and the scene cuts only run when
   landing.js adds `play` to <html>, so no-JS, reduced motion and hidden tabs render settled. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage-grotesque-latin-wght.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/assets/fonts/ibm-plex-sans-arabic-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/assets/fonts/ibm-plex-sans-arabic-600.woff2') format('woff2');
  font-weight: 500 600;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/assets/fonts/ibm-plex-sans-arabic-700.woff2') format('woff2');
  font-weight: 700 800;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E;
}

:root {
  --night: #0d0a08;
  --lacquer: #16110e;
  --linen: #fff;
  --soft: rgb(255 255 255 / 0.74);
  --faint: rgb(255 255 255 / 0.16);
  --pomegranate: #e3124b;
  --display: 'Bricolage Grotesque', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --ui: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  --gutter: 1.25rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-cut: cubic-bezier(0.76, 0, 0.24, 1);
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night);
}
body {
  margin: 0;
  background: var(--night);
  color: var(--linen);
  font: 400 1rem/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  overflow-wrap: break-word;
}
[dir='rtl'] body {
  line-height: 1.75;
}
[hidden] {
  display: none !important;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
p,
figure {
  margin: 0;
}
a,
button {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid var(--linen);
  outline-offset: 4px;
  border-radius: 10px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: 12px;
  transform: translateY(calc(-100% - 24px));
  z-index: 30;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--linen);
  color: var(--lacquer);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  transform: none;
}

/* Masthead: /Table/ by /Sauce/ in linen, over the opening shot. */
.masthead {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(1280px + 2 * var(--gutter));
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) var(--gutter) 0;
}
.signature {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  direction: ltr;
  min-height: 44px;
  color: var(--linen);
  text-decoration: none;
}
.signature .mark-table {
  width: 104px;
  height: auto;
}
.byline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 2px;
  font-size: 0.75rem;
  color: var(--soft);
}
.byline img {
  width: 54px;
  height: auto;
}
.language {
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 44px;
  min-width: 72px;
  padding: 0 1.1rem;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 999px;
  background: rgb(13 10 8 / 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--linen);
  font: 600 0.9375rem var(--ui);
  cursor: pointer;
}
.language:hover {
  background: rgb(13 10 8 / 0.6);
}

/* The opening shot. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: max(100svh, 34rem);
  display: grid;
  align-content: end;
  padding: 7rem var(--gutter) calc(3.25rem + env(safe-area-inset-bottom));
}
.shot {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--lacquer);
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
.shot::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(13 10 8 / 0.55) 0%, rgb(13 10 8 / 0) 22%),
    linear-gradient(to top, var(--night) 0%, rgb(13 10 8 / 0.86) 30%, rgb(13 10 8 / 0.2) 62%, rgb(13 10 8 / 0) 80%);
}
.bars {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  display: none;
}
.bars span {
  position: absolute;
  inset-inline: 0;
  height: 50.5%;
  background: var(--night);
}
.bars span:first-child {
  top: 0;
  transform-origin: top;
}
.bars span:last-child {
  bottom: 0;
  transform-origin: bottom;
}
.hero-copy {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  justify-items: start;
  gap: 0.85rem;
}
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft);
}
[dir='rtl'] .eyebrow {
  letter-spacing: 0;
  font-size: 0.95rem;
}
h1 {
  font: 800 2.9rem/1 var(--display);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
[dir='rtl'] h1 {
  font-weight: 700;
  font-size: 2.85rem;
  line-height: 1.3;
  letter-spacing: 0;
}
.line {
  display: block;
  overflow: hidden;
  padding-block: 0.04em 0.1em;
  margin-block: -0.04em -0.1em;
}
[dir='rtl'] .line {
  padding-block: 0.12em;
  margin-block: -0.12em;
}
.rise {
  display: inline-block;
}
.spark {
  color: var(--pomegranate);
}
.lede {
  max-width: 30rem;
  font-size: 1.0625rem;
  color: var(--soft);
  text-wrap: pretty;
}
.cue {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 2.25rem;
  background: linear-gradient(var(--faint), var(--linen));
  opacity: 0.6;
}
.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.4rem;
  padding: 0 1.2rem;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 999px;
  color: var(--linen);
  font-weight: 600;
  text-decoration: none;
}
.home-link:hover {
  background: rgb(255 255 255 / 0.08);
}

/* The evening, in three cuts. */
.scenes {
  max-width: calc(1280px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 3.5rem var(--gutter) 1rem;
  display: grid;
  gap: 3.5rem;
}
.scene {
  display: grid;
  gap: 1.1rem;
}
.frame {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 4 / 5;
  background: var(--lacquer);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
figcaption {
  display: grid;
  gap: 0.35rem;
}
.time {
  justify-self: start;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--soft);
}
[dir='rtl'] .time {
  letter-spacing: 0.02em;
  font-size: 0.9rem;
}
.say {
  font: 800 1.85rem/1.12 var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
[dir='rtl'] .say {
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.45;
  letter-spacing: 0;
}

.closing {
  max-width: calc(1280px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 4.5rem var(--gutter) 4rem;
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
}
.closing h2 {
  font: 800 2.6rem/1.02 var(--display);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
[dir='rtl'] .closing h2 {
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}
.closing p {
  max-width: 24rem;
  color: var(--soft);
}

.foot {
  display: flex;
  justify-content: center;
  padding: 1.5rem var(--gutter) max(1.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--faint);
}
.sign {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--soft);
}
.sign img:first-child {
  width: 84px;
  height: auto;
}
.sign img:last-child {
  width: 48px;
  height: auto;
}

/* Not found: a quiet table by the window. */
.hero.missing {
  min-height: max(100svh, 30rem);
}
.missing .shot img {
  object-position: 70% 50%;
}
.missing h1 {
  font-size: 2.4rem;
}

@media (max-width: 359px) {
  :root {
    --gutter: 1rem;
  }
  .signature .mark-table {
    width: 88px;
  }
  .byline img {
    width: 46px;
  }
  h1 {
    font-size: 2.4rem;
  }
  [dir='rtl'] h1 {
    font-size: 2.35rem;
  }
  .say,
  [dir='rtl'] .say {
    font-size: 1.5rem;
  }
  .closing h2 {
    font-size: 2.15rem;
  }
}

@media (min-width: 760px) {
  :root {
    --gutter: 2.5rem;
  }
  h1 {
    font-size: clamp(3.5rem, 6.4vw, 6rem);
  }
  [dir='rtl'] h1 {
    font-size: clamp(3.25rem, 5.6vw, 5.25rem);
  }
  .lede {
    font-size: 1.1875rem;
  }
  .hero {
    padding-bottom: 4.5rem;
  }
  .scenes {
    padding-top: 6rem;
    gap: 7rem;
  }
  .scene {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: end;
    gap: 3rem;
  }
  .scene:nth-child(odd) .frame {
    order: 2;
  }
  .frame {
    aspect-ratio: 4 / 3;
  }
  .say,
  [dir='rtl'] .say {
    font-size: clamp(2rem, 3.4vw, 3rem);
  }
  .closing {
    padding-block: 8rem 7rem;
  }
  .closing h2 {
    font-size: clamp(3rem, 6vw, 5.5rem);
  }
}

/* ---- The opening, only with `play` (motion allowed, page visible). About 2.8 s. ---- */
.play .bars {
  display: block;
}
.play .bars span {
  animation: bar-open 1100ms var(--ease-cut) 250ms both;
}
.play .shot img {
  animation: push-in 2800ms var(--ease-out) 150ms both;
}
.play .masthead {
  animation: fade-in 800ms ease-out 700ms both;
}
.play .eyebrow {
  animation: fade-up 700ms var(--ease-out) 1050ms both;
}
.play .line .rise {
  animation: rise 900ms var(--ease-out) 1200ms both;
}
.play .line + .line .rise {
  animation-delay: 1420ms;
}
.play .lede {
  animation: fade-up 800ms var(--ease-out) 1800ms both;
}
.play .cue {
  animation: cue 900ms var(--ease-out) 2300ms both;
}
.paused,
.paused * {
  animation-play-state: paused !important;
}

/* Each scene cuts in once, when it reaches the screen. */
.play .scene .frame {
  transition: clip-path 1100ms var(--ease-cut);
}
.play .scene .frame img {
  transition: transform 1600ms var(--ease-out);
}
.play .scene figcaption {
  transition:
    opacity 800ms var(--ease-out) 350ms,
    transform 800ms var(--ease-out) 350ms;
}
.play .scene:not(.seen) .frame {
  clip-path: inset(14% 10% 14% 10% round 28px);
}
.play .scene:not(.seen) .frame img {
  transform: scale(1.16);
}
.play .scene:not(.seen) figcaption {
  opacity: 0;
  transform: translateY(1rem);
}
.play .scene.seen .frame {
  clip-path: inset(0 round 22px);
}

@keyframes bar-open {
  to {
    transform: scaleY(0);
  }
}
@keyframes push-in {
  from {
    transform: scale(1.14);
    filter: brightness(0.3) saturate(0.7);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}
@keyframes rise {
  from {
    transform: translateY(110%);
  }
}
@keyframes cue {
  from {
    transform: scaleY(0);
    transform-origin: top;
  }
  to {
    transform-origin: top;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
