/* =========================================================
   LEDETRAAD — styles.css
   Strategisk IT-rådgivning, Nordjylland
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --color-navy: #071a2d;
  --color-navy-soft: #0e2740;
  --color-text-dark: #122033;
  --color-text-on-dark: #ffffff;
  --color-accent: #ffb002;
  --color-accent-dark: #d99400;
  --color-border: #d9e3ec;
  --color-bg: #f8fafc;
  --color-white: #ffffff;

  --font-display: "Source Sans Pro", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --container-max: 1400px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --header-h: 167px;
  --header-h-scrolled: 78px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-soft: 0 2px 6px rgba(7, 26, 45, 0.08);
  --shadow-med: 0 8px 24px rgba(7, 26, 45, 0.12);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@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 {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text-dark);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text-dark);
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
}

/* Visible focus states everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-navy);
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  z-index: 2000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.full-bleed {
  width: 100%;
}

.section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section-bg-alt {
  background: var(--color-white);
}

.section-heading {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  letter-spacing: -0.01em;
}

.section-rule {
  height: 1px;
  width: 100%;
  max-width: var(--container-max);
  background: var(--color-border);
  border: 0;
  margin: 1.5rem 0 2.5rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 0.6rem;
}

.lede {
  font-size: 1.05rem;
  max-width: 68ch;
  color: var(--color-text-dark);
}

.lede + .lede { margin-top: 1.1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: var(--header-h);
  background: var(--color-navy);
  transition: height 0.35s var(--ease), box-shadow 0.35s var(--ease);
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.site-header.is-scrolled {
  height: var(--header-h-scrolled);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.site-header__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo */
.brand {
  display: flex;
  align-items: center;
}

.brand__mark {
  width: 532px;
  height: 133px;
  object-fit: contain;
  transition: width 0.35s var(--ease), height 0.35s var(--ease);
  flex-shrink: 0;
}

.site-header.is-scrolled .brand__mark {
  width: 264px;
  height: 66px;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.main-nav__list {
  display: flex;
  gap: 2.1rem;
}

.main-nav__link {
  position: relative;
  color: var(--color-text-on-dark);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.4rem 0.1rem;
  transition: font-size 0.35s var(--ease), color 0.2s;
}

.site-header.is-scrolled .main-nav__link {
  font-size: 0.9rem;
}

.main-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.25s var(--ease);
}

.main-nav__link:hover::after,
.main-nav__link:focus-visible::after,
.main-nav__link.is-active::after {
  width: 100%;
}

.main-nav__link.is-active {
  color: var(--color-accent);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
  color: var(--color-text-on-dark);
}

.nav-toggle__bars {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: background 0.2s;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 26px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}
.nav-toggle__bars::before { top: -8px; }
.nav-toggle__bars::after { top: 8px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.hero__figure {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero__image-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-med);
  aspect-ratio: 16 / 6;
  background: linear-gradient(135deg, #0e2740, #1c3d5e);
}

.hero__image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Quote box ---------- */
.quote-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-left: 25px solid var(--color-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 1.75rem 2rem;
  margin-top: 2.5rem;
}

.quote-box__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--color-accent);
}

.quote-box__text {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-text-dark);
  margin: 0;
}

.quote-box__cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-navy);
}

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.service-card {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-med);
}

.service-card__head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.service-card__icon {
  width: 46px;
  height: 46px;
  color: var(--color-navy);
  background: #fff3da;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  flex-shrink: 0;
}

.service-card__title {
  font-size: 1.2rem;
}

.service-card__text {
  color: var(--color-text-dark);
  font-size: 0.97rem;
  margin: 0;
}

/* ---------- Om section ---------- */
.about-copy {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  max-width: 78ch;
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-intro__title {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.contact-form {
  display: grid;
  gap: 1.25rem;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-soft);
}

.form-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Label floats inside the field; sits centered until the field is
   focused or filled, then shrinks up into the top of the input. */
.form-field label {
  position: absolute;
  left: 0.95rem;
  top: 0.95rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  color: #5b6b7c;
  background: transparent;
  padding-inline: 0.15rem;
  pointer-events: none;
  transition: top 0.18s var(--ease), font-size 0.18s var(--ease), color 0.18s var(--ease);
}

.form-field .optional {
  font-weight: 400;
  font-size: 0.92em;
}

.form-field input,
.form-field textarea {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1.45rem 0.9rem 0.55rem;
  font: inherit;
  color: var(--color-text-dark);
  background: var(--color-bg);
  transition: border-color 0.2s;
}

.form-field textarea {
  padding-top: 1.6rem;
}

.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
  top: 0.4rem;
  font-size: 0.72rem;
  color: var(--color-navy);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-accent);
}

.form-field input:invalid:not(:placeholder-shown),
.form-field textarea:invalid:not(:placeholder-shown) {
  border-color: #d94848;
}

.form-error {
  font-size: 0.82rem;
  color: #b3261e;
  min-height: 1.1em;
}

.btn-primary {
  justify-self: start;
  background: var(--color-accent);
  color: var(--color-navy);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.9rem 2rem;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
}

.form-status {
  font-size: 0.9rem;
  font-weight: 600;
  color: #146c43;
  min-height: 1.2em;
}

.recaptcha-notice {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #5b6b7c;
  margin: -0.5rem 0 0;
}

.recaptcha-notice a {
  color: var(--color-navy);
  text-decoration: underline;
}

