/* =========================================================
   Kompiskretsen – utkast v2
   Varm beige bas, mycket blått, mjuka former
   ========================================================= */

:root {
  /* Beige */
  --page: #EADFCE;        /* sidans bakgrund, varm beige */
  --page-2: #E1D3BE;      /* mörkare beige band */
  --card: #F8F3EA;        /* kort och ytor */
  --line: #D6C6AE;

  /* Blått */
  --navy: #111F36;
  --blue: #1B3358;
  --blue-mid: #46658F;
  --blue-soft: #A9C3E3;
  --blue-pale: #DCE6F2;
  --cream: #F3E8D7;

  --text: #22314A;
  --muted: #5A6578;

  --r-lg: 32px;
  --r: 22px;
  --r-sm: 14px;
  --shadow: 0 2px 4px rgba(30,53,87,.05), 0 12px 32px rgba(30,53,87,.10);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--navy); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.section { padding: 84px 0; }
.center { text-align: center; }
.sub { color: var(--muted); font-size: 1.05rem; margin-top: 8px; max-width: 56ch; }
.link { color: var(--blue); font-weight: 800; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- Knappar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 1rem var(--font); text-decoration: none; cursor: pointer;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: .95rem; }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(27,51,88,.28); }
.btn-blue:hover { background: var(--navy); }
.btn-cream { background: var(--cream); color: var(--navy); }
.btn-cream:hover { background: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-soft { background: var(--blue-pale); color: var(--blue); width: 100%; }
.btn-soft:hover { background: var(--blue-soft); }
.btn-soft.joined { background: var(--blue); color: #fff; }
.btn-mini { padding: 7px 14px; font-size: .85rem; background: rgba(255,255,255,.14); color: #fff; }
.btn-mini:hover { background: var(--cream); color: var(--navy); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(17,31,54,.96); backdrop-filter: blur(12px);
}
.site-header .brand-word { color: #fff; }
.site-header .brand-word span { color: var(--blue-soft); }
.site-header .main-nav { background: rgba(243,232,215,.08); }
.site-header .main-nav a { color: rgba(243,232,215,.8); }
.site-header .main-nav a:hover { background: rgba(243,232,215,.14); color: #fff; }
.site-header .link-quiet { color: var(--cream); }
.site-header .btn-blue { background: var(--cream); color: var(--navy); box-shadow: none; }
.site-header .btn-blue:hover { background: #fff; }
.header-inner { display: flex; align-items: center; gap: 28px; height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word { font-weight: 900; font-size: 1.5rem; color: var(--navy); letter-spacing: -.02em; }
.brand-word span { color: var(--blue-mid); }
.main-nav { display: flex; gap: 4px; margin-left: 8px; background: var(--card); padding: 5px; border-radius: 999px; }
.main-nav a { text-decoration: none; font-weight: 700; color: var(--muted); padding: 8px 16px; border-radius: 999px; transition: background .2s, color .2s; }
.main-nav a:hover { background: var(--blue-pale); color: var(--blue); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.link-quiet { text-decoration: none; font-weight: 800; color: var(--navy); }

/* ---------- Hero ---------- */
.hero-wrap { padding: 20px 0 0; }
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
  background:
    radial-gradient(circle at 92% 12%, rgba(169,195,227,.35) 0, transparent 34%),
    radial-gradient(circle at 70% 110%, rgba(70,101,143,.5) 0, transparent 45%),
    linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  border-radius: var(--r-lg); padding: 64px 56px; color: var(--cream);
}
.pill-label {
  display: inline-block; background: rgba(243,232,215,.14); color: var(--cream);
  padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: .92rem; margin-bottom: 22px;
}
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 span { color: var(--blue-soft); }
.hero .lead { font-size: 1.15rem; color: rgba(243,232,215,.88); max-width: 50ch; }

.search {
  margin-top: 32px; display: flex; gap: 6px; align-items: stretch; max-width: 620px;
  background: var(--card); padding: 8px; border-radius: 26px; box-shadow: 0 16px 40px rgba(10,25,50,.25);
}
.search-field { flex: 1; display: flex; flex-direction: column; padding: 6px 16px; min-width: 0; }
.search-field + .search-field { border-left: 2px solid var(--page); }
.search-field span { font-size: .78rem; font-weight: 800; color: var(--blue-mid); }
.search-field input, .search-field select {
  border: 0; outline: 0; background: transparent; font: 600 1.02rem var(--font); color: var(--text); padding: 2px 0;
}
.search-field input::placeholder { color: #8b93a3; }
.search .btn { border-radius: 20px; }

.hero-visual { position: relative; height: 380px; }
.hv-ring { position: absolute; inset: 10px 0; border-radius: 50%; border: 2px dashed rgba(169,195,227,.45); }
.hv-ring::after { content: ""; position: absolute; inset: 56px; border-radius: 50%; background: rgba(169,195,227,.14); }
.hv-card {
  position: absolute; background: var(--card); color: var(--text); border-radius: var(--r);
  padding: 16px 18px; box-shadow: 0 14px 34px rgba(10,25,50,.28);
}
.hv-event { top: 20px; left: 0; display: flex; gap: 14px; align-items: center; width: 290px; }
.hv-date {
  flex: none; width: 56px; height: 62px; border-radius: 16px; background: var(--blue-pale); color: var(--blue);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.hv-date span { font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.hv-date strong { font-size: 1.6rem; font-weight: 900; }
.hv-title { font-weight: 800; color: var(--navy); line-height: 1.3; }
.hv-meta { font-size: .88rem; color: var(--muted); }
.hv-quote { top: 150px; right: 0; width: 270px; }
.hv-quote p { font-weight: 600; color: var(--navy); line-height: 1.45; }
.hv-quote span { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .88rem; color: var(--muted); }
.hv-joined { bottom: 22px; left: 24px; display: flex; align-items: center; gap: 10px; font-size: .92rem; padding: 12px 18px; border-radius: 999px; }
.hv-joined b { color: var(--blue); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #4F9D78; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(79,157,120,.55); } 70% { box-shadow: 0 0 0 10px rgba(79,157,120,0); } 100% { box-shadow: 0 0 0 0 rgba(79,157,120,0); } }

.stats {
  list-style: none; padding: 0; margin: 20px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.stats li { background: var(--card); border-radius: var(--r); padding: 20px 22px; display: flex; flex-direction: column; }
.stats strong { font-size: 1.7rem; font-weight: 900; color: var(--blue); line-height: 1.1; }
.stats span { color: var(--muted); font-weight: 600; }

/* ---------- Avatarer ---------- */
.av, .avatars i {
  display: inline-grid; place-items: center; flex: none; font-style: normal;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--c, var(--blue)); color: #fff; font-weight: 800; font-size: .95rem;
}
.hv-quote .av { width: 28px; height: 28px; font-size: .75rem; }
.avatars { display: flex; }
.avatars i { width: 34px; height: 34px; font-size: .8rem; border: 3px solid var(--card); margin-left: -9px; }
.avatars i:first-child { margin-left: 0; }
.avatars .more { background: var(--blue-pale); color: var(--blue); }

/* ---------- Träffar ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head.center .sub { margin-inline: auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  font: 700 .95rem var(--font); cursor: pointer; border: 0; padding: 9px 18px; border-radius: 999px;
  background: var(--card); color: var(--muted); transition: background .2s, color .2s;
}
.filter:hover { color: var(--blue); }
.filter.on { background: var(--blue); color: #fff; }

.events { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 40px; }
.event {
  background: var(--card); border-radius: var(--r); padding: 22px;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-content: start;
  transition: transform .2s, box-shadow .2s;
}
.event:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-date {
  width: 62px; padding: 10px 0; border-radius: 18px;
  background: linear-gradient(160deg, var(--blue-mid), var(--blue)); color: #fff;
  display: flex; flex-direction: column; align-items: center; line-height: 1.05; align-self: start;
}
.event-date span { font-size: .74rem; font-weight: 800; text-transform: uppercase; opacity: .85; }
.event-date strong { font-size: 1.75rem; font-weight: 900; }
.event-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tag { align-self: flex-start; background: var(--blue-pale); color: var(--blue); font-size: .8rem; font-weight: 800; padding: 3px 11px; border-radius: 999px; margin-bottom: 4px; }
.event h3 { line-height: 1.3; }
.event .meta { font-size: .9rem; color: var(--blue-mid); font-weight: 700; }
.event .desc { font-size: .95rem; color: var(--muted); margin-top: 2px; }
.event-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.spots { font-size: .82rem; font-weight: 800; color: var(--navy); background: var(--page); padding: 4px 11px; border-radius: 999px; }
.spots.low { color: #8F4A2C; background: #F2DCCB; }
.event .join { grid-column: 1 / -1; margin-top: 14px; }

/* ---------- Kretsar ---------- */
.kretsar { background: var(--page-2); border-radius: var(--r-lg); width: min(1240px, 100% - 16px); margin-inline: auto; }
.krets-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.krets {
  background: var(--card); border-radius: var(--r); padding: 24px; text-decoration: none;
  display: flex; flex-direction: column; gap: 2px; transition: transform .2s, background .2s;
}
.krets:hover { transform: translateY(-3px); background: #fff; }
.krets .ico {
  width: 54px; height: 54px; border-radius: 50%; background: var(--blue-pale);
  display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 12px;
}
.krets strong { color: var(--navy); font-weight: 800; font-size: 1.05rem; }
.krets small { color: var(--muted); font-weight: 600; font-size: .9rem; }

/* ---------- Så funkar det ---------- */
.how-box {
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: var(--cream);
  border-radius: var(--r-lg); padding: 56px; text-align: center;
}
.how-box h2 { color: #fff; margin-bottom: 36px; }
.steps { list-style: none; padding: 0; margin: 0 0 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.steps li { background: rgba(243,232,215,.08); border: 1px solid rgba(243,232,215,.14); border-radius: var(--r); padding: 26px; }
.steps .no {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--cream); color: var(--blue); font-weight: 900; font-size: 1.2rem; margin-bottom: 16px;
}
.steps h3 { color: #fff; margin-bottom: 6px; }
.steps p { color: rgba(243,232,215,.82); }

/* ---------- Gästbok ---------- */
.gb-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 36px; align-items: start; }
.posts { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 14px; }
.post { display: flex; gap: 16px; background: var(--card); border-radius: var(--r); padding: 20px 22px; }
.post-head { font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
.post-head b { color: var(--navy); }
.members { background: var(--blue); color: #fff; border-radius: var(--r-lg); padding: 30px; }
.members h3 { color: #fff; font-size: 1.3rem; margin-bottom: 20px; }
.members ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.members li { display: flex; align-items: center; gap: 12px; }
.members li > div { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.members small { color: rgba(255,255,255,.75); font-size: .88rem; }
.members .av { border: 3px solid rgba(255,255,255,.2); }

/* ---------- Trygghet ---------- */
.trygghet { padding-top: 24px; }
.safe-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.safe-grid li { background: var(--card); border-radius: var(--r); padding: 26px; }
.safe-ico {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px;
  background: var(--blue-pale); color: var(--blue); font-size: 1.3rem; font-weight: 900; margin-bottom: 16px;
}
.safe-grid h3 { margin-bottom: 6px; }
.safe-grid p { color: var(--muted); font-size: .96rem; }

/* ---------- CTA ---------- */
.cta-wrap { padding-top: 0; }
.cta {
  position: relative; overflow: hidden; text-align: center;
  background:
    radial-gradient(circle at 10% 0%, rgba(169,195,227,.35) 0, transparent 35%),
    radial-gradient(circle at 95% 100%, rgba(70,101,143,.55) 0, transparent 40%),
    var(--blue);
  border-radius: var(--r-lg); padding: 64px 32px; color: var(--cream);
}
.cta img { margin: 0 auto 20px; background: var(--cream); border-radius: 50%; padding: 5px; box-sizing: content-box; }
.brand-light img { background: var(--cream); border-radius: 50%; padding: 3px; box-sizing: content-box; }
.cta h2 { color: #fff; margin-bottom: 10px; }
.cta p { font-size: 1.12rem; color: rgba(243,232,215,.88); margin-bottom: 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(243,232,215,.8); padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.brand-light .brand-word { color: #fff; }
.brand-light .brand-word span { color: var(--blue-soft); }
.footer-tag { margin-top: 12px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; }
.footer-grid h4 { color: var(--blue-soft); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.footer-grid nav a { text-decoration: none; color: var(--cream); font-weight: 600; }
.footer-grid nav a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(243,232,215,.15); font-size: .9rem; }

/* ---------- Responsivt ---------- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; padding: 48px 36px; }
  .hero-visual { height: 340px; max-width: 520px; width: 100%; margin-inline: auto; }
  .events { grid-template-columns: repeat(2, 1fr); }
  .krets-grid, .safe-grid { grid-template-columns: repeat(2, 1fr); }
  .gb-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }
  .hero { padding: 36px 20px; border-radius: 26px; }
  .search { flex-direction: column; }
  .search-field + .search-field { border-left: 0; border-top: 2px solid var(--page); padding-top: 10px; }
  .hero-visual { height: 330px; }
  .hv-event { width: 250px; }
  .hv-quote { width: 230px; top: 130px; }
  .hv-joined { left: 0; font-size: .85rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .events, .krets-grid, .safe-grid, .steps { grid-template-columns: 1fr; }
  .how-box { padding: 40px 20px; }
  .header-actions .link-quiet { display: none; }
  .brand-word { font-size: 1.25rem; }
  .brand img { width: 38px; height: 38px; }
  .footer-grid { grid-template-columns: 1fr; }
}
