/* =========================================================
   LIBAAS MAHAL TRADERS — site styles
   Design tokens first, then base, layout, components, pages.
   ========================================================= */

:root {
  --navy-950: #070d1c;
  --navy-900: #0b1530;
  --navy-800: #12204a;
  --navy-700: #1b2d63;
  --gold-500: #c9a24a;
  --gold-400: #d9b866;
  --gold-100: #f6eedb;
  --teal-500: #1f9e8f;

  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --surface: #ffffff;
  --border: #e3e6ef;
  --text: #121a2f;
  --text-muted: #5a6480;
  --accent: var(--gold-500);
  --accent-ink: #8a6a1f;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 21, 48, .06);
  --shadow: 0 10px 30px -12px rgba(11, 21, 48, .18);
  --shadow-lg: 0 24px 60px -20px rgba(11, 21, 48, .35);

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --container: 1160px;
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--navy-700); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy-900); letter-spacing: -.01em; }
h1, h2 { font-family: var(--font-display); font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--navy-900); color: #d6dcef; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
.section--dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--gold-400); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.lead { font-size: 1.15rem; color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  font: inherit; font-size: .98rem; font-weight: 650; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--gold-500); color: var(--navy-950); box-shadow: 0 10px 24px -10px rgba(201, 162, 74, .7); }
.btn--primary:hover { background: var(--gold-400); color: var(--navy-950); }
.btn--ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.btn--dark { background: var(--navy-900); color: #fff; }
.btn--dark:hover { background: var(--navy-700); color: #fff; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy-900); min-width: 0; }
.brand:hover { color: var(--navy-900); }
.brand__mark { width: 42px; height: 42px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; white-space: nowrap; }
.brand__sub { font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-size: .95rem; font-weight: 550; color: var(--text); text-decoration: none;
}
.nav__link:hover { background: var(--bg-soft); color: var(--navy-900); }
.nav__link[aria-current="page"] { color: var(--navy-900); background: var(--gold-100); }
.nav .btn { min-height: 42px; padding: 0 20px; margin-left: 10px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--navy-900); border-radius: 2px;
  position: relative; transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 8px;
    padding: 16px 20px 24px; background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; }
  .nav__link { padding: 12px 14px; border-radius: 10px; }
  .nav .btn { margin: 8px 0 0; }
}
@media (max-width: 420px) {
  .brand__sub { display: none; }
  .brand__name { font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #cfd6ec;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(201, 162, 74, .18), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(31, 158, 143, .16), transparent 60%),
    linear-gradient(160deg, var(--navy-950), var(--navy-800));
  padding: clamp(72px, 11vw, 136px) 0 clamp(72px, 10vw, 120px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero__lead { font-size: 1.15rem; max-width: 600px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 36px; font-size: .9rem; color: #9fa9c9; }
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 16px; height: 16px; color: var(--gold-400); }

.hero__visual { position: relative; }
.device {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
.device__bar { display: flex; gap: 6px; margin-bottom: 14px; }
.device__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.device__bar i:first-child { background: #e7735f; }
.device__bar i:nth-child(2) { background: var(--gold-400); }
.device__bar i:nth-child(3) { background: var(--teal-500); }
.device__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile {
  border-radius: 12px; padding: 16px; min-height: 104px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; justify-content: space-between; color: #e8ecf8;
}
.tile svg { width: 26px; height: 26px; color: var(--gold-400); }
.tile b { font-size: .92rem; font-weight: 600; }
.tile--wide { grid-column: span 2; min-height: 0; flex-direction: row; align-items: center; gap: 14px; justify-content: flex-start; }
.tile--wide .lines { flex: 1; display: grid; gap: 7px; }
.tile--wide .lines i { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .16); }
.tile--wide .lines i:nth-child(2) { width: 70%; }
.tile--wide .lines i:nth-child(3) { width: 45%; background: rgba(201, 162, 74, .55); }
.float-chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--navy-900); border-radius: 12px; padding: 10px 14px;
  font-size: .85rem; font-weight: 650; box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
.float-chip svg { width: 18px; height: 18px; color: var(--teal-500); }
.float-chip--a { left: -26px; bottom: 34px; }
.float-chip--b { right: -14px; top: -18px; animation-delay: -3s; }
.float-chip--b svg { color: var(--accent-ink); }
@keyframes float { 50% { transform: translateY(-8px); } }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; margin: 12px auto 0; width: 100%; }
  .float-chip--a { left: -6px; }
  .float-chip--b { right: -6px; }
}

/* Inner page hero */
.page-hero {
  color: #cfd6ec; padding: clamp(56px, 8vw, 96px) 0;
  background:
    radial-gradient(700px 360px at 90% 0%, rgba(201, 162, 74, .2), transparent 60%),
    linear-gradient(160deg, var(--navy-950), var(--navy-800));
}
.page-hero h1 { color: #fff; margin-bottom: .35em; }
.page-hero p { max-width: 680px; font-size: 1.1rem; margin: 0; }
.breadcrumb { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .85rem; color: #9fa9c9; }
.breadcrumb a { color: #cfd6ec; text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: .6; }

/* ---------- Split / about ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.facts { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.fact {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px;
}
.fact__icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gold-100); color: var(--accent-ink);
}
.fact__icon svg { width: 22px; height: 22px; }
.fact b { display: block; color: var(--navy-900); }
.fact span { color: var(--text-muted); font-size: .95rem; }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards, .cards--2 { grid-template-columns: 1fr; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3d8e6; }
.card__icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(145deg, var(--navy-800), var(--navy-700)); color: var(--gold-400);
}
.card__icon svg { width: 26px; height: 26px; }
.card__num { position: absolute; top: 24px; right: 26px; font-family: var(--font-display); font-size: 1.1rem; color: #c3c9d9; }
.card p { color: var(--text-muted); margin: 0; }
.card ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .95rem; }
.card li { display: flex; gap: 10px; align-items: flex-start; }
.card li::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-top: .6em; border-radius: 50%; background: var(--accent);
}
.card--feature { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); border-color: transparent; color: #cfd6ec; }
.card--feature h3 { color: #fff; }
.card--feature p { color: #b8c1dd; }
.card--feature .card__icon { background: var(--gold-500); color: var(--navy-950); }
.card--feature .btn { margin-top: auto; align-self: flex-start; }
.card--feature p + .btn { margin-top: 22px; }

/* ---------- Values / mission ---------- */
.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .mv { grid-template-columns: 1fr; } }
.mv__item {
  border-radius: var(--radius-lg); padding: 32px; background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
}
.mv__item p { margin: 0; font-size: 1.08rem; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 860px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .values { grid-template-columns: 1fr; } }
.values li {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  font-weight: 600; color: var(--navy-900);
}
.values svg { flex: none; width: 22px; height: 22px; color: var(--teal-500); }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.steps li::before {
  content: counter(step, decimal-leading-zero); display: block; margin-bottom: 14px;
  font-family: var(--font-display); font-size: 1.6rem; color: var(--accent);
}
.steps p { margin: 0; color: var(--text-muted); font-size: .96rem; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px);
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(201, 162, 74, .28), transparent 60%),
    linear-gradient(150deg, var(--navy-900), var(--navy-700));
  color: #cfd6ec; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
}
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { margin: 0; max-width: 560px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info { display: grid; gap: 14px; }
.contact-info .fact a { color: var(--navy-900); font-weight: 600; text-decoration: none; word-break: break-word; }
.contact-info .fact a:hover { color: var(--accent-ink); text-decoration: underline; }
.contact-info address { font-style: normal; color: var(--text-muted); font-size: .95rem; }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .9rem; font-weight: 650; margin-bottom: 6px; color: var(--navy-900); }
.field label .req { color: #b4442f; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg-soft); border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(27, 45, 99, .12); }
.field.has-error input, .field.has-error textarea { border-color: #c2412b; background: #fff8f6; }
.field__error { display: none; margin-top: 6px; font-size: .85rem; color: #b4442f; }
.field.has-error .field__error { display: block; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.form-foot small { color: var(--text-muted); max-width: 340px; }
.form-status { margin-top: 18px; padding: 14px 16px; border-radius: 12px; font-size: .95rem; display: none; }
.form-status.is-success { display: block; background: #e8f6f3; color: #0f5e54; border: 1px solid #bfe5dd; }
.form-status.is-error { display: block; background: #fdf0ed; color: #8f2f1f; border: 1px solid #f2c9bf; }

/* ---------- Legal pages ---------- */
.legal { max-width: 800px; }
.legal h2 { font-family: var(--font); font-size: 1.3rem; font-weight: 700; margin-top: 2.2em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.legal .updated { color: var(--text-muted); font-size: .95rem; }
.legal .note { background: var(--bg-soft); border-left: 3px solid var(--accent); padding: 14px 18px; border-radius: 0 12px 12px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #9fa9c9; padding: 64px 0 28px; font-size: .95rem; }
.site-footer a { color: #cfd6ec; text-decoration: none; }
.site-footer a:hover { color: var(--gold-400); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.site-footer .brand__sub { color: #8390b6; }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer address { font-style: normal; }
.footer-bottom {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .88rem;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound .code { font-family: var(--font-display); font-size: clamp(4rem, 14vw, 8rem); color: var(--gold-500); line-height: 1; margin-bottom: 10px; }
