/* ==========================================================================
   Storyz — landing page
   Brand: Storyz Red #FF1935, black, white. Vertical by design.
   ========================================================================== */

@font-face {
  font-family: "Alexandria";
  src: url("../fonts/alexandria-arabic-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Alexandria";
  src: url("../fonts/alexandria-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  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 {
  --red: #ff1935;
  --red-deep: #c8001e;
  --red-wash: #fff0f2;
  --black: #000;
  --white: #fff;
  --mist: #ededed;
  --graphite: #595959;
  --ash: #a6a6a6;

  --font: "Alexandria", "Segoe UI", Tahoma, system-ui, sans-serif;
  --tight: -0.028em;
  --display-leading: 0.92;
  --body-leading: 1.55;

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1440px;
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2));
  --control-radius: 14px;

  --phone-w: clamp(270px, 24vw, 340px);
  --dir: 1;
}

html[dir="rtl"] {
  --dir: -1;
}

html[lang="ar"] {
  --tight: 0;
  --display-leading: 1.12;
  --body-leading: 1.75;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: var(--body-leading);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure, fieldset {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  border-radius: var(--control-radius);
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

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

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--control-radius);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn[aria-busy="true"] {
  cursor: progress;
}
.btn:disabled {
  cursor: progress;
}

.btn--ink {
  background: var(--black);
  color: var(--white);
}
.btn--ink:hover {
  background: var(--red-deep);
}

.btn--red {
  background: var(--red);
  color: var(--white);
}
.btn--red:hover {
  background: var(--black);
}

.btn--line {
  background: transparent;
  color: var(--black);
  box-shadow: inset 0 0 0 2px var(--black);
}
.btn--line:hover {
  background: var(--black);
  color: var(--white);
}

.btn--big {
  min-height: 62px;
  min-width: 260px;
  padding: 0 32px;
  font-size: 19px;
}

/* ------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px var(--edge);
  background: var(--red);
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.masthead__icon {
  width: 40px;
  height: 40px;
}
.masthead__name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: var(--tight);
}

.masthead__nav {
  display: flex;
  gap: 28px;
  margin-inline-start: auto;
}
.masthead__nav a {
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.masthead__nav a:hover {
  text-decoration: underline;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--black);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lang-switch:hover {
  background: var(--black);
  color: var(--white);
}

/* ================================================================= HERO */

.hero {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 5vw, 64px) var(--edge) 72px;
  background: var(--red);
}

.hero__grid {
  display: flex;
  flex-direction: column;
}

.hero__title {
  font-size: clamp(50px, 13.5vw, 84px);
  font-weight: 900;
  line-height: var(--display-leading);
  letter-spacing: var(--tight);
  color: var(--white);
}
.hero__half {
  display: block;
}
html[lang="ar"] .hero__title {
  font-size: clamp(44px, 11.8vw, 76px);
}
/* On small screens the copy and sign-up come first; the phone closes the hero. */
.hero__title { order: 0; }
.hero__body { order: 1; }
.hero__availability { order: 2; }
.phone { order: 3; }

.hero__body {
  margin-top: 28px;
}

.hero__lede {
  max-width: 34ch;
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.45;
}
html[lang="ar"] .hero__lede {
  line-height: 1.7;
}

.hero__availability {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 600;
}

/* --- phone ------------------------------------------------------------ */

.phone {
  --w: min(74vw, 320px);
  flex: none;
  min-height: 0;
  height: calc(var(--w) * 2.1667);
  position: relative;
  z-index: 3;
  width: var(--w);
  aspect-ratio: 9 / 19.5;
  margin: 48px auto calc(var(--w) * -0.62);
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.15);
  background: var(--black);
  box-shadow:
    inset 0 0 0 2px #333,
    0 50px 90px -40px rgba(70, 0, 12, 0.6);
}
.phone::after {
  content: "";
  position: absolute;
  top: calc(var(--w) * 0.062);
  left: 50%;
  width: 31%;
  height: calc(var(--w) * 0.085);
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--black);
  pointer-events: none;
}

.phone__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--w) * 0.12);
  background: var(--red);
  container-type: inline-size;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
}

