:root {
  --ink: #142018;
  --fog: #e7eee5;
  --leaf: #2f6b45;
  --leaf-deep: #1e4a2f;
  --sunlit: #e4ef9a;
  --sunlit-hot: #f0f6b8;
  --hero-fg: #f4f7f2;
  --hero-muted: rgba(244, 247, 242, 0.88);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --shell: 70rem;
  --gutter: clamp(1.35rem, 4.5vw, 3.5rem);
  --section-y: clamp(5rem, 10vw, 8rem);
  --top-h: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--fog);
  font-family: "Figtree", "Trebuchet MS", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body,
html[dir="rtl"] body {
  font-family: "IBM Plex Sans Arabic", "Figtree", "Trebuchet MS", sans-serif;
}

html[lang="ar"] .brand,
html[lang="ar"] .top-brand,
html[lang="ar"] .auth-brand,
html[lang="ar"] .foot-brand {
  font-family: "Syne", "IBM Plex Sans Arabic", sans-serif;
}

html[lang="ar"] .slogan,
html[lang="ar"] .system h2,
html[lang="ar"] .control h2,
html[lang="ar"] .pillar-body strong,
html[lang="ar"] .auth-panel h1,
html[lang="ar"] .app-main h1 {
  font-family: "IBM Plex Sans Arabic", "Syne", sans-serif;
  letter-spacing: 0;
}

::selection {
  background: rgba(47, 107, 69, 0.28);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 40;
  padding: 0.55rem 0.9rem;
  border-radius: 0.35rem;
  background: var(--ink);
  color: var(--hero-fg);
  font-weight: 600;
  font-size: 0.92rem;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}

.skip:focus {
  transform: translateY(0);
}

/* —— Header —— */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  color: #fff;
  mix-blend-mode: difference;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--top-h);
  min-width: 0;
}

.logo-mark {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  color: currentColor;
}

.logo-mark.logo-hero {
  width: clamp(2.6rem, 5vw, 3.4rem);
  height: clamp(2.6rem, 5vw, 3.4rem);
}

.top-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  font-family: "Syne", "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.brand-lockup {
  display: grid;
  gap: 0.7rem;
  justify-items: start;
  margin: 0 0 0.65rem;
}

.brand-lockup .brand,
.brand-lockup .auth-brand {
  margin: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 0.85rem 1.35rem;
  min-width: 0;
}

