/* Malin — site styles. Tokens and rationale in DESIGN.md. */
:root {
  --navy: #1f2360;
  --navy-deep: #151845;
  --ink: #1a1c33;
  --muted: #5b5f78;
  --amber: #ffb300;
  --orange: #ff6a00;
  --grad: linear-gradient(120deg, var(--amber), var(--orange));
  --surface: #f6f5f1;
  --line: #e5e3dc;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(21 24 69 / 6%), 0 8px 24px rgb(21 24 69 / 8%);
  --max: 1160px;
  --gutter: 20px;
  --font-head: "Rubik", "Heebo", system-ui, sans-serif;
  --font-body: "Heebo", system-ui, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 clamp(1rem, 0.35vw + 0.9375rem, 1.125rem)/1.75 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.875rem, 3.2vw + 0.875rem, 3.25rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.1875rem, 0.6vw + 1rem, 1.4375rem); font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.8em 1.4em; border-radius: 999px; border: 0;
  font: 600 1rem/1 var(--font-head); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-primary { background: var(--grad); color: var(--navy-deep); box-shadow: 0 6px 18px rgb(255 106 0 / 28%); }
.btn-primary:hover { color: var(--navy-deep); transform: translateY(-1px); box-shadow: 0 10px 24px rgb(255 106 0 / 34%); }
.btn-ghost { background: rgb(255 255 255 / 10%); color: var(--white); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 45%); }
.btn-ghost:hover { background: rgb(255 255 255 / 18%); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-outline:hover { color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { width: 48px; height: 48px; }
.brand-name { font: 700 1.5rem/1 var(--font-head); }
.site-nav { margin-inline-start: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
.site-nav a {
  display: block; padding: 8px 10px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--orange); }
.site-nav .lang a { font-size: 0.875rem; color: var(--muted); }
.header-cta { flex: none; }
.menu-toggle {
  display: none; margin-inline-start: auto;
  background: none; border: 0;
  width: 46px; height: 46px; cursor: pointer; color: var(--navy);
}
.menu-toggle svg { width: 22px; height: 22px; margin: auto; }

@media (max-width: 1080px) {
  .header-cta .btn-label { display: none; }
}
@media (max-width: 960px) {
  .menu-toggle { display: grid; place-items: center; }
  .header-cta { order: 2; }
  .site-nav {
    position: fixed; inset: 76px 0 auto 0; margin: 0;
    background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 12px var(--gutter) 20px; display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 12px 4px; font-size: 1.0625rem; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom: 2px solid var(--orange); }
}

/* Hero */
.hero {
  position: relative; isolation: isolate; color: var(--white);
  background: var(--navy-deep) url("../img/hero-bg-sm.jpg") center / cover no-repeat;
  padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 10vw, 132px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgb(21 24 69 / 55%) 0%, rgb(21 24 69 / 88%) 65%);
}
[dir="rtl"] .hero::before { background: linear-gradient(260deg, rgb(21 24 69 / 55%) 0%, rgb(21 24 69 / 88%) 65%); }
.hero-text { max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font: 600 0.875rem/1 var(--font-head); letter-spacing: 0.04em; color: var(--amber);
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--grad); }
.hero h1 { color: var(--white); margin-bottom: 18px; }
.hero h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(1.125rem, 0.6vw + 1rem, 1.375rem); color: rgb(255 255 255 / 85%); max-width: 34em; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.05em; }
.section-head h2::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--grad); margin-top: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-top: 3px solid transparent;
  padding: 28px 24px; text-decoration: none; color: var(--ink);
  transition: border-color .2s ease, background-color .2s ease;
}
.card:hover { border-top-color: var(--orange); background: #f0eee8; color: var(--ink); }
.card-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; margin-bottom: 18px; color: var(--navy-deep); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin-bottom: 16px; font-size: 0.95em; }
.card-more { margin-top: auto; font: 600 0.9375rem/1 var(--font-head); color: var(--navy); display: inline-flex; gap: 6px; align-items: center; }
.card-more svg { width: 16px; height: 16px; }
[dir="rtl"] .card-more svg, [dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* Client logos marquee */
.logos { direction: ltr; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logos-track { display: flex; width: max-content; gap: 20px; margin: 0; padding: 0; animation: marquee 45s linear infinite; direction: ltr; }
.logos:hover .logos-track, .logos:focus-within .logos-track { animation-play-state: paused; }
.logos-track li { list-style: none; flex: none; }
.logos-track img {
  width: 132px; height: 132px; object-fit: contain; padding: 14px;
  background: var(--white);
  filter: grayscale(1); opacity: .8; transition: filter .25s, opacity .25s;
}
.logos-track img:hover { filter: none; opacity: 1; }
@keyframes marquee { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logos { mask-image: none; }
  .logos-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .logos-track [aria-hidden="true"] { display: none; }
}

/* About + contact split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.facts { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts svg { width: 22px; height: 22px; flex: none; color: var(--orange); margin-top: 4px; }

/* Forms */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); }
.form-card h2, .form-card h3 { margin-bottom: 6px; }
.form-card > p { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 500; font-size: 0.9375rem; margin-bottom: 6px; color: var(--navy); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgb(31 35 96 / 15%); }
.form-note { font-size: 0.875rem; color: var(--muted); margin: 12px 0 0; }
.form-status { margin: 12px 0 0; font-weight: 500; color: var(--navy); }