.reel {
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.slide {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22cqw 7cqw 0;
  overflow: hidden;
}

.slide__meta {
  margin-top: auto;
  padding-bottom: 10cqw;
}

.slide__episode {
  display: inline-block;
  padding: 1.1cqw 2.6cqw;
  background: var(--red);
  color: var(--black);
  font-size: 3.8cqw;
  font-weight: 700;
  line-height: 1.3;
}

.slide__caption {
  max-width: 88%;
  margin-top: 2.6cqw;
  font-size: 4.9cqw;
  font-weight: 500;
  line-height: 1.35;
}

.slide__progress {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1.2cqw;
  background: currentColor;
  opacity: 0.9;
  transform: scaleX(0);
  transform-origin: left center;
}
html[dir="rtl"] .slide__progress {
  transform-origin: right center;
}
.slide.is-active .slide__progress {
  animation: reel-progress var(--slide-time, 4.6s) linear forwards;
}
.slide--brand {
  --slide-time: 3s;
}
.is-paused .slide__progress {
  animation-play-state: paused;
}

@keyframes reel-progress {
  to { transform: scaleX(1); }
}

.poster-title {
  width: min-content;
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.035em;
  white-space: normal;
}
html[lang="ar"] .poster-title {
  line-height: 1.22;
  letter-spacing: 0;
}

/* Brand slide: the logo is itself a 9:16 screen. */
.slide--brand {
  justify-content: center;
  align-items: center;
  padding-top: 0;
  background: var(--red);
  color: var(--white);
}
.slide__logo {
  width: 64cqw;
  box-shadow: 0 0 0 1.4cqw var(--white);
}
.slide__logo svg {
  width: 100%;
  height: auto;
}
.slide__tagline {
  max-width: 64cqw;
  margin-top: 8cqw;
  font-size: 6cqw;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

/* Poster one: black, title escaping the frame. */
.slide--heir {
  background: var(--black);
  color: var(--white);
}
.slide--heir .poster-title {
  font-size: 27cqw;
}
html[lang="ar"] .slide--heir .poster-title {
  font-size: 30cqw;
}

/* Poster two: white, signature line. */
.slide--contract {
  background: var(--white);
  color: var(--black);
}
.slide--contract .poster-title {
  font-size: 22cqw;
}
html[lang="ar"] .slide--contract .poster-title {
  font-size: 29cqw;
}
.slide--contract .slide__episode {
  background: var(--black);
  color: var(--white);
}
.signature {
  position: relative;
  margin-top: 12cqw;
  width: 70cqw;
}
.signature__ink {
  width: 62cqw;
  height: auto;
  margin-inline-start: 4cqw;
  margin-bottom: -4cqw;
  color: var(--red);
}
html[dir="rtl"] .signature__ink {
  transform: scaleX(-1);
}
.signature__ink path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.slide.is-active .signature__ink path {
  animation: sign 1.3s 0.9s cubic-bezier(0.55, 0, 0.3, 1) forwards;
}
@keyframes sign {
  to { stroke-dashoffset: 0; }
}
.signature__line {
  display: block;
  height: 0.7cqw;
  background: var(--black);
}
.signature__label {
  display: block;
  margin-top: 1.6cqw;
  font-size: 3.6cqw;
  font-weight: 600;
}

/* Poster three: red, a message arrives. */
.slide--message {
  background: var(--red);
  color: var(--black);
}
.slide--message .poster-title {
  font-size: 22cqw;
}
html[lang="ar"] .slide--message .poster-title {
  font-size: 25cqw;
}
.slide--message .slide__episode {
  background: var(--black);
  color: var(--white);
}
.bubble {
  align-self: flex-start;
  margin-top: 11cqw;
  padding: 3.4cqw 4.6cqw 2.6cqw;
  border-radius: 6cqw 6cqw 6cqw 1.2cqw;
  background: var(--white);
  font-size: 5.6cqw;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(4cqw) scale(0.92);
  transform-origin: bottom left;
}
html[dir="rtl"] .bubble {
  border-radius: 6cqw 6cqw 1.2cqw 6cqw;
  transform-origin: bottom right;
}
.bubble__time {
  display: block;
  margin-top: 0.8cqw;
  font-size: 3cqw;
  font-weight: 500;
  color: var(--graphite);
  text-align: end;
}
.slide.is-active .bubble {
  animation: bubble-in 0.45s 1.1s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
@keyframes bubble-in {
  to { opacity: 1; transform: none; }
}

/* On-screen controls */
.reel-controls {
  position: absolute;
  bottom: 11cqw;
  inset-inline-end: 4cqw;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2.4cqw;
}
.reel-btn {
  display: grid;
  place-items: center;
  width: max(11cqw, 36px);
  height: max(11cqw, 36px);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28);
  color: var(--white);
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.15s ease;
}
.reel-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}
.reel-btn:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--black);
}
.reel-btn svg {
  width: 52%;
  height: 52%;
  fill: currentColor;
}
.reel-btn .icon-play,
.is-user-paused .reel-btn .icon-pause {
  display: none;
}
.is-user-paused .reel-btn .icon-play {
  display: block;
}

