/* ===========================================================
   MULTILINGUAL LANDING PAGE
   Distinctive layout + motion, built on the site's tokens.
   =========================================================== */

.ml-eyebrow {
  font-family: var(--mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--coral);
  font-weight: 500;
  margin: 0 0 18px;
}

.ml-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- HERO ---------- */
.ml-hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 88px;
  background:
    radial-gradient(1100px 520px at 78% -10%, var(--coral-soft) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
  border-bottom: 1px solid var(--rule);
}
/* floating script glyphs in the background */
.ml-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.ml-hero-bg span {
  position: absolute;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--coral-deep);
  opacity: 0.07;
  line-height: 1;
  animation: ml-float 14s ease-in-out infinite;
}
.ml-hero-bg span:nth-child(1)  { top: 8%;  left: 6%;   font-size: 8rem;  animation-delay: 0s; }
.ml-hero-bg span:nth-child(2)  { top: 58%; left: 3%;   font-size: 11rem; animation-delay: -2s; }
.ml-hero-bg span:nth-child(3)  { top: 18%; left: 88%;  font-size: 9rem;  animation-delay: -4s; }
.ml-hero-bg span:nth-child(4)  { top: 70%; left: 80%;  font-size: 12rem; animation-delay: -1s; }
.ml-hero-bg span:nth-child(5)  { top: 4%;  left: 46%;  font-size: 6rem;  animation-delay: -6s; }
.ml-hero-bg span:nth-child(6)  { top: 82%; left: 40%;  font-size: 7rem;  animation-delay: -3s; }
.ml-hero-bg span:nth-child(7)  { top: 40%; left: 70%;  font-size: 6rem;  animation-delay: -5s; }
.ml-hero-bg span:nth-child(8)  { top: 30%; left: 24%;  font-size: 5rem;  animation-delay: -7s; }
.ml-hero-bg span:nth-child(9)  { top: 88%; left: 64%;  font-size: 6rem;  animation-delay: -2.5s; }
.ml-hero-bg span:nth-child(10) { top: 52%; left: 52%;  font-size: 5rem;  animation-delay: -4.5s; }
.ml-hero-bg span:nth-child(11) { top: 12%; left: 68%;  font-size: 7rem;  animation-delay: -1.5s; }
.ml-hero-bg span:nth-child(12) { top: 64%; left: 18%;  font-size: 6rem;  animation-delay: -5.5s; }
@keyframes ml-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-18px) rotate(2deg); }
}

.ml-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
}
.ml-hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 26px;
  font-variation-settings: "opsz" 144;
}
/* the animated language rotator inside the headline */
.ml-rotator {
  display: inline-flex;
  vertical-align: bottom;
  height: 1.08em;
  overflow: hidden;
  position: relative;
  top: 0.02em;
}
.ml-rotator-track {
  display: inline-flex;
  flex-direction: column;
  animation: ml-rotate 12s cubic-bezier(0.7, 0, 0.3, 1) infinite;
}
.ml-rotator-track span {
  height: 1.08em;
  display: inline-flex;
  align-items: center;
  color: var(--coral-deep);
  font-style: italic;
  white-space: nowrap;
  padding-right: 0.1em;
}
/* 8 items (first repeated at the end) -> 7 visible steps */
@keyframes ml-rotate {
  0%,    10%   { transform: translateY(0); }
  13%,   23%   { transform: translateY(-1.08em); }
  26%,   36%   { transform: translateY(-2.16em); }
  39%,   49%   { transform: translateY(-3.24em); }
  52%,   62%   { transform: translateY(-4.32em); }
  65%,   75%   { transform: translateY(-5.4em); }
  78%,   88%   { transform: translateY(-6.48em); }
  91%,   100%  { transform: translateY(-7.56em); }
}
.ml-hero-lead {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 0 32px;
}
.ml-hero-lead code,
.ml-section-lead code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  padding: 1px 7px;
  border-radius: 4px;
  color: #b6452f;
}
.ml-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- BUTTONS ---------- */
.ml-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 30px;
  border-radius: 100px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
}
.ml-btn-primary {
  background: var(--ink);
  color: #fff;
}
.ml-btn-primary:hover {
  background: var(--coral-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(168, 65, 47, 0.28);
}
.ml-btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--rule);
}
.ml-btn-ghost:hover {
  border-color: var(--coral);
  color: var(--coral-deep);
}

/* ---------- BREADCRUMB tweak ---------- */
.ml-breadcrumb {
  position: static;
  margin: 28px 0 0;
  padding: 0;
  background: none;
  border: none;
}
.ml-breadcrumb::before { display: none; }

/* ---------- SECTION HEADS ---------- */
.ml-section-head {
  max-width: 720px;
  margin: 0 0 48px;
}
.ml-section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "opsz" 60;
}
.ml-section-lead {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 16px 0 0;
}