/* Inner pages */
.page-hero {
  background: var(--navy-deep) url("../img/hero-bg-sm.jpg") center 40% / cover no-repeat;
  position: relative; isolation: isolate; color: var(--white);
  padding: clamp(44px, 6vw, 80px) 0;
}
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(21 24 69 / 84%); }
.page-hero h1 { color: var(--white); margin: 0; }
.page-hero p { color: rgb(255 255 255 / 82%); max-width: 46em; margin: 14px 0 0; font-size: 1.08em; }
.crumbs { font-size: 0.875rem; margin-bottom: 14px; color: rgb(255 255 255 / 70%); }
.crumbs a { color: rgb(255 255 255 / 85%); }

.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .page-layout { grid-template-columns: 1fr; } }
.prose { max-width: 44em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-inline-start: 0; list-style: none; margin: 0 0 1.4em; }
.prose ul li { position: relative; padding-inline-start: 30px; margin-bottom: 10px; }
.prose ul li::before {
  content: ""; position: absolute; inset-inline-start: 4px; top: 0.7em;
  width: 10px; height: 10px; border-radius: 50%; background: var(--grad);
}
.prose figure { margin: 0 0 1.8em; }
.prose figure img { border-radius: var(--radius); width: 100%; }
.lead { font-size: 1.15em; color: var(--navy); font-weight: 500; }
.callout { background: var(--surface); border-inline-start: 4px solid var(--orange); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 1.6em 0; }
[dir="rtl"] .callout { border-radius: var(--radius) 0 0 var(--radius); }
.callout p:last-child { margin: 0; }
.price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 22px 26px; margin: 1.4em 0; }
.price strong { font: 700 2.75rem/1 var(--font-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps { counter-reset: step; display: grid; gap: 14px; margin: 1.2em 0 1.8em; padding: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; background: var(--surface); border-radius: var(--radius); padding: 16px 20px; padding-inline-start: 64px; }
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 16px; top: 14px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: var(--navy-deep);
  display: grid; place-items: center; font: 700 1rem/1 var(--font-head);
}

.aside-card { position: sticky; top: 100px; background: var(--navy); color: var(--white); border-radius: 18px; padding: 28px; }
.aside-card h2 { color: var(--white); font-size: 1.375rem; }
.aside-card p { color: rgb(255 255 255 / 75%); font-size: 0.9375rem; }
.aside-card .contact-list { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 14px; }
.aside-card .contact-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9375rem; }
.aside-card .contact-list svg { width: 20px; height: 20px; flex: none; color: var(--amber); margin-top: 3px; }
.aside-card a { color: var(--white); }
.aside-card a:hover { color: var(--amber); }
.aside-card .btn { width: 100%; justify-content: center; }
@media (max-width: 960px) { .aside-card { position: static; } }

/* CTA band */
.cta-band { background: var(--grad); color: var(--navy-deep); padding: clamp(40px, 5vw, 64px) 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: var(--navy-deep); margin: 0 0 4px; }
.cta-band p { margin: 0; font-weight: 500; }
.cta-band .btn { background: var(--navy-deep); color: var(--white); }
.cta-band .btn:hover { background: var(--navy); color: var(--white); }

/* Footer */
.site-footer { background: var(--navy-deep); color: rgb(255 255 255 / 78%); padding: 56px 0 28px; font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { color: var(--white); font-size: 1.0625rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: rgb(255 255 255 / 85%); text-decoration: none; }
.site-footer a:hover { color: var(--amber); text-decoration: underline; }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; color: var(--white); }
.footer-brand img { width: 44px; height: 44px; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / 12%); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 0.875rem; }

/* 404 */
.notfound { text-align: center; padding: clamp(80px, 12vw, 160px) 0; }
.notfound .code { font: 700 clamp(5rem, 14vw, 10rem)/1 var(--font-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