/* --- signup ----------------------------------------------------------- */

.signup {
  margin-top: 28px;
  max-width: 480px;
}

.signup__label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
}

.signup__row {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: var(--white);
}
.signup__row:focus-within {
  outline: 3px solid var(--black);
  outline-offset: 3px;
}
.signup__input {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  border: 0;
  background: transparent;
  font-size: 17px;
  text-align: start;
}
html[dir="rtl"] .signup__input {
  text-align: right;
}
.signup__input::placeholder {
  color: #767676;
}
.signup__input:focus {
  outline: none;
}
.signup__row .btn {
  min-height: 50px;
}

.toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  border: 0;
}
.toggle__legend {
  float: inline-start;
  margin-inline-end: 6px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
}
.toggle__opt {
  position: relative;
  cursor: pointer;
}
.toggle__opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.toggle__opt span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--black);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.toggle__opt input:checked + span {
  background: var(--black);
  color: var(--white);
}
.toggle__opt input:focus-visible + span {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

.signup__privacy {
  margin-top: 16px;
  max-width: 44ch;
  font-size: 14px;
  line-height: 1.5;
}

.signup__done {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--black);
  color: var(--white);
}
.signup__done:focus {
  outline: none;
}
.signup__check {
  flex: none;
  width: 44px;
  height: 44px;
  color: var(--red);
}
.signup__check path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: sign 0.5s 0.15s ease-out forwards;
}
.signup__done-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.signup__done p + p {
  margin-top: 4px;
  color: #d9d9d9;
}

/* --- hero, tablet: copy beside the phone -------------------------------- */

@media (min-width: 760px) and (max-width: 1199px) {
  .hero {
    --overlap: 120px;
    --pad-b: 64px;
    --tab-w: clamp(260px, 31vw, 320px);
    padding-bottom: var(--pad-b);
  }
  .hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--tab-w);
    grid-template-rows: auto auto 1fr;
    column-gap: clamp(32px, 5vw, 64px);
    min-height: calc(var(--tab-w) * 2.1667 - var(--overlap) - var(--pad-b));
  }
  .hero__title {
    grid-column: 1;
    grid-row: 1;
    font-size: clamp(52px, 7.4vw, 80px);
  }
  .hero__body {
    grid-column: 1;
    grid-row: 2;
  }
  .hero__availability {
    grid-column: 1;
    grid-row: 3;
  }
  .phone {
    --w: var(--tab-w);
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: end;
    margin: 0 0 calc(-1 * (var(--overlap) + var(--pad-b)));
  }
  .about {
    padding-top: 230px;
  }
}

/* --- hero, wide layout ------------------------------------------------ */

