/*
  Ferth IT Solutions — design system
  Cool, structural palette built directly off the logo's navy. White/light-gray
  surfaces, navy as the dominant brand color (not a thin accent line).
  No gradients, no drop shadows, no rounded cards — hairlines and type do the work.
*/

:root {
  --bg: #ffffff;
  --bg-2: #eef1f6;
  --surface: #ffffff;
  --ink: #12162a;
  --ink-soft: #4d5266;
  --ink-faint: #868ba0;
  --rule: rgba(18, 22, 42, 0.13);
  --rule-strong: rgba(18, 22, 42, 0.28);
  --navy: #1b346a;
  --navy-deep: #101f3f;
  --navy-tint: rgba(27, 52, 106, 0.07);
  --error: #ad3a24;

  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", "Liberation Mono", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- base ---------- */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.kicker::before {
  content: "";
  width: 9px;
  height: 8px;
  background: var(--accent, var(--navy));
  display: inline-block;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---------- links / buttons ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 3px;
  transition: border-color 0.2s ease, color 0.2s ease, gap 0.2s ease;
}
.link-arrow span { transition: transform 0.2s ease; }
.link-arrow:hover { border-color: var(--navy); gap: 0.75em; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 22px;
  border: 1px solid var(--navy);
  color: var(--navy);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--navy); color: var(--surface); }
.btn--solid { background: var(--navy); color: var(--surface); }
.btn--solid:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--surface); }
.btn--ghost { border-color: var(--rule-strong); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 20px 0;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(245, 246, 249, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom-color: var(--rule);
  padding: 13px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand__mark { width: 30px; height: 30px; flex: none; object-fit: contain; }
.brand__tagline {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  margin-top: 2px;
  font-weight: 500;
}
.brand__word { display: flex; flex-direction: column; line-height: 1.1; }

.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav ul { display: flex; gap: 28px; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 4px;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--navy);
  transition: right 0.25s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 26px; }
.nav-toggle span { height: 2px; background: var(--navy); width: 100%; }

@media (max-width: 860px) {
  .site-nav ul { display: none; }
  .site-nav .btn { display: none; }
  .nav-toggle { display: flex; }
  body.nav-open .mobile-menu { transform: translateY(0); opacity: 1; visibility: visible; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 22px; }
.mobile-menu a {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 32px;
}
.mobile-menu .kicker { margin-bottom: 40px; }

/* ---------- hero ---------- */
.hero {
  padding: 190px 0 100px;
  position: relative;
}
.hero__kicker { margin-bottom: 26px; }
.hero h1 {
  font-size: clamp(38px, 6.6vw, 76px);
  line-height: 1.05;
  max-width: 18ch;
}
.hero__lede {
  margin-top: 26px;
  max-width: 46ch;
  font-size: 18px;
  color: var(--ink-soft);
}
.hero__actions {
  margin-top: 44px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero--page { padding: 160px 0 70px; }
.hero--page h1 { font-size: clamp(34px, 5.6vw, 58px); max-width: 20ch; }

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  padding: 16px 0;
  background: var(--navy);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee__track span {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cdd6e8;
  padding: 0 28px;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.18);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */
.section { padding: 108px 0; }
.section--alt { background: var(--bg-2); }
.section--tight { padding: 72px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 56px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--rule);
}
.section-head h2 { font-size: clamp(26px, 3.6vw, 38px); }
.section-head__note { max-width: 32ch; font-size: 14.5px; color: var(--ink-soft); text-align: right; }
@media (max-width: 700px) {
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head__note { text-align: left; }
}

.lede { font-size: 19px; color: var(--ink-soft); max-width: 62ch; }

/* index / numbered list */
.index-list { counter-reset: idx; }
.index-list li {
  counter-increment: idx;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.index-list li::before {
  content: counter(idx, decimal-leading-zero);
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--navy);
  padding-top: 4px;
}
.index-list li:last-child { border-bottom: 1px solid var(--rule); }
.index-list li > h3, .index-list li > p { grid-column: 2; }
.index-list h3 { font-size: 20px; margin-bottom: 8px; }
.index-list p { color: var(--ink-soft); max-width: 60ch; }

/* ---------- cards / grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); }
@media (max-width: 760px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  padding: 34px;
  transition: background 0.2s ease;
  border-top: 3px solid transparent;
}
.card:hover { background: var(--navy-tint); }
.card--accent { border-top-color: var(--navy); }
.card__num { font-family: var(--font-mono); font-size: 12px; color: var(--navy); }
.card h3, .card h4 { margin: 14px 0 10px; font-size: 19px; }
.card p { color: var(--ink-soft); font-size: 14.5px; }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule-strong);
  padding: 5px 9px;
  color: var(--ink-soft);
}

/* ---------- cta banner ---------- */
.cta-banner {
  background: var(--navy);
  color: var(--surface);
  padding: 90px 0;
}
.cta-banner h2 { color: var(--surface); font-size: clamp(28px, 4.4vw, 46px); max-width: 20ch; }
.cta-banner .kicker { --accent: #ffffff; color: #cdd6e8; opacity: 0.9; }
.cta-banner__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-top: 30px; }
.cta-banner .btn { border-color: var(--surface); color: var(--surface); }
.cta-banner .btn:hover { background: var(--surface); color: var(--navy); }

/* ---------- footer ---------- */
.site-footer { padding: 80px 0 40px; background: var(--ink); color: var(--bg); }
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4 { color: var(--surface); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 60px; }
.footer-brand p { color: #a9adc0; max-width: 32ch; margin-top: 16px; font-size: 14.5px; }
.footer-brand .brand { color: var(--surface); }
.footer-brand .brand__tagline { color: #7c81a0; }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #7c81a0; margin-bottom: 18px; }
.footer-col li { margin-bottom: 12px; font-size: 14.5px; }
.footer-col a { color: #c3c6d6; }
.footer-col a:hover { color: var(--surface); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.12); flex-wrap: wrap; gap: 12px; }
.footer-bottom small { color: #7c81a0; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.form-grid .field--full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 10px; }
.field label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  padding: 10px 2px;
  font-size: 16px;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--navy);
}
.field textarea { resize: vertical; min-height: 120px; font-family: var(--font-sans); }

.form-status {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-error { border-color: var(--error); color: var(--error); }
.form-status.is-success { border-color: var(--navy); color: var(--navy); }

/* ---------- contact split ---------- */
.contact-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 1px; background: var(--rule); }
.contact-panel { background: var(--surface); padding: 48px; }
@media (max-width: 900px) { .contact-split { grid-template-columns: 1fr; } }

.contact-route { padding: 20px 0; border-top: 1px solid var(--rule); }
.contact-route:first-of-type { border-top: 0; }
.contact-route__head { display: flex; justify-content: space-between; align-items: baseline; }
.contact-route__head h4 { font-family: var(--font-sans); font-weight: 700; font-size: 18px; }
.contact-route a { font-family: var(--font-mono); font-size: 13.5px; color: var(--navy); }
.contact-route p { color: var(--ink-soft); font-size: 14px; margin-top: 6px; max-width: 40ch; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- misc ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--navy);
  color: var(--surface);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  z-index: 999;
}
.skip-link:focus { left: 16px; top: 16px; }
