/* Marexsoft Corporation — sober, modern, dependency-free */
:root {
  --navy: #0b1f3a;
  --navy-2: #132a4d;
  --ink: #0d1b2e;
  --muted: #5b6b82;
  --line: #e4e9f2;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --accent: #1d6ff2;
  --accent-2: #4cc2ff;
  --accent-soft: #eaf2ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(13, 27, 46, .06), 0 8px 24px -16px rgba(13, 27, 46, .25);
  --shadow-md: 0 2px 6px rgba(13, 27, 46, .06), 0 24px 48px -28px rgba(13, 27, 46, .35);
  --max: 1120px;
  --header-h: 72px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 720; }
h3 { font-size: 1.08rem; font-weight: 650; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -24px rgba(13,27,46,.4); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,.18)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-weight: 750; letter-spacing: .06em; font-size: .95rem; }
.brand-text small { font-size: .62rem; font-weight: 650; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--ink); font-size: .93rem; font-weight: 550; padding: 8px 12px; border-radius: 9px;
  text-decoration: none; transition: background .18s ease, color .18s ease;
}
.nav a:hover { background: var(--accent-soft); color: var(--navy); text-decoration: none; }
.nav a.is-active { color: var(--accent); background: var(--accent-soft); }
.nav .nav-cta { margin-left: 8px; }
.nav .nav-cta:hover { background: var(--accent); color: #fff; }

.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); background: var(--surface); border-radius: 11px; cursor: pointer; padding: 11px 10px; gap: 4px; flex-direction: column; justify-content: center; }
.menu-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .95rem; font-weight: 600; line-height: 1;
  padding: 14px 22px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 24px -14px rgba(29,111,242,.8); }