@media (min-width: 1200px) {
  .hero {
    --overlap: 150px;
    --pad-b: 64px;
    padding-top: clamp(40px, 5vw, 72px);
    padding-bottom: var(--pad-b);
  }

  .hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--phone-w) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: clamp(28px, 3.2vw, 60px);
    min-height: calc(var(--phone-w) * 2.1667 - var(--overlap) - var(--pad-b));
  }

  .hero__title {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--phone-w) minmax(0, 1fr);
    column-gap: clamp(28px, 3.2vw, 60px);
    padding-top: calc(var(--phone-w) * 0.2);
    font-size: clamp(56px, 5.5vw, 88px);
  }
  html[lang="ar"] .hero__title {
    padding-top: calc(var(--phone-w) * 0.1);
    font-size: clamp(52px, 5vw, 80px);
  }
  html[lang="ar"] .hero__lede {
    font-size: 19px;
  }
  .hero__half--a {
    grid-column: 1;
    text-align: end;
  }
  .hero__half--b {
    grid-column: 3;
    text-align: start;
  }

  /* Anchored to the bottom so it always bleeds into the next section by --overlap. */
  .phone {
    --w: var(--phone-w);
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: end;
    margin: 0 0 calc(-1 * (var(--overlap) + var(--pad-b)));
  }

  .hero__body {
    grid-column: 3;
    grid-row: 2;
    margin-top: 32px;
  }

  .hero__availability {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin-top: 36px;
    text-align: end;
  }

  /* The one orchestrated moment: the headline slides out from behind the screen. */
  @media (prefers-reduced-motion: no-preference) {
    .hero__half {
      animation: escape-frame 1s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    .hero__half--a {
      --from: calc(var(--dir) * 45%);
    }
    .hero__half--b {
      --from: calc(var(--dir) * -45%);
    }
    .phone {
      animation: phone-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
  }
}

@keyframes escape-frame {
  from { transform: translateX(var(--from)); opacity: 0; }
  30% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
@keyframes phone-rise {
  from { transform: translateY(40px); }
  to { transform: none; }
}

/* ================================================================ ABOUT */

.about {
  position: relative;
  z-index: 1;
  padding: calc(min(74vw, 320px) * 0.62 + 64px) var(--edge) clamp(80px, 9vw, 130px);
  background: var(--black);
  color: var(--white);
}
.about :focus-visible {
  outline-color: var(--white);
}

.about__title {
  max-width: 17ch;
  font-size: clamp(36px, 4.6vw, 70px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: var(--tight);
}
html[lang="ar"] .about__title {
  line-height: 1.3;
}

.about__list {
  display: grid;
  gap: 36px;
  margin-top: clamp(40px, 5vw, 72px);
}
.about__item {
  padding-top: 20px;
  border-top: 2px solid #333;
}
.about__item h3 {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}
.about__item p {
  max-width: 36ch;
  margin-top: 10px;
  color: var(--ash);
}

@media (min-width: 760px) {
  .about__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(28px, 3.5vw, 56px);
  }
}

@media (min-width: 1000px) {
  .about {
    padding-top: 270px;
  }
  .about__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--phone-w) minmax(0, 1fr);
    column-gap: clamp(28px, 3.2vw, 60px);
  }
  .about__title,
  .about__list {
    grid-column: 1 / -1;
  }
}

/* ============================================================= CREATORS */

.creators {
  padding: clamp(72px, 9vw, 140px) var(--edge);
  background: var(--white);
}

.creators__inner {
  display: grid;
  gap: 56px;
}

.creators__title {
  max-width: 13ch;
  font-size: clamp(40px, 5vw, 76px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: var(--tight);
}
html[lang="ar"] .creators__title {
  line-height: 1.25;
}

.creators__lede {
  max-width: 42ch;
  margin-top: 24px;
  font-size: clamp(17px, 1.3vw, 19px);
}

.creators__subhead {
  margin-top: 44px;
  font-size: 15px;
  font-weight: 700;
}

.steps {
  position: relative;
  margin-top: 18px;
  counter-reset: step;
}
.steps__item {
  position: relative;
  padding-inline-start: 56px;
  padding-bottom: 22px;
  counter-increment: step;
}
.steps__item::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--red);
  color: var(--white);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}
.steps__item::after {
  content: "";
  position: absolute;
  inset-inline-start: 17px;
  top: 40px;
  bottom: 2px;
  width: 2px;
  background: var(--black);
}
.steps__item:last-child {
  padding-bottom: 0;
}
.steps__item:last-child::after {
  display: none;
}
.steps__item h4 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}
.steps__item p {
  margin-top: 2px;
  font-size: 16px;
  color: var(--graphite);
}

.creators__fit {
  max-width: 44ch;
  margin-top: 10px;
  font-size: 16px;
  color: var(--graphite);
}

.creators__questions {
  margin-top: 28px;
  font-size: 15px;
}
.creators__questions a {
  font-weight: 600;
}

@media (min-width: 1000px) {
  .creators__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(48px, 6vw, 110px);
    align-items: start;
  }
}
@media (min-width: 1000px) and (min-height: 860px) {
  .creators__intro {
    position: sticky;
    top: 40px;
  }
}

/* --- submission form ------------------------------------------------- */

