/* Insaf Legal – base, layout, header, hero
   Palette derived from the logo: navy + crimson. */

:root {
    --navy-900: #071a35;
    --navy-800: #0a2650;
    --navy-700: #003465;
    --navy-600: #1a4a85;
    --red-600: #BD0028;
    --red-700: #9A0020;
    --ink: #14202f;
    --muted: #54627a;
    --line: #dde3ee;
    --tint: #f3f6fb;
    --white: #fff;
    --ok: #0b6b3a;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(7, 26, 53, .06), 0 2px 8px rgba(7, 26, 53, .05);
    --shadow-md: 0 8px 28px rgba(7, 26, 53, .12);
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
    --header-h: 88px;
    --maxw: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--navy-700); text-underline-offset: 3px; }
a:hover { color: var(--red-600); }
:focus-visible { outline: 3px solid var(--red-600); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-head); color: var(--navy-800); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.container--narrow { max-width: 820px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 68px; width: auto; display: block; }

.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link { display: block; padding: 10px 14px; color: var(--navy-800); text-decoration: none; font-weight: 600; font-size: .98rem; border-radius: 8px; }
.nav__link:hover, .nav__item.is-current > .nav__link { color: var(--red-600); }
.nav__item.is-current > .nav__link { box-shadow: inset 0 -3px 0 var(--red-600); border-radius: 0; }
.nav__item--cta { margin-left: 10px; }
.nav__toggle { background: none; border: 0; padding: 8px 6px 8px 0; margin-left: -8px; cursor: pointer; color: var(--navy-800); display: inline-flex; }
.nav__toggle svg { transition: transform .2s; }
.nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.dropdown { position: absolute; top: 100%; left: 0; min-width: 270px; list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.dropdown a { display: block; padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; }
.dropdown a:hover, .dropdown a[aria-current] { background: var(--tint); color: var(--red-600); }
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.has-dropdown.is-open > .dropdown { opacity: 1; visibility: visible; transform: none; }

.menu-btn { display: none; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--navy-800); cursor: pointer; padding: 0; transition: background .15s, border-color .15s, color .15s, transform .15s; flex: none; }
.menu-btn:hover { background: var(--tint); color: var(--red-600); border-color: var(--navy-700); }
.menu-btn__icon { transition: transform 0.25s ease; }
.menu-btn__icon--open { display: block; }
.menu-btn__icon--close { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__icon--open { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__icon--close { display: block; color: var(--red-600); animation: iconPop 0.22s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes iconPop { from { transform: rotate(-90deg) scale(0.7); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }

/* ---------- Hero ---------- */
.hero, .page-hero { position: relative; color: #fff; background: var(--navy-800); overflow: hidden; isolation: isolate; }
.hero::before, .page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
    radial-gradient(900px 420px at 85% -10%, rgba(189, 0, 40, .35), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(26, 74, 133, .65), transparent 60%),
    linear-gradient(135deg, var(--navy-900), var(--navy-700)); }
.hero h1, .page-hero h1 { color: #fff; }
.hero { padding: clamp(56px, 9vw, 110px) 0; }
.hero__inner { display: grid; grid-template-columns: 1.4fr .8fr; gap: 48px; align-items: center; }
.page-hero { padding: clamp(40px, 6vw, 76px) 0 clamp(44px, 6vw, 80px); }
.page-hero--center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: #f1b9c4; margin-bottom: 14px; }
.lead { font-size: 1.2rem; max-width: 62ch; color: rgba(255, 255, 255, .88); }
.page-hero--center .lead { margin-inline: auto; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__actions--center { justify-content: center; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 34px 0 0; font-size: .95rem; color: rgba(255, 255, 255, .85); }
.hero__trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust .icon { width: 20px; height: 20px; color: #f1b9c4; }
.hero__card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-md); }
.hero__card h2 { font-size: 1.5rem; }
.hero__card-alt { text-align: center; margin: 14px 0 0; font-size: .92rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--tint { background: var(--tint); }
.section--tight { padding: 32px 0 56px; }
.section__title--center { text-align: center; }
.section__sub { text-align: center; color: var(--muted); max-width: 60ch; margin: -.2em auto 2.2em; }
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.split--form { grid-template-columns: 1.5fr 1fr; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { max-width: 70ch; }
.muted { color: var(--muted); font-size: .95rem; }
.subhead { margin: 2em 0 .7em; font-size: 1.1rem; color: var(--red-600); font-family: var(--font-body); text-transform: uppercase; letter-spacing: .08em; }
.link-light { color: #fff; }
.link-light:hover { color: #f1b9c4; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
