/* ============================================================
   Modport — Shared styles
   Type: Switzer (Söhne-like) · Palette: dark mono
   ============================================================ */
@import url('https://api.fontshare.com/v2/css?f[]=switzer@300,400,500,600,700&f[]=jetbrains-mono@400&display=swap');

:root {
  /* ---- Light palette (warm off-white) ---- */
  --bg: #f6f4ef;
  --bg-2: #f1eee7;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --surface-3: #ebe9e3;
  --border: #d8d6cf;
  --border-hi: #b8b5ac;
  --text: #0a0a0a;
  --text-2: #5b5a55;
  --text-3: #8b8a83;
  --text-4: #b8b5ac;
  --accent: #0a0a0a;

  --nav-h: 68px;
  --content-max: 1440px;
  --page-pad: 32px;

  --ease: cubic-bezier(.2, .6, .2, 1);
}

@media (max-width: 720px) {
  :root { --page-pad: 20px; --nav-h: 60px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-feature-settings: 'ss01', 'ss02', 'cv01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  line-height: 1.5;
}
/* Prevent horizontal scroll without creating a scroll container on body —
   that would break position:sticky elsewhere. */
body { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Type scale ---------- */
.h-display { font-size: clamp(48px, 7.4vw, 112px); line-height: 0.96; letter-spacing: -0.035em; font-weight: 500; }
.h-1       { font-size: clamp(40px, 5.2vw, 80px);  line-height: 1.02; letter-spacing: -0.03em;  font-weight: 500; }
.h-2       { font-size: clamp(28px, 3.4vw, 52px);  line-height: 1.06; letter-spacing: -0.025em; font-weight: 500; }
.h-3       { font-size: clamp(20px, 1.8vw, 28px);  line-height: 1.15; letter-spacing: -0.015em; font-weight: 500; }
.eyebrow   { font-size: 12px; line-height: 1; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); font-weight: 500; }
.mono      { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.04em; }
.lead      { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: var(--text-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px; min-width: 144px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
  white-space: nowrap;
}
.btn-primary   { background: #0a0a0a; color: #ffffff; }
.btn-primary:hover   { background: #2a2a2a; }
.btn-secondary { background: #ffffff; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-hi); }
.btn-ghost     { background: transparent; color: var(--text); border-color: var(--border-hi); }
.btn-ghost:hover { background: rgba(0,0,0,0.04); border-color: var(--text-3); }
.btn-sm { height: 36px; min-width: 0; padding: 0 16px; font-size: 13px; }
.btn-lg { height: 52px; min-width: 168px; padding: 0 28px; font-size: 15px; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}
.section { padding: clamp(80px, 10vw, 160px) 0; }
.section-tight { padding: clamp(48px, 6vw, 96px) 0; }
.divider { height: 1px; background: var(--border); border: 0; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 var(--page-pad);
  background: rgba(246, 244, 239, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav-inner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav-brand {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.18em;
  color: var(--text);
}
.nav-links {
  display: flex; gap: 36px; align-items: center;
  font-size: 14px; font-weight: 500;
}
.nav-links a {
  color: var(--text);
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  transition: color .25s var(--ease);
}

/* ---------- Mega menu (hover dropdown under Produkter) ---------- */
.nav-item-mega { position: relative; display: inline-flex; align-items: center; }
.nav-mega {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding-top: 14px; /* invisible hover bridge */
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ease), transform .35s var(--ease);
  z-index: 110;
}
.nav-item-mega:hover .nav-mega,
.nav-item-mega:focus-within .nav-mega {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-item-mega:hover > a { color: var(--text-2); }
.nav-mega-panel {
  width: min(700px, calc(100vw - 48px));
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Landing (dark) — give the panel slightly more opacity than the nav for legibility */
.nav-mega-panel { backdrop-filter: blur(20px) saturate(140%); }
.mega-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.mega-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
  transition: opacity .2s var(--ease);
}
.mega-card:hover { opacity: 0.92; }
.mega-card:hover .mega-ph { transform: scale(1.03); }
.mega-ph-wrap {
  height: 80px;
  overflow: hidden;
  position: relative;
}
.mega-ph {
  position: absolute;
  inset: 0;
  transition: transform .8s var(--ease);
}
.mega-ph::after {
  font-size: 9px !important;
  left: 10px !important;
  bottom: 8px !important;
}
.mega-name { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.mega-sub { font-size: 12px; color: var(--text-2); margin-top: -8px; font-feature-settings: 'tnum'; }
.mega-actions {
  display: flex;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.mega-actions a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--border-hi);
  transition: text-decoration-color .25s var(--ease), color .2s var(--ease);
}
.mega-actions a:hover {
  text-decoration-color: var(--text);
}
.mega-foot {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-2);
}
.mega-foot a { transition: color .2s var(--ease); }
.mega-foot a:hover { color: var(--text); }
.mega-foot .mega-foot-links { display: flex; gap: 28px; }

/* Category-grouped layout (Carport / Pergola) */
.mega-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}
.mega-cat { display: flex; flex-direction: column; gap: 16px; }
.mega-cat-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-2);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.mega-cat-cards { display: flex; flex-direction: column; gap: 20px; }

/* Placeholder ("Kommer snart") cards — non-interactive */
.mega-card-soon { cursor: default; }
.mega-card-soon:hover { opacity: 1; }
.mega-card-soon:hover .mega-ph { transform: none; }
.mega-card-soon .mega-name,
.mega-card-soon .mega-sub { color: var(--text-2); }
.mega-ph-soon {
  background: rgba(127, 127, 127, 0.10);
  border: 1px dashed var(--border-hi);
}
.mega-soon-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
}

/* Roof option not yet rendered for the chosen finish (e.g. red + monopitch) */
.opt:disabled, .opt.opt-soon { opacity: 0.4; cursor: not-allowed; }
.opt.opt-soon .price { color: var(--text-2); }

@media (max-width: 900px) {
  .mega-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-mega { display: none; }
}
.nav-links a:hover { color: var(--text-2); }
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.lang {
  display: inline-flex; align-items: center;
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--text-2);
  border: 1px solid var(--border);
  height: 30px; padding: 0 4px;
}
.lang button {
  height: 100%; padding: 0 8px;
  color: var(--text-3);
  font-size: 12px; font-weight: 500; letter-spacing: 0.06em;
  transition: color .2s var(--ease);
}
.lang button.active { color: var(--text); }
.lang button:hover { color: var(--text); }
.lang .sep { color: var(--border-hi); }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { grid-template-columns: 1fr auto; }
}

/* ---------- Placeholder imagery ---------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(0,0,0,0.018) 0 12px,
      rgba(0,0,0,0.045) 12px 24px
    ),
    radial-gradient(120% 80% at 50% 40%, #ebe9e3 0%, #d4d1c8 70%);
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  position: absolute; left: 16px; bottom: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.1em;
  color: rgba(0,0,0,0.45); text-transform: uppercase;
}
.ph-dark {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.02) 0 12px,
      rgba(255,255,255,0.04) 12px 24px
    ),
    radial-gradient(120% 80% at 50% 40%, #1d1d1d 0%, #0e0e0e 70%);
}
.ph-dark::after { color: var(--text-3); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  color: var(--text-2);
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.footer h5 { color: var(--text); font-size: 13px; font-weight: 500; margin-bottom: 16px; letter-spacing: 0.01em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 12px; color: var(--text-3); }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Visually hidden ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
