*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
}

:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #111111;
  --color-border: #111111;
  --color-accent: #2d2dfc;
  --color-accent-text: #ffffff;

  /* Typography */
  --font-body: "Istok Web", Arial, sans-serif;
  --font-heading: 'Anton', sans-serif;

  --fs-body: 1rem;
  --fs-small: 0.75rem;
  --fs-title: clamp(1.5rem, 7vw, 3rem);
  --fs-section-title: 1.25rem;
  --fs-logo: 2.25rem;

  --line-height-body: 1.45;
  --line-height-heading: 0.95;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 4rem;

  /* Layout */
  --page-padding: 1rem;
  --page-max-width: 90rem;
  --box-padding: 1rem;
  --box-gap: 1.5rem;


  /* Borders */
  --border: 1px solid var(--color-border);
}

.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}


/* HEADER / NAV */

.site-header {
  background-color: var(--color-bg);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-xl);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  position: relative;
  z-index: 20;
}

.brand__tag {
  width: fit-content;
  padding: 0.2em;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-accent-text);
  background: var(--color-accent);
}

.brand__name {
  font-family: var(--font-heading);
  font-size: var(--fs-logo);
  line-height: 1;
  white-space: nowrap;
}

/* hamburger */

.menu-button {
  position: relative;
  z-index: 20;
  width: 2.5rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 0.5rem;
  background: var(--color-text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-button span:nth-child(1) {
  top: 0;
}

.menu-button span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.menu-button span:nth-child(3) {
  bottom: 0;
}

.menu-button.is-open span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.menu-button.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-button.is-open span:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* nav mobile */

.main-nav {
  display: none;
}

.main-nav.is-open {
  position: fixed;
  inset: 0;
  z-index: 10;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  background: var(--color-bg);
}

.main-nav__link,
.main-nav__slash {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 0.95;
  color: var(--color-text);
  text-decoration: none;
}

.main-nav__link.is-active {
  width: fit-content;
  padding: 0.2em;
  color: var(--color-accent-text);
  background: var(--color-accent);
}





/*FOOTEr*/

.site-footer {
  background: #000;
  color: #fff;
  margin-top: var(--space-2xl);
}

.footer-inner {
  padding-block: var(--space-xl);
}

.footer-name {
  font-family: var(--font-heading);
  font-size: var(--fs-logo);
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-lg) 0; 
  font-weight: 100;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.35;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links span {
  display: block;
  line-height: 1;
}

.footer-bottom {
  padding: var(--space-sm) var(--page-padding);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--fs-small);
  font-family: var(--font-body);
  line-height: 1;
  text-align: center;
}

/*PROJECT CARD*/
.project-grid {
  display: grid;
  gap: var(--space-md);
  margin-bottom: 4rem;
}

.project-card {
  display: block;
  color: var(--color-text);
  text-decoration: none;
}

.project-card img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--border);
}

.project-card__title {
  border-right: var(--border);
  border-bottom: var(--border);
  border-left: var(--border);
  padding: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  line-height: 1;
  background: var(--color-surface);
}





/*PROJECT INTRO*/
.project-intro {
  margin-bottom: var(--space-lg);
  margin-top: var(--space-lg);
}

.project-intro__title {
  margin: 0 0 var(--space-lg) 0;
  font-family: var(--font-heading);
  font-size: 2rem; /* 32px */
  font-weight: 100;
  line-height: 1;
  text-transform: uppercase;
}

.project-meta {
  margin: 0 0 var(--space-xl) 0;
  border: var(--border);
  font-family: var(--font-body);
}

.project-meta div {
  display: flex;
  gap: 0.5rem;
  padding: var(--space-sm);
  border-bottom: var(--border);
}

.project-meta div:last-child {
  border-bottom: 0;
}

.project-meta dt,
.project-meta dd {
  margin: 0;
  font-size: var(--fs-body);
}

.project-meta dt {
  flex: 0 0 auto;
}

.project-meta dd {
  flex: 1;
}

.project-summary {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--space-md);
  align-items: center;
}

.project-summary h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-accent);
  text-transform: uppercase;
}

.project-summary p {
  margin: 0;
  font-size: var(--fs-body);
  font-family: var(--font-body);
}

.project-hero {
  margin-bottom: var(--space-xl);
}

.project-hero img {
  display: block;
  width: 100%;
  height: auto;
}




/*PROJECT SITE*/
.case-section {
  border: var(--border);
  background: var(--color-surface);
  margin-bottom: var(--space-md);
}

.case-section__title {
  margin: 0;
  padding: var(--box-padding);
  border-bottom: var(--border);
  font-family: var(--font-heading);
  font-size: var(--fs-section-title);
  font-weight: 100;
  line-height: var(--line-height-heading);
}

.case-section__content {
  padding: var(--box-padding);
  font-size: var(--fs-body);
  font-family: var(--font-body);
  line-height: var(--line-height-body);
}

.case-section__content > *:first-child {
  margin-top: 0;
}

