/* Jagged Consulting site styles */
:root {
  --blue: #008AC9;
  --blue-dark: #00608C;
  --blue-deep: #004A6E;
  --ink: #1B1B1B;
  --text: #3A3F44;
  --mist: #EEF6FA;
  --line: #DCE6EB;
  --amber: #FFA401;
  --white: #FFFFFF;
  --font: "Segoe UI", "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 74rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); }
h1, h2, h3 { color: var(--ink); line-height: 1.15; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--amber);
  color: var(--ink);
  padding: 0.6rem 1rem;
  font-weight: 700;
  z-index: 100;
  text-decoration: none;
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 1rem); }

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

.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid transparent;
  line-height: 1.3;
}
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #FFB733; }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--blue-dark); }

/* Header */
.site-header {
  background: var(--white);
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.5rem;
}
.brand { display: block; flex: none; }
.brand img { width: clamp(190px, 22vw, 280px); }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--blue);
  color: var(--blue-dark);
  font: 700 0.95rem var(--font);
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
}

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: 0.15rem; }
.nav a, .nav .sub-toggle {
  display: block;
  padding: 0.55rem 0.8rem;
  color: var(--ink);
  text-decoration: none;
  font: 600 1rem var(--font);
  background: none;
  border: 0;
  cursor: pointer;
  border-radius: 3px;
}
.nav a:hover, .nav .sub-toggle:hover { color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); border-radius: 0; }

.sub-toggle::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.2em) rotate(45deg);
}
.sub-toggle[aria-expanded="true"]::after { transform: translateY(0) rotate(-135deg); }

.has-sub { position: relative; }
.sub {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 14rem;
  background: var(--white);
  border-top: 3px solid var(--blue);
  padding: 0.4rem 0;
  box-shadow: 0 12px 28px rgba(0, 74, 110, 0.18);
}
.sub.open { display: block; }
.nav .sub a { font-weight: 400; border-radius: 0; padding: 0.6rem 1.1rem; }
.nav .sub a:hover { background: var(--mist); }

.nav .linkedin { padding: 0.55rem; color: var(--blue); }
.nav .linkedin svg { width: 1.4rem; height: 1.4rem; display: block; }

/* Hero */
.hero {
  position: relative;
  color: var(--white);
  background-color: var(--blue);
  background-image:
    linear-gradient(90deg, rgba(0, 74, 110, 0.55) 0%, rgba(0, 74, 110, 0.25) 45%, rgba(0, 74, 110, 0) 70%),
    url("../img/slide-bg.jpg");
  background-size: cover;
  background-position: center, 62% center;
  background-repeat: no-repeat;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(6.5rem, 12vw, 8.5rem);
}
.hero h1 {
  color: var(--white);
  font-weight: 300;
  font-size: clamp(2.2rem, 5.5vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 12ch;
}
.hero h1 strong { font-weight: 800; display: block; }
.hero-lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 30rem;
  margin: 1.25rem 0 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* Highlights overlapping the hero */
.highlights {
  position: relative;
  margin-top: clamp(-5rem, -8vw, -3.5rem);
  z-index: 2;
}
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--white);
  box-shadow: 0 18px 40px rgba(0, 74, 110, 0.16);
  border-radius: 6px;
  overflow: hidden;
}
.highlight {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: clamp(1.5rem, 3vw, 2.1rem);
}
.highlight + .highlight { border-left: 1px solid var(--line); }
.highlight h2 { font-size: 1.3rem; margin: 0 0 0.3rem; }
.highlight p { margin: 0; }
.highlight a { font-weight: 700; }

.icon {
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: 0 -50px;
}
.icon-bulb { background-image: url("../img/img-2.png"); }
.icon-gear { background-image: url("../img/img-1.png"); }
.icon-heart { background-image: url("../img/img.png"); }
.icon-db { background-image: url("../img/img-db.png"); }

/* Services */
.services { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 300;
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
}
.section-title strong { font-weight: 700; }

.service-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}
.service {
  display: flex;
  flex-direction: column;
  background: var(--mist);
  border-radius: 6px;
  overflow: hidden;
}
.service-art {
  aspect-ratio: 4 / 3;
  background: #DDEFF8;
}
.service-art svg { width: 100%; height: 100%; display: block; }
.service-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 2.4rem 1.4rem 1.5rem;
}
.service .icon {
  position: absolute;
  top: -25px;
  left: 1.4rem;
  box-shadow: 0 0 0 5px var(--mist);
}
.service h3 {
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1.1;
  margin: 0 0 0.75rem;
}
.service h3 span { display: block; font-weight: 700; color: var(--blue-dark); }
.service p { margin: 0 0 1.1rem; flex: 1; }
.service a { font-weight: 700; align-self: flex-start; }

