/* =========================================================
   library.css - central layout for gated library items
   ========================================================= */

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

.nb-prethankyou {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0b1c2c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
}

.nb-prethankyou__brand {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.nb-prethankyou__brand span {
  color: #0ea5e9;
}

.nb-prethankyou__status {
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  min-height: 20px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nb-prethankyou__status--large {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.88);
  max-width: 760px;
}

.nb-prethankyou__status.is-fading {
  opacity: 0;
  transform: translateY(4px);
}

.nb-prethankyou__logo,
.library-loader__logo {
  display: block;
  width: auto;
  height: auto;
}

.nb-prethankyou__logo {
  width: clamp(260px, 55vw, 560px);
}

.library-loader__logo {
  width: clamp(220px, 50vw, 500px);
}

/* Background (image + gradient overlay)
   NB: Juster bakgrunnsbilde her hvis du vil */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #1a202c;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;

  background:
    linear-gradient(
      135deg,
      rgba(10, 25, 41, 0.75) 75%,
      rgba(26, 58, 82, 0.75) 95%,
      rgba(15, 37, 55, 0.75) 100%
    ),
    url('https://mavedoy.no/wp-content/uploads/2025/03/u1563732241_A_massive_dynamic_ocean_wave_crashing_on_the_righ_ecc57ae.png');
  background-size: cover;
  background-position: center;
}

/* Soft glass overlay */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(16px);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.90));
}

/* Layout */
.wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.card {
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.30);
  padding: 36px;
  position: relative;
  overflow: hidden;
  animation: slideUp .45s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.head h1 {
  font-size: 24px;
  color: #1a3a52;
  margin-bottom: 8px;
}

.meta { margin-bottom: 10px; }
.doctype {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
}
.byline {
  font-size: 13px;
  color: #4a5568;
  margin-top: 4px;
}