.form-summary {
  margin-bottom: 28px;
  padding: 16px 20px;
  border-radius: var(--control-radius);
  background: var(--red-wash);
  color: var(--red-deep);
  font-weight: 600;
  box-shadow: inset 4px 0 0 var(--red-deep);
}
html[dir="rtl"] .form-summary {
  box-shadow: inset -4px 0 0 var(--red-deep);
}

.pitch__group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.pitch__group + .pitch__group {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 2px solid var(--black);
}
.pitch__legend {
  float: inline-start;
  width: 100%;
  margin-bottom: 24px;
  padding: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: var(--tight);
}
.pitch__grid {
  clear: both;
  display: grid;
  gap: 22px 20px;
}

@media (min-width: 640px) {
  .pitch__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .pitch__grid > .field {
    grid-column: span 3;
  }
  .pitch__grid > .field--wide {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1200px) {
  .pitch__grid > .field--third {
    grid-column: span 2;
  }
}

.field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > label:not(.check),
.field__label,
.chips > legend {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.field__optional {
  font-weight: 400;
  color: var(--graphite);
}
.field__hint {
  margin: -2px 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--graphite);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 2px solid transparent;
  border-radius: var(--control-radius);
  background: var(--mist);
  font-size: 17px;
  line-height: 1.4;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea {
  resize: vertical;
  line-height: 1.55;
}
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #c9c9c9;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--black);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(255, 25, 53, 0.28);
}
.field [aria-invalid="true"] {
  border-color: var(--red-deep);
  background-color: var(--red-wash);
}
html[dir="rtl"] .field input[dir="ltr"] {
  text-align: right;
}
html[dir="rtl"] .field textarea[dir="ltr"] {
  text-align: left;
}

.field select {
  appearance: none;
  padding-inline-end: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 20px;
  background-position: right 16px center;
  cursor: pointer;
}
html[dir="rtl"] .field select {
  background-position: left 16px center;
}

.field__count {
  margin-top: 6px;
  font-size: 13px;
  color: var(--graphite);
  text-align: end;
}
.field__count.is-low {
  color: var(--red-deep);
  font-weight: 600;
}

.field__error {
  --err: var(--red-deep);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--err);
}
.field__error::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--err);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.field__error--on-red {
  --err: var(--black);
}