/* ---------- Contact detail list (icon + label + value) ---------- */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.75rem;
}

.contact-details__item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.contact-details__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff3da;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-details__icon svg {
  width: 19px;
  height: 19px;
}

.contact-details__text {
  display: flex;
  flex-direction: column;
}

.contact-details__label {
  font-size: 0.8rem;
  color: #5b6b7c;
}

.contact-details__value {
  font-weight: 600;
  color: var(--color-navy);
}

.contact-details__value:hover {
  color: var(--color-accent-dark);
}

/* ---------- Legal / long-form document pages ---------- */
.legal-header {
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-bottom: 0;
}

.legal-updated {
  color: #5b6b7c;
  font-size: 0.9rem;
  margin-top: -0.5rem;
}

.legal-notice {
  display: flex;
  gap: 0.9rem;
  background: #fff8e8;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  margin: 2rem 0 0;
  font-size: 0.92rem;
  color: var(--color-text-dark);
}

.legal-notice svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--color-accent-dark);
  margin-top: 0.15rem;
}

.legal-content {
  max-width: 78ch;
  margin-top: 1rem;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 2.75rem;
  margin-bottom: 0.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-border);
}

.legal-content > h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 2.25rem;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

.legal-content p {
  margin: 0 0 1rem;
  color: var(--color-text-dark);
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 1rem;
  padding-left: 1.6rem;
  color: var(--color-text-dark);
}

.legal-content ul {
  list-style-type: disc;
}

.legal-content ol {
  list-style-type: decimal;
}

.legal-content li {
  display: list-item;
  list-style-position: outside;
  margin-bottom: 0.4rem;
}

.legal-content strong {
  color: var(--color-navy);
}

.legal-content a {
  color: var(--color-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--color-accent-dark);
}

.legal-contact {
  margin-top: 2.75rem;
  padding: 1.5rem 1.75rem;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
}

.legal-contact p {
  margin: 0;
  line-height: 1.8;
}

/* ---------- Login page ---------- */
.login-section {
  min-height: calc(100vh - var(--header-h) - 320px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: clamp(2rem, 5vw, 2.75rem);
}

.login-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff3da;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.login-card__icon svg {
  width: 24px;
  height: 24px;
}

.login-card__title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.login-card__intro {
  color: #5b6b7c;
  font-size: 0.97rem;
  margin: 0 0 1.75rem;
}

.login-form {
  display: grid;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: -0.25rem;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--color-text-dark);
}

.checkbox-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--color-accent);
  border: 2px solid var(--color-border);
}

.form-row a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-row a:hover {
  color: var(--color-accent-dark);
}

.login-form .btn-primary {
  width: 100%;
  justify-self: stretch;
  text-align: center;
}

.login-card__footer {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: #5b6b7c;
  text-align: center;
}

.login-card__footer a {
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: underline;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy);
  color: var(--color-text-on-dark);
  padding-block: 3.5rem 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.footer-heading {
  color: var(--color-text-on-dark);
  font-size: 1.15rem;
  margin-bottom: 1.1rem;
}

.footer-info p {
  margin: 0 0 0.9rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-info strong {
  color: var(--color-text-on-dark);
}

.social-links {
  display: flex;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.social-links a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.social-links svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-on-dark);
}

.social-links a:hover svg {
  color: var(--color-navy);
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
}

/* =========================================================
   Responsive
   ========================================================= */

/* Tablet */
@media (max-width: 1024px) {
  .brand__mark {
    width: 340px;
    height: 85px;
  }

  .site-header.is-scrolled .brand__mark {
    width: 200px;
    height: 50px;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile nav + layout */
@media (max-width: 860px) {
  :root {
    --header-h: 148px;
    --header-h-scrolled: 70px;
  }

  .brand__mark {
    width: 260px;
    height: 65px;
  }

  .site-header.is-scrolled .brand__mark {
    width: 150px;
    height: 38px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h-scrolled);
    left: 0;
    right: 0;
    background: var(--color-navy-soft);
    flex-direction: column;
    align-items: stretch;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  }

  .site-header.is-scrolled .main-nav {
    top: var(--header-h-scrolled);
  }

  .main-nav.is-open {
    max-height: 400px;
  }

  .main-nav__list {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
  }

  .main-nav__list li {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .main-nav__link {
    display: block;
    padding: 0.9rem 0.1rem;
  }

  .site-header:not(.is-scrolled) .main-nav {
    top: var(--header-h);
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .quote-box {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand__mark {
    width: 190px;
    height: 47px;
  }
  .site-header.is-scrolled .brand__mark {
    width: 120px;
    height: 30px;
  }
  .hero__image-frame { aspect-ratio: 4 / 5; }
}

/* Large / 4K screens */
@media (min-width: 2200px) {
  html { font-size: 19px; }
}

/* =========================================================
   Print
   ========================================================= */
@media print {
  @page {
    size: A4 portrait;
    margin: 16mm;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
    background: transparent !important;
    color: #000 !important;
  }

  .site-header,
  .nav-toggle,
  .main-nav,
  .contact-form,
  .btn-primary,
  .social-links,
  .skip-link {
    display: none !important;
  }

  .site-header { position: static; }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
  }

  .service-card,
  .quote-box {
    border: 1px solid #999 !important;
    break-inside: avoid;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  .section {
    padding-block: 1.25rem;
  }

  .hero__image-frame {
    aspect-ratio: auto;
    max-height: 200px;
  }
}
