/* Andelsbolig finans — abfinans.dk */

/* Skrifttyper ligger lokalt, så der ikke sendes data til Google. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/kanit-300.woff2") format("woff2");
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/kanit-400.woff2") format("woff2");
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/kanit-500.woff2") format("woff2");
}

:root {
  --navy: #1b506c;
  --navy-deep: #0f3447;
  --ink: #142f3d;
  --muted: #566e7b;
  --green: #90c964;
  --green-dark: #5f9a35;
  --cyan: #3ec4e1;
  --sand: #f5f3ef;
  --line: #e3e1dc;
  --white: #ffffff;
  --gradient: linear-gradient(90deg, var(--cyan), var(--green));

  --font-head: "Kanit", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(15, 52, 71, 0.06), 0 8px 24px rgba(15, 52, 71, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--navy);
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.15;
  color: var(--navy-deep);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

/* Overline: lille label over overskrifter */
.overline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 14px;
}

.overline::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--gradient);
}

.lead {
  font-size: 1.15rem;
  color: var(--ink);
  max-width: 640px;
}

/* Knapper */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  padding: 15px 26px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: var(--navy-deep);
}

.btn-primary:hover {
  background: #a2d47b;
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  background: var(--navy-deep);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.btn-arrow::after {
  content: "\2192";
  font-size: 1.1em;
}

/* Top */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo img {
  height: 34px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav a {
  font-family: var(--font-head);
  font-size: 0.98rem;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}

.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.nav a:not(.btn):hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav .btn {
  padding: 11px 20px;
  color: var(--white);
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-deep);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 24px;
  }

  .menu-open .nav {
    display: flex;
  }

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.1rem;
  }

  .nav a:not(.btn)::after {
    display: none;
  }

  .nav .btn {
    margin-top: 18px;
    justify-content: center;
    padding: 15px 20px;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      100deg,
      rgba(15, 52, 71, 0.94) 0%,
      rgba(15, 52, 71, 0.82) 38%,
      rgba(15, 52, 71, 0.25) 75%,
      rgba(15, 52, 71, 0.1) 100%
    ),
    linear-gradient(0deg, rgba(15, 52, 71, 0.55), transparent 45%);
}

.hero .wrap {
  position: relative;
  z-index: 1;
  padding-top: 120px;
  padding-bottom: 72px;
}

.hero-content {
  max-width: 640px;
}

.hero h1 {
  color: var(--white);
}

.hero h1 em {
  font-style: normal;
  color: var(--green);
}

.hero .lead {
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 32px;
}

.hero .overline {
  color: var(--green);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
}

.trust span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust svg {
  width: 18px;
  height: 18px;
  color: var(--green);
  flex-shrink: 0;
}

/* Sektioner */
.section {
  padding: 104px 0;
}

.section-sand {
  background: var(--sand);
}

.section-navy {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.86);
}

.section-navy h2,
.section-navy h3 {
  color: var(--white);
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head.center .lead {
  margin-left: auto;
  margin-right: auto;
}

/* Kort */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  position: relative;
  transition: box-shadow 0.25s, transform 0.25s;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 30px;
  width: 44px;
  height: 3px;
  background: var(--gradient);
}

.card p {
  color: var(--muted);
  margin: 0;
}

.icon {
  width: 44px;
  height: 44px;
  color: var(--navy);
  margin-bottom: 20px;
}

/* Billede + tekst */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 72px;
  align-items: center;
}

.split.reverse .split-media {
  order: 2;
}

.split-media {
  position: relative;
}

.split-media img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
}

.split-media::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -16px;
  width: 40%;
  height: 40%;
  border-right: 3px solid var(--green);
  border-bottom: 3px solid var(--green);
  border-radius: 0 0 var(--radius) 0;
  pointer-events: none;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 28px 0 32px;
}

.checklist li {
  position: relative;
  padding: 0 0 16px 36px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f3447' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}

.checklist strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--navy-deep);
}

.checklist span {
  color: var(--muted);
}

/* Proces */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 26px;
}

.steps li::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 18px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.steps p {
  margin: 0;
  font-size: 0.98rem;
}

/* Udtalelse */
.quote {
  position: relative;
  color: var(--white);
  overflow: hidden;
}

.quote-bg {
  position: absolute;
  inset: 0;
}

.quote-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quote::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 52, 71, 0.86);
}

.quote .wrap {
  position: relative;
  z-index: 1;
  padding-top: 112px;
  padding-bottom: 112px;
}

