/* =========
   RESET / BASE
   ========= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #05060a;
  color: #f5f5f7;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==========================
   FARGEVARIABLER — DARK MODE
   ========================== */

:root {
  /* Main backgrounds */
  --bg-main: #00171F;          /* Ink Black */
  --bg-elevated: #003459;      /* Deep Space Blue */
  --bg-soft: #007EA7;          /* Cerulean */
  --box-bg: #003459;           /* kort/panel bakgrunn dark */

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);

  /* Text */
  --text-main: #ffffff;
  --text-muted: #cdd3df;
  --text-soft: #9ba3b1;

  /* Accent colors */
  --accent: #00A8E8;           /* Fresh Sky */
  --accent-soft: rgba(0, 168, 232, 0.14);
  --accent-strong: #007EA7;    /* Cerulean darker */

  /* Other */
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 22px 60px rgba(0, 0, 0, 0.5);
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.25s ease-out;

  --header-height: 68px;
}

/* ==========================
   FARGEVARIABLER — LIGHT MODE
   ========================== */

body.theme-light {
  /* Main backgrounds */
  --bg-main: #F4F1DE;        /* Eggshell */
  --bg-elevated: #FFFFFF;    /* White */
  --bg-soft: #F2CC8F;        /* Apricot Cream */
  --box-bg: #F2CC8F;         /* paneler/boxer */

  /* Borders */
  --border-subtle: rgba(15, 23, 42, 0.10);

  /* Text */
  --text-main: #3D405B;      /* Twilight Indigo */
  --text-muted: #6b7280;
  --text-soft: #8B8F9C;

  /* Accent */
  --accent: #E07A5F;         /* Burnt Peach */
  --accent-soft: rgba(224, 122, 95, 0.16);
  --accent-strong: #C7654D;

  /* Shadows */
  --shadow-soft: 0 14px 45px rgba(0, 0, 0, 0.08);

  /* Knapp-farger i light mode */
  --button-primary: #F4F1DE;        /* Eggshell */
  --button-primary-strong: #E6DFC0; /* litt mørkere */
  --button-secondary-bg: #FFFFFF;
  --button-secondary-border: rgba(0, 0, 0, 0.12);
}

/* Linker */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Fokus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Layout helpers */
main {
  padding-top: var(--header-height);
}

.section-inner {
  max-width: 1024px;
  padding: 4.5rem 1.5rem;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .section-inner {
    padding: 5.5rem 2rem;
  }
}

/* =========
   HEADER / NAV
   ========= */

#site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: linear-gradient(
      to bottom,
      rgba(5, 6, 10, 0.9),
      rgba(5, 6, 10, 0.84)
    );
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  transition: background 0.2s ease-out, transform 0.2s ease-out,
    box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}

body.theme-light #site-header {
  background: rgba(245, 245, 251, 0.92);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

#site-header.scrolled {
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.45);
  background: rgba(5, 6, 10, 0.97);
}

body.theme-light #site-header.scrolled {
  background: rgba(245, 245, 251, 0.98);
}

.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-title-main {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-title-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Links desktop */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding: 0.25rem 0;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Fjern vanlig understrek på menylenker */
.nav-links a,
.nav-links a:hover,
.nav-links a:focus {
  text-decoration: none;
}

/* Flytt linje nærmere teksten */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-med);
  border-radius: 999px;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Burger */
.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  transition: background var(--transition-fast), transform var(--transition-fast),
    border-color var(--transition-fast), box-shadow var(--transition-fast);
}

body.theme-light .nav-toggle {
  background: rgba(255, 255, 255, 0.92);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-main);
  transition: transform var(--transition-fast), opacity var(--transition-fast),
    width var(--transition-fast), translate var(--transition-fast);
}

/* Burger åpen */
.nav-toggle.open span:nth-child(1) {
  transform: translateY(4px) rotate(40deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-4px) rotate(-40deg);
}

/* Mobilnav */
@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    inset-inline: 0;
    top: var(--header-height);
    background: rgba(5, 6, 10, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    flex-direction: column;
    padding: 0.8rem 1.4rem 1.1rem;
    gap: 0.6rem;
    transition: opacity var(--transition-med), transform var(--transition-med),
      visibility var(--transition-med);
  }

  body.theme-light .nav-links {
    background: rgba(245, 245, 251, 0.98);
    border-bottom-color: rgba(15, 23, 42, 0.08);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    width: 100%;
    padding: 0.5rem 0;
  }
}

