/* ============================================================
   Stockholm Apartment Guide - clean, friendly, Airbnb-style
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f7f7f7;
  --ink:       #222222;
  --ink-2:     #484848;
  --muted:     #717171;
  --line:      #ebebeb;
  --line-2:    #dddddd;
  --brand:     #ff385c;
  --brand-2:   #e00b41;
  --brand-tint:#fff1f4;
  --green:     #008a05;
  --green-tint:#eaf7ea;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);

  --radius:    14px;
  --radius-lg: 20px;
  --wrap:      1120px;
  --ease:      cubic-bezier(0.2, 0.7, 0.2, 1);

  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.icon {
  width: 24px; height: 24px;
  flex: none;
  color: inherit;
  /* inherited SVG props cascade into <use>-referenced symbols */
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--brand);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.logo .icon { width: 26px; height: 26px; }
.logo span { color: var(--ink); }

.mainnav { display: flex; align-items: center; gap: 0.35rem; }
.mainnav a {
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.mainnav a:hover { background: var(--bg-soft); }
.mainnav a[aria-current="page"] { color: var(--ink); background: var(--bg-soft); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}
.nav-toggle:hover { box-shadow: var(--shadow-sm); }
.nav-toggle span { position: relative; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.25s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

/* ============================================================
   Buttons & small parts
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease), box-shadow 0.2s ease, background 0.2s ease;
}
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-2); box-shadow: var(--shadow-md); }
.btn:active { transform: scale(0.98); }
.btn .icon { width: 20px; height: 20px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}
.back-link .icon { width: 18px; height: 18px; transform: rotate(180deg); }
.back-link:hover { color: var(--ink); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow .icon { width: 18px; height: 18px; }

/* ============================================================
   Home - hero
   ============================================================ */
.hero {
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem);
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 16ch;
}
.hero p {
  margin-top: 1.1rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 56ch;
}

/* Home - cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, border-color 0.25s ease;
}
.card-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-2);
}
.card-link__badge {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--brand-tint);
  color: var(--brand);
  margin-bottom: 1.1rem;
}
.card-link__badge .icon { width: 28px; height: 28px; }
.card-link h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-link p {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.96rem;
  flex: 1;
}
.card-link__go {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.2rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}
.card-link__go .icon { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.card-link:hover .card-link__go .icon { transform: translateX(4px); }

/* ============================================================
   Sub-page layout
   ============================================================ */
.page {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3.5rem, 8vw, 6rem);
}
.page__head { max-width: 62ch; margin-bottom: 2.5rem; }
.page__head h1 {
  margin-top: 0.9rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.page__head .lede {
  margin-top: 1rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--muted);
}

.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.4rem, 3vw, 2rem);
}
.panel + .panel { margin-top: 1.25rem; }

/* Video (vertical / phone-shot) */
.video {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 380px;
  max-height: 78vh;
  margin-inline: auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
}
.video video { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; display: block; }
.video__fallback {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.9rem; text-align: center; color: #fff;
  background: radial-gradient(80% 80% at 50% 40%, #3a3a3a, #111);
}
.video__fallback .play {
  width: 66px; height: 66px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.video__fallback .play .icon { width: 26px; height: 26px; fill: currentColor; stroke: none; margin-left: 3px; }
.video__fallback p { font-weight: 700; font-size: 1.05rem; }
.video__fallback small { color: rgba(255,255,255,0.7); font-size: 0.85rem; }
.video__caption { margin-top: 0.9rem; color: var(--muted); font-size: 0.9rem; }

/* Wi-Fi credential rows */
.cred {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}
.cred + .cred { border-top: 1px solid var(--line); }
.cred__label { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.cred__value { display: flex; align-items: center; gap: 0.75rem; }
.cred__value code {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.cred__free { color: var(--green); font-weight: 700; display: inline-flex; align-items: center; gap: 0.4rem; }
.copy {
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.copy:hover { box-shadow: var(--shadow-sm); }
.copy.is-done { background: var(--green-tint); color: var(--green); border-color: transparent; }

/* Callout / note */
.callout {
  display: flex;
  gap: 0.9rem;
  padding: 1.2rem 1.3rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
}
.callout .icon { width: 22px; height: 22px; color: var(--ink-2); margin-top: 2px; }
.callout h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.callout p { color: var(--muted); font-size: 0.96rem; }
.callout--in-panel { margin-top: 1.3rem; }

/* Recycling list */
.sortlist { display: flex; flex-direction: column; gap: 0.9rem; }
.sortitem {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.sortitem:hover { box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.sortitem__icon {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
}
.sortitem__icon .icon { width: 24px; height: 24px; }
.sortitem h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 0.2rem; }
.sortitem p { color: var(--muted); font-size: 0.96rem; }
.sortitem .where {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.85rem; font-weight: 600; color: var(--ink-2);
}
.sortitem .where .icon { width: 15px; height: 15px; color: var(--brand); }
.tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-tint);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 0.4rem;
}

/* Map */
.mapcard { margin-top: 1.25rem; }
.mapcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.mapcard__head h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.mapcard__head h2 .icon { width: 20px; height: 20px; color: var(--brand); }
.mapcard__head .btn {
  padding: 0.6rem 1.05rem;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.mapcard__head .btn:hover { box-shadow: var(--shadow-sm); background: var(--bg); }
.map {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: var(--radius);
  display: block;
  background: var(--bg-soft);
}
.map-note { margin-top: 0.8rem; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 560px) {
  .map { aspect-ratio: 4 / 5; }
  /* trim the card padding on mobile so the map gets more room */
  .mapcard { padding: 0.6rem; }
  .mapcard__head { margin: 0.3rem 0.3rem 0.7rem; }
  .map-note { margin: 0.7rem 0.3rem 0.3rem; }
}

/* Prev/next footer nav on sub-pages */
.pager {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 2.2rem 0;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer strong { color: var(--ink); font-weight: 700; }

/* toast */
.toast {
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translate(-50%, 160%);
  z-index: 200;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.45s var(--ease);
}
.toast.is-shown { transform: translate(-50%, 0); }

/* 404 */
.notfound { text-align: center; padding: clamp(4rem, 12vw, 8rem) 0; }
.notfound h1 { font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 800; letter-spacing: -0.03em; }
.notfound p { color: var(--muted); font-size: 1.15rem; margin: 1rem 0 2rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  .cards { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .mainnav {
    position: absolute;
    top: calc(100% + 10px); right: 1.25rem; left: 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.6rem;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .mainnav.is-open { display: flex; }
  .mainnav a { padding: 0.8rem 1rem; border-radius: 10px; }
  .cred { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