.case-section__content > *:last-child {
  margin-bottom: 0;
}

.case-section__content ul {
  padding-left: 1.25rem;
}

.case-section__content img {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: auto;
  margin: var(--space-md) auto 0;
}


/*BILDKARUSELL*/
.carousel-section {
  border-top: var(--border);
  border-bottom: var(--border);
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-lg);
}

.carousel {
  position: relative;
}

.carousel__track {
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
}

.carousel__item {
  display: none;
  text-align: center;
}

.carousel__item.active {
  display: block;
}

.carousel__item img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.carousel__caption {
  margin-top: var(--space-md);
  text-align: center;
  font-family: var(--font-body);
}

.carousel__caption h3 {
  margin: 0 0 0.25rem 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1;
  font-weight: 100;
}

.carousel__caption p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.carousel__btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--color-text);
}

.carousel__btn.prev {
  left: 0;
}

.carousel__btn.next {
  right: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox.open {
  display: flex;
}

.lightbox__image {
  max-width: 90%;
  max-height: 90%;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/*PROJECT NAVIGATION*/

.project-nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-lg);
}

.project-nav__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 45%;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
}

.project-nav__item.left {
  justify-self: start;
}

.project-nav__item.right {
  margin-left: auto;
  text-align: right;
}
.project-nav__item .label {
  max-width: 8.5rem;
}

.project-nav .arrow {
  font-size: 2rem;
  line-height: 1;
  display: inline-block;
  font-family: Arial, sans-serif;
  transform: translateY(-2px);
}

/*section double diamond*/
.process-divider {
  background: var(--color-accent);
  padding-block: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.process-divider h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1;
  text-align: center;
  color: var(--color-accent-text);
  text-transform: uppercase;
  font-weight: 100;
}

/*insight cards/images between*/
.image-group {
  margin: var(--space-lg) 0;
}

.image-group__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.image-group img {
  display: block;
  width: 100%;
  height: auto;
}


/*text block (key design decisions*/
.text-block {
  margin-bottom: var(--space-lg);
}

.text-block:last-child {
  margin-bottom: 0;
}

.text-block h3 {
  margin: 0 0 0.25rem 0;
  font-weight: 700;
  font-size: var(--fs-body); 
  line-height: 1.3;
}

.text-block p {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--line-height-body);
}




/*ABOUT*/

.about-page {
  padding-top: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

/* INTRO */

.about-intro {
  margin-bottom: var(--space-2xl);
}

.about-text p {
  margin: 0 0 var(--space-lg) 0;
  font-size: var(--fs-body);
  line-height: var(--line-height-body);
  font-family: var(--font-body);
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* BLUE HIGHLIGHT */

.about-highlight {
  margin: var(--space-xl) 0;
  padding: var(--space-md);
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-family: var(--font-body);

  font-size: var(--fs-body);
  line-height: var(--line-height-body);
}

/* IMAGE */

.about-image {
  display: block;
  width: 100%;
  height: auto;
}

/* TIMELINE */

.timeline {
  border: var(--border);
  margin-block: var(--space-xl);
}

.timeline__row {
  display: grid;
  grid-template-columns: 40% 60%;
  border-bottom: var(--border);
}

.timeline__row:last-child {
  border-bottom: 0;
}

.timeline__year,
.timeline__text {
  padding: var(--space-md);
}

.timeline__year {
  border-right: var(--border);

  font-family: var(--font-heading);
  font-size: var(--fs-section-title);
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.timeline__text {
  font-size: var(--fs-body);
  line-height: var(--line-height-body);
  font-family: var(--font-body);

  display: flex;
  align-items: center;
}


/* =========================
   > 768px
========================= */

@media (min-width: 768px) {
  :root {
    --page-padding: 3rem;
    --box-padding: 1.5rem;
    --box-gap: 2rem;
  }

  /* nav desktop */

  .header-inner {
    align-items: flex-center;
  }

  .menu-button {
    display: none;
  }

  .main-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
  }

  .main-nav__link,
  .main-nav__slash {
    font-size: 1rem;
    line-height: 1;
  }

    .brand__tag {
    font-size: 1.4rem;
  }

  .brand__name {
    font-size: 4rem;
  }


  /* FOOTER */
  .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-xl);
  }

  .footer-name {
    margin-bottom: 0;
  }

  .footer-links {
    align-items: flex-end;
    text-align: right;
  }

  /* INDEX */
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 6rem;
  }

  .project-card__title {
    font-size: 1.25rem;
    padding: 1rem;
  }

  /* PROJECT */
  .project-intro {
    margin-top: 3rem;
    margin-bottom: 3rem;
  }

  .project-summary {
    padding-block: 1rem;
  }

  .project-summary p {
    max-width: 58rem;
  }

  .case-section {
    margin-bottom: 2rem;
  }

  .case-section__content {
    padding: 2rem;
  }

  .case-section__title {
    padding: 1.25rem 2rem;
  }

  .process-divider {
    margin-block: 3rem 2rem;
    padding-block: 1rem;
  }

  .process-divider h2 {
    font-size: 2.5rem;
  }

  .image-group {
    margin: 2rem 0;
  }

  .image-group__inner {
    gap: 2rem;
  }

  .project-nav__item {
    max-width: 48%;
    font-size: 1.25rem;
  }

  .project-nav__item .label {
    max-width: 18rem;
  }

  .project-nav .arrow {
    font-size: 3rem;
  }
}


