/* OM */

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h2 {
  margin-left: 20px;
  margin-right: 20px;
}

.hero {
  position: relative;

  place-items: center;
  height: 10vh;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: var(--space-10);
  max-width: 1000px;
}

.typewriter-3 {
  position: relative;
  display: flex;
  min-height: 20vh;
  min-height: 20dvh;

  justify-content: center;
  width: 100%;
}

.typed-text {
  margin: 0;
  min-height: 1.2em;
}

.typed-text::after {
  content: "|";
  animation: cursor 0.8s infinite;
}

@keyframes cursor {
  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .typed-text::after {
    animation: none;
    opacity: 1;
  }
}

.about {
  position: relative;
}
.about-section {
  position: relative;
  display: grid;

  grid-template-columns: 1fr 1fr;

  justify-content: space-around;
  margin-bottom: 20px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.about-image {
  position: relative;
  justify-self: center;
  align-self: center;

  display: flex;
  outline: 15px solid white;
}

.about-image img {
  filter: grayscale(1);
  width: 25dvw;
  width: 25vw;
  height: auto;
  object-fit: cover;
}
.about-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 40dvw;
  width: 40vw;
  display: flex;
  justify-content: center;
  align-items: center;

  text-align: left;
}

@media (max-width: 768px) {
  .hero-content {
    padding-top: var(--space-6);
  }

  .about-section {
    grid-template-columns: 1fr;
    height: auto;
    text-align: center;
    width: 100dvw;
    width: 100vw;
    justify-content: space-around;
  }
  .about-image img {
    width: 45dvw;
    width: 45vw;
    height: auto;
  }
  .about-content {
    font-size: var(--font-size-0);
    width: 90dvw;
    width: 90vw;
    max-width: 90vw;
    height: auto;
    margin: 0 auto;
    padding: var(--space-4);
  }

  .about-content p {
    font-size: var(--font-size-0);
    width: 100%;
    max-width: 80vw;
    height: auto;
    text-align: center;
  }
}

/* ARBEID / CASE GRID */
.work .case-grid {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-6);
  margin-left: 20px;
  margin-right: 20px;

  grid-template-columns: repeat(3, 1fr);

  min-height: 50vh;
}

@media (max-width: 768px) {
  .work .case-grid {
    grid-template-columns: 1fr;
    margin-bottom: 50px;
  }
}

.case a {
  display: block;
  border: var(--border-1);
  border-radius: var(--radius-2);
  overflow: hidden;
  background: var(--color-bg-elev-1);
  transition: transform var(--dur-med) var(--ease-curve),
    border-color var(--dur-fast) var(--ease-curve),
    box-shadow var(--dur-fast) var(--ease-curve);
}
.case a:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-1);
}
.case figure {
  margin: 0;
  display: grid;
}
.case img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  filter: saturate(0.96) contrast(1.02);
  background: var(--color-bg-elev-2);
}
.case figcaption {
  padding: var(--space-4) var(--space-5);
  color: var(--color-text-dim);
  font-size: var(--font-size-1);
  border-top: var(--border-1);
}

/* Website preview indicator */
.case img[src*="microlink.io"]::before {
  content: "🌐";
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 1;
}

/* Loading state for website previews */
.case img[src*="microlink.io"]:not([src*="screenshot"]) {
  background: linear-gradient(
    90deg,
    var(--color-bg-elev-2) 25%,
    var(--color-bg-elev-1) 50%,
    var(--color-bg-elev-2) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* Loading class for JavaScript */
.case img.loading {
  opacity: 0.8;
  filter: saturate(0.8) contrast(0.9);
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* SOSIALT PROV */
.social-proof {
  position: relative;
  min-height: 50vh;
  min-height: 50dvh;
}
.social-proof .quotes {
  position: relative;
  list-style: none;
  padding: 0;

  margin-left: 20px;
  margin-right: 20px;
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(2, 1fr);
}

blockquote {
  margin: 0;
  padding: var(--space-5);
  border: var(--border-1);
  border-radius: var(--radius-2);
  background: var(--color-bg-elev-1);
}
blockquote p {
  font-size: var(--font-size-3);
  color: var(--color-text);
}
blockquote footer {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--font-size-0);
}

@media (max-width: 768px) {
  .social-proof .quotes {
    grid-template-columns: 1fr;
    position: relative;
  }
}

/* METODE */

.method .steps {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(4, 1fr);

  counter-reset: step;
  padding: 0;
  margin-left: 20px;
  margin-right: 20px;
  list-style: none;
}
@media (max-width: 768px) {
  .method .steps {
    grid-template-columns: 1fr;
  }
}
.method .steps li {
  border: var(--border-1);
  border-radius: var(--radius-2);
  background: var(--color-bg-elev-1);
  padding: var(--space-5);
  position: relative;
}
.method .steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--color-text-muted);
  font-size: var(--font-size-0);
  letter-spacing: 0.06em;
}

/* KONTAKT */
.cta {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: center;
  margin: 100px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-1);
  border: var(--border-1);
  color: var(--color-text);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0)
  );
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-curve),
    background var(--dur-fast) var(--ease-curve),
    border-color var(--dur-fast) var(--ease-curve),
    box-shadow var(--dur-fast) var(--ease-curve);
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    150px circle at var(--x, 0) var(--y, 0),
    rgba(59, 170, 132, 0.15) 0%,
    rgba(59, 170, 132, 0.05) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: var(--radius-1);
}
.btn:hover {
  border-color: var(--color-border-strong);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0)
  );
  box-shadow: var(--shadow-1);
}

.btn:hover::before {
  opacity: 1;
}
.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(
      to bottom right,
      rgba(59, 170, 132, 0.2),
      rgba(181, 106, 58, 0.18)
    ),
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0)
    );
}

.btn.primary::before {
  background: radial-gradient(
    150px circle at var(--x, 0) var(--y, 0),
    rgba(59, 170, 132, 0.3) 0%,
    rgba(59, 170, 132, 0.1) 40%,
    transparent 70%
  );
}
@media (max-width: 768px) {
  .cta {
    flex-direction: column;
  }
  .btn {
    font-size: var(--font-size-0);
  }
  .hero p {
    font-size: var(--font-size-0);
  }
  .coords {
    font-size: var(--font-size-0);
  }
}
.btn.primary:hover {
  background: linear-gradient(
      to bottom right,
      rgba(59, 170, 132, 0.3),
      rgba(181, 106, 58, 0.26)
    ),
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0)
    );
  box-shadow: var(--shadow-2);
}
