/* ===========================================================================
   The public surface: landing page and the signed-out account screens.

   Kept out of style.css so that in-app pages — which every signed-in user
   loads on every request — do not carry the marketing page's weight. Both
   files share the design tokens declared in style.css, so a token change still
   moves this surface with the rest of the product.

   Written to work in both writing directions. Anything that would pin an edge
   uses logical properties (margin-inline, inset-inline, border-inline-start),
   so the Arabic interface mirrors correctly instead of needing its own rules.
   =========================================================================== */

/* Declared on :root, not on `.lp`. The account screens carry `.authpage`
   instead, and a variable scoped to `.lp` resolves to nothing there — which
   silently collapsed the sign-in panel's gradient and left white text on a
   white background. */
:root {
  --lp-ink: var(--ink);
  --lp-soft: var(--muted);
  --lp-edge: var(--line);
  --lp-surface: var(--panel);
  --lp-quiet: #f7f9fd;
  --lp-deep: #0e1729;
}
.lp { background: var(--panel); }

.lp-wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--sp-4); }
.lp-muted { color: var(--lp-soft); }

/* ---- top bar ---- */
.lp-top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--lp-edge);
}
.lp-topinner { display: flex; align-items: center; gap: var(--sp-4); height: 62px; }
.lp-brand {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 700; color: var(--lp-ink); white-space: nowrap;
}
.lp-brand:hover { text-decoration: none; color: var(--accent); }
.lp-mark { font-size: 1.15rem; }
.lp-nav { display: flex; gap: 0.4rem; margin-inline-start: var(--sp-3); }
.lp-nav a {
  padding: 0.4rem 0.7rem; border-radius: var(--r-sm);
  color: var(--lp-soft); font-size: 0.93rem;
}
.lp-nav a:hover { background: var(--accent-soft); color: var(--accent-ink); text-decoration: none; }
.lp-actions {
  display: flex; align-items: center; gap: 0.55rem;
  margin-inline-start: auto;
}
.lp-signin { color: var(--lp-soft); font-size: 0.93rem; padding: 0.4rem 0.5rem; }
.lp-signin:hover { color: var(--accent-ink); }
.lp-lang button {
  background: none; border: 1px solid var(--lp-edge); color: var(--lp-soft);
  border-radius: var(--r-pill); padding: 0.3rem 0.7rem; font-size: 0.85rem;
  cursor: pointer; transition: border-color var(--ease), color var(--ease);
}
.lp-lang button:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ---- buttons ---- */
.lp-btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 0.72rem 1.25rem; border-radius: var(--r-md); font-weight: 600;
  box-shadow: var(--shadow-2);
  transition: transform var(--ease), background var(--ease), box-shadow var(--ease);
}
.lp-btn:hover {
  background: var(--accent-ink); text-decoration: none;
  transform: translateY(-1px); box-shadow: var(--shadow-3);
}
.lp-btn-sm { padding: 0.45rem 0.9rem; font-size: 0.92rem; box-shadow: none; }
.lp-btn-lg { padding: 0.9rem 1.7rem; font-size: 1.05rem; }
.lp-ghost {
  display: inline-block; padding: 0.72rem 1.1rem; border-radius: var(--r-md);
  border: 1px solid var(--lp-edge); color: var(--lp-ink); font-weight: 500;
}
.lp-ghost:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }

