/* ==========================================================================
   1. GLOBAL STYLES & RESET
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Høyden på navbar */
}

body {
  font-family: "Inter", sans-serif;
  background-color: #f8fafc;
  color: #1a202c;
  overflow-x: hidden; /* Hindrer horisontal scrolling på mobil */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.blue-text {
  color: #38bdf8;
}

/* ==========================================================================
   2. NAVBAR
   ========================================================================== */
.navbar {
  height: 80px;
  background-color: rgba(255, 255, 255, 0.95);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 22px;
  letter-spacing: 1px;
  color: #0f172a;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  margin-right: 12px;
}

.logo-text .bold {
  font-weight: 700;
}

.nav-menu ul {
  display: flex;
  list-style: none;
}

.nav-menu ul li {
  margin: 0 20px;
}

.nav-menu ul li a {
  text-decoration: none;
  color: #475569;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu ul li a:hover {
  color: #38bdf8;
}

.btn-primary {
  background-color: #0f172a;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #334155;
  transform: translateY(-2px);
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
}

.hero h1 {
  font-size: clamp(
    32px,
    8vw,
    48px
  ); /* Skalerer automatisk mellom mobil og desktop */
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero p {
  font-size: 18px;
  color: #64748b;
  max-width: 600px;
}

/* ==========================================================================
   4. INTERACTIVE GLOBE (REVEAL)
   ========================================================================== */
.interactive-globe {
  padding: 60px 0;
  display: flex;
  justify-content: center;
  background-color: #f8fafc;
}

.reveal-container {
  position: relative;
  width: 600px;
  height: 600px;
  max-width: 90vw; /* Kritisk for mobil */
  max-height: 90vw; /* Kritisk for mobil */
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  cursor: none;
  touch-action: none; /* Stopper scrolling mens man tar på kloden */
}

.base-layer,
.reveal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.mask-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  clip-path: ellipse(0px 0px at 50% 50%);
  z-index: 2;
}

/* Bruker CSS-variabler styrt av JS */
.reveal-container:hover .mask-layer,
.reveal-container:active .mask-layer {
  clip-path: ellipse(
    var(--rx, 150px) var(--ry, 150px) at var(--x, 50%) var(--y, 50%)
  );
}

/* ==========================================================================
   5. PRICING (TJENESTER)
   ========================================================================== */
.pricing {
  padding: 100px 0;
  background-color: #ffffff;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 36px;
  color: #0f172a;
  margin-bottom: 15px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  align-items: flex-start;
}

.price-card {
  background: white;
  padding: 40px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.price-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.price-card.featured {
  border: 2px solid #38bdf8;
  transform: scale(1.05);
  z-index: 10;
}

.popular-tag {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: #38bdf8;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.price {
  font-size: 36px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 30px;
}

.features {
  list-style: none;
  margin-bottom: 30px;
  text-align: left;
}

.features li {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.features li::before {
  content: "✓";
  color: #38bdf8;
  margin-right: 10px;
  font-weight: bold;
}

.btn-outline {
  display: block;
  padding: 12px;
  border: 2px solid #38bdf8;
  color: #38bdf8;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: #38bdf8;
  color: white;
}

/* ==========================================================================
   6. PORTFOLIO (PROSJEKTER)
   ========================================================================== */
.portfolio {
  padding: 100px 0;
  background-color: #ffffff;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.project-image {
  position: relative;
  aspect-ratio: 16 / 10;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(56, 189, 248, 0.15);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  color: #0f172a;
}

.view-project {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 25px;
  border: 2px solid #0f172a;
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  border-radius: 50px;
}

/* ==========================================================================
   7. ABOUT (OM OSS)
   ========================================================================== */
.about {
  padding: 100px 0;
  background-color: #f8fafc;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-size: 42px;
  margin: 20px 0;
}

.stats {
  display: flex;
  gap: 30px;
  margin-top: 30px;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  display: block;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.member-image {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 20px;
  overflow: hidden;
  border: 5px solid white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   8. CONTACT (KONTAKT)
   ========================================================================== */
.contact {
  padding: 100px 0;
  background-color: #0f172a;
  color: white;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-form {
  background: rgba(255, 255, 255, 0.05);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 8px;
}

.btn-submit {
  width: 100%;
  padding: 15px;
  background: #38bdf8;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.footer {
  padding: 40px 0;
  text-align: center;
  background-color: #0f172a;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   10. MEDIA QUERIES (MOBILE FIXES)
   ========================================================================== */

/* Tablet & Mobile */
@media (max-width: 992px) {
  .about-grid,
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Mobile Specific (iPhone 16 Pro etc) */
@media (max-width: 768px) {
  .navbar .nav-menu,
  .navbar .nav-cta {
    display: none; /* Skjuler meny på mobil - bør erstattes med en hamburgermeny senere */
  }

  .hero {
    padding: 60px 20px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .price-card.featured {
    transform: scale(1); /* Ingen skalering på mobil for å unngå overlapping */
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr; /* Ett teammedlem per rad på mobil */
  }

  .about-text h2 {
    font-size: 32px;
  }

  .contact-info h2 {
    font-size: 32px;
  }

  .reveal-container {
    cursor: default;
    /* Kloden har allerede max-width: 90vw fra hovedstilen */
  }

  .mask-layer {
    /* Sikrer at sirkelen har en grei størrelse på touch */
    --rx: 80px !important;
    --ry: 80px !important;
  }
}
