/* IGNOT Realty corporate site — Nvest brand (navy + sky blue, Montserrat / Tajawal) */

:root {
  /* Aligned with official Nvest raster (navy ↔ sky gradient) */
  --color-navy: #0d415f;
  --color-navy-deep: #002d5e;
  --color-sky: #00a3e0;
  --color-primary: var(--color-sky);
  --color-primary-dark: #0088ce;
  --color-accent: var(--color-sky);
  --color-ink: var(--color-navy);
  --color-body: #3d5266;
  --color-muted: #6b7c8f;
  --color-success: #0d9f6e;
  --color-surface: #ffffff;
  --color-canvas: #f5f7fa;
  --color-border: #e2e8f0;
  --shadow-card: 0 12px 40px rgba(13, 65, 95, 0.08);
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-pill: 999px;
  --font-heading: "Montserrat", "Tajawal", system-ui, sans-serif;
  --font-sans: "Montserrat", "Tajawal", system-ui, sans-serif;
  --gradient-hero: linear-gradient(152deg, #00a3e0 0%, #0d415f 52%, #002d5e 100%);
  /* Sticky header + compact logo — --scroll-pad-top overridden in JS from real header height */
  --header-logo-h: 32px;
  --header-logo-max-w: 120px;
  --header-inner-py: 0.45rem;
  --scroll-pad-top: 3.85rem;
}

[dir="rtl"] {
  --font-sans: "Tajawal", "Montserrat", system-ui, sans-serif;
  --font-heading: "Tajawal", "Montserrat", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  /* Matches real sticky header height via --scroll-pad-top (header-layout.js) */
  scroll-padding-top: var(--scroll-pad-top);
}

@media (min-width: 768px) {
  :root {
    --header-logo-h: 38px;
    --header-logo-max-w: 140px;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-body);
  background: var(--color-canvas);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* —— Top bar —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: var(--header-inner-py) 0;
  min-height: 0;
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-ink);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo--nvest {
  align-items: center;
}

/* Official raster lockups: icon + wordmark + tagline — capped so header stays one compact row */
.logo__img {
  display: block;
  flex-shrink: 0;
  height: var(--header-logo-h);
  max-height: var(--header-logo-h);
  width: auto;
  max-width: min(var(--header-logo-max-w), 40vw);
  object-fit: contain;
  object-position: left center;
}

[dir="rtl"] .logo__img {
  object-position: right center;
}

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

.nav a {
  color: var(--color-body);
  font-weight: 600;
  font-size: 0.8125rem;
  text-decoration: none;
  line-height: 1.25;
}

.nav a:hover {
  color: var(--color-sky);
  text-decoration: none;
}

.lang-toggle {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.35rem 0.72rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}

.lang-toggle:hover {
  border-color: var(--color-sky);
  box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.18);
}

.lang-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* —— Hero —— */
.hero {
  position: relative;
  background: var(--gradient-hero);
  color: #fff;
  padding: 3.5rem 0 4.5rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 48px), 0 100%);
  margin-bottom: -24px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 70% 0%, rgba(255, 255, 255, 0.15), transparent 55%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.92;
  margin-bottom: 0.75rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  color: #fff;
  max-width: 18ch;
  margin: 0 0 1rem;
}

.hero__subtitle {
  font-size: 1.05rem;
  max-width: 52ch;
  opacity: 0.95;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hero .btn--primary:focus-visible {
  outline-color: #fff;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--color-sky);
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 163, 224, 0.38);
}

.btn--primary:hover {
  text-decoration: none;
  filter: brightness(1.06);
  box-shadow: 0 10px 32px rgba(0, 163, 224, 0.45);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.22);
}

/* —— Sections —— */
main > section {
  padding: 4rem 0;
}

.section--surface {
  background: var(--color-surface);
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.section__lead {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 60ch;
  margin: 0 0 2rem;
}

.prose {
  max-width: 70ch;
  font-size: 1.05rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* —— Feature grid —— */
.grid-features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-body);
}

/* —— Steps —— */
.steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.step__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-sky);
  margin-bottom: 0.35rem;
}

.step h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.step p {
  margin: 0;
  font-size: 0.95rem;
}

/* —— Trust —— */
.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullet-list li {
  position: relative;
  padding-inline-start: 1.5rem;
  margin-bottom: 0.85rem;
  font-size: 1rem;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.bullet-list--trust {
  max-width: 52rem;
}

/* —— Contact —— */
.contact-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  max-width: 480px;
}

.contact-card dl {
  margin: 0;
}

.contact-card dt {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-top: 1rem;
}

.contact-card dt:first-child {
  margin-top: 0;
}

.contact-card dd {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-ink);
}

/* —— Footer —— */
.footer-company {
  margin: 0.85rem 0 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.site-footer {
  background: linear-gradient(180deg, var(--color-navy-deep) 0%, var(--color-navy) 100%);
  color: #d1d5db;
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.site-footer a {
  color: #e5e7eb;
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer__legal {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-footer__legal a {
  font-size: 0.9rem;
  font-weight: 600;
}

.site-footer p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* —— Legal subpages —— */
.legal-page main {
  padding: 2.5rem 0 4rem;
}

.legal-article {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  max-width: 720px;
  margin-inline: auto;
}

.legal-article h1 {
  margin-top: 0;
}

.legal-article .updated {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.legal-article section {
  margin-bottom: 1.75rem;
}

.legal-article section:last-child {
  margin-bottom: 0;
}

.legal-article h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.legal-article p {
  margin: 0;
  font-size: 0.98rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: 600;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  inset-inline-start: 0.5rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  clip: auto;
  background: var(--color-sky);
  color: #fff;
  z-index: 100;
  border-radius: var(--radius-lg);
}