/* ---- hero ---- */
.lp-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-5); align-items: center; padding-block: 4.5rem 4rem;
}
.lp-eyebrow {
  font-size: 0.74rem; letter-spacing: 0.13em; text-transform: uppercase;
  font-weight: 700; color: var(--accent); margin: 0 0 0.85rem;
}
.lp-hero h1 {
  margin: 0 0 1.1rem; font-size: clamp(2.05rem, 4.4vw, 3.15rem);
  line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance;
}
.lp-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), #7c3aed);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-lede { color: var(--lp-soft); font-size: 1.06rem; max-width: 48ch; margin: 0 0 1.7rem; }
.lp-ctas { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.lp-trust { margin: 1.1rem 0 0; font-size: 0.86rem; color: var(--lp-soft); }

/* ---- hero artefact: two snippets folding into one cited page ---- */
.lp-mock {
  margin: 0; display: grid; gap: 0.75rem; position: relative;
  padding: var(--sp-4); border: 1px solid var(--lp-edge);
  border-radius: var(--r-lg); background: var(--lp-quiet);
  box-shadow: var(--shadow-3);
}
.lp-snips { display: grid; gap: 0.55rem; }
.lp-snip {
  background: var(--lp-surface); border: 1px solid var(--lp-edge);
  border-inline-start: 3px solid var(--c-date);
  border-radius: var(--r-sm); padding: 0.6rem 0.75rem; font-size: 0.87rem;
}
.lp-snip p { margin: 0.3rem 0 0; color: var(--lp-ink); }
.lp-src {
  font-family: Consolas, "SF Mono", monospace; font-size: 0.76rem;
  color: var(--lp-soft);
}
.lp-arrow { justify-self: center; width: 2px; height: 22px; background: var(--line-strong);
  position: relative; }
.lp-arrow::after {
  content: ""; position: absolute; inset-inline-start: -4px; bottom: -1px;
  border: 5px solid transparent; border-top-color: var(--line-strong);
}
.lp-card {
  background: var(--lp-surface); border: 1px solid var(--lp-edge);
  border-radius: var(--r-md); padding: var(--sp-3); box-shadow: var(--shadow-1);
}
.lp-cardhead { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.lp-chip {
  font-size: 0.72rem; font-weight: 600; padding: 0.15rem 0.55rem;
  border-radius: var(--r-pill); color: #fff;
}
.lp-chip-person { background: var(--c-person); }
.lp-cited {
  margin-inline-start: auto; font-size: 0.76rem; color: var(--c-event);
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--r-pill);
  padding: 0.1rem 0.5rem;
}
.lp-card h3 { margin: 0; font-size: 1.05rem; }
.lp-alias { margin: 0.15rem 0 0.6rem; font-size: 0.82rem; color: var(--lp-soft); }
.lp-rels { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.lp-rels li { font-size: 0.85rem; display: flex; gap: 0.5rem; align-items: baseline; }
.lp-rels code { background: var(--accent-soft); color: var(--accent-ink); }
.lp-mock figcaption {
  font-size: 0.78rem; color: var(--lp-soft); text-align: center; margin-top: 0.2rem;
}

/* ---- bands and sections ---- */
.lp-band { background: var(--lp-quiet); border-block: 1px solid var(--lp-edge);
  padding-block: 3.6rem; }
.lp-band-quiet { background: var(--accent-soft); border-color: transparent; }
.lp-section { padding-block: 3.8rem; }
.lp h2 {
  margin: 0 0 0.6rem; font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.015em; text-wrap: balance;
}
.lp-sub { color: var(--lp-soft); margin: 0 0 var(--sp-4); max-width: 62ch; }

/* ---- how it works ---- */
.lp-steps {
  list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  counter-reset: none;
}
.lp-steps li {
  background: var(--lp-surface); border: 1px solid var(--lp-edge);
  border-radius: var(--r-md); padding: var(--sp-3); position: relative;
}
.lp-stepno {
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: var(--r-pill); background: var(--accent); color: #fff;
  font-size: 0.85rem; font-weight: 700; margin-bottom: 0.6rem;
}
.lp-steps h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.lp-steps p { margin: 0; font-size: 0.9rem; color: var(--lp-soft); }

/* ---- features ---- */
.lp-grid {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.lp-feature {
  background: var(--lp-surface); border: 1px solid var(--lp-edge);
  border-radius: var(--r-md); padding: var(--sp-4);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.lp-feature:hover {
  border-color: var(--line-strong); box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}
.lp-ficon { font-size: 1.5rem; display: block; margin-bottom: 0.5rem; }
.lp-feature h3 { margin: 0 0 0.35rem; font-size: 1.02rem; }
.lp-feature p { margin: 0; color: var(--lp-soft); font-size: 0.92rem; }

/* ---- data & isolation ---- */
.lp-security {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-5); align-items: center;
}
.lp-seclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.lp-seclist li {
  background: var(--panel); border-radius: var(--r-md); padding: 0.8rem 1rem;
  font-size: 0.92rem; display: flex; gap: 0.6rem; align-items: flex-start;
  box-shadow: var(--shadow-1);
}
.lp-seclist li::before { content: "✓"; color: var(--c-place); font-weight: 700; }

/* ---- closing ---- */
.lp-final { text-align: center; padding-block: 4.2rem; }
.lp-final .lp-sub { margin-inline: auto; }

/* ---- footer ---- */
.lp-foot { background: var(--lp-deep); color: #cbd5e1; padding-block: var(--sp-4); }
.lp-footinner { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.lp-foot .lp-brand { color: #fff; }
.lp-foot .lp-muted { color: #94a3b8; }
.lp-foot a { color: #93c5fd; margin-inline-start: auto; }

/* ===========================================================================
   Signed-out account screens: a split panel — the product's promise beside
   the form, so signing in does not feel like a detour away from the pitch.
   =========================================================================== */
.authpage {
  min-height: 100vh; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  background: var(--panel);
}
.authaside {
  background: linear-gradient(160deg, var(--lp-deep), #16305c);
  color: #e2e8f0; padding: var(--sp-5) var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.authaside .lp-brand { color: #fff; font-size: 1.05rem; }
.authpitch { margin-block: auto; display: grid; gap: var(--sp-4); }
.authaside h2 { margin: 0; font-size: 1.5rem; color: #fff; letter-spacing: -0.01em; }
.authpoints { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.authpoints li { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.95rem; }
.authpoints li::before {
  content: "✓"; color: #6ee7b7; font-weight: 700; flex: none;
}
.authaside .authfoot { margin-block-start: auto; font-size: 0.85rem; color: #94a3b8; }
.authaside .authfoot a { color: #93c5fd; }

.authmain {
  display: grid; place-items: center; padding: var(--sp-5) var(--sp-4);
}
.authcard { width: 100%; max-width: 27rem; }
.authback { font-size: 0.88rem; color: var(--muted); }
.authtitle { margin: 0.8rem 0 0.3rem; font-size: 1.6rem; letter-spacing: -0.015em; }
.authsub { margin: 0 0 var(--sp-4); color: var(--muted); }
.authform { display: grid; gap: var(--sp-3); }
.authform label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.92rem; }
.authform input {
  font: inherit; padding: 0.62rem 0.75rem; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--panel); color: var(--ink);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.authform input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none;
}
.authform input[readonly] { background: var(--bg); color: var(--muted); }
.authform .hint { font-weight: 400; font-size: 0.82rem; color: var(--muted); }
.authform button[type="submit"] {
  margin-top: 0.3rem; padding: 0.72rem 1rem; font: inherit; font-weight: 600;
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--r-md); cursor: pointer; transition: background var(--ease);
}
.authform button[type="submit"]:hover { background: var(--accent-ink); }
.pwfield { position: relative; display: grid; }
.pwtoggle {
  position: absolute; inset-inline-end: 0.4rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 0.78rem;
  color: var(--muted); padding: 0.25rem 0.4rem; border-radius: var(--r-sm);
}
.pwtoggle:hover { color: var(--accent-ink); background: var(--accent-soft); }
.authalt { margin: var(--sp-3) 0 0; font-size: 0.92rem; }
.orglist { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: grid; gap: 0.6rem; }
.orglist button {
  width: 100%; text-align: start; font: inherit; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); padding: 0.8rem 1rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.orglist button:hover { border-color: var(--accent); box-shadow: var(--shadow-2); }
.orglist .orgrole { display: block; font-size: 0.82rem; color: var(--muted); }
/* A button that has to read as a link: sign-out is not a primary action here. */
.linky {
  background: none; border: none; padding: 0; font: inherit; cursor: pointer;
  color: var(--accent); text-decoration: underline;
}
.linky:hover { color: var(--accent-ink); }

/* ---- what OKF is: the value, before the page explains the mechanics ---- */
.lp-intro .lp-lede { max-width: 64ch; margin-bottom: 0; }
.lp-introlist {
  display: grid; gap: var(--sp-3) var(--sp-4); list-style: none;
  padding: 0; margin: 1.8rem 0 0;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
}
.lp-introlist li {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding-inline-start: 0.9rem;
  /* Logical border: the rule stays on the reading edge in Arabic. */
  border-inline-start: 3px solid var(--accent-soft);
}
.lp-introlist strong { font-size: 0.98rem; }
.lp-introlist span { color: var(--lp-soft); font-size: 0.93rem; line-height: 1.55; }

/* ---- narrow screens ---- */
@media (max-width: 900px) {
  .lp-hero, .lp-security { grid-template-columns: minmax(0, 1fr); }
  .lp-hero { padding-block: 2.8rem 2.4rem; }
  .lp-nav { display: none; }
  .authpage { grid-template-columns: minmax(0, 1fr); }
  .authaside { display: none; }        /* the form is the job on a phone */
}

@media (max-width: 560px) {
  /* The top bar runs out of room: brand, language, sign in and the call to
     action do not fit across a phone. The sign-in link goes, because the hero
     carries one a thumb-length below and the sign-up page links across too. */
  .lp-signin { display: none; }
  .lp-topinner { gap: var(--sp-2); }
  .lp-brand span:not(.lp-mark) { font-size: 0.95rem; }
  .lp-wrap { padding-inline: var(--sp-3); }
}

@media (max-width: 380px) {
  /* Smallest phones still in use: the language toggle and the call to action
     have to share about 200px between them. */
  .lp-lang button { font-size: 0.78rem; padding: 0.25rem 0.5rem; }
  .lp-btn-sm { padding: 0.4rem 0.7rem; font-size: 0.88rem; }
}

/* ---- dark ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --lp-quiet: #131c2c; --lp-surface: #172136; --lp-edge: #24314a;
    --lp-ink: #e6ecf7; --lp-soft: #9aa8bf;
  }
  .lp { background: #0f1626; color: var(--lp-ink); }
  .lp-top { background: rgba(15, 22, 38, 0.85); }
  .lp-cited { background: #2a1f10; border-color: #7c4a12; }
  .lp-seclist li { background: #172136; }
  .lp-band-quiet { background: #131f3a; }
  .authpage { background: #0f1626; }
  .authform input { background: #172136; border-color: #2c3a55; color: #e6ecf7; }
  .authform input[readonly] { background: #131c2c; }
}
