/* ===================================================================
   Realsec Invest AB — Huvudstilmall
   Tema: mörkt + premium guld/koppar-accent (investmentbolag).
   Egen identitet, fristående från dotterbolagen.
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:        #0b0b0d;
  --bg-2:      #100f12;
  --bg-3:      #16141a;
  --line:      #2a2620;
  --line-soft: #201d19;
  --ink:       #f1ede4;   /* varm off-white */
  --grey:      #b1aa9c;
  --grey-dim:  #837c6f;
  --gold:      #c4a35a;
  --gold-br:   #ddc086;
  --gold-deep: #a8843f;
  --gold-dim:  rgba(196, 163, 90, 0.12);
  --gold-line: rgba(196, 163, 90, 0.28);
  --maxw: 1200px;
  --radius: 3px;
  --t: 0.28s ease;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--gold); color: #1a150b; }

/* Stora rubriker = elegant serif. Entitetsnamn/UI = sans (sätts nedan). */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 14px;
  margin-bottom: 5px;
}

.section { padding: 130px 0; }
.section-head { text-align: center; max-width: 740px; margin: 0 auto 72px; }
.section-head h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.section-head p { color: var(--grey); margin-top: 20px; font-size: 1.06rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.84rem;
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  padding: 15px 32px; border-radius: 6px;
  border: 1.5px solid transparent; cursor: pointer; transition: var(--t);
}
/* Primär: fylld guld med mörk, fet text + tydlig kant och djup */
.btn-primary {
  background: var(--gold); color: #14110a;
  border-color: var(--gold-deep);
  box-shadow: 0 6px 18px rgba(196,163,90,0.18);
}
.btn-primary:hover {
  background: var(--gold-br); color: #14110a;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(196,163,90,0.28);
}
/* Sekundär: tydlig guldkant + guldtext, fylls vid hover */
.btn-ghost {
  background: rgba(196,163,90,0.06); color: var(--gold-br);
  border-color: var(--gold);
}
.btn-ghost:hover {
  background: var(--gold); color: #14110a; border-color: var(--gold);
  transform: translateY(-2px);
}

/* ---------- Top utility bar ---------- */
.topbar {
  background: #070708; border-bottom: 1px solid var(--line-soft);
  font-size: 0.8rem; color: var(--grey);
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.topbar .tb-left { letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.7rem; color: var(--grey-dim); }
.topbar .tb-right { display: flex; gap: 28px; }
.topbar .tb-right a { display: inline-flex; align-items: center; gap: 8px; transition: var(--t); }
.topbar .tb-right a:hover { color: var(--gold-br); }
.topbar svg { width: 15px; height: 15px; fill: var(--gold); }
@media (max-width: 720px) { .topbar .tb-left { display: none; } .topbar .container { justify-content: center; } }

/* ---------- Header / nav ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,11,13,0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 40px; }
.nav a {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--grey); position: relative; padding: 6px 0; transition: var(--t);
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px; background: var(--gold);
}
.nav .btn { padding: 12px 26px; }
/* Säkerställ läsbar mörk text på guld-knappen i menyn (slår .nav a-färgen) */
.nav a.btn-primary, .nav a.btn-primary:hover { color: #14110a; }
.nav a.btn-ghost { color: var(--gold-br); }
.nav a.btn-ghost:hover { color: #14110a; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 1.5px; background: var(--ink); margin: 6px 0; transition: var(--t); }

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 128px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg-2); border-top: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.35s ease; padding: 0;
  }
  .nav.open { max-height: 440px; padding: 12px 0 28px; }
  .nav a { width: 100%; text-align: center; padding: 17px 0; border-bottom: 1px solid var(--line-soft); }
  .nav .btn { margin-top: 18px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: center;
  background:
    radial-gradient(820px 520px at 75% 22%, rgba(196,163,90,0.14), transparent 62%),
    radial-gradient(620px 520px at 8% 92%, rgba(196,163,90,0.05), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, transparent 60%, rgba(0,0,0,0.5) 100%);
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  filter: grayscale(1) contrast(1.06) brightness(0.85);
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11,11,13,0.94) 0%, rgba(11,11,13,0.78) 42%, rgba(11,11,13,0.42) 100%),
    linear-gradient(0deg, rgba(11,11,13,0.85) 0%, transparent 45%),
    radial-gradient(760px 480px at 76% 24%, rgba(196,163,90,0.12), transparent 62%);
}
.hero .container { position: relative; z-index: 2; }
.hero-inner { max-width: 820px; }
.hero h1 {
  font-size: clamp(3.2rem, 8vw, 6rem); font-weight: 600; line-height: 1.0;
  letter-spacing: -0.01em;
}
.hero h1 .accent { color: var(--gold); font-style: italic; font-weight: 500; }
.hero p { color: var(--grey); font-size: 1.18rem; max-width: 580px; margin: 30px 0 44px; line-height: 1.75; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Portfolio ---------- */
.bg-alt { background: var(--bg-2); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 920px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .portfolio-grid { grid-template-columns: 1fr; } }

.card {
  position: relative; background: var(--bg-3); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 38px 32px; transition: var(--t); overflow: hidden;
  display: flex; flex-direction: column;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-br));
  transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.card:hover { border-color: var(--gold-line); transform: translateY(-6px); }
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 56px; height: 56px; border-radius: var(--radius); background: var(--gold-dim);
  border: 1px solid var(--gold-line);
  display: flex; align-items: center; justify-content: center; margin-bottom: 26px;
}
.card-icon svg { width: 26px; height: 26px; stroke: var(--gold-br); fill: none; stroke-width: 1.5; }
.card h3 { font-family: var(--font-body); font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }
.card .cat {
  display: inline-block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); margin: 10px 0 16px;
}
.card p { color: var(--grey); font-size: 0.95rem; flex-grow: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.card-link { font-family: var(--font-body); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; transition: var(--t); }
.card-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; transition: var(--t); }
.card-link:hover { color: var(--gold-br); }
.card-link:hover svg { transform: translateX(4px); }
.badge {
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--grey-dim); border: 1px solid var(--line); border-radius: 50px; padding: 5px 13px;
}

