/* Serviceport portal styles */

:root {
  --blue-900: #0b1f4d;
  --blue-700: #0f4fd6;
  --blue-600: #1463f3;
  --blue-500: #2f7bff;
  --blue-100: #e7f0ff;
  --blue-50: #f3f7ff;
  --ink: #0e1a33;
  --ink-soft: #46546f;
  --line: #e3e9f3;
  --surface: #ffffff;
  --bg: #f7f9fc;
  --amber-700: #8a4b00;
  --amber-100: #fff1dc;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-sm: 0 1px 2px rgba(14, 26, 51, 0.06), 0 2px 8px rgba(14, 26, 51, 0.05);
  --shadow-md: 0 10px 30px rgba(14, 26, 51, 0.10), 0 2px 6px rgba(14, 26, 51, 0.06);
  --shadow-lg: 0 20px 45px rgba(15, 79, 214, 0.18), 0 4px 12px rgba(14, 26, 51, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: var(--blue-700);
}

ul[role="list"],
.site-nav ul,
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--blue-700);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-700);
  margin-bottom: 14px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  border-radius: 8px;
}

.brand img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.site-nav ul {
  display: flex;
  gap: 4px;
}

.site-nav a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}

.site-nav a[aria-current="page"] {
  color: var(--blue-700);
}

.nav-toggle {
  display: none;
  flex: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  margin-left: -10px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bar {
  top: 50%;
  margin-top: -1px;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  left: 0;
  margin-left: 0;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 719px) {
  .brand img {
    height: 38px;
  }

  /* Collapsible menu only when JS is available; otherwise links stay visible. */
  .js .nav-toggle {
    display: block;
  }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }

  .js .site-nav.is-open {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
    padding: 8px clamp(16px, 4vw, 40px) 16px;
  }

  .js .site-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
  }

  html:not(.js) .header-inner {
    flex-wrap: wrap;
    padding-bottom: 8px;
  }

  html:not(.js) .site-nav a {
    padding: 8px 10px;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(47, 123, 255, 0.16), transparent 70%),
    radial-gradient(700px 380px at 5% 10%, rgba(0, 194, 255, 0.10), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.hero-inner {
  max-width: 880px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  font-weight: 800;
  color: var(--blue-900);
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--blue-700), #1aa3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 22px auto 0;
  max-width: 640px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--blue-700);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 79, 214, 0.28);
}

.btn-primary:hover {
  background: #0c43b8;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 79, 214, 0.32);
}

.btn-ghost {
  background: var(--surface);
  color: var(--blue-900);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  border-color: #c9d6ee;
  color: var(--blue-700);
  transform: translateY(-1px);
}

.hero-visual {
  margin: clamp(40px, 6vw, 64px) auto 0;
  max-width: 1160px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(90deg, #8cc4ff, #ffd59c, #8cc4ff);
}

.hero-visual img {
  width: 100%;
  height: clamp(110px, 15vw, 180px);
  object-fit: cover;
  object-position: center 60%;
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(64px, 8vw, 104px) 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.section-head h2,
.about-copy h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 750;
  color: var(--blue-900);
}

.section-lead {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* ---------- Service grid ---------- */

.service-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
}

@media (min-width: 520px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 840px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1240px) {
  .service-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #c6d7f7;
}

.service-card:focus-within {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
}

.service-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-100), #d6e6ff);
}

.service-media--ragnar {
  background: radial-gradient(circle at 50% 60%, #1b4fa8 0%, #0a1a3d 60%, #050c1f 100%);
}

.service-media-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-media-emblem {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  height: auto;
  transform: translate(-50%, -54%);
  filter: drop-shadow(0 6px 18px rgba(255, 154, 40, 0.45));
  transition: transform 0.5s ease;
}

.service-card:hover .service-media-bg,
.service-card:focus-within .service-media-bg {
  transform: scale(1.05);
}

.service-card:hover .service-media-emblem,
.service-card:focus-within .service-media-emblem {
  transform: translate(-50%, -54%) scale(1.06);
}

.service-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 20px 22px;
}

.status {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status--preview {
  background: var(--amber-100);
  color: var(--amber-700);
}

.service-title {
  margin-top: 12px;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: var(--blue-900);
}

.service-desc {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex: 1;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 650;
  color: var(--blue-700);
  text-decoration: none;
}

/* Stretch the link over the whole card so the entire card is clickable. */
.service-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.service-link:focus-visible {
  outline: none;
}

.service-link svg {
  transition: transform 0.2s ease;
}

.service-card:hover .service-link svg,
.service-card:focus-within .service-link svg {
  transform: translateX(3px);
}

/* ---------- About ---------- */

.about {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.about-inner {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

@media (min-width: 900px) {
  .about-inner {
    grid-template-columns: 1.1fr 1fr;
  }
}

.about-copy p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.feature-list {
  display: grid;
  gap: 16px;
}

.feature {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.feature-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--blue-100);
  color: var(--blue-700);
}

.feature h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--blue-900);
}

.feature p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--blue-900);
  color: #c9d5ef;
}

.footer-art {
  height: 72px;
  background: url("../assets/footer-skyline.jpg") center 70% / cover no-repeat, linear-gradient(90deg, #8cc4ff, #ffd59c);
  position: relative;
}

.footer-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 31, 77, 0) 0%, rgba(11, 31, 77, 0.35) 60%, var(--blue-900) 100%);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  padding-bottom: 32px;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer-nav a {
  color: #dbe5f8;
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-copy {
  width: 100%;
  font-size: 0.875rem;
  color: #9fb0d4;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