/* About */
.about { background: var(--mist); padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about-art {
  justify-self: end;
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: 6px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 14px 14px 0 var(--blue);
}
.about h2 { margin-top: 0; }
.about blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.1rem;
  border-left: 4px solid var(--blue);
  font-size: 1.15rem;
  color: var(--ink);
}

/* Call band */
.call {
  background: var(--blue);
  background-image: linear-gradient(120deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--white);
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  overflow: hidden;
}
.call-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: center;
}
.call h2 { color: var(--white); font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 1rem; }
.call p { margin: 0 0 1.75rem; max-width: 34rem; font-size: 1.1rem; }
.call .phone { color: var(--white); font-weight: 700; white-space: nowrap; }
.call-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.call-art { width: 100%; max-width: 460px; justify-self: end; display: block; }

/* Footer */
.site-footer {
  background: #F3F6F8;
  color: #4B5258;
  padding: 2.5rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.92rem;
  border-top: 4px solid var(--blue);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.75rem;
}
.site-footer p { margin: 0 0 0.3rem; }
.ecologi img { height: 2.8rem; width: auto; }

/* Responsive */
@media (max-width: 64rem) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 52rem) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 0.25rem var(--gutter) 1rem;
    border-bottom: 3px solid var(--blue);
    box-shadow: 0 16px 30px rgba(0, 74, 110, 0.15);
  }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li { border-bottom: 1px solid var(--line); }
  .nav > ul > li:last-child { border-bottom: 0; }
  .nav a, .nav .sub-toggle { width: 100%; text-align: left; padding: 0.8rem 0.25rem; border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .sub {
    position: static;
    box-shadow: none;
    border-top: 0;
    border-left: 3px solid var(--blue);
    margin: 0 0 0.6rem 0.25rem;
    padding: 0;
  }
  .nav .sub a { padding: 0.6rem 1rem; }

  .hero {
    background-image:
      linear-gradient(180deg, rgba(0, 74, 110, 0.55) 0%, rgba(0, 74, 110, 0.35) 100%),
      url("../img/slide-bg.jpg");
    background-position: center, 58% center;
  }
  .highlight-grid { grid-template-columns: 1fr; }
  .highlight + .highlight { border-left: 0; border-top: 1px solid var(--line); }
  .about-inner, .call-inner { grid-template-columns: 1fr; }
  .about-art { justify-self: start; max-width: 400px; box-shadow: 10px 10px 0 var(--blue); }
  .call-art { justify-self: center; max-width: 380px; }
}

@media (max-width: 36rem) {
  .service-grid { grid-template-columns: 1fr; }
}

/* Current section marker for Services */
.nav .sub-toggle.is-current { color: var(--blue); }
.nav .sub a[aria-current="page"] { color: var(--blue); font-weight: 700; }

/* Sub page hero */
.page-hero {
  background: var(--blue);
  background-image: linear-gradient(120deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--white);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, 0.12) 12px 24px);
}
.page-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  align-items: center;
}
.page-hero h1 {
  color: var(--white);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.08;
  margin: 0;
}
.page-hero h1 strong { font-weight: 800; }
.page-hero p { margin: 1rem 0 0; font-size: 1.15rem; max-width: 34rem; }
.page-art {
  justify-self: end;
  width: 100%;
  max-width: 340px;
  border-radius: 8px;
  overflow: hidden;
  background: #DDEFF8;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.18);
}
.page-art svg, .page-art img { display: block; width: 100%; height: auto; }
.page-art.is-plain { background: var(--white); padding: 1.5rem; }
.page-art.is-clear { background: none; box-shadow: none; }