.top-link {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.88;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.top-link:hover,
.top-link-strong {
  opacity: 1;
}

.top-link:hover {
  border-bottom-color: currentColor;
}

.top-link-strong {
  font-weight: 600;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.lang-btn {
  min-width: 1.85rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.72;
  transition: background 0.25s var(--ease), opacity 0.25s var(--ease), color 0.25s var(--ease);
}

.lang-btn:hover,
.lang-btn.is-active {
  opacity: 1;
}

.lang-btn.is-active {
  background: rgba(255, 255, 255, 0.2);
}

.app-top .lang-toggle,
.auth-panel .lang-toggle {
  border-color: rgba(20, 32, 24, 0.18);
  color: var(--ink);
}

.app-top .lang-btn.is-active,
.auth-panel .lang-btn.is-active {
  background: rgba(47, 107, 69, 0.14);
  color: var(--leaf-deep);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  color: var(--hero-fg);
}

.hero-media,
.hero-veil {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 42%;
  transform: scale(1.06);
  animation: drift 34s var(--ease) infinite alternate;
  will-change: transform;
}

.hero-veil {
  z-index: 1;
  background:
    linear-gradient(
      180deg,
      rgba(8, 16, 12, 0.42) 0%,
      rgba(8, 16, 12, 0.08) 28%,
      rgba(8, 16, 12, 0.35) 58%,
      rgba(6, 14, 10, 0.88) 100%
    ),
    linear-gradient(
      95deg,
      rgba(6, 14, 10, 0.55) 0%,
      rgba(6, 14, 10, 0.28) 48%,
      transparent 74%
    );
}

.hero-frame {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  align-content: end;
  justify-items: start;
  column-gap: 1.5rem;
  padding-top: calc(var(--top-h) + 1rem);
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  min-height: 100vh;
  min-height: 100svh;
}

.hero-copy {
  grid-column: 1;
  grid-row: 2;
  width: min(100%, 38rem);
  /* Pull copy off the hard left edge toward the composition center */
  margin-inline-start: clamp(0.75rem, 9vw, 8rem);
  padding-bottom: 0.25rem;
}

.brand {
  margin: 0;
  font-family: "Syne", "Trebuchet MS", sans-serif;
  font-weight: 800;
  font-size: clamp(3.25rem, 9vw, 6.25rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 40px rgba(6, 14, 10, 0.45);
}

.slogan {
  margin: 0 0 0.9rem;
  max-width: 17ch;
  font-family: "Syne", "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 1.65rem;
  max-width: 32ch;
  color: var(--hero-muted);
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
}

.hero-scroll {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
  color: rgba(244, 247, 242, 0.75);
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}

.hero-scroll span {
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  animation: bob 1.8s var(--ease) infinite;
}

.hero-scroll:hover {
  color: #fff;
  transform: translateY(2px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.45rem;
  border-radius: 0.35rem;
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  transition:
    transform 0.35s var(--ease),
    background 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--sunlit);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(6, 14, 10, 0.28);
}

.btn-primary:hover {
  background: var(--sunlit-hot);
}

.btn-ghost {
  background: transparent;
  color: var(--hero-fg);
  border: 1px solid rgba(244, 247, 242, 0.5);
}

.btn-ghost:hover {
  border-color: #fff;
  background: rgba(244, 247, 242, 0.1);
}

.btn-sun {
  background: var(--sunlit);
  color: var(--ink);
}

.btn-sun:hover {
  background: var(--sunlit-hot);
}

.btn-leaf {
  background: var(--leaf);
  color: #fff;
  width: 100%;
}

.btn-leaf:hover {
  background: var(--leaf-deep);
}

.btn-quiet {
  min-height: 2.4rem;
  padding: 0.45rem 0.9rem;
  background: transparent;
  border: 1px solid rgba(20, 32, 24, 0.18);
  color: var(--ink);
  cursor: pointer;
}

.btn-quiet:hover {
  background: rgba(20, 32, 24, 0.05);
}

.control .cta-row {
  margin-top: 0.25rem;
}

.reveal {
  opacity: 0;
  transform: translateY(1.15rem);
  animation: rise 0.95s var(--ease) forwards;
}

.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

@keyframes bob {
  0%, 100% { transform: rotate(45deg) translateY(-3px); opacity: 0.55; }
  50% { transform: rotate(45deg) translateY(2px); opacity: 1; }
}

.rise-on-scroll {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.1s);
}

.rise-on-scroll.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* —— System: split composition —— */
.system {
  position: relative;
  padding-block: var(--section-y);
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(47, 107, 69, 0.1), transparent 55%),
    radial-gradient(ellipse 45% 40% at 100% 100%, rgba(196, 168, 78, 0.1), transparent 50%),
    var(--fog);
}

.system-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.system-intro {
  display: grid;
  gap: 1rem;
  padding-top: 0.2rem;
  position: sticky;
  top: calc(var(--top-h) + 1rem);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--leaf);
}

.eyebrow.light {
  color: var(--sunlit);
}

.system h2 {
  margin: 0;
  font-family: "Syne", "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 12ch;
}

.system-lead {
  margin: 0;
  max-width: 34ch;
  color: #3a4f40;
  font-size: 1.08rem;
}

.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(20, 32, 24, 0.14);
}

.pillars li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 1rem 1.25rem;
  padding: 1.65rem 0;
  border-bottom: 1px solid rgba(20, 32, 24, 0.14);
}

.pillar-num {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--leaf);
  padding-top: 0.2rem;
}

.pillar-body {
  display: grid;
  gap: 0.4rem;
}