/* =========
   HERO
   ========= */

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  color: #fff;
}

/* Bakgrunnsbilde */
.hero-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.03);
  transition: background-image 0.5s ease-out, transform 0.6s ease-out,
    filter 0.5s ease-out;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 10% -10%,
      rgba(79, 140, 255, 0.7),
      transparent 55%
    ),
    radial-gradient(circle at 120% 40%, rgba(14, 165, 233, 0.65), transparent 55%),
    linear-gradient(to top, #020617, rgba(15, 23, 42, 0.2));
}

/* Innhold */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding-top: 20rem;
  padding-bottom: 6rem;
}

.hero-inner > div {
  width: 100%;
  max-width: 42rem;
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 1.2rem;
  min-height: 3.2rem;
}

.hero-subtitle {
  max-width: 32rem;
  font-size: 1rem;
  color: #e5e7eb;
  margin: 0 0 2rem;
  min-height: 4.5rem;
}

.hero-subtitle .highlight {
  font-weight: 600;
  background: rgba(15, 23, 42, 0.72);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

/* Hero actions */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  width: 100%;
  margin-top: 2rem;
  min-height: 3.5rem;
}

/* Slider dots */
.hero-slider-dots {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
}

.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(15, 23, 42, 0.35);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    width var(--transition-fast), opacity var(--transition-fast);
  opacity: 0.7;
}

.slider-dot.active {
  width: 22px;
  background: #f9fafb;
  opacity: 1;
}

/* Full bredde bakgrunn for services */
#services {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: radial-gradient(
      circle at top left,
      rgba(79, 140, 255, 0.18),
      transparent 55%
    ),
    radial-gradient(circle at bottom right,
      rgba(15, 23, 42, 0.9),
      transparent 50%
    ),
    var(--bg-main);
}

/* Kontakt-seksjon full høyde og full bredde */
#contact {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-main);
}

/* =========
   KNAPPER
   ========= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast),
    box-shadow var(--transition-fast), transform var(--transition-fast),
    border-color var(--transition-fast);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: #ffffff;
  box-shadow: 0 18px 45px rgba(0, 168, 232, 0.55);
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.75);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.5);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.95);
}

/* PRIMARY BUTTON — LIGHT MODE */
body.theme-light .btn-primary {
  background: var(--button-primary);
  border-color: var(--button-primary-strong);
  color: #05060a;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

body.theme-light .btn-primary:hover {
  background: var(--button-primary-strong);
}

/* SECONDARY BUTTON — LIGHT MODE */
body.theme-light .btn-secondary {
  background: var(--button-secondary-bg);
  border-color: var(--button-secondary-border);
  color: #05060a;
}

body.theme-light .btn-secondary:hover {
  background: #f3f3f6;
}

/* =========
   GENERELLE SEKSJONER / TITLER
   ========= */

.section-header {
  max-width: 640px;
  margin-bottom: 2.4rem;
}

.section-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.section-title {
  font-size: 1.8rem;
  margin: 0 0 0.8rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.section-intro {
  margin: 0;
  color: var(--text-muted);
}

/* =========
   SERVICES
   ========= */

.services-compact {
  max-width: 720px;
  margin-bottom: 2.5rem;
  color: var(--text-muted);
}

/* Theme-toggle rad */
.theme-toggle-row {
  margin-top: 2.2rem;
  padding: 1rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

body.theme-light .theme-toggle-row {
  background: rgba(255, 255, 255, 0.9);
}

.theme-toggle-text {
  margin: 0;
  font-size: 1rem;
  color: var(--text-soft);
}

/* Toggle-knapp */
.theme-toggle {
  margin-left: auto;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: background var(--transition-fast), border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

body.theme-light .theme-toggle {
  background: #f9fafb;
}

.theme-toggle-label-light,
.theme-toggle-label-dark {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.theme-toggle-switch {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: var(--box-bg);
  position: relative;
  padding: 2px;
}

body.theme-light .theme-toggle-switch {
  background: rgba(15, 23, 42, 0.08);
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #f9fafb;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.35);
  transition: transform var(--transition-med);
}

/* Når LYST er aktiv (aria-pressed=true) flyttes tommel til høyre. */
.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  transform: translateX(20px);
}

/* Services-eksempler */
.services-examples {
  display: grid;
  gap: 1.2rem;
  margin-top: 2.6rem;
}

@media (min-width: 768px) {
  .services-examples {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.service-mini {
  background: var(--box-bg);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast);
}

body.theme-light .service-mini {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.service-mini:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.7);
}

/* generelt (dark mode) */
.service-mini h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #ffffff;          /* hvit i dark mode, juster hvis du vil */
}

/* lysere/mørkere i light mode */
body.theme-light .service-mini h3 {
  color: #3D405B;          /* mørk blågrå, god kontrast mot aprikos-bakgrunn */
}
.service-mini p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========
   CONTACT
   ========= */

#contact {
  background: var(--bg-main);
}

.contact-layout {
  display: grid;
  gap: 2.2rem;
  align-items: flex-start;
}

@media (min-width: 880px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
    gap: 2.8rem;
  }
}

.contact-blurb {
  margin-top: 0;
  margin-bottom: 1.4rem;
  color: var(--text-muted);
}

/* Highlight-liste */
.contact-highlights {
  display: grid;
  gap: 0.7rem;
}

.contact-highlight {
  font-size: 0.92rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.7);
}

