/* ========================================================================
   Legator Solutions — Stylesheet
   Palette sampled from brand mark: navy #004080 → teal #00a0a0
   ===================================================================== */

:root {
  --navy-900: #042747;
  --navy-800: #06365f;
  --navy-700: #084d92;
  --navy: #0a5cab;
  --blue: #1473d1;
  --teal: #12a7b0;
  --teal-400: #1cc4c4;
  --teal-300: #4fe0db;

  --ink: #0d2236;
  --body: #46586b;
  --muted: #7a8aa0;
  --line: #e6ecf3;
  --bg: #ffffff;
  --bg-soft: #f4f8fc;
  --bg-tint: #eef5fb;

  --grad: linear-gradient(120deg, var(--navy-700) 0%, var(--blue) 45%, var(--teal-400) 100%);
  --grad-soft: linear-gradient(135deg, #0a4d8f 0%, #12a7b0 100%);

  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 4px 18px rgba(10, 60, 110, .07);
  --shadow: 0 18px 50px rgba(10, 60, 110, .12);
  --shadow-lg: 0 30px 80px rgba(8, 45, 95, .18);

  --container: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; letter-spacing: -.02em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Eyebrow label ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy-700);
  padding: 7px 14px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: 100px;
}
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.eyebrow--light { color: #cfe9ff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }
.eyebrow--light .eyebrow__dot { background: var(--teal-300); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  padding: 14px 26px; border-radius: 100px; cursor: pointer; border: 1px solid transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
  white-space: nowrap;
}
.btn__arrow { transition: transform .35s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--primary {
  color: #fff; background: var(--grad);
  box-shadow: 0 12px 30px rgba(16, 110, 160, .35);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(16, 110, 160, .45); }
.btn--ghost {
  color: var(--navy-700); background: #fff; border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { transform: translateY(-3px); border-color: #cbdaeb; box-shadow: var(--shadow); }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 18px 0;
  transition: padding .35s var(--ease), background .35s, box-shadow .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  padding: 11px 0;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(10,60,110,.06);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__logo { height: 40px; width: auto; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; color: var(--ink); letter-spacing: -.02em; }
.brand__name-accent { color: var(--teal); font-weight: 600; }

.nav__menu { display: flex; align-items: center; gap: 6px; }
.nav__link {
  font-weight: 500; font-size: .96rem; color: var(--ink);
  padding: 9px 16px; border-radius: 100px; position: relative;
  transition: color .25s, background .25s;
}
.nav__link:not(.nav__link--cta):hover { color: var(--navy); background: var(--bg-tint); }
.nav__link--cta {
  color: #fff; background: var(--grad); font-family: var(--font-display); font-weight: 600;
  box-shadow: 0 10px 24px rgba(16,110,160,.3); margin-left: 8px;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.nav__link--cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(16,110,160,.42); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease), opacity .25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 168px 0 96px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.orb--1 { width: 520px; height: 520px; top: -140px; right: -120px; background: radial-gradient(circle, #36c8d6 0%, rgba(54,200,214,0) 70%); }
.orb--2 { width: 460px; height: 460px; bottom: -160px; left: -140px; background: radial-gradient(circle, #1b7fd6 0%, rgba(27,127,214,0) 70%); opacity: .4; }
.grid-glow {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
  opacity: .5;
}
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero__inner > * { min-width: 0; }
.hero__title { font-size: clamp(2.1rem, 5vw, 3.7rem); font-weight: 800; margin: 22px 0 18px; }
.hero__lead { font-size: 1.16rem; max-width: 540px; color: var(--body); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 40px; }
.hero__stats { display: flex; gap: 36px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.stat__num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; color: var(--ink); line-height: 1; }
.stat__label { font-size: .85rem; color: var(--muted); }

/* Hero visual */
.hero__visual { position: relative; display: grid; place-items: center; min-height: 380px; }
.glass-card {
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.glass-card--main { width: 100%; max-width: 420px; padding: 22px; }
.glass-card__head { display: flex; gap: 7px; margin-bottom: 18px; }
.glass-card__head .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.glass-card__head .dot:first-child { background: #ff6f6f; }
.glass-card__head .dot:nth-child(2) { background: #ffc861; }
.glass-card__head .dot:nth-child(3) { background: #54d6a0; }
.chart { position: relative; height: 180px; }
.chart__bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 12px; }
.chart__bars span {
  flex: 1; height: var(--h); border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, rgba(28,196,196,.65), rgba(20,115,209,.18));
  transform-origin: bottom; animation: grow 1.1s var(--ease) backwards;
}
.chart__bars span:nth-child(1){animation-delay:.05s}.chart__bars span:nth-child(2){animation-delay:.12s}
.chart__bars span:nth-child(3){animation-delay:.19s}.chart__bars span:nth-child(4){animation-delay:.26s}
.chart__bars span:nth-child(5){animation-delay:.33s}.chart__bars span:nth-child(6){animation-delay:.4s}
@keyframes grow { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.chart__line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart__line polyline {
  fill: none; stroke: url(#g); stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 4px 8px rgba(10,60,110,.25));
  stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.6s var(--ease) .4s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.glass-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.glass-card__foot strong { font-family: var(--font-display); font-size: 1.35rem; }

.glass-card--badge {
  position: absolute; bottom: 18px; left: -8px;
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
}
.glass-card--badge .glass-card__icon { height: 38px; width: auto; }
.glass-card--badge strong { display: block; font-family: var(--font-display); color: var(--ink); font-size: .95rem; }
.glass-card--badge span { font-size: .8rem; color: var(--muted); }
.float-slow { animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Trust bar ---------- */
.trust { padding: 18px 0 8px; }
.trust__label { text-align: center; color: var(--muted); font-size: .85rem; letter-spacing: .04em; margin-bottom: 18px; }
.trust__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; }
.trust__item {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #b6c4d6;
  transition: color .3s; letter-spacing: -.01em;
}
.trust__item:hover { color: var(--navy-700); }

/* ---------- Section base ---------- */
.section { padding: 96px 0; }
.section__head { max-width: 660px; margin: 0 auto 56px; text-align: center; }
.section__title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 700; margin: 18px 0 14px; }
.section__sub { font-size: 1.08rem; color: var(--body); }

.grid { display: grid; gap: 24px; }
.grid--services { grid-template-columns: repeat(3, 1fr); }
.grid--process { grid-template-columns: repeat(4, 1fr); }
.grid--work { grid-template-columns: repeat(3, 1fr); margin-bottom: 56px; }

/* ---------- Service cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
  position: relative; overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::after { transform: scaleX(1); }
.card__icon {
  width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center;
  background: var(--bg-tint); margin-bottom: 20px; transition: background .4s;
}
.card__icon svg { width: 28px; height: 28px; stroke: var(--navy); stroke-width: 1.9; transition: stroke .4s; }
.card:hover .card__icon { background: var(--grad-soft); }
.card:hover .card__icon svg { stroke: #fff; }
.card__title { font-size: 1.25rem; font-weight: 600; margin-bottom: 9px; }
.card__text { font-size: .98rem; }

/* ---------- About ---------- */
.about { background: var(--bg-soft); border-block: 1px solid var(--line); }
.about__inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.about__media { display: grid; place-items: center; }
.about__panel {
  position: relative; width: min(360px, 100%); aspect-ratio: 1; border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #fff, var(--bg-tint));
  border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; place-items: center; overflow: hidden;
}
.about__panel::before {
  content: ""; position: absolute; width: 130%; height: 130%;
  background: radial-gradient(circle at 70% 30%, rgba(28,196,196,.22), transparent 55%);
}
.about__emblem { width: 52%; position: relative; z-index: 1; filter: drop-shadow(0 16px 30px rgba(8,45,95,.2)); }
.about__ring { position: absolute; width: 78%; aspect-ratio: 1; border: 2px dashed #cfe0f0; border-radius: 50%; animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feature-list { margin: 26px 0 32px; display: grid; gap: 14px; }
.feature-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--ink); }
.feature-list__tick {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-soft); color: #fff; font-size: .8rem; font-weight: 700;
}

/* ---------- Process steps ---------- */
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 24px; position: relative; box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.step__num {
  font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: .9; display: block; margin-bottom: 16px;
}
.step__title { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.step__text { font-size: .95rem; }

/* ---------- Work / metrics / quote ---------- */
.metric {
  text-align: center; padding: 38px 24px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--line);
}
.metric__num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; line-height: 1; margin-bottom: 10px; }
.metric__text { color: var(--body); font-size: .98rem; max-width: 240px; margin-inline: auto; }

.quote {
  max-width: 860px; margin: 0 auto; text-align: center;
  padding: 48px 40px; border-radius: var(--radius-lg);
  background: var(--grad); color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.quote::before { content: "\201C"; position: absolute; top: 6px; left: 30px; font-family: var(--font-display); font-size: 7rem; opacity: .18; }
.quote blockquote { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.15rem, 2.3vw, 1.55rem); line-height: 1.5; letter-spacing: -.01em; }
.quote figcaption { display: inline-flex; align-items: center; gap: 14px; margin-top: 26px; }
.quote__avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); font-family: var(--font-display); font-weight: 700; }
.quote__person { text-align: left; line-height: 1.3; }
.quote__person strong { font-family: var(--font-display); }
.quote__person span { display: block; font-size: .85rem; opacity: .85; }

/* ---------- Contact ---------- */
.contact { padding-bottom: 110px; }
.contact__card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.contact__intro { background: var(--navy-900); color: #fff; padding: 54px 46px; position: relative; overflow: hidden; }
.contact__intro::after {
  content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%;
  bottom: -160px; right: -120px; background: radial-gradient(circle, rgba(28,196,196,.4), transparent 70%);
}
.contact__title { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; margin: 16px 0 14px; position: relative; }
.contact__sub { color: #b8cfe6; position: relative; }
.contact__list { margin-top: 32px; display: grid; gap: 14px; position: relative; }
.contact__list li { display: flex; align-items: center; gap: 12px; color: #dcebfa; color: #d3e6f7; }
.contact__list span {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: var(--teal-300);
}
.contact__form { background: #fff; padding: 54px 46px; display: grid; gap: 18px; align-content: start; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: .88rem; color: var(--ink); font-family: var(--font-display); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft);
  transition: border-color .25s, box-shadow .25s, background .25s; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #9fb0c4; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); background: #fff;
  box-shadow: 0 0 0 4px rgba(28,196,196,.14);
}
.field input.invalid, .field textarea.invalid { border-color: #ff6f6f; box-shadow: 0 0 0 4px rgba(255,111,111,.12); }
.form__note { font-size: .9rem; min-height: 1.2em; }
.form__note.ok { color: #1aa06a; }
.form__note.err { color: #e05656; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: #aebfd2; padding: 64px 0 26px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer .brand__name { color: #fff; }
.footer .brand__name-accent { color: var(--teal-300); }
.footer__tag { margin-top: 16px; max-width: 320px; font-size: .95rem; color: #94a8be; }
.footer__nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__col h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; font-weight: 600; }
.footer__col a { display: block; padding: 5px 0; font-size: .93rem; color: #9fb3c8; transition: color .25s; }
.footer__col a:hover { color: var(--teal-300); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 22px; font-size: .85rem; color: #7e93aa; }
.footer__legal a { margin-left: 18px; transition: color .25s; }
.footer__legal a:hover { color: var(--teal-300); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 1.2rem; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(14px); transition: all .35s var(--ease);
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-3px); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { min-height: 320px; }
  .about__inner { grid-template-columns: 1fr; gap: 40px; }
  .about__media { order: -1; }
  .grid--services { grid-template-columns: repeat(2, 1fr); }
  .grid--process { grid-template-columns: repeat(2, 1fr); }
  .contact__card { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 84vw);
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px;
    background: #fff; padding: 96px 22px 32px; box-shadow: -20px 0 60px rgba(8,45,95,.18);
    transform: translateX(100%); transition: transform .4s var(--ease); z-index: 99;
  }
  .nav__menu.open { transform: translateX(0); }
  .nav__link { padding: 14px 16px; border-radius: 12px; font-size: 1.05rem; }
  .nav__link--cta { margin-left: 0; margin-top: 8px; text-align: center; }
  .section { padding: 72px 0; }
  .hero { padding: 132px 0 72px; }
  .grid--services, .grid--process, .grid--work { grid-template-columns: 1fr; }
  .hero__stats { gap: 26px; }
  .contact__intro, .contact__form { padding: 38px 28px; }
  .quote { padding: 38px 26px; }
  .glass-card--badge { left: 50%; transform: translateX(-50%); bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