.pillar-body strong {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.pillar-body span {
  color: #4a5f50;
  font-size: 1.02rem;
  max-width: 34ch;
}

/* —— Control —— */
.control {
  position: relative;
  padding-block: clamp(5.5rem, 12vw, 9rem);
  background:
    linear-gradient(150deg, #122a1c 0%, #1c4630 45%, #2a6542 100%);
  color: var(--hero-fg);
  overflow: hidden;
}

.control-glow {
  position: absolute;
  inset: -20% -10% auto 40%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(228, 239, 154, 0.14), transparent 65%);
  pointer-events: none;
}

.control-panel {
  position: relative;
  max-width: 40rem;
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.control h2 {
  margin: 0;
  font-family: "Syne", "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 14ch;
}

.control-lead {
  margin: 0 0 0.75rem;
  max-width: 34ch;
  color: rgba(244, 247, 242, 0.86);
  font-size: 1.08rem;
}

/* —— Footer —— */
.foot {
  background: var(--ink);
  color: rgba(244, 247, 242, 0.62);
  font-size: 0.9rem;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  min-height: 4.25rem;
  padding-block: 1.25rem;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  color: var(--hero-fg);
}

.foot-brand .logo-mark {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--sunlit);
}

/* —— Breakpoints —— */
@media (max-width: 900px) {
  .system-grid {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .system-intro {
    position: static;
    max-width: 36rem;
  }

  .system h2 {
    max-width: 16ch;
  }

  .hero-frame {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    margin-inline-start: clamp(0.25rem, 3vw, 1.5rem);
  }

  .hero-scroll {
    display: none;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: clamp(1.1rem, 4.5vw, 1.5rem);
    --top-h: 3.85rem;
    --section-y: 4rem;
  }

  .top-nav {
    gap: 0.65rem 0.9rem;
  }

  /* Extra auth links crowd the rail — keep only account actions on small phones */
  .top-link-secondary {
    display: none;
  }

  .brand {
    font-size: clamp(2.9rem, 15vw, 4rem);
  }

  .slogan {
    max-width: 18ch;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-row .btn {
    width: 100%;
  }

  .pillars li {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    padding: 1.35rem 0;
  }

  .control {
    padding-block: 4.5rem;
  }

  .foot-bar {
    flex-direction: column;
    gap: 0.3rem;
    min-height: auto;
  }
}

/* —— Auth pages —— */
.auth-body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--fog);
}

.auth-stage {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  color: var(--hero-fg);
}

.auth-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.auth-visual-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 16, 12, 0.25), rgba(8, 16, 12, 0.78)),
    linear-gradient(90deg, rgba(8, 16, 12, 0.35), transparent 55%);
}

.auth-visual-copy {
  position: absolute;
  inset-block-end: 2.5rem;
  inset-inline-start: 2.5rem;
  z-index: 1;
  max-width: 22rem;
}

.auth-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.auth-panel-top .auth-home {
  margin-bottom: 0;
}

.auth-brand {
  margin: 0 0 0.5rem;
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.auth-visual-copy p:last-child {
  margin: 0;
  color: var(--hero-muted);
}

.auth-panel {
  display: grid;
  align-content: center;
  gap: 0.85rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: #f3f7f2;
}

.auth-home {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: #4a5f50;
  margin-bottom: 0.5rem;
}

.auth-home .logo-mark {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--leaf);
}

.auth-home:hover {
  color: var(--ink);
}

.brand-lockup.light {
  color: var(--hero-fg);
}

.auth-panel h1 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.auth-sub {
  margin: 0 0 0.5rem;
  color: #3a4f40;
  max-width: 34ch;
}

.auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 0.35rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2a3d30;
}

.field-hint {
  font-size: 0.82rem;
  color: #5a6f60;
  font-weight: 400;
}

.field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(20, 32, 24, 0.18);
  border-radius: 0.35rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.field input:focus {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(47, 107, 69, 0.18);
}

.auth-switch {
  margin: 0.35rem 0 0;
  color: #4a5f50;
  font-size: 0.98rem;
}

.auth-switch a {
  color: var(--leaf);
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

.auth-switch a:hover {
  border-bottom-color: currentColor;
}

.flash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.flash {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 0.35rem;
  font-size: 0.95rem;
}

.flash-error {
  background: rgba(140, 40, 40, 0.1);
  color: #6e2424;
}

.flash-ok {
  background: rgba(47, 107, 69, 0.12);
  color: var(--leaf-deep);
}

/* —— Logged-in app shell —— */
.app-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(47, 107, 69, 0.08), transparent 55%),
    var(--fog);
}