.quote blockquote {
  margin: 0 auto;
  max-width: 860px;
  text-align: center;
}

.quote blockquote::before {
  content: "\201C";
  display: block;
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 0.6;
  color: var(--green);
  margin-bottom: 24px;
}

.quote p {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.35;
  color: var(--white);
  margin-bottom: 28px;
}

.quote cite {
  font-style: normal;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
}

/* Målgrupper */
.audience {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  border: 1px solid var(--line);
}

.audience h3 {
  font-size: 1.45rem;
}

.audience .checklist {
  margin-bottom: 0;
}

/* Overvågning */
.monitor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.monitor-visual {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.monitor-visual .label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.monitor-visual svg {
  width: 100%;
  height: auto;
}

/* Kontakt-bånd */
.cta {
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
}

.cta .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}

.cta h2 {
  color: var(--white);
  margin-bottom: 8px;
}

.cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.cta-photo {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--green);
  background: var(--white);
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.cta-actions .phone {
  text-align: center;
  color: var(--white);
  font-family: var(--font-head);
  text-decoration: none;
  font-size: 1.05rem;
}

/* Sidetop på undersider */
.page-hero {
  position: relative;
  color: var(--white);
  background: var(--navy-deep);
  overflow: hidden;
}

.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.page-hero .wrap {
  position: relative;
  padding-top: 96px;
  padding-bottom: 80px;
}

.page-hero h1 {
  color: var(--white);
  max-width: 760px;
}

.page-hero .lead {
  color: rgba(255, 255, 255, 0.85);
}

.page-hero .overline {
  color: var(--green);
}

/* Profil */
.profile {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 72px;
  align-items: start;
}

.profile-photo {
  position: relative;
}

.profile-photo {
  margin: 0;
  text-align: center;
}

.profile-photo img {
  width: 300px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--green);
  background: var(--white);
}

.profile-photo figcaption {
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--muted);
}

.profile-photo figcaption strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--navy-deep);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 36px 0;
}

.fact {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 18px;
}

.fact b {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.8rem;
  line-height: 1.1;
  color: var(--navy-deep);
}

.fact span {
  font-size: 0.92rem;
  color: var(--muted);
}

/* Formular */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}

.form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  margin-bottom: 18px;
}

.field label,
.field legend {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--navy-deep);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  transition: border-color 0.2s, background 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--white);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.radios {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radios label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 0;
  cursor: pointer;
}

.radios input {
  width: auto;
  accent-color: var(--navy);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 6px 0 22px;
}

.form-error {
  background: #fdecec;
  border: 1px solid #f4b9b9;
  color: #8a2323;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.contact-info h3 {
  margin-top: 0;
}

.contact-line {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.contact-line svg {
  width: 22px;
  height: 22px;
  color: var(--green-dark);
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-line a {
  font-family: var(--font-head);
  font-size: 1.1rem;
  text-decoration: none;
}

.contact-line small {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Tekstsider */
.prose {
  max-width: 760px;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2em;
}

.prose h3 {
  margin-top: 1.6em;
}

.prose ul {
  padding-left: 1.2em;
}

/* Bund */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 56px;
}

.footer-top img {
  height: 34px;
  width: auto;
  margin-bottom: 20px;
}

.footer-top h3 {
  color: var(--white);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-top ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-top li {
  margin-bottom: 8px;
}

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  padding-bottom: 32px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

/* Blid indtoning ved scroll */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .hero-bg img {
  animation: hero-zoom 18s ease-out both;
}

@keyframes hero-zoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js .hero-bg img {
    animation: none;
  }

  .btn,
  .card {
    transition: none;
  }
}

/* Mindre skærme */
@media (max-width: 1000px) {
  .split,
  .monitor,
  .contact-grid,
  .profile {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .split.reverse .split-media {
    order: 0;
  }

  .profile-photo {
    max-width: 380px;
    margin: 0 auto;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 28px;
  }

  .cta .wrap {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .section {
    padding: 72px 0;
  }

  .grid-3,
  .grid-2,
  .steps,
  .facts,
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero .wrap {
    padding-bottom: 48px;
  }

  .hero::after {
    background: linear-gradient(0deg, rgba(15, 52, 71, 0.95) 20%, rgba(15, 52, 71, 0.55) 100%);
  }

  .form {
    padding: 26px 20px;
  }

  .split-media::after {
    right: -8px;
    bottom: -8px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}
