/* ============================================================
   JLC Portal — mörkt editorial-tema (portal/marknadsföring)
   Importerar tokens.css (färger, typsnitt, spacing m.m.) och
   definierar BARA portal-specifika komponenter härifrån.
   Redigera tokens.css för varumärkesändringar.
   ============================================================ */

@import url('tokens.css');

/* Portalens egna namnrymdsaliaser
   (tokens.css exporterar --jlc-* och semantiska --bg/--text/etc.
    Portalen behöver även de kortare --dark/--navy-mid/--hairline-
    namn som finns direkt i komponent-CSS nedan.) */
:root {
  --dark:        var(--jlc-dark);
  --dark-2:      var(--jlc-dark-2);
  --navy-mid:    var(--jlc-navy-mid);
  --orange:      var(--jlc-orange);
  --orange-dark: var(--jlc-orange-dark);
  --white:       var(--jlc-white);
  --ice:         var(--jlc-ice);
  --hairline:    var(--jlc-hairline);
  --hairline-2:  var(--jlc-hairline-2);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Logga: footer-variant ── */
.logo--footer .logo__word { font-size: 16px; }

/* ── Logga: bildvariant (riktiga ordmärket) ── */
.logo__img { display: block; height: 40px; width: auto; }
.logo__img--footer { height: 30px; }
@media (max-width: 860px) { .logo__img { height: 34px; } }

/* ── Header / nav ── */
.site-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 56px);
  background: rgba(32, 32, 42, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline-2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.site-nav__link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
  position: relative;
  padding: 6px 0;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.site-nav__link:hover { color: var(--white); }
.site-nav__link:hover::after,
.site-nav__link.is-active::after { transform: scaleX(1); }
.site-nav__link.is-active { color: var(--white); }
.site-nav__cta { display: inline-flex; }

/* ── Hamburgerknapp (dold på desktop) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle__bar {
  display: block; width: 20px; height: 2px;
  margin-inline: auto;
  background: var(--ice);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Knappar ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.btn--sm { padding: 9px 18px; font-size: 11px; }
.btn--accent { background: var(--orange); color: var(--white); }
.btn--accent:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}
.btn--ghost { background: transparent; color: var(--ice); border-color: var(--hairline); }
.btn--ghost:hover { border-color: var(--ice); color: var(--white); background: rgba(189, 212, 225, 0.06); }

/* ── Hero (editorial) ── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(48px, 9vw, 120px) clamp(20px, 5vw, 56px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 78% 42%, rgba(36, 76, 94, 0.55) 0%, transparent 60%),
    radial-gradient(50% 60% at 8% 90%, rgba(36, 76, 94, 0.28) 0%, transparent 55%);
  pointer-events: none;
}
.hero__watermark {
  position: absolute;
  right: clamp(-40px, -2vw, 0px);
  bottom: -6%;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(120px, 26vw, 420px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: var(--white);
  opacity: 0.035;
  pointer-events: none;
  user-select: none;
}
.hero__inner { max-width: 880px; position: relative; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 28px;
}
.hero__eyebrow::before {
  content: "";
  width: 34px; height: 1px;
  background: var(--orange);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--white);
  margin-bottom: 30px;
  max-width: 16ch;
}
.hero__title em { font-style: italic; color: var(--ice); }
.hero__subtitle {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--text-2);
  line-height: 1.7;
  max-width: 54ch;
  margin-bottom: 42px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* Staggerad entré vid sidladdning */
.reveal { opacity: 0; transform: translateY(18px); animation: rise 0.9s var(--ease) forwards; }
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.18s; }
.reveal-3 { animation-delay: 0.32s; }
.reveal-4 { animation-delay: 0.46s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── Teaser-sektion / kort ── */
.section {
  padding: clamp(56px, 9vw, 120px) clamp(20px, 5vw, 56px);
  max-width: var(--maxw);
  margin-inline: auto;
  width: 100%;
}
.section__head { margin-bottom: 48px; max-width: 60ch; }
.section__label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(26px, 3.5vw, 40px); line-height: 1.1; color: var(--white);
}
.section__lead {
  margin-top: 18px; font-size: clamp(15px, 1.4vw, 17px);
  color: var(--text-2); line-height: 1.7; max-width: 56ch;
}
.section--split { border-top: 1px solid var(--hairline-2); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline-2); border: 1px solid var(--hairline-2); }
.card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 40px 34px;
  background: var(--dark-2);
  transition: background 0.3s var(--ease);
  position: relative;
}
.card::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 100%; height: 2px;
  background: var(--orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.card:hover { background: var(--navy-mid); }
.card:hover::before { transform: scaleX(1); }
.card__index {
  font-family: var(--font-display); font-style: italic;
  font-size: 14px; color: var(--text-muted);
}
.card h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; color: var(--white); letter-spacing: 0.01em;
}
.card p { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.card__more {
  margin-top: auto; padding-top: 18px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--orange);
}

/* ── Inre sidor (Om JLC) ── */
.page-hero {
  padding: clamp(64px, 11vw, 150px) clamp(20px, 5vw, 56px) clamp(32px, 5vw, 56px);
  max-width: var(--maxw); margin-inline: auto; width: 100%;
  border-bottom: 1px solid var(--hairline-2);
}
.page-hero__eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 18px;
}
.page-hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(34px, 6vw, 68px); line-height: 1.04; color: var(--white);
  letter-spacing: -0.01em; margin-bottom: 18px; max-width: 18ch;
}
.page-hero h1 em { font-style: italic; color: var(--ice); }
.page-hero > p { font-size: clamp(16px, 1.5vw, 19px); color: var(--text-2); max-width: 56ch; }
.page-hero > p em { font-style: italic; color: var(--ice); }