/* Light mode – highlight-bokser mer lesbare */
body.theme-light .contact-highlight {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #3D405B;
}

body.theme-light .contact-highlight * {
  color: #3D405B;
}

/* Kontakt-panel */
.contact-panel {
  background: var(--box-bg);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 768px) {
  .contact-panel {
    padding: 1.8rem 1.7rem;
  }
}

.contact-panel h3 {
  margin-top: 0;
  margin-bottom: 1.2rem;
}

/* Form */
.form-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.form-field {
  display: grid;
  gap: 0.3rem;
}

.form-field label {
  font-size: 0.85rem;
  color: var(--text-soft);
}

input,
textarea {
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.8);
  padding: 0.55rem 0.7rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast),
    background var(--transition-fast), box-shadow var(--transition-fast);
}

body.theme-light input,
body.theme-light textarea {
  background: #ffffff;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-soft);
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Kontakt-footer */
.contact-footer {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  display: grid;
  gap: 0.25rem;
}

.contact-footer a {
  color: var(--accent);
  text-decoration: none;
}

.contact-footer a:hover {
  text-decoration: underline;
}

/* LIGHT MODE – KONTAKTPANEL-TYPografi */
body.theme-light .contact-panel,
body.theme-light .contact-panel * {
  color: #3D405B;
}

/* men selve input/textarea skal ha mørk tekst på hvit bakgrunn */
body.theme-light .contact-panel input,
body.theme-light .contact-panel textarea {
  background: #ffffff;
  color: #000000;
}

/* placeholder i feltene i kontaktpanel – lys grå */
body.theme-light .contact-panel input::placeholder,
body.theme-light .contact-panel textarea::placeholder {
  color: #8B8F9C;
}

/* =========
   FOOTER
   ========= */

footer {
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  background: #020617;
  color: #9ca3af;
}

body.theme-light footer {
  background: #e5e7eb;
  color: #4b5563;
}

.footer-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 1.1rem 1.6rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 0.9rem;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* =========
   RESPONSIVE FINPUSS
   ========= */

@media (max-width: 768px) {
  .hero-inner {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .theme-toggle-row {
    flex-direction: column;
    align-items: flex-start;
    padding-inline: 1rem;
  }

  .theme-toggle {
    width: 100%;
    justify-content: space-between;
  }
}

/* Logo-farge i light mode */
body.theme-light .nav-title-main {
  color: var(--accent);
}
.contact-image {
  width: 300px;        /* gjør bildet mindre */
  height: auto;        /* holder proporsjoner */
  border-radius: 50%;  /* gjør bildet helt rundt */
  display: block;
  margin: 20px auto;   /* sentrerer bildet */
}
/* Skjemaet inni kontakt-panelet */
.contact-form {
  margin-top: 1.2rem;
}

/* Feltene skal gå fra kant til kant inne i panelet */
.contact-form .form-grid {
  gap: 1rem;
}

.contact-form .form-field {
  display: grid;
  gap: 0.35rem;
}

/* Gjør input/textarea full bredde */
.contact-form input,
.contact-form textarea {
  width: 100%;
}

/* Send-knappen – samme stil som andre, bare strekk den litt ut */
.contact-submit {
  margin-top: 0.8rem;
  width: 100%;          /* hvis du vil ha full bredde */
  /* evt. kommenter ut linjen over og bruk dette for høyrestilt knapp:
  width: auto;
  display: inline-flex;
  margin-left: auto;
  */
}
.theme-toggle-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.theme-toggle {
  margin: 0 auto !important;
}