/* ==========================================================================
   Oppdrett.ai – Redaksjonelt designsystem
   Inspirasjon: peec.ai (typografisk hierarki, rolig rytme, ren struktur)
   Typografi: Geist Sans (overskrifter & nav) + Inter (brødtekst & knapper)
   Fargepalett: Kobolt (#2149DA), nesten-svart (#101318), hvitt, lys kjølig grå (#F8FAFC)
   ========================================================================== */

@import url('../fonts/fonts.css');

:root {
  /* Farger */
  --color-primary: #2149DA;
  --color-primary-hover: #1636A8;
  --color-primary-subtle: #EEF3FF;
  --color-primary-line: #93C5FD;
  --color-text-main: #101318;
  --color-text-muted: #4B5563;
  --color-text-subtle: #6B7280;
  --color-bg-body: #FFFFFF;
  --color-bg-surface: #F8FAFC;
  --color-border: #E2E8F0;
  --color-border-subtle: #F1F5F9;

  /* Typografi */
  --font-heading: 'Geist Sans', 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --line-height-body: 1.65;
  --line-height-heading: 1.15;

  /* Layout */
  --container-max: 1200px;
  --container-text: 560px;
  --header-height: 80px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-bg-body);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Tilgjengelighet – Tastaturfokus */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.hero-section :focus-visible,
.site-header :focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

/* Snarvei for tastaturbrukere */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--color-primary);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 500;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Skjermleser-klasse */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

/* Knapper */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-white {
  background-color: #FFFFFF;
  color: var(--color-primary);
  font-weight: 600;
  border-color: #FFFFFF;
}
.btn-white:hover {
  background-color: #F8FAFC;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-weight: 500;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(33, 73, 218, 0.25);
}