/* ── Profil ── */
.profile {
  max-width: var(--maxw); margin-inline: auto; width: 100%;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 56px) clamp(64px, 9vw, 110px);
  display: grid; gap: clamp(28px, 5vw, 64px);
  grid-template-columns: 1fr; align-items: start;
}
@media (min-width: 820px) {
  .profile { grid-template-columns: minmax(280px, 380px) 1fr; }
}
.profile__media { position: relative; }
.profile__photo {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--hairline);
}
.profile__media::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -14px; width: 64px; height: 2px; background: var(--orange);
}
.profile__caption {
  margin-top: 26px; font-size: 13px; letter-spacing: .04em; color: var(--text-muted);
}
.profile__caption strong { color: var(--white); font-weight: 600; }
.profile__body { max-width: 60ch; }
.profile__eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 14px;
}
.profile__body h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(24px, 3vw, 34px); color: var(--white); margin-bottom: 18px; line-height: 1.1;
}
.profile__body p { color: var(--text-2); margin-bottom: 18px; }

/* ── 4MAT-rutnät ── */
.quad {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--hairline-2); border: 1px solid var(--hairline-2);
}
.quad__cell {
  background: var(--dark-2); padding: 36px 30px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; transition: background 0.3s var(--ease);
}
.quad__cell::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 2px; height: 100%; background: var(--orange);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.35s var(--ease);
}
.quad__cell:hover { background: var(--navy-mid); }
.quad__cell:hover::before { transform: scaleY(1); }
.quad__num {
  font-family: var(--font-display); font-style: italic;
  font-size: 15px; color: var(--orange);
}
.quad__cell h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 21px; color: var(--white);
}
.quad__cell p { font-size: 14px; color: var(--text-2); line-height: 1.65; }

/* ── Arbetssätt ── */
.approach {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.approach li { padding-top: 22px; border-top: 1px solid var(--hairline); }
.approach h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 20px; color: var(--white); margin-bottom: 10px;
}
.approach p { font-size: 15px; color: var(--text-2); line-height: 1.65; }

/* ── Kontakt-CTA-band ── */
.cta {
  padding: clamp(56px, 9vw, 110px) clamp(20px, 5vw, 56px);
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(36, 76, 94, 0.5) 0%, transparent 60%),
    #18181f;
  border-top: 1px solid var(--hairline-2);
}
.cta__inner { max-width: 640px; margin-inline: auto; text-align: center; }
.cta__eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 16px;
}
.cta__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(26px, 3.6vw, 40px); line-height: 1.1; color: var(--white);
  margin-bottom: 16px;
}
.cta__text { color: var(--text-2); font-size: clamp(15px, 1.4vw, 17px); margin-bottom: 32px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ── Login / auth ── */
.login-hero {
  text-align: center;
  padding: clamp(40px, 8vw, 72px) 20px clamp(8px, 2vw, 16px);
  max-width: 640px; margin: 0 auto;
}
.login-hero__eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 14px;
}
.login-hero__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(26px, 4vw, 40px); line-height: 1.2; color: var(--white);
}
.login-hero__title em { color: var(--ice); font-style: italic; }

.auth-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: clamp(48px, 10vw, 96px) 20px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--dark-2);
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 44px 38px;
  box-shadow: var(--shadow-deep);
}
.auth-card h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 30px; color: var(--white); margin-bottom: 6px;
}
.auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 30px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form label {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-2);
}
.auth-form input {
  padding: 13px 15px;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  color: var(--white);
  font: 400 15px/1.4 var(--font-body);
  letter-spacing: normal; text-transform: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.auth-form input::placeholder { color: var(--text-muted); }
.auth-form input:focus {
  outline: none; border-color: var(--ice);
  box-shadow: 0 0 0 3px rgba(189, 212, 225, 0.1);
}
.auth-form .btn { justify-content: center; margin-top: 6px; width: 100%; }

/* ── Flash ── */
.flashes { max-width: var(--maxw); margin: 16px auto -8px; padding: 0 clamp(20px, 5vw, 56px); }
.flash {
  padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 8px;
  border: 1px solid transparent;
}
.flash--error   { background: rgba(153, 27, 27, 0.18); border-color: rgba(237,125,49,.3); color: #ffd9c2; }
.flash--success { background: rgba(26, 102, 64, 0.18); border-color: rgba(26,102,64,.4);  color: #bdeccd; }
.flash--info    { background: rgba(36, 76, 94, 0.4);   border-color: var(--hairline);     color: var(--ice); }

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  padding: 48px clamp(20px, 5vw, 56px);
  background: #18181f;
  border-top: 1px solid var(--hairline-2);
}
.site-footer__tagline {
  margin-top: 14px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted);
}
.site-footer__meta {
  display: flex; flex-direction: column; gap: 6px; text-align: right;
  font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em;
}
.site-footer__ver { color: var(--text-muted); border-bottom: 1px solid var(--hairline-2); }
.site-footer__ver:hover { color: var(--ice); }

/* ── Responsivt ── */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .quad  { grid-template-columns: repeat(2, 1fr); }
  .approach { grid-template-columns: 1fr; }

  /* Hamburger tar över: navet blir en utfällbar panel under headern */
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px clamp(20px, 5vw, 56px) 20px;
    background: rgba(28, 28, 36, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hairline-2);
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.26s var(--ease), opacity 0.2s var(--ease);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav__link {
    display: block;
    padding: 16px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--hairline-2);
  }
  .site-nav__link::after { display: none; }
  .site-nav__cta { margin-top: 18px; width: 100%; }
  .site-nav__cta .btn { width: 100%; justify-content: center; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 520px) {
  .quad { grid-template-columns: 1fr; }
}
