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

:root {
  --black: #111;
  --white: #fff;
  --gray: #666;
  --light: #f5f5f5;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
}

/* ── Hamburger nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: flex-end;
  mix-blend-mode: multiply;
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 30px;
  height: 2px;
  background: var(--black);
  transition: all .3s ease;
}

/* ── Menu overlay ── */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  color: var(--white);
  z-index: 201;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  pointer-events: none;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
}

.menu-overlay.open {
  transform: translateX(0);
  pointer-events: all;
}

.menu-identity {
  text-align: center;
  margin-bottom: 3rem;
}

.menu-identity h2 {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: .04em;
}

.menu-identity p {
  font-size: .8rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #888;
  margin-top: .4rem;
}

.menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.menu-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .6;
  transition: opacity .2s;
}

.menu-links a:hover { opacity: 1; }

.close-btn {
  position: absolute;
  top: 1.6rem;
  right: 2rem;
  width: 54px;
  height: 54px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform .35s ease;
}

.close-btn:hover {
  transform: rotate(90deg);
}

.close-btn.spin {
  animation: close-spin .35s ease forwards;
}

@keyframes close-spin {
  0%   { transform: rotate(0deg)   scale(1); }
  50%  { transform: rotate(120deg) scale(.8); }
  100% { transform: rotate(180deg) scale(1); }
}

.close-btn span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
}

.close-btn span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-btn span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 5rem;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 5rem;
  max-width: 920px;
  width: 100%;
}

.hero-img {
  width: 260px;
  height: 330px;
  object-fit: cover;
  flex-shrink: 0;
  filter: grayscale(100%);
}

.hero-text h1 {
  font-family: var(--serif);
  font-size: 4rem;
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 1.8rem;
}

.hero-text p {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.85;
  max-width: 380px;
}

/* ── Carousel ── */
.carousel-section {
  padding: 5rem 0 4rem;
  background: var(--light);
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 0 2rem;
}

.carousel-viewport {
  width: 640px;
  overflow: hidden;
  flex-shrink: 0;
}

.carousel-track {
  display: flex;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
}

.carousel-slide {
  min-width: 640px;
  height: 420px;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-slide:nth-child(even) img {
  filter: grayscale(100%);
}

.carousel-arrow {
  background: none;
  border: 1.5px solid var(--black);
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}

.carousel-arrow:hover {
  background: var(--black);
  color: var(--white);
}

.carousel-arrow svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 2.2rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  border: none;
  transition: background .3s;
}

.dot.active { background: var(--black); }

/* ── Competence ── */
.competence {
  padding: 7rem 2rem;
  max-width: 1120px;
  margin: 0 auto;
}

.section-label {
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 4.5rem;
}

.org {
  border-top: 1px solid #e0e0e0;
  padding-top: 2.8rem;
  margin-bottom: 5rem;
}

.org h3 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 2.2rem;
}

.org-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2.5rem;
}

/* Video items */
.org-videos {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.video-link {
  display: block;
  text-decoration: none;
  color: var(--black);
}

.video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #ddd;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(30%);
  transition: filter .3s;
}

.video-link:hover .video-thumb img { filter: grayscale(0%); }

.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-icon svg {
  width: 48px;
  height: 48px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
}

.video-overlay {
  cursor: pointer;
}

.video-caption {
  font-size: .82rem;
  color: var(--gray);
  margin-top: .5rem;
  display: block;
}

/* Articles */
.org-articles {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-link {
  display: block;
  text-decoration: none;
  color: var(--black);
  padding: 1.2rem 0;
  border-bottom: 1px solid #e8e8e8;
}

.article-link:first-child { border-top: 1px solid #e8e8e8; }

.article-link h4 {
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: .3rem;
}

.article-link:hover h4 { text-decoration: underline; }

.article-meta {
  font-size: .76rem;
  color: var(--gray);
}

/* Org image */
.org-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  filter: grayscale(15%);
}

/* ── Masonry Gallery ── */
.gallery-section {
  padding: 5rem 2rem 6rem;
  background: var(--light);
}

.gallery-section .section-label {
  text-align: center;
  margin-bottom: 3rem;
}

.masonry {
  columns: 3;
  column-gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.masonry-item img {
  width: 100%;
  display: block;
  filter: grayscale(15%);
  transition: filter .3s;
}

.masonry-item img:hover { filter: grayscale(0%); }

/* ── Footer ── */
footer {
  padding: 3rem 2rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  border-top: 1px solid #e0e0e0;
}

footer a {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--black);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
  transition: opacity .2s;
}

footer a:hover { opacity: 1; }

footer svg {
  width: 20px;
  height: 20px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner { flex-direction: column; gap: 2.5rem; text-align: center; }
  .hero-img { width: 200px; height: 250px; }
  .hero-text p { max-width: 100%; }
  .org-grid { grid-template-columns: 1fr 1fr; }
  .org-img { grid-column: 1 / -1; aspect-ratio: 16/9; }
  .section-label { text-align: center; }
  .org h3 { text-align: center; }
}

@media (max-width: 700px) {
  /* Carousel: pilar läggs ovanpå bilden */
  .carousel-wrapper {
    position: relative;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
  .carousel-viewport { width: 100%; }
  .carousel-slide { min-width: 100%; height: 56vw; }
  .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.8);
    border-color: transparent;
  }
  #prevBtn { left: .75rem; }
  #nextBtn { right: .75rem; }
  .carousel-dots { margin-top: 1.4rem; }

  /* Kompetens */
  .competence { padding: 4rem 1.2rem; }
  .org-grid { grid-template-columns: 1fr; }
  .video-caption { text-align: center; }
  .article-link h4 { text-align: center; }
  .article-meta { text-align: center; display: block; }

  .masonry { columns: 2; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 2.8rem; }
  .masonry { columns: 1; }
}