/* =========================
   > 900px
========================= */

@media (min-width: 900px) {
  :root {
    --page-padding: 4rem;
  }
/*proj intro*/
   .project-meta {
    display: grid;
    grid-template-columns: 1.4fr 1.8fr 2fr 1.6fr;
    width: 100%;
    border: var(--border);
  }

  .project-meta div {
    display: grid;
    grid-template-rows: 3rem auto;
    padding: 0;
    border-bottom: 0;
    border-right: var(--border);
    min-width: 0;
  }

  .project-meta div:last-child {
    border-right: 0;
  }

  .project-meta dt,
  .project-meta dd {
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    line-height: 1.35;
    min-width: 0;
    overflow-wrap: break-word;
  }

  .project-meta dt {
    border-bottom: var(--border);
    display: flex;
    align-items: center;
  }

  .project-meta dd {
    display: flex;
    align-items: flex-start;
  }

    .project-summary {
    grid-template-columns: 8rem 1fr;
    gap: 3rem;
    align-items: center;
  }

  .project-summary h2 {
    align-self: center;
    margin: 0;
  }

  .project-hero img {
    max-width: 60rem;
    margin-inline: auto;
  }

/*abput*/
.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.8fr);
  grid-template-areas:
    "text image"
    "highlight image";
  column-gap: 3rem;
  row-gap: 2rem;
  align-items: start;
}

.about-text {
  grid-area: text;
  min-width: 0;
}

.about-highlight {
  grid-area: highlight;
  margin: 0;
  min-width: 0;
}

.about-image {
  grid-area: image;
  display: block;
  width: 100%;
  height: auto;
  max-height: 44rem;
  object-fit: cover;
  align-self: start;
}

  .timeline__row {
    grid-template-columns: 25% 75%;
  }

  .timeline__year {
    justify-content: flex-start;
    text-align: left;
    padding-left: 2rem;
  }

  .timeline__text {
    padding: 1.25rem 2rem;
  }

    .case-section {
    display: grid;
    grid-template-columns: 180px 1fr;
  }

  .case-section__title {
  border-bottom: 0;
  border-right: var(--border);

  display: flex;
  justify-content: center;
  align-items: center;

  text-align: center;
  padding: 1.5rem;
  }

  .case-section__content {
    padding: 1.5rem;
  }

  /*karusell*/
.carousel-section {
  margin-block: 5rem;
  padding-block: 2rem;
}

.carousel {
  max-width: 70rem;
  margin-inline: auto;
}

.carousel__track {
  max-width: 55rem;
}

.carousel__caption {
  max-width: 55rem;
  margin-inline: auto;
}

.carousel__btn.prev {
  left: 0;
}

.carousel__btn.next {
  right: 0;
}

.image-group--full img {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
}
  /*två bilder på rad*/
.image-group--two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 28rem));
  justify-content: center;
  gap: 1.5rem;
}

.image-group--two-up img {
  width: 100%;
  max-width: none;
  margin: 0;
}

/*tre bilder på rad*/

.image-group--three-up {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

/*fyra bilder insight cards*/
  .image-group--insights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 28rem));
    justify-content: center;
    gap: var(--space-lg);
  }

  .image-group--insights img {
    width: 100%;
    max-width: none;
    margin: 0;
  }
/*lofi maia*/
  .prototype-step img {
    max-width: 40rem;
    margin-inline: auto;
  }
  /*split image*/
  .case-section__content--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: var(--space-xl);
  align-items: start;
}

.split-media img {
  display: block;
  width: 100%;
  height: auto;
}
}


/* =========================
   > 1440px
========================= */

@media (min-width: 1440px) {
  :root {
    --page-padding: 5rem;
    --page-max-width: 100rem;
    --fs-logo: 3rem;
  }

  .header-inner {
    padding-block: 3rem;
  }

  /* PROJECT INTRO DESKTOP */
  .project-intro {
    margin-top: 4rem;
    margin-bottom: 4rem;
  }

  .project-intro__title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
  }

  .project-summary p {
    max-width: 70rem;
  }
  .project-hero img {
    max-width: 64rem;
  }

  .case-section {
    margin-bottom: 3rem;
  }

  .case-section__title {
    font-size: 1.5rem;
  }

  .case-section__content {
    padding: 2.5rem;
  }

  .process-divider {
    margin-block: 4rem 3rem;
  }

  .process-divider h2 {
    font-size: 3rem;
  }
}