.btn-primary:hover { background: #1760d6; box-shadow: 0 16px 30px -14px rgba(29,111,242,.9); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: #cfd9e8; }
.btn-sm { padding: 10px 16px; font-size: .88rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 104px) 0 clamp(64px, 10vw, 120px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(76,194,255,.16), transparent 60%),
    radial-gradient(800px 420px at 0% 10%, rgba(29,111,242,.10), transparent 55%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(to right, rgba(13,27,46,.05) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(13,27,46,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: clamp(32px, 6vw, 72px); }
.hero-watermark { position: absolute; z-index: 0; right: -80px; top: -40px; width: min(46vw, 560px); height: auto; opacity: .05; pointer-events: none; user-select: none; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero h1 { max-width: 16ch; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.16rem); color: var(--muted); max-width: 56ch; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .9rem; font-weight: 550; }
.hero-points li { position: relative; padding-left: 18px; }
.hero-points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px rgba(76,194,255,.18); }

.hero-visual { position: relative; min-height: 360px; display: grid; place-items: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.orb-1 { width: 220px; height: 220px; background: radial-gradient(circle at 30% 30%, rgba(76,194,255,.55), rgba(76,194,255,0) 68%); top: -10px; right: -10px; }
.orb-2 { width: 180px; height: 180px; background: radial-gradient(circle at 60% 40%, rgba(29,111,242,.35), rgba(29,111,242,0) 70%); bottom: 0; left: -20px; }
.panel {
  position: relative; width: min(100%, 420px); border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f4f7fc);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  transform: rotate(-1.2deg);
}
.panel-top { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.panel-top .dot { width: 9px; height: 9px; border-radius: 50%; background: #dfe6f1; }
.panel-top .dot:first-child { background: #ff6b6b; }
.panel-top .dot:nth-child(2) { background: #f5c451; }
.panel-top .dot:nth-child(3) { background: #43c98a; }
.panel-title { margin-left: 8px; font-size: .76rem; color: var(--muted); font-weight: 600; }
.panel-body { padding: 22px; }
.panel-line { height: 9px; border-radius: 6px; background: #e8eef8; margin-bottom: 12px; }
.w-40 { width: 40%; } .w-55 { width: 55%; } .w-70 { width: 70%; } .w-80 { width: 80%; } .w-90 { width: 90%; }
.panel-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.mini-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--navy); }
.mini-ico { color: var(--accent); font-size: 1rem; }

/* Sections */
.section { padding: clamp(64px, 9vw, 104px) 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: clamp(30px, 5vw, 48px); }
.section-sub { color: var(--muted); font-size: 1.02rem; margin-bottom: 0; }

.grid { display: grid; gap: 18px; }
.services-grid { grid-template-columns: repeat(3, 1fr); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.service { padding: 26px 24px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d3deee; }
.service-ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.service-ico svg { width: 22px; height: 22px; }
.service h3 { margin-bottom: 8px; }
.service p { color: var(--muted); font-size: .94rem; margin: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(28px, 6vw, 72px); align-items: start; }
.values { list-style: none; display: grid; gap: 12px; margin-top: 22px; }
.values li { position: relative; padding-left: 22px; color: var(--muted); font-size: .96rem; }
.values li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent-2); transform: rotate(45deg); }
.values strong { color: var(--navy); }
.quote-card { padding: 30px 28px; border-radius: var(--radius); background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #dfe9f7; box-shadow: var(--shadow-md); }
.quote-logo { width: 46px; height: 46px; margin-bottom: 10px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.quote-mark { font-size: 3.2rem; line-height: 1; color: var(--accent-2); margin: 0 0 4px; font-family: Georgia, serif; }
.quote-text { font-size: 1.08rem; line-height: 1.6; color: #eaf2fb; }
.quote-author { margin: 0; font-size: .86rem; color: #9fb4cd; }

/* Steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 24px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.step-num { display: inline-block; font-size: .78rem; font-weight: 750; letter-spacing: .12em; color: var(--accent); background: var(--accent-soft); padding: 5px 9px; border-radius: 7px; margin-bottom: 14px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }

/* Contact */
.section-contact { background: linear-gradient(180deg, #fff, var(--bg)); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr .9fr; gap: clamp(28px, 6vw, 72px); align-items: start; }
.contact-list { list-style: none; display: grid; gap: 16px; margin-top: 26px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-ico { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.contact-ico svg { width: 19px; height: 19px; }
.contact-label { display: block; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.contact-list a, .contact-list span { color: var(--navy); font-weight: 550; }

.contact-form { padding: clamp(22px, 4vw, 32px); }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: .86rem; font-weight: 600; color: var(--navy); }
.field .opt { color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fbfcfe; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #9aa8bc; }
.field input:focus, .field textarea:focus {
  outline: none; background: #fff; border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(29,111,242,.14);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:user-invalid, .field textarea:user-invalid { border-color: #e05a5a; box-shadow: 0 0 0 4px rgba(224,90,90,.12); }
.form-note { font-size: .82rem; color: var(--muted); margin: 12px 0 0; }
.form-note.is-ok { color: #15803d; }

/* Footer */
.site-footer { background: var(--navy); color: #b9c8dc; padding: 48px 0 28px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 24px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-mark { width: 46px; height: 46px; border-radius: 50%; }
.footer-name { margin: 0; color: #fff; font-weight: 700; letter-spacing: .05em; }
.footer-tag { margin: 2px 0 0; font-size: .8rem; color: #8ea3bd; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-nav a { color: #c7d4e5; font-size: .9rem; }
.footer-nav a:hover { color: #fff; }
.footer-copy { margin: 0; font-size: .82rem; color: #8ea3bd; text-align: right; }

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

/* Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-watermark { display: none; }
  .hero-visual { min-height: 300px; order: -1; }
  .panel { transform: none; width: min(100%, 460px); }
  .hero h1 { max-width: 22ch; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .footer-copy { text-align: left; }
}
@media (max-width: 720px) {
  .nav {
    position: absolute; left: 16px; right: 16px; top: calc(var(--header-h) - 4px);
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    padding: 10px; box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 11px 12px; }
  .nav .nav-cta { margin: 6px 0 0; }
  .menu-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #dbe6f5;
    --muted: #9ab0c9;
    --line: #22344f;
    --bg: #081527;
    --surface: #0d1f36;
    --navy: #eaf2fb;
    --navy-2: #132a4d;
    --accent: #59a6ff;
    --accent-2: #6fd2ff;
    --accent-soft: #12294a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -16px rgba(0,0,0,.7);
    --shadow-md: 0 2px 6px rgba(0,0,0,.35), 0 24px 48px -28px rgba(0,0,0,.8);
  }
  .hero::after { opacity: .35; background-image: linear-gradient(to right, rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.06) 1px, transparent 1px); }
  .panel { background: linear-gradient(180deg, #102540, #0c1c31); }
  .panel-top { background: #0e2038; }
  .panel-line { background: #1d3352; }
  .mini-card { background: #0e2038; }
  .field input, .field textarea { background: #0a1a2e; }
  .field input:focus, .field textarea:focus { background: #0d2038; }
  .quote-card { background: linear-gradient(160deg, #0a1a2e, #102540); }
  .site-header { background: color-mix(in srgb, #081527 82%, transparent); }
  .section-alt { background: #0a1a2e; }
  .section-contact { background: linear-gradient(180deg, #0a1a2e, #081527); }
  .site-footer { background: #050f1d; }
  .footer-name { color: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .service { transition: none; }
}