/* Bolagslogga på ljus bricka (originalfärger syns mot mörk sajt) */
.card-logo {
  background: #faf8f4; border-radius: 8px; padding: 16px 24px;
  height: 112px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.card-logo img { max-height: 58px; max-width: 100%; width: auto; object-fit: contain; }
.card-logo img.logo-lg { max-height: 80px; }   /* kompakta loggor (HSG) större */
.logo-text { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; color: #16141a; }
.c-logo {
  background: #faf8f4; border-radius: 8px; padding: 16px 24px;
  display: inline-flex; align-items: center; margin-bottom: 22px;
}
.c-logo img { max-height: 48px; max-width: 250px; width: auto; object-fit: contain; }
.c-logo img.logo-lg { max-height: 68px; }

/* ---------- About / stats ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: center; }
@media (max-width: 850px) { .about-grid { grid-template-columns: 1fr; gap: 48px; } }
.about-text h2 { font-size: clamp(2.1rem, 4vw, 3rem); }
.about-text p { color: var(--grey); margin-top: 20px; font-size: 1.05rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat { background: var(--bg-3); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 34px 28px; }
.stat .num { font-family: var(--font-display); font-size: 3rem; font-weight: 600; color: var(--gold); line-height: 1; }
.stat .num span { color: var(--gold-br); }
.stat .lbl { color: var(--grey-dim); font-size: 0.82rem; margin-top: 10px; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Team / människorna bakom ---------- */
.team-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
@media (max-width: 850px) { .team-grid { grid-template-columns: 1fr; gap: 36px; } }
.team-img img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.team-text h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.team-text p { color: var(--grey); margin-top: 20px; font-size: 1.05rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, #18130a, var(--bg-2));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 34px; padding-top: 80px; padding-bottom: 80px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); max-width: 680px; }
.cta-band p { color: var(--grey); margin-top: 12px; }

/* ---------- Company detail rows (bolagsöversikt) ---------- */
.company-row { padding: 56px 0; border-bottom: 1px solid var(--line-soft); }
.company-row:last-child { border-bottom: 0; }
.company-row .c-icon { width: 68px; height: 68px; border-radius: var(--radius); background: var(--gold-dim); border: 1px solid var(--gold-line); display: flex; align-items: center; justify-content: center; }
.company-row .c-icon svg { width: 32px; height: 32px; stroke: var(--gold-br); fill: none; stroke-width: 1.4; }
.company-row .c-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.company-row h3 { font-family: var(--font-body); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.company-row .cat { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.company-row p { color: var(--grey); margin: 16px 0; max-width: 780px; }
.company-row ul { list-style: none; margin: 16px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; max-width: 780px; }
.company-row ul li { color: var(--grey); position: relative; padding-left: 26px; font-size: 0.95rem; }
.company-row ul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 9px; height: 9px; border-left: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(-45deg); }
@media (max-width: 600px) { .company-row { grid-template-columns: 1fr; } .company-row ul { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 64px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--bg-3); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 44px 32px; text-align: center; transition: var(--t); }
.contact-card:hover { border-color: var(--gold-line); transform: translateY(-4px); }
.contact-card .ci { width: 62px; height: 62px; border-radius: 50%; background: var(--gold-dim); border: 1px solid var(--gold-line); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.contact-card .ci svg { width: 26px; height: 26px; stroke: var(--gold-br); fill: none; stroke-width: 1.5; }
.contact-card h3 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; margin-bottom: 10px; }
.contact-card a, .contact-card p { color: var(--grey); font-size: 0.98rem; }
.contact-card a:hover { color: var(--gold-br); }

.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: start; }
@media (max-width: 850px) { .contact-wrap { grid-template-columns: 1fr; gap: 44px; } }
.contact-wrap h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: 12px; }
.form { background: var(--bg-3); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 42px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 520px) { .form .row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); margin-bottom: 9px; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); padding: 14px 16px; font-family: var(--font-body); font-size: 0.95rem; transition: var(--t);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 130px; }
.map-embed { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 100%; }
.map-embed iframe { width: 100%; height: 100%; min-height: 380px; border: 0; filter: grayscale(1) invert(0.92) contrast(0.82) sepia(0.2); }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  padding: 100px 0 80px;
  background: radial-gradient(720px 380px at 78% 8%, rgba(196,163,90,0.13), transparent 62%), var(--bg);
  border-bottom: 1px solid var(--line-soft); text-align: center;
}
.page-hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); font-weight: 600; }
.page-hero p { color: var(--grey); margin-top: 18px; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.footer { background: #070708; border-top: 1px solid var(--line); padding: 78px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 54px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 38px; } }
.footer .f-brand svg { height: 42px; margin-bottom: 22px; }
.footer p { color: var(--grey-dim); font-size: 0.92rem; }
.footer h4 { font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); margin-bottom: 22px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 13px; }
.footer ul li a { color: var(--grey-dim); font-size: 0.94rem; transition: var(--t); }
.footer ul li a:hover { color: var(--gold-br); }
.footer-bottom { border-top: 1px solid var(--line-soft); margin-top: 60px; padding: 26px 0; text-align: center; }
.footer-bottom p { color: var(--grey-dim); font-size: 0.84rem; letter-spacing: 0.04em; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