/* ---------- REPAIR GRID ---------- */
.ml-repair {
  padding: 96px 0;
}
.ml-repair-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px 20px;
  align-items: center;
}
.ml-repair-head {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding-bottom: 6px;
}
.ml-repair-head-from { color: var(--ink-muted); }
.ml-repair-head-to { color: var(--coral-deep); text-align: right; }
.ml-repair-head-spacer { content: ""; }
.ml-repair-row {
  display: contents;
}
.ml-chip {
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 1.0625rem;
  border: 1px solid var(--rule);
}
.ml-chip-broken {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: #a98e72;
  background: repeating-linear-gradient(
    45deg,
    #f2ebdf,
    #f2ebdf 8px,
    #efe6d6 8px,
    #efe6d6 16px
  );
  word-break: break-all;
}
.ml-chip-clean {
  background: var(--bg-card);
  border-color: var(--coral-soft);
  color: var(--ink);
  font-weight: 500;
  text-align: right;
  box-shadow: var(--shadow-card);
}
.ml-repair-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}
.ml-flag {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.ml-enc {
  font-family: var(--mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ---------- WALL OF SCRIPTS ---------- */
.ml-wall {
  padding: 96px 0;
  background: var(--bg-warm);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.ml-wall-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.ml-wall-card {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.ml-wall-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--coral-soft);
}
.ml-wall-lang {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.ml-wall-text {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--ink);
  font-variation-settings: "opsz" 36;
}
.ml-wall-card [dir="rtl"] {
  text-align: right;
}

/* ---------- HOW IT WORKS ---------- */
.ml-how {
  padding: 96px 0;
}
.ml-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
}
.ml-step {
  background: var(--bg-card);
  padding: 36px 30px 34px;
  position: relative;
}
.ml-step-num {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--coral);
  display: block;
  margin-bottom: 18px;
}
.ml-step h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.375rem;
  color: var(--ink);
  margin: 0 0 10px;
  font-variation-settings: "opsz" 36;
}
.ml-step p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- ENCODING SPEC ---------- */
.ml-spec {
  padding: 96px 0;
  background: var(--ink);
  color: #f4ede3;
}
.ml-spec .ml-eyebrow { color: var(--coral); }
.ml-spec-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.ml-spec-text h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: #fffefb;
  margin: 0 0 16px;
  font-variation-settings: "opsz" 60;
}
.ml-spec-text .ml-section-lead {
  color: #d8cdbd;
  margin: 0 0 16px;
}
.ml-spec-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  color: #b3a591;
  margin: 0;
  font-variation-settings: "opsz" 24;
}
.ml-spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ml-spec-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  transition: background 0.16s, border-color 0.16s;
}
.ml-spec-list li:hover {
  background: rgba(208, 89, 69, 0.12);
  border-color: rgba(208, 89, 69, 0.4);
}
.ml-spec-name {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fffefb;
}
.ml-spec-desc {
  font-size: 0.8125rem;
  color: #a99c89;
  text-align: right;
}

/* ---------- FAQ ---------- */
.ml-faq {
  padding: 96px 0;
}
.ml-faq-list {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
}
.ml-faq-item {
  background: var(--bg-card);
  padding: 28px 30px;
}
.ml-faq-item h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1875rem;
  color: var(--ink);
  margin: 0 0 8px;
  font-variation-settings: "opsz" 30;
}
.ml-faq-item p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- CTA ---------- */
.ml-cta-section {
  padding: 0 0 96px;
}
.ml-cta {
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--coral-soft) 150%);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 56px 48px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.ml-cta-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--coral-deep);
  font-weight: 600;
  margin: 0 0 12px;
}
.ml-cta h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 16px;
  font-variation-settings: "opsz" 60;
}
.ml-cta p {
  font-size: 1.03125rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 26px;
}
.ml-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.ml-cta-note {
  margin: 24px 0 0 !important;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9375rem !important;
  color: var(--ink-muted) !important;
  font-variation-settings: "opsz" 24;
}

/* ---------- RELATED spacing ---------- */
.ml-related {
  margin-bottom: 96px;
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .ml-hero-bg span { animation: none; }
  .ml-rotator-track { animation: none; }
  /* show just the first language if motion is off */
  .ml-rotator { height: auto; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .ml-wall-grid { grid-template-columns: repeat(2, 1fr); }
  .ml-steps { grid-template-columns: 1fr; }
  .ml-spec-inner { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 820px) {
  .ml-hero { padding: 72px 0 64px; }
  .ml-repair, .ml-wall, .ml-how, .ml-spec, .ml-faq { padding: 64px 0; }
  .ml-cta { padding: 40px 28px; }
}
@media (max-width: 640px) {
  /* repair grid: stack each row as broken -> meta -> clean */
  .ml-repair-grid { grid-template-columns: 1fr; gap: 0; }
  .ml-repair-head, .ml-repair-head-spacer { display: none; }
  .ml-repair-row {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
  }
  .ml-repair-row:last-child { border-bottom: none; }
  .ml-repair-meta {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 2px;
  }
  .ml-chip-clean { text-align: left; }
  .ml-wall-grid { grid-template-columns: 1fr; }
}
