/* ==========================================================================
   LeasingOps.ae — common stylesheet (shared by all pages)
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --ink: #152833;
  --ink-82: #152833d1;
  --ink-78: #152833c7;
  --ink-72: #152833b8;
  --ink-66: #152833a8;
  --ink-18: #1528332e;
  --accent: #1c93f3;
  --accent-hover: #1689e4;
  --border: #dce3e8;
  --border-light: #e2e7ea;
  --border-light-2: #e6ebef;
  --surface: #fff;
  --surface-grey: #f6f8fa;
  --surface-grey-2: #f5f8fa;
  --surface-grey-3: #eef2f5;
  --radius-chip: 5px;
  --radius-control: 10px;
  --radius-card: 16px;
  --font-body: "Dubai", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body-size: 15.5px;
  --body-line: 1.8;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  margin: 0;
}
button, input, select, textarea, address { font-family: var(--font-body); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }
a.btn:hover, a.chip:hover { text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.page { background: var(--surface); width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; }
.label {
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-66);
  font-size: 11px;
  font-weight: 500;
}

/* ---------- Page loading cover ---------- */
.page-cover {
  z-index: 9999;
  background: var(--surface, #fff);
  opacity: 1;
  justify-content: center;
  align-items: center;
  transition: opacity .3s;
  display: flex;
  position: fixed;
  inset: 0;
}
.page-cover-mark { width: 56px; height: 56px; object-fit: contain; animation: 1.1s ease-in-out infinite page-cover-pulse; }
body:not(.is-loading) .page-cover { opacity: 0; pointer-events: none; }
@keyframes page-cover-pulse {
  0%, to { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.88); }
}
@media (prefers-reduced-motion: reduce) {
  .page-cover { transition: none; }
  .page-cover-mark { animation: none; }
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px clamp(20px, 4vw, 56px);
  display: flex;
}
@media (width <= 639px) { .site-header { justify-content: center; gap: 0; } }
.logo-link { padding: 18px 18px 18px 0; line-height: 0; display: block; }
.site-header .logo { width: 250px; max-width: 100%; height: auto; display: block; }
.site-header.legal .logo { width: 200px; }
@media (width <= 719px) {
  .site-header .logo { width: 200px; }
  .site-header.legal .logo { width: 180px; }
}
@media (width <= 459px) {
  .site-header .logo { width: 170px; }
  .site-header.legal .logo { width: 150px; }
}
.cta {
  background: var(--accent);
  min-height: 44px;
  color: var(--surface);
  border-radius: var(--radius-control);
  flex: none;
  justify-content: center;
  align-self: flex-end;
  align-items: center;
  margin-top: 0;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
}
.cta:hover { background: var(--accent-hover); color: var(--surface); }
@media (width <= 639px) { .cta { flex: 0 0 100%; align-self: center; margin-top: 14px; } }

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */

/* ---------- Credentials strip ---------- */
.credentials { background: var(--surface); padding: clamp(20px, 2.4vw, 28px) clamp(20px, 4vw, 56px); }
.credentials .wrap { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.1vw, 14px); display: grid; }
@media (width <= 719px) { .credentials .wrap { grid-template-columns: 1fr 1fr; } }
@media (width <= 559px) { .credentials .wrap { grid-template-columns: 1fr; } }
.credentials .card {
  background: var(--surface);
  border: 1px solid var(--border-light-2);
  border-radius: var(--radius-card);
  padding: 18px clamp(16px, 2vw, 22px);
  box-shadow: 0 1px 2px #1528330a;
}
.credentials .label { margin-bottom: 7px; }
.credentials .value {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 700;
}

/* ---------- About + Office ---------- */
.about-office { background: var(--surface); padding: clamp(36px, 4.4vw, 64px) clamp(20px, 4vw, 56px); }
.about-office .wrap { grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(24px, 3vw, 48px); display: grid; }
@media (width <= 899px) { .about-office .wrap { grid-template-columns: 1fr; } }
.about-office h2 { letter-spacing: -.004em; color: var(--ink); margin: 0 0 8px; font-size: clamp(23px, 2.2vw, 29px); font-weight: 700; }
.about-lead { color: var(--ink-72); text-wrap: pretty; margin: 0 0 16px; font-size: 15px; font-weight: 700; line-height: 1.6; }
.about-body { text-align: justify; hyphens: auto; font-size: var(--body-size); line-height: var(--body-line); color: var(--ink); margin: 0; }
.about-body p { margin: 0; }
.about-body p + p { margin-top: 1em; }
.office-grid { grid-template-columns: 1fr 1fr; gap: 18px clamp(20px, 2.5vw, 36px); display: grid; }
@media (width <= 459px) { .office-grid { grid-template-columns: 1fr; } }
.office-grid .label { margin-bottom: 7px; }
.about-office address { color: var(--ink); font-size: 15px; font-style: normal; line-height: 1.65; }
.hours-grid { color: var(--ink); font-variant-numeric: tabular-nums; grid-template-columns: auto 1fr; gap: 5px 18px; font-size: 15px; display: grid; }
.map-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface-grey-3);
  height: 220px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}