/* genre chips */
.chips__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  cursor: pointer;
}
.chip input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--black);
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.chip:hover span {
  background: var(--mist);
}
.chip input:checked + span {
  background: var(--black);
  color: var(--white);
}
.chip input:checked + span::before {
  content: "";
  width: 12px;
  height: 7px;
  margin-top: -3px;
  border-inline-start: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg);
}
html[dir="rtl"] .chip input:checked + span::before {
  transform: rotate(45deg) scaleX(-1);
}
.chip input:focus-visible + span {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* file drop */
.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 30px 24px 24px;
  border: 2px dashed var(--black);
  border-radius: 18px;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.dropzone.is-dragover {
  border-style: solid;
  border-color: var(--red);
  background: var(--red-wash);
}
.dropzone:focus-within {
  outline: 3px solid var(--black);
  outline-offset: 3px;
}
.dropzone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.dropzone__icon {
  width: 40px;
  height: 40px;
  color: var(--red);
}
.dropzone__text {
  font-size: 16px;
  font-weight: 500;
}
.dropzone__browse {
  color: var(--red-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  cursor: pointer;
}
.dropzone .field__hint {
  margin: 0;
  max-width: 46ch;
}

.filelist {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.filelist:empty {
  display: none;
}
.filelist li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 6px 6px 16px;
  border-radius: 12px;
  background: var(--mist);
}
html[dir="rtl"] .filelist li {
  padding: 6px 16px 6px 6px;
}
.filelist__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filelist__size {
  flex: none;
  font-size: 14px;
  color: var(--graphite);
}
.filelist__remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.filelist__remove:hover {
  background: var(--white);
}
.filelist__remove svg {
  width: 18px;
  height: 18px;
}

/* consent */
.pitch__consent {
  display: grid;
  gap: 14px;
  margin: 40px 0 32px;
  padding-top: 32px;
  border-top: 2px solid var(--black);
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
}
.check input {
  flex: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid var(--black);
  border-radius: 7px;
  background: var(--white);
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.check input:checked {
  background: var(--black) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.check input[aria-invalid="true"] {
  border-color: var(--red-deep);
  background-color: var(--red-wash);
}
.check input:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}
.check a {
  font-weight: 600;
}
.pitch__consent .field__error {
  margin-inline-start: 36px;
}

.pitch .btn--big {
  width: 100%;
}
@media (min-width: 640px) {
  .pitch .btn--big {
    width: auto;
  }
}

.upload-bar {
  display: block;
  height: 5px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mist);
}
.upload-bar span {
  display: block;
  width: var(--pct, 0%);
  height: 100%;
  background: var(--red);
  transition: width 0.2s linear;
}

/* success */
.submit-done {
  display: grid;
  gap: 28px;
  padding: clamp(28px, 4vw, 56px);
  background: var(--red);
}
.submit-done:focus {
  outline: none;
}
.submit-done__logo {
  width: 88px;
  height: auto;
  color: var(--white);
}
.submit-done__title {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: var(--tight);
  color: var(--white);
}
html[lang="ar"] .submit-done__title {
  line-height: 1.25;
}
.submit-done__body {
  max-width: 40ch;
  margin-top: -12px;
  font-size: 19px;
}
.submit-done__ref {
  font-weight: 800;
  white-space: nowrap;
}
.submit-done .btn--line {
  justify-self: start;
}
@media (min-width: 640px) {
  .submit-done {
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: 36px;
  }
  .submit-done__logo {
    grid-row: 1 / span 3;
    width: 112px;
  }
  .submit-done__body {
    margin-top: 0;
  }
}

/* ================================================================ FOOTER */

.site-footer {
  padding: clamp(64px, 7vw, 100px) var(--edge) 36px;
  background: var(--black);
  color: var(--white);
}
.site-footer :focus-visible {
  outline-color: var(--white);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 28px;
}
.site-footer__brand,
.site-footer__col--contact {
  grid-column: 1 / -1;
}
.site-footer__logo {
  width: 104px;
  height: auto;
  color: var(--white);
}
.site-footer__brand p {
  max-width: 24ch;
  margin-top: 20px;
  color: var(--ash);
}

.site-footer__col h2 {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 700;
}
.site-footer__col li + li {
  margin-top: 8px;
}
.site-footer__col a {
  color: var(--ash);
  text-decoration: none;
}
.site-footer__col a:hover {
  color: var(--white);
  text-decoration: underline;
}
html[dir="rtl"] .site-footer__col a[dir="ltr"] {
  unicode-bidi: isolate;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social li + li {
  margin-top: 0;
}
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px #3d3d3d;
  color: var(--white);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.social a:hover {
  background: var(--red);
  box-shadow: inset 0 0 0 2px var(--red);
}
.social svg {
  width: 20px;
  height: 20px;
}

.site-footer__legal {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid #333;
  font-size: 14px;
  color: var(--ash);
}

@media (min-width: 900px) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
  }
  .site-footer__brand,
  .site-footer__col--contact {
    grid-column: auto;
  }
}

/* ============================================================ LEGAL PAGE */

.legal {
  padding: clamp(48px, 7vw, 100px) var(--edge) clamp(72px, 9vw, 130px);
}
.legal__inner {
  max-width: 68ch;
}
.legal h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: var(--tight);
}
html[lang="ar"] .legal h1 {
  line-height: 1.3;
}
.legal__updated {
  margin-top: 12px;
  color: var(--graphite);
  font-size: 15px;
}
.legal h2 {
  margin-top: 40px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}
.legal p,
.legal ul {
  margin-top: 12px;
}
.legal ul {
  list-style: disc;
  padding-inline-start: 1.3em;
}
.legal li + li {
  margin-top: 6px;
}
.legal__back {
  display: inline-block;
  margin-top: 48px;
  font-weight: 700;
}

/* ================================================================ MOBILE */

@media (max-width: 759px) {
  .masthead {
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .masthead__nav a:first-child {
    display: none;
  }
  .masthead__nav {
    gap: 16px;
  }
  .masthead__nav a {
    font-size: 15px;
  }
  .masthead__name {
    display: none;
  }
}

@media (max-width: 420px) {
  .signup__row {
    flex-direction: column;
  }
  .signup__input {
    min-height: 48px;
  }
}

/* ======================================================== REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reel {
    transition: none;
  }
  .signature__ink path,
  .signup__check path {
    stroke-dashoffset: 0;
    animation: none !important;
  }
  .bubble {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}