/* Content */
.content { padding: clamp(3rem, 7vw, 5rem) 0; }
.content.tint { background: var(--mist); }
.prose { max-width: 46rem; }
.prose p { margin: 0 0 1.1rem; }
.prose h2 { font-size: clamp(1.5rem, 2.8vw, 1.9rem); font-weight: 700; margin: 0.2rem 0 1rem; }
.prose h2 strong { font-weight: 700; }
.lead { font-size: 1.2rem; color: var(--ink); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.feature {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.feature + .feature { margin-top: 2.25rem; }
.feature h2 { margin: 0.35rem 0 0.75rem; font-size: 1.4rem; }
.feature h3 { margin: 1.25rem 0 0.4rem; font-size: 1.1rem; color: var(--blue-dark); }
.feature h2 + h3 { margin-top: 0; }
.feature p { margin: 0 0 1rem; }
.feature ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.feature .prose h2 { font-size: clamp(1.5rem, 2.8vw, 1.9rem); margin-top: 0.2rem; }
.feature li { margin-bottom: 0.3rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.panel {
  background: var(--white);
  border-radius: 6px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 4px solid var(--blue);
}
.content.tint .panel { box-shadow: 0 10px 28px rgba(0, 74, 110, 0.08); }

.icon-folder { background-image: url("../img/img-3.png"); }

/* Requirement cards */
.req-grid {
  list-style: none;
  margin: 1.5rem 0 1.75rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.req-grid li {
  background: var(--mist);
  border-radius: 6px;
  padding: 1.25rem;
  border-left: 4px solid var(--blue);
}
.req-grid h3 { font-size: 1.05rem; margin: 0 0 0.5rem; color: var(--blue-dark); }
.req-grid p { margin: 0; font-size: 0.98rem; }

/* Mission */
.mission { list-style: none; margin: 0; padding: 0; counter-reset: mission; }
.mission li {
  counter-increment: mission;
  position: relative;
  padding-left: 3.75rem;
  margin-bottom: 1.75rem;
}
.mission li::before {
  content: counter(mission);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mission h3 { margin: 0.35rem 0 0.4rem; font-size: 1.25rem; }
.mission p { margin: 0; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.form-card {
  background: var(--white);
  border-radius: 6px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 10px 28px rgba(0, 74, 110, 0.08);
  border-top: 4px solid var(--blue);
}
.form-card h2, .aside-card h2 { margin: 0 0 1.25rem; font-size: 1.5rem; }
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.field label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 0.35rem; }
.field .opt { font-weight: 400; color: #5B666D; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 0.7rem 0.8rem;
  border: 2px solid #C5D3DA;
  border-radius: 4px;
  background: var(--white);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(0, 138, 201, 0.25); }
.field [aria-invalid="true"] { border-color: #C0392B; }
.field-error { display: block; color: #B03A2E; font-size: 0.92rem; margin-top: 0.3rem; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.92rem; color: #5B666D; margin: 0.5rem 0 1.25rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-actions button { font: inherit; font-weight: 700; cursor: pointer; }
.form-actions button[disabled] { opacity: 0.6; cursor: wait; }
.form-status { margin: 1rem 0 0; padding: 0.9rem 1rem; border-radius: 4px; }
.form-status:empty { display: none; }
.form-status.ok { background: #E6F4EA; color: #1D5E2F; border-left: 4px solid #2E8B47; }
.form-status.err { background: #FBEAEA; color: #8E2A21; border-left: 4px solid #C0392B; }

.aside-card {
  background: var(--white);
  box-shadow: 0 10px 28px rgba(0, 74, 110, 0.08);
  border-radius: 6px;
  padding: clamp(1.5rem, 3vw, 2rem);
}
.aside-card + .aside-card { margin-top: 1.5rem; }
.aside-card address { font-style: normal; margin-bottom: 1rem; }
.aside-card dl { margin: 0; }
.aside-card dt { font-weight: 700; color: var(--ink); }
.aside-card dd { margin: 0 0 0.9rem; }

/* Privacy */
.policy {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.toc {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 1rem);
  background: var(--mist);
  border-radius: 6px;
  padding: 1.25rem;
  font-size: 0.93rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
.toc h2 { font-size: 1rem; margin: 0 0 0.6rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: 0.35rem; }
.policy-body { max-width: 48rem; }
.policy-body h2 { font-size: 1.45rem; margin: 2.5rem 0 0.9rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.policy-body h2:first-child { margin-top: 0; }
.policy-body h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; color: var(--blue-dark); }
.policy-body p { margin: 0 0 1rem; }
.policy-body ul.plain { list-style: none; padding: 0; margin: 0; }
.policy-body address { font-style: normal; background: var(--mist); border-radius: 6px; padding: 1rem 1.25rem; margin: 0 0 1rem; }

/* 404 */
.notfound { text-align: left; }
.search-form { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; max-width: 30rem; }
.search-form input { flex: 1 1 14rem; font: inherit; padding: 0.7rem 0.8rem; border: 2px solid #C5D3DA; border-radius: 4px; }
.search-form button { font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 52rem) {
  .page-hero-inner, .split, .contact-grid, .policy, .feature-grid { grid-template-columns: 1fr; }
  .page-art { justify-self: start; max-width: 280px; }
  .req-grid { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
}
@media (max-width: 36rem) {
  .field-row { grid-template-columns: 1fr; }
  .page-art { max-width: 230px; }
  .feature { grid-template-columns: 1fr; gap: 0.75rem; }
}