.btn-nav {
  padding: 8px 18px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-nav:hover {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
  color: #FFFFFF;
}

/* ==========================================================================
   1. Toppmeny (Transparent over hero)
   ========================================================================== */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  position: fixed;
  background-color: rgba(4, 18, 62, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #FFFFFF;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.18s ease;
}
.nav-link:hover {
  color: #FFFFFF;
}

@media (max-width: 680px) {
  :root {
    --header-height: 64px;
  }
  .nav-menu li:not(:last-child) {
    display: none;
  }
  .btn-nav {
    padding: 7px 14px;
    font-size: 0.86rem;
  }
  .brand-logo-img {
    height: 30px;
  }
}

/* ==========================================================================
   2. Første skjerm: Fullskjerm fjordhero med blått filter
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background-color: #04123E;
  background-image: url('../assets/hero-bakgrunn-blaa.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #FFFFFF;
  padding-top: var(--header-height);
  padding-bottom: 60px;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(4, 18, 62, 0.45) 0%, rgba(4, 18, 62, 0.25) 50%, rgba(4, 18, 62, 0.55) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 40px 0;
}

.hero-overline {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.35rem;
  }
  .hero-lead {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   3. Hovedseksjon: Plattformkonsept og forbindelsesdiagram
   ========================================================================== */
.section-platform {
  padding-top: 120px;
  padding-bottom: 120px;
  background-color: var(--color-bg-body);
}

@media (max-width: 768px) {
  .section-platform {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

.platform-header {
  margin-bottom: 48px;
}

.badge-concept {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  background-color: var(--color-primary-subtle);
  border: 1px solid #BFDBFE;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.section-headline-xl {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-text-main);
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .section-headline-xl {
    font-size: 2.75rem;
  }
}

@media (max-width: 768px) {
  .section-headline-xl {
    font-size: 2.15rem;
  }
}

.section-lead-constrained {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: var(--container-text);
}

/* Diagram-flaten */
.diagram-canvas-wrapper {
  margin-top: 40px;
  margin-bottom: 28px;
  position: relative;
  background-color: #FFFFFF;
}

/* Desktop SVG diagram */
.diagram-desktop {
  width: 100%;
  height: auto;
  display: block;
  max-width: 1080px;
  margin: 0 auto;
}

/* Interaktive noder i SVG */
.diagram-node-card {
  transition: all 0.2s ease;
  cursor: pointer;
}

.diagram-node-card .node-card-bg {
  transition: stroke 0.2s ease, filter 0.2s ease;
}

.diagram-node-card:hover .node-card-bg,
.diagram-node-card:focus .node-card-bg,
.diagram-node-card.is-active .node-card-bg {
  stroke: var(--color-primary);
  stroke-width: 1.5px;
}

/* Forbindelseslinjer */
.connection-line {
  stroke: #CBD5E1;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  transition: stroke 0.2s ease, stroke-width 0.2s ease;
}

.connection-line.is-active,
.connection-line:hover {
  stroke: var(--color-primary);
  stroke-width: 2.2;
}

/* Diskret impulsanimasjon langs midtaksen */
.pulse-dot {
  fill: var(--color-primary);
  animation: pulse-stream 7s ease-in-out infinite;
}

@keyframes pulse-stream {
  0% {
    transform: translate(270px, 250px);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  48% {
    transform: translate(540px, 220px);
    opacity: 0.9;
  }
  52% {
    transform: translate(540px, 220px);
    opacity: 0.9;
  }
  90% {
    opacity: 0.9;
  }
  100% {
    transform: translate(810px, 220px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-dot {
    display: none !important;
  }
}

/* Tydelig presisering under diagrammet */
.diagram-disclaimer {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-text-subtle);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

/* ==========================================================================
   Diagram mobilvisning (vertikal komposisjon)
   ========================================================================== */
.diagram-mobile {
  display: none;
  width: 100%;
}

@media (max-width: 768px) {
  .diagram-desktop {
    display: none;
  }
  .diagram-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
}

.mobile-diagram-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-group-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.mobile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.mobile-card:hover,
.mobile-card:focus {
  border-color: var(--color-primary);
}

.mobile-card-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.mobile-card-desc {
  font-size: 0.85rem;
  color: var(--color-text-subtle);
}

.mobile-card-logo-img {
  max-height: 24px;
  max-width: 110px;
  object-fit: contain;
}

/* Vertikal strøm-indikator på mobil */
.mobile-flow-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}

.mobile-flow-line {
  width: 1.5px;
  height: 24px;
  background-color: #CBD5E1;
}

/* Sentralt oppdrett.ai-symbol på mobil (blå bakgrunn, sentrert hvit logo) */
.mobile-hub-card {
  width: 120px;
  height: 120px;
  background-color: var(--color-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(33, 73, 218, 0.22);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mobile-hub-card:hover,
.mobile-hub-card:active {
  box-shadow: 0 8px 24px rgba(33, 73, 218, 0.4);
}

.mobile-hub-diamonds {
  display: grid;
  grid-template-columns: repeat(3, 11px);
  gap: 7px;
}

.mobile-diamond {
  width: 11px;
  height: 11px;
  background-color: #FFFFFF;
  transform: rotate(45deg);
  border-radius: 1.5px;
  transform-origin: center;
}

/* Spinner synkront til høyre ved hover */
.mobile-hub-card:hover .mobile-diamond,
.mobile-hub-card:active .mobile-diamond {
  animation: hub-diamond-spin-right 1.2s linear infinite;
}

/* Sentralt oppdrett.ai-symbol i desktop SVG diagram */
.central-hub-group {
  cursor: pointer;
  outline: none;
}

.central-hub-group .hub-card-bg {
  transition: filter 0.25s ease;
}

.central-hub-group:hover .hub-card-bg,
.central-hub-group:focus .hub-card-bg,
.central-hub-group:focus-within .hub-card-bg {
  filter: drop-shadow(0 8px 24px rgba(33, 73, 218, 0.45));
}

.central-hub-group .hub-diamond {
  transform: rotate(45deg);
  transform-origin: 0 0;
}

/* Alle 9 hvite diamanter spinner synkront til høyre (med klokken) ved hover */
.central-hub-group:hover .hub-diamond,
.central-hub-group:focus .hub-diamond,
.central-hub-group:focus-within .hub-diamond {
  animation: hub-diamond-spin-right 1.2s linear infinite;
}

@keyframes hub-diamond-spin-right {
  0% {
    transform: rotate(45deg);
  }
  100% {
    transform: rotate(405deg); /* 360 graders synkron rotasjon mot høyre */
  }
}

@media (prefers-reduced-motion: reduce) {
  .central-hub-group:hover .hub-diamond,
  .mobile-hub-card:hover .mobile-diamond {
    animation: none !important;
    transform: rotate(45deg) !important;
  }
}

/* ==========================================================================
   4. Redaksjonell Blokk A & B
   ========================================================================== */
.section-editorial-a {
  padding-top: 110px;
  padding-bottom: 110px;
  background-color: #FFFFFF;
}

.section-editorial-b {
  padding-top: 110px;
  padding-bottom: 110px;
  background-color: #FFFFFF;
}

@media (max-width: 768px) {
  .section-editorial-a,
  .section-editorial-b {
    padding-top: 60px;
    padding-bottom: 60px;
  }
}

.editorial-divider {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  border: 0;
  border-top: 1px solid var(--color-border);
}

.editorial-header {
  max-width: 780px;
  margin-bottom: 40px;
}

.editorial-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text-main);
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .editorial-title {
    font-size: 2rem;
  }
}

.editorial-body {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: var(--container-text);
}

/* Tre korte uttrykk på én rad (Blokk A) */
.editorial-triplet-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border-subtle);
}

@media (max-width: 680px) {
  .editorial-triplet-row {
    flex-direction: column;
    gap: 18px;
  }
}

.triplet-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.triplet-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-primary);
  flex-shrink: 0;
}

.triplet-text {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text-main);
  letter-spacing: -0.01em;
}

/* ==========================================================================
   5. Kontaktavslutning
   ========================================================================== */
.section-contact-closing {
  padding-top: 110px;
  padding-bottom: 120px;
  background-color: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .section-contact-closing {
    padding-top: 68px;
    padding-bottom: 76px;
  }
}

.contact-closing-box {
  max-width: 720px;
}

