/* =========================================================
   Rigo Consulting AB - stylesheet
   No external dependencies. System fonts only.
   ========================================================= */

/* ---------- Reset / base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
               Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; font-weight: 600; }

p   { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: #0074d9;
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: #005baa; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- NAV ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 860px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  gap: 1rem;
}

.nav__brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1a1a1a;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav__brand:hover { color: #0074d9; }

.nav__brand_ico {
  height: 16px;
  margin-right: 0.5rem;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav__links a {
  color: #444;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav__links a:hover { color: #0074d9; }

/* Hamburger button - hidden on desktop */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: all 0.2s;
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}

.section--alt {
  background: #f7f8fa;
}

.section__subheading {
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555;
}

/* ---------- Hero ---------- */
.hero {
  padding: 6rem 0 5rem;
  background: linear-gradient(135deg, #f0f6ff 0%, #ffffff 60%);
  border-bottom: 1px solid #e5e5e5;
}

.hero__title {
  color: #0a0a0a;
  margin-bottom: 0.5rem;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: #0074d9;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.hero__body {
  max-width: 640px;
  color: #333;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.btn--primary {
  background: #0074d9;
  color: #fff;
  border: 2px solid #0074d9;
}
.btn--primary:hover {
  background: #005baa;
  border-color: #005baa;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,116,217,.25);
}

.btn--secondary {
  background: transparent;
  color: #0074d9;
  border: 2px solid #0074d9;
}
.btn--secondary:hover {
  background: #0074d9;
  color: #fff;
}

/* ---------- Lists ---------- */
.list {
  list-style: none;
  margin-bottom: 1rem;
}

.list li {
  padding: 0.3rem 0 0.3rem 1.4rem;
  position: relative;
}

.list li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: #0074d9;
  font-weight: 700;
}

.list--values li::before {
  content: "\2192";
}

/* ---------- Note / callout ---------- */
.note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: #eaf3ff;
  border-left: 3px solid #0074d9;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
}

/* ---------- About ---------- */
.about__inner {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.about__avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #0074d9;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.about__avatar_ico {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  background: #ffffff;
}

.about__text {
  flex: 1;
  min-width: 0;
}

/* ---------- Project cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}

.card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.09);
  transform: translateY(-2px);
}

.card__title {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.card__desc {
  color: #444;
  font-size: 0.93rem;
  flex: 1;
  margin-bottom: 1rem;
}

.card__link {
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: #0074d9;
  align-self: flex-start;
}
.card__link:hover {
  text-decoration: underline;
}

/* ---------- Contact ---------- */
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ---------- Footer ---------- */
.footer {
  background: #1a1a1a;
  color: #aaa;
  padding: 1.75rem 0;
  font-size: 0.875rem;
  text-align: center;
}

.footer a {
  color: #ccc;
}

/* =========================================================
   Responsive - mobile ( ≤ 640px )
   ========================================================= */
@media (max-width: 640px) {

  /* Nav: show toggle, hide link list by default */
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 4px 8px rgba(0,0,0,.08);
    padding: 0.5rem 0;
    z-index: 99;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links li {
    width: 100%;
  }

  .nav__links a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .nav__links a:hover {
    background: #f0f6ff;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  /* Toggle X animation */
  .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 {
    padding: 4rem 0 3.5rem;
  }

  /* About: stack avatar above text */
  .about__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Cards: single column */
  .cards {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 0;
  }
}
