/* Forge landing page. Palette from the Lovable design; Cairo is the app's own
   bundled font, served from the Flutter build under app/. Logical properties
   only, so the same rules hold in rtl (Arabic, default) and ltr (English). */

@font-face {
  font-family: "Cairo";
  src: url("app/assets/assets/fonts/Cairo-Variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #08120d;
  --fg: #eaf5ed;
  --card: #132019;
  --muted: #18251e;
  --muted-fg: #99aa9e;
  --primary: #aafa2e;
  --on-primary: #09180c;
  --border: rgb(245 252 247 / 12%);
  --radius: 0.5rem;
  --gutter: 16px;
  --max: 72rem;
  --topbar-h: 4rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Cairo", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-sm { min-height: 2.25rem; padding-inline: 0.75rem; font-size: 0.875rem; }
.btn-lg { min-height: 3rem; padding-inline: 1.5rem; font-size: 1rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: #bcff5a; }
.btn-outline { border-color: var(--border); background: rgb(8 18 13 / 50%); color: var(--fg); }
.btn-outline:hover { background: var(--muted); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--muted); }

.badge {
  display: inline-block;
  border-radius: 999px;
  background: var(--muted);
  color: var(--fg);
  padding: 0.25rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Top bar */
.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  border-block-end: 1px solid var(--border);
  background: rgb(8 18 13 / 80%);
  backdrop-filter: blur(8px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: var(--topbar-h);
}
.logo { height: 1.75rem; width: auto; }
.topnav { display: flex; align-items: center; gap: 0.25rem; }

/* On a narrow phone the sign-in link lives in the footer and hero instead. */
@media (max-width: 420px) {
  .topnav a[data-i18n="nav.signIn"] { display: none; }
}

/* Full-bleed image sections */
.hero, .closing {
  position: relative;
  overflow: hidden;
  border-block-end: 1px solid var(--border);
}
.cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgb(8 18 13 / 70%), rgb(8 18 13 / 82%), var(--bg));
}
.hero-glow {
  pointer-events: none;
  position: absolute;
  inset-block-start: -10rem;
  inset-inline: 0;
  margin-inline: auto;
  width: min(36rem, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(170 250 46 / 10%);
  filter: blur(64px);
}
.hero-inner, .closing-inner {
  position: relative;
  text-align: center;
}
.hero-inner { padding-block: 5rem; }
@media (min-width: 640px) {
  .hero-inner { padding-block: 8rem; }
}

h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 800; }

h1 {
  margin-block-start: 1.5rem;
  font-size: clamp(2.25rem, 7vw, 4rem);
}
h1 span { display: block; }
.accent { color: var(--primary); }

h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: 1.125rem; }

.lead {
  max-width: 38rem;
  margin: 1.5rem auto 0;
  color: var(--muted-fg);
  font-size: clamp(1rem, 2.2vw, 1.125rem);
}
.sub { max-width: 42rem; margin-block: 0.75rem 0; color: var(--muted-fg); }
.closing .sub { margin-inline: auto; }

.cta-row {
  margin-block-start: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .cta-row { flex-direction: row; justify-content: center; }
}

.facts {
  margin: 3.5rem auto 0;
  max-width: 48rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.facts dt { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.facts dd { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--muted-fg); }

/* Content sections */
.section { padding-block: 5rem; }
.grid { margin-block-start: 2.5rem; display: grid; gap: 1rem; }
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

.card {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--card);
  padding: 1.5rem;
}
.card p, .step p { margin: 0.5rem 0 0; font-size: 0.9375rem; color: var(--muted-fg); }
.card h3 { margin-block-start: 1rem; }

.icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--primary);
}
.icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.band {
  border-block: 1px solid var(--border);
  background: rgb(19 32 25 / 40%);
}

.step {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--bg);
}
.step-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.step-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms;
}
.step:hover .step-media img { transform: scale(1.05); }
.step-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg), rgb(8 18 13 / 20%) 45%, transparent);
}
.step-tag {
  position: absolute;
  z-index: 1;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  border-radius: 0.25rem;
  background: rgb(8 18 13 / 80%);
  color: var(--primary);
  padding: 0.125rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
}
.step-body { padding: 1.5rem; }

.closing-shade { position: absolute; inset: 0; background: rgb(8 18 13 / 85%); }
.closing-inner { padding-block: 6rem; }
.closing h2 { margin-block-start: 1rem; }

.footer { padding-block: 2rem; color: var(--muted-fg); font-size: 0.875rem; }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; }
}
.footnav { display: flex; gap: 1rem; }
.footnav a { text-decoration: none; }
.footnav a:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .step:hover .step-media img { transform: none; }
}