.contact-headline {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text-main);
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .contact-headline {
    font-size: 2rem;
  }
}

.contact-body {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: 36px;
  max-width: var(--container-text);
}

.contact-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.contact-email-link {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.15s ease;
}
.contact-email-link:hover {
  color: var(--color-primary-hover);
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
.site-footer {
  padding-top: 48px;
  padding-bottom: 48px;
  background-color: #FFFFFF;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 680px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-main);
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-size: 0.95rem;
  color: var(--color-text-subtle);
}

/* Sosiale medier i footer */
.footer-social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  transition: all 0.15s ease;
}

.footer-social-link:hover,
.footer-social-link:focus {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background-color: #FFFFFF;
}

.footer-social-link .social-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--color-text-subtle);
}

@media (min-width: 680px) {
  .footer-meta {
    text-align: right;
  }
}

.footer-email-link {
  color: var(--color-primary);
  text-decoration: none;
}
.footer-email-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   7. Bakgrunnsmønster: Store, delvis beskårne diamanter langs ytterkantene
   Koboltblå opasitet (~5.5%), ingen repeterende tapetmønster, null sidescroll
   ========================================================================== */
.section-platform,
.section-editorial-a,
.section-editorial-b,
.section-contact-closing {
  position: relative;
  overflow: hidden; /* Sikrer null horisontal sidescroll fra beskårne diamanter */
}

.section-platform .container,
.section-editorial-a .container,
.section-editorial-b .container,
.section-contact-closing .container {
  position: relative;
  z-index: 1; /* Tekstinnhold ligger alltid trygt foran bakgrunnsdekor */
}

.brand-bg-pattern {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  display: block;
}

/* Plassert mot høyre ytterkant i Blokk A */
.brand-bg-pattern.pattern-edge-right {
  top: 50%;
  right: -50px;
  transform: translateY(-50%);
  width: 440px;
  height: 440px;
  max-width: 45vw;
}

/* Plassert mot venstre ytterkant i Blokk B */
.brand-bg-pattern.pattern-edge-left {
  top: 50%;
  left: -50px;
  transform: translateY(-50%);
  width: 420px;
  height: 420px;
  max-width: 45vw;
}

/* Plassert øverst til høyre i verktøy-seksjonen */
.brand-bg-pattern.pattern-edge-top-right {
  top: 30px;
  right: -50px;
  width: 400px;
  height: 400px;
  max-width: 40vw;
}

/* Plassert nederst til høyre i kontakt-seksjonen */
.brand-bg-pattern.pattern-edge-bottom-right {
  bottom: -40px;
  right: -40px;
  width: 360px;
  height: 360px;
  max-width: 40vw;
}

@media (max-width: 768px) {
  .brand-bg-pattern.pattern-edge-right {
    right: -80px;
    width: 260px;
    height: 260px;
  }
  .brand-bg-pattern.pattern-edge-left {
    left: -80px;
    width: 250px;
    height: 250px;
  }
  .brand-bg-pattern.pattern-edge-top-right {
    right: -80px;
    width: 240px;
    height: 240px;
  }
  .brand-bg-pattern.pattern-edge-bottom-right {
    right: -60px;
    width: 220px;
    height: 220px;
  }
}

/* ==========================================================================
   8. Lasteindikator: 9 svarte diamanter i 3x3 med individuell rotasjon
   ========================================================================== */
.oppdrett-loader-inline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(16, 19, 24, 0.04);
}

.oppdrett-loader-svg {
  display: block;
  flex-shrink: 0;
}

/* Diamanter i svart (#101318) som roterer om eget sentrum */
.loader-diamond {
  fill: #101318;
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(45deg);
  animation: diamond-individual-spin 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes diamond-individual-spin {
  0% {
    transform: rotate(45deg);
  }
  50% {
    transform: rotate(225deg);
  }
  100% {
    transform: rotate(405deg);
  }
}

/* Tidsforskyvning mellom diamantene i det opprinnelige 3x3-mønsteret */
.loader-diamond.d-1 { animation-delay: 0.00s; }
.loader-diamond.d-2 { animation-delay: 0.08s; }
.loader-diamond.d-3 { animation-delay: 0.16s; }
.loader-diamond.d-4 { animation-delay: 0.12s; }
.loader-diamond.d-5 { animation-delay: 0.20s; }
.loader-diamond.d-6 { animation-delay: 0.28s; }
.loader-diamond.d-7 { animation-delay: 0.24s; }
.loader-diamond.d-8 { animation-delay: 0.32s; }
.loader-diamond.d-9 { animation-delay: 0.40s; }

.oppdrett-loader-label {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Tilgjengelighet: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .loader-diamond {
    animation: none !important;
    transform: rotate(45deg) !important;
  }
}

/* Feilmelding ved feilet operasjon */
.oppdrett-loader-error {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-md);
  color: #991B1B;
  font-size: 0.88rem;
  margin-top: 8px;
}

.loader-retry-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: #991B1B;
  background: #FFFFFF;
  border: 1px solid #FCA5A5;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.loader-retry-btn:hover {
  background-color: #FEF2F2;
  border-color: #B91C1C;
}
