/* ==========================================================================
   Hero — eyebrow, headline, copy, signup form
   Light theme: centred.  Dark theme: left aligned, different copy.
   ========================================================================== */

.hero {
  padding-top: clamp(22px, 4vw, 38px);
}

.hero > *,
.hero__copy > * {
  animation: fade-up 0.9s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 90ms + 80ms);
}

/* ------------------------------- Eyebrow -------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow__box {
  display: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--ink-soft);
}

.eyebrow__text {
  display: inline-block;
}

/* ------------------------------ Shared copy ------------------------------ */

.hero__title {
  font-family: var(--font-display);
  font-weight: var(--hero-weight);
  line-height: 0.96;
  letter-spacing: -0.015em;
  text-wrap: balance;
}


.hero__lead {
  color: var(--ink-soft);
  text-wrap: pretty;
}

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

:root[data-theme="light"] .hero {
  text-align: center;
}

:root[data-theme="light"] .hero__copy--dark,
:root[data-theme="dark"] .hero__copy--light {
  display: none;
}

:root[data-theme="light"] .eyebrow {
  justify-content: center;
  animation: none;
}

:root[data-theme="light"] .eyebrow__text {
  padding-bottom: 7px;
  border-bottom: 1px solid var(--ink-soft);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

:root[data-theme="light"] .hero__title {
  margin-top: clamp(30px, 6vw, 52px);
  font-size: clamp(2.7rem, 9.3vw, 6.6rem);
}

:root[data-theme="light"] .hero__subtitle {
  margin-top: clamp(18px, 2.8vw, 26px);
  font-family: var(--font-sans);
  font-size: clamp(1.45rem, 3.6vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

:root[data-theme="light"] .hero__lead {
  max-width: 28em;
  margin: clamp(14px, 2vw, 18px) auto 0;
  font-size: clamp(1rem, 1.9vw, 1.12rem);
  line-height: 1.45;
}

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

:root[data-theme="dark"] .hero {
  text-align: start;
  padding-top: clamp(22px, 4vw, 36px);
}

:root[data-theme="dark"] .eyebrow__box {
  display: block;
}

:root[data-theme="dark"] .eyebrow__text {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

:root[data-theme="dark"] .hero__subtitle {
  display: none;
}

:root[data-theme="dark"] .hero__title {
  margin-top: clamp(16px, 2.6vw, 24px);
  font-size: clamp(2.3rem, 7.3vw, 5rem);
  line-height: 0.98;
}

:root[data-theme="dark"] .hero__lead {
  max-width: 31em;
  margin-top: clamp(16px, 2.2vw, 22px);
  font-size: clamp(1rem, 1.9vw, 1.1rem);
  line-height: 1.5;
  color: var(--ink);
}

.hero__proof {
  display: grid;
  gap: 4px;
  margin-top: clamp(18px, 2.6vw, 24px);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.hero__proof strong {
  font-weight: 400;
  font-size: clamp(0.72rem, 1.5vw, 0.84rem);
  letter-spacing: 0.14em;
  color: var(--ink);
}

.hero__proof span {
  font-size: clamp(0.64rem, 1.3vw, 0.74rem);
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}

/* ------------------------------ Signup form ------------------------------ */

.signup {
  margin-top: clamp(30px, 4.6vw, 44px);
}

.signup__label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  text-align: start;
}

.signup__row {
  display: flex;
  align-items: stretch;
}

.signup__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 20px;
  background: transparent;
  border: 1px solid var(--field);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.signup__input::placeholder {
  color: var(--placeholder);
}

.signup__input:hover {
  border-color: var(--ink-soft);
}

.signup__input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent);
}

.btn-primary {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 42px;
  padding: 0 26px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, opacity 0.2s ease;
}

.btn-primary .icon {
  font-size: 17px;
  transition: transform 0.3s var(--ease-out);
}

.btn-primary:hover .icon {
  transform: translateX(4px);
}

/* RTL: the arrow (and its hover nudge) should point toward reading-forward, i.e. left. */
:root[dir="rtl"] .btn-primary .icon {
  transform: scaleX(-1);
}

:root[dir="rtl"] .btn-primary:hover .icon {
  transform: scaleX(-1) translateX(4px);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary[disabled] {
  opacity: 0.65;
}

.signup__note {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.signup.is-error .signup__note {
  color: #d8423a;
}

.signup.is-error .signup__input {
  border-color: #d8423a;
  animation: shake 0.4s ease;
}

.signup.is-success .signup__note {
  color: var(--ink);
}

/* Light: centred 560px form, label above */
:root[data-theme="light"] .signup {
  max-width: 560px;
  margin-inline: auto;
}

:root[data-theme="light"] .signup__note {
  text-align: center;
}

:root[data-theme="light"] .btn-primary {
  min-width: 178px;
  padding: 0 24px;
}

/* Dark: left aligned, label hidden, gap between field and button */
:root[data-theme="dark"] .signup {
  max-width: 610px;
  margin-top: clamp(26px, 4vw, 38px);
}

:root[data-theme="dark"] .signup__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

:root[data-theme="dark"] .signup__row {
  gap: 6px;
}

:root[data-theme="dark"] .signup__input {
  background: #0d0d0d;
}

:root[data-theme="dark"] .btn-primary {
  min-width: 215px;
  font-size: 0.86rem;
}

:root[data-theme="dark"] .signup__note {
  margin-top: 14px;
  color: var(--ink-mute);
}

/* ------------------------------- Arabic -------------------------------- */
/* Arabic glyphs (ascenders, descenders, stacked diacritics) need real
   line-height — the Latin display font's near-zero leading overlaps lines.
   Selectors are kept as specific as the theme rules above so they win
   regardless of theme. */

:root[lang="ar"][data-theme="light"] .hero__title,
:root[lang="ar"][data-theme="dark"] .hero__title {
  line-height: 1.35;
  letter-spacing: 0;
}