.sub {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Form */
.form { margin-top: 2px; }

.field { display: block; margin-bottom: 16px; }

.label {
  display: block;
  font-size: 14px;
  color: #2d3748;
  margin-bottom: 6px;
  font-weight: 500;
}

.label em { font-style: normal; color: #1a3a52; }

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e0;
  font-size: 14px;
  background: #f7fafc;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

input:focus {
  outline: none;
  border-color: #1a3a52;
  box-shadow: 0 0 0 3px rgba(26,58,82,0.12);
}

input::placeholder { color: #a0aec0; }

.hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #4a5568;
  line-height: 1.4;
}

.hint.error { color: #e53e3e; }

/* Button */
.btn {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg, #1a3a52 0%, #0f2537 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;

  transition: transform .15s ease-out, box-shadow .15s ease-out, background .15s ease-out;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
  background: linear-gradient(135deg, #20435d 0%, #132b3e 100%);
}

.btn:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.privacy {
  margin-top: 14px;
  font-size: 13px;
  color: #4a5568;
  line-height: 1.5;
}

/* ============================
   Thank you (logo + green glow)
   ============================ */

.download-section { text-align: center; }

.download-section h1 {
  font-size: 24px;
  color: #1a3a52;
  margin-bottom: 8px;
}

.report-title {
  font-size: 16px;
  font-weight: 700;
  color: #2d3748;
  margin-top: 6px;
}

.prepared-by {
  font-size: 13px;
  color: #4a5568;
  margin-top: 4px;
}

.download-section .subtitle {
  font-size: 14px;
  color: #4a5568;
  margin-top: 12px;
  margin-bottom: 18px;
}

.is-hidden {
  display: none !important;
}

.library-loader {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  animation: successPop 0.35s ease-out;
}

.library-loader--shell {
  min-height: 320px;
}

.library-loader__brand {
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.library-loader__logo { width: auto; }

.library-loader__indicator {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.library-loader__wordmark {
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1a3a52;
}

.library-loader__wordmark-accent {
  color: #0ea5e9;
}

.library-loader__heading {
  font-size: 24px;
  color: #1a3a52;
}

.library-loader__heading--on-dark {
  color: #f4f7fa;
}

.library-loader__status {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
  max-width: 28rem;
}

.library-loader__status--fade {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.library-loader__status--fade.is-fading {
  opacity: 0;
  transform: translateY(4px);
}

.library-loader__actions {
  width: 100%;
}

.library-loader__actions--appear {
  opacity: 0;
  transform: translateY(8px);
  animation: downloadActionsFadeIn 0.55s ease-out forwards;
}

@keyframes downloadActionsFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.library-loader__progress {
  width: 100%;
  height: 1.2em;
  border-radius: 999px;
  background: rgba(26, 58, 82, 0.12);
  overflow: hidden;
}

.library-loader__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a3a52 0%, #0ea5e9 100%);
}

.download-section {
  text-align: center;
}

.download-section__back {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4a5568;
  font-size: 13px;
  text-decoration: none;
}

.download-section__back:hover {
  color: #1a3a52;
}

.download-section__back--on-dark {
  color: rgba(255, 255, 255, 0.8);
}

.download-section__back--on-dark:hover {
  color: #ffffff;
}

.download-logo-link {
  display: inline-block;
  text-decoration: none;
}

.success-icon-wrap {
  width: 92px;
  height: 92px;
  margin: 0 auto;
  position: relative;
}

.countdown-ring {
  position: absolute;
  inset: -6px;
  width: 92px;
  height: 92px;
}

.countdown-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.countdown-track {
  fill: none;
  stroke: rgba(56, 161, 105, 0.15);
  stroke-width: 3;
}

.countdown-progress {
  fill: none;
  stroke: rgba(14, 165, 233, 0.95);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}

.library-loader__countdown-core {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a3a52 0%, #0f2537 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 24px rgba(15, 37, 55, 0.28),
    0 0 0 4px rgba(14, 165, 233, 0.08);
  animation: successPop 0.4s ease-out;
  position: relative;
  z-index: 1;
}

.library-loader__countdown-wordmark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
}

/* Logo circle w/ green glow */
.success-logo {
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.98);
  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 0 0 4px rgba(56, 161, 105, 0.15),
    0 12px 28px rgba(56, 161, 105, 0.35);
  animation: successPop 0.35s ease-out;
  position: relative;
}

.success-logo img {
  width: 36px;
  height: 36px;
  display: block;
}

.success-logo-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Subtle pop */
@keyframes successPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* =================================
   Interest checkboxes
   ================================= */

.checkbox-group {
  margin-top: 6px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.checkbox-item:hover {
  background: #f1f5f9;
}

.checkbox-item input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.download-section--left {
  text-align: left;
}

.download-center-text {
  text-align: center;
}

.subscribe-list {
  margin-top: 26px;
}

.subscribe-list-item {
  margin-bottom: 18px;
}

.subscribe-report-title {
  margin-top: 0;
  font-size: 16px;
}

.subscribe-item-link {
  color: #1a3a52;
  text-decoration: none;
}

.subscribe-item-desc {
  margin-top: 6px;
  margin-bottom: 0;
}

.subscribe-empty {
  margin-top: 20px;
}

.subscribe-actions {
  margin-top: 24px;
  text-align: center;
}

.download-section .library-loader__brand {
  margin-bottom: 10px;
  text-align: center;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.library-loader__status--prominent {
  font-size: 22.5px;
  font-weight: 500;
  color: #1f3448;
  letter-spacing: 0.01em;
  line-height: 1.45;
}

.library-loader__status--prominent.library-loader__status--on-dark {
  color: #f4f7fa;
  animation: statusAppearDown 0.65s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes statusAppearDown {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(10px);
  }
}

.library-loader__redirect {
  width: 100%;
  margin-top: 10px;
}

.library-loader__redirect-label {
  margin-bottom: 8px;
  font-size: 13px;
  color: #4a5568;
}

.library-loader__redirect-label--on-dark {
  color: rgba(255, 255, 255, 0.78);
}

.library-loader__progress--on-dark {
  background: rgba(255, 255, 255, 0.22);
}

.nb-prethankyou__actions {
  width: min(360px, 100%);
}

.nb-prethankyou__redirect {
  width: min(980px, calc(100vw - 40px));
}

@media (max-width: 640px) {
  .wrap {
    padding: 14px;
    align-items: flex-start;
  }

  .card {
    max-width: none;
    padding: 24px 18px;
    margin: 12px 0;
    border-radius: 14px;
  }

  .head h1,
  .download-section h1,
  .library-loader__heading {
    font-size: 22px;
    line-height: 1.15;
  }

  .sub,
  .download-section .subtitle,
  .library-loader__status,
  .privacy {
    font-size: 13px;
  }

  input {
    min-height: 44px;
    padding: 11px 12px;
  }

  .btn {
    min-height: 48px;
    padding: 13px 14px;
  }

  .library-loader,
  .library-loader--shell {
    min-height: 280px;
  }
}

@media (max-width: 380px) {
  .wrap {
    padding: 10px;
  }

  .card {
    padding: 20px 14px;
  }

  .head h1,
  .download-section h1,
  .library-loader__heading {
    font-size: 20px;
  }

  .label,
  .doctype,
  .byline,
  .hint,
  .privacy,
  .download-section__back {
    font-size: 12px;
  }
}