.app-top {
  border-bottom: 1px solid rgba(20, 32, 24, 0.1);
  background: rgba(243, 247, 242, 0.92);
  backdrop-filter: blur(8px);
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  gap: 1rem;
}

.top-brand.ink {
  color: var(--ink);
  mix-blend-mode: normal;
}

.app-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #3a4f40;
  font-weight: 500;
}

.app-main {
  padding-block: clamp(3rem, 8vw, 5rem);
  display: grid;
  gap: 0.85rem;
  max-width: 44rem;
}

.app-main h1 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.app-lead {
  margin: 0;
  max-width: 46ch;
  color: #3a4f40;
}

.app-farm-badge,
.app-note {
  margin: 0;
  color: #4a5f50;
  font-size: 0.95rem;
}

.app-note {
  max-width: 52ch;
  padding: 0.85rem 1rem;
  border-inline-start: 3px solid var(--leaf);
  background: rgba(47, 107, 69, 0.08);
}

.app-farm-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(47, 107, 69, 0.12);
  color: var(--leaf-deep);
  font-size: 0.82rem;
  font-weight: 600;
}

.ink-link {
  color: var(--leaf-deep);
  font-weight: 600;
  font-size: 0.95rem;
}

.farm-panel {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.25rem;
  max-width: 36rem;
}

.farm-panel-head h2 {
  margin: 0;
  font-family: "Syne", "IBM Plex Sans Arabic", sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.field-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.field-list a {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(20, 32, 24, 0.12);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.65);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.field-list a:hover {
  border-color: var(--leaf);
  transform: translateY(-1px);
}

.field-list strong {
  font-family: "Syne", "IBM Plex Sans Arabic", sans-serif;
}

.field-list span {
  color: #4a5f50;
  font-size: 0.95rem;
}

.app-empty {
  margin: 0;
  color: #4a5f50;
}

.field-form {
  margin-top: 0.25rem;
}

.flash-error {
  background: rgba(140, 40, 40, 0.1);
  color: #6e2424;
}

@media (max-width: 900px) {
  .auth-stage {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 34vh;
  }

  .auth-visual-copy {
    inset-block-end: 1.5rem;
    inset-inline-start: 1.5rem;
  }

  .auth-panel {
    min-height: 66vh;
  }
}

/* —— RTL layout polish —— */
html[dir="rtl"] .hero-media img {
  object-position: 42% 42%;
}

html[dir="rtl"] .hero-veil {
  background:
    linear-gradient(
      180deg,
      rgba(8, 16, 12, 0.42) 0%,
      rgba(8, 16, 12, 0.08) 28%,
      rgba(8, 16, 12, 0.35) 58%,
      rgba(6, 14, 10, 0.88) 100%
    ),
    linear-gradient(
      265deg,
      rgba(6, 14, 10, 0.55) 0%,
      rgba(6, 14, 10, 0.28) 48%,
      transparent 74%
    );
}

html[dir="rtl"] .slogan,
html[dir="rtl"] .system h2,
html[dir="rtl"] .control h2,
html[dir="rtl"] .lead,
html[dir="rtl"] .system-lead,
html[dir="rtl"] .control-lead,
html[dir="rtl"] .pillar-body span {
  max-width: none;
}

html[dir="rtl"] .slogan {
  max-width: 18ch;
}

html[dir="rtl"] .auth-stage {
  grid-template-columns: minmax(22rem, 0.95fr) minmax(0, 1.05fr);
}

html[dir="rtl"] .auth-visual {
  order: 2;
}

html[dir="rtl"] .auth-panel {
  order: 1;
}

@media (max-width: 900px) {
  html[dir="rtl"] .auth-stage {
    grid-template-columns: 1fr;
  }

  html[dir="rtl"] .auth-visual,
  html[dir="rtl"] .auth-panel {
    order: initial;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .rise-on-scroll,
  .hero-scroll span {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .hero-media img {
    animation: none;
    transform: none;
  }

  .btn:hover {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