.map-frame iframe { border: 0; width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.map-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  min-height: 36px;
  color: var(--ink);
  border-radius: 999px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  position: absolute;
  bottom: 12px;
  right: 12px;
  box-shadow: 0 1px 3px #1528331f;
}
.map-pill:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border-light); padding: clamp(30px, 3.4vw, 44px) clamp(20px, 4vw, 56px) clamp(24px, 2.6vw, 34px); }
.site-footer .top-row { flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 24px; display: flex; }
.site-footer .logo { width: 170px; max-width: 60%; height: auto; display: block; }
.site-footer .links-col { flex-direction: column; align-items: flex-end; gap: 6px; margin-left: auto; display: flex; }
.site-footer .legal-links { flex-wrap: wrap; justify-content: flex-end; gap: 6px 28px; display: flex; }
.site-footer .legal-links a { min-height: 44px; color: var(--accent); align-items: center; font-size: 14px; display: inline-flex; }
.payment-marks { flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; display: flex; }
.mark { border: 1px solid var(--border-light-2); border-radius: var(--radius-chip); background: var(--surface); justify-content: center; align-items: center; gap: 5px; height: 24px; padding: 0 8px; display: inline-flex; }
.mark.visa span { letter-spacing: .01em; color: #1434cb; font-size: 10.5px; font-style: italic; font-weight: 700; }
.mark.mastercard span { letter-spacing: .02em; color: var(--ink); font-size: 8.5px; font-weight: 700; }
.mark.amex { background: #2e77bc; border-color: #2e77bc; }
.mark.amex span { letter-spacing: .04em; color: var(--surface); font-size: 9px; font-weight: 700; }
.mark.unionpay span { letter-spacing: .01em; color: #e21836; font-size: 10px; font-weight: 700; }
.mark.unionpay em { color: #005bac; font-style: normal; }
.license-row { border-top: 1px solid var(--border-light); grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 16px 32px; margin-top: 22px; padding-top: 20px; display: grid; }
.license-row > div:last-child { text-align: right; justify-self: stretch; }
@media (width <= 719px) {
  .license-row { grid-template-columns: 1fr; gap: 16px; }
  .license-row > div:last-child { text-align: left; }
}
.license-row .label { margin-bottom: 6px; }
.license-row .value { color: var(--ink); font-size: 14px; line-height: 1.55; }
.license-row .value.tabular { font-variant-numeric: tabular-nums; }
.copyright { color: var(--ink-66); margin-top: 20px; font-size: 12.5px; line-height: 1.6; }

/* ==========================================================================
   LEGAL PAGES (Privacy Policy, Terms & Conditions)
   ========================================================================== */
.back-row { background: var(--surface); padding: clamp(16px, 2vw, 22px) clamp(20px, 4vw, 56px) clamp(12px, 1.4vw, 18px); }
.back-link {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  min-height: 44px;
  color: var(--ink);
  align-items: center;
  gap: 9px;
  padding: 0 clamp(16px, 1.8vw, 20px);
  font-size: 14.5px;
  font-weight: 500;
  display: inline-flex;
}
.back-link:hover { border-color: var(--accent); color: var(--accent); }
.hero { background: var(--surface-grey); border-bottom: 1px solid var(--border-light); padding: clamp(30px, 3.6vw, 52px) clamp(20px, 4vw, 56px); }
.hero h1 { letter-spacing: -.01em; color: var(--ink); margin: 0 0 14px; font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; }
.lede { max-width: 70ch; color: var(--ink-78); text-wrap: pretty; margin: 0 0 16px; font-size: 15.5px; line-height: 1.7; }
.updated { color: var(--ink-66); font-size: 13.5px; font-weight: 500; }
.doc { padding: clamp(32px, 3.8vw, 56px) clamp(20px, 4vw, 56px); }
.doc-grid { grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: clamp(24px, 3vw, 52px); display: grid; }
@media (width <= 939px) { .doc-grid { grid-template-columns: 1fr; } }
.toc { border-left: 1px solid var(--border-light); flex-direction: column; gap: 2px; padding-left: 18px; display: flex; position: sticky; top: 24px; }
@media (width <= 939px) { .toc { display: none; } }
.toc-label { letter-spacing: .09em; text-transform: uppercase; color: var(--ink-66); margin-bottom: 10px; font-size: 11px; font-weight: 500; }
.toc-links { display: contents; }
.toc a { min-height: 34px; color: var(--ink); align-items: center; font-size: 14px; display: flex; }
.toc a:hover, .toc a.active { color: var(--accent); text-decoration: none; }
.content { max-width: 74ch; }
.callout {
  background: var(--surface-grey);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  color: var(--ink);
  margin-bottom: clamp(26px, 3vw, 38px);
  padding: clamp(18px, 2vw, 24px);
  font-size: 14.5px;
  line-height: 1.7;
}
.content h2 { letter-spacing: -.004em; color: var(--ink); margin: 0 0 12px; scroll-margin-top: 24px; font-size: clamp(20px, 2vw, 24px); font-weight: 700; }
.content p { font-size: var(--body-size); line-height: var(--body-line); color: var(--ink); margin: 0 0 14px; }
.content p:last-child, .content ul:last-child { margin-bottom: 28px; }
.content ul { flex-direction: column; gap: 9px; margin: 0 0 14px; padding: 0; list-style: none; display: flex; }
.content li { font-size: var(--body-size); color: var(--ink); gap: 10px; line-height: 1.7; display: flex; }
.content .dot { background: var(--accent); border-radius: 50%; flex: none; width: 6px; height: 6px; margin-top: 9px; }
.content strong { font-weight: 700; }

/* ---------- Login area (landing page) ---------- */
.login-area {
  background: var(--surface-grey-2);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: clamp(24px, 2.8vw, 38px) clamp(20px, 4vw, 56px) clamp(36px, 4.4vw, 60px);
}
@media (width >= 1150px) { .login-area { padding-bottom: clamp(52px, 6vw, 88px); } }
.login-slot {
  min-height: 460px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ---------- Login card ---------- */
.login-card {
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 1px 2px #1528330d, 0 14px 30px #15283312;
}
@media (width <= 759px) { .login-card { grid-template-columns: 1fr; } }

.login-aside {
  background: var(--accent);
  color: var(--surface);
  padding: clamp(28px, 3.4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-headline {
  margin: 0;
  color: var(--surface);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.login-sub { margin: 0; max-width: 34ch; color: #ffffffd9; font-size: 15px; line-height: 1.6; }

.login-main {
  background: var(--surface-grey);
  padding: clamp(28px, 3.4vw, 44px) clamp(24px, 3.4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-logo { width: 180px; height: auto; display: block; margin-bottom: 22px; }
.login-form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.login-title { margin: 0; color: var(--ink); font-size: 19.5px; font-weight: 700; letter-spacing: -.003em; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-label { letter-spacing: .09em; text-transform: uppercase; color: var(--ink-66); font-size: 11px; font-weight: 500; }
.field-link { color: var(--accent); font-size: 13px; font-weight: 500; }
.input-wrap { position: relative; }
.input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap .input { padding-right: 64px; }
.input::placeholder { color: var(--ink-66); }
.input:hover { border-color: var(--ink-18); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #1c93f326; }
.input[aria-invalid="true"] { border-color: #d64545; }
.toggle-password {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-height: 32px;
  padding: 0 10px;
  background: none;
  border: 0;
  border-radius: var(--radius-chip);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.toggle-password:hover { background: #f1f8fe; }

.form-error { margin: 0; color: #c03a3a; font-size: 13.5px; line-height: 1.5; }
.login-submit {
  min-height: 44px;
  margin-top: 4px;
  background: var(--accent);
  color: var(--surface);
  border: 0;
  border-radius: var(--radius-control);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.login-submit:hover { background: var(--accent-hover); }
.login-help { margin: 22px 0 0; color: var(--ink-72); font-size: 13.5px; }

/* Login card: single sign-in button (no form) */
.login-main { justify-content: center; }
.login-main > .login-submit {
  width: 100%;
  max-width: 340px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: 0;
}
.login-main > .login-submit:hover { color: var(--surface); text-decoration: none; }

/* Login card fills the whole login area (full wrap width and slot height) */
.login-slot { align-items: stretch; }
.login-card { max-width: none; }

/* Login card runs from the top to the bottom edge of its section */
.login-area { padding-top: 0 !important; padding-bottom: 0 !important; }

/* Square corners on the login card */
.login-card { border-radius: 0; }

/* Centre the message in the login card's left column */
.login-aside { justify-content: center; align-items: center; text-align: center; }
.login-sub { margin-inline: auto; }

/* Right column blends into the login section (same background, no card edge) */
.login-card { background: var(--surface-grey-2); border: 0; box-shadow: none; }
.login-main { background: var(--surface-grey-2); }

/* Login section reaches the bottom of the screen on first view.
   --login-top (set by main.js) is the height of everything above the section. */
.login-area {
  display: flex;
  min-height: calc(100vh - var(--login-top, 0px));
  min-height: calc(100svh - var(--login-top, 0px));
}
.login-area > .wrap { flex: 1; width: 100%; display: flex; }
.login-slot { flex: 1; min-height: 0; }

/* Wide screens: info cards and login card span the full width, aligned with the header's edges
   (same side padding as .site-header), instead of stopping at 1180px. */
.credentials .wrap,
.login-area > .wrap { max-width: none; }

/* Larger screens: scale the login card's content so it doesn't look lost in the wider card */
@media (width >= 1600px) {
  .login-headline { font-size: clamp(38px, 2.4vw, 56px); }
  .login-sub { font-size: clamp(15px, 0.95vw, 19px); }
  .login-logo { width: clamp(180px, 11vw, 260px); margin-bottom: 28px; }
  .login-main > .login-submit { max-width: clamp(340px, 20vw, 440px); min-height: 52px; font-size: 16.5px; }
  .login-help { font-size: 14.5px; }
  .credentials .value { font-size: clamp(15px, 0.9vw, 18px); }
}
