/* =========================================================
   Hemängen – Raktvål (index_rakning) CSS
   Städat, utan dubbletter
   ========================================================= */

/* ---------- Theme tokens ---------- */
:root{
  --bg:#121212;
  --panel:#161616;
  --text:#cfd7c2;
  --muted:#a8b19b;
  --accent:#2f7a55;
  --card:#ffffff;
  --shadow: 0 12px 28px rgba(0,0,0,.35);
  --radius: 18px;
}

/* ---------- Base ---------- */
*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  line-height:1.45;
}

/* ---------- Book (scroll-snap) ---------- */
.book{
  height:100svh;
  overflow:auto;
  scroll-snap-type:y mandatory;
  scroll-behavior:smooth;
}

/* ---------- Page ---------- */
section.page{
  --pad: clamp(18px, 4vw, 44px);

  height: 100svh;
  padding: var(--pad);

  scroll-snap-align: start;

  display:flex;
  align-items:center;
  justify-content:center;

  background: linear-gradient(180deg, var(--bg), var(--panel));
  overflow:hidden; /* desktop: stoppar visuellt läckage */
  position: relative;
}

/* ---------- Page wrapper ---------- */
.sheet{
  width: min(980px, 100%);
  height: 100%;      /* ger kolumner/illusStack riktig höjd */
  min-height: 0;     /* tillåter krympning i grid/flex */
  position: relative;/* ankare för absolut footer */

  display: grid;
  gap: clamp(18px, 3vw, 36px);
  align-content: start;

  padding-bottom: 56px; /* plats för pageFooter (desktop) */
}

/* ---------- Typography ---------- */
.kicker{
  color:var(--muted);
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-size:.92rem;
}

h1, h2{
  margin:0;
  font-weight:700;
  letter-spacing:.02em;
}

h1{
  font-size: clamp(40px, 6vw, 76px);
  line-height:1.02;
}

h2{
  font-size: clamp(28px, 4.2vw, 48px);
  line-height:1.06;
}

p{
  margin:0;
  font-size: clamp(16px, 2.2vw, 20px);
  color:var(--text);
}

.small{
  font-size:14px;
  color:var(--muted);
}

.subhead{
  margin-top:14px;
  font-weight:700;
}

.section-title{
    margin-top: 22px;
    margin-bottom: 8px;
    font-size: clamp(18px, 2.4vw, 22px);
    font-weight: 750;
    color: var(--text);
   }

.rule{
  height:1px;
  background: rgba(255,255,255,.10);
  margin:10px 0 0 0;
}

.steps{
  margin-top:16px;
}

.step{
  margin-bottom:14px;
}

.stepHead{
  display:flex;
  align-items:baseline;
  gap:8px;
  
}

.stepHead h3{
  font-size:18px;
  font-weight:750;
}

.step .n{
  font-weight:750;
  font-size:18px;
  margin:0;
}



step p {
  margin: 0;
  max-width: 42ch; /* perfekt läsbredd */
}

.intro{
  margin-top:10px;
  max-width:42ch;
}

.note{
  margin-top:10px;
  font-weight:650;
}

.section{
  margin-top:14px;
}

.sectionTitle{
  margin:0 0 6px 0;
  font-size:18px;
  font-weight:750;
}


/* ---------- Two-column layout ---------- */
.twoCol{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(16px, 3vw, 32px);
  align-items: stretch;

  height: 100%;
  min-height: 0;
}

.twoCol > div{
  min-height:0; /* KRITISK: gör att flex/grid-barn kan krympa */
}

/* ---------- Cards (GLOBAL) ---------- */
.card{
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px;

  display:flex;
  justify-content:center;
  align-items:center;

  min-height:160px; /* global baseline */
}

.card img{
  max-width:100%;
  height:auto;
  display:block;
}

.cardTop{ margin-top:6px; }

/* ---------- Illustration stack (högerkolumn) ---------- */
.illusStack{
  display:flex;
  flex-direction:column;
  gap:12px;

  height:100%;
  min-height:0;
}

/* override global card i stacken */
.illusStack .card{
  flex:1;
  min-height:0;     /* override global min-height */
  padding:10px;
}

/* bild fyller kortets höjd */
.illusStack .card img{
  width:100%;
  height:100%;
  max-width:none;
  max-height:100%;
  object-fit:contain;
  display:block;
}

/* ---------- Steps ---------- */
.steps{
  display:grid;
  gap:10px;
  margin-top:6px;
}

.step{
  padding:0;
  border-radius:14px;
}

.step .n{
  color:var(--muted);
  font-weight:700;
  margin-right:10px;
}

.stepTitle{
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight:800;
  color:var(--text);
}



/* ---------- Buttons ---------- */
.navRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

.btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor:pointer;
  font-weight:650;
  font-size:14px;
}

.btn:hover{
  background: rgba(255,255,255,.10);
}

.btn--ghost{
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  color: var(--muted);
}

.btn--ghost:hover{
  color: var(--text);
  border-color: rgba(255,255,255,.35);
}


/* ---------- Navigation dots ---------- */
.dots{
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index:10;
}

.dot{
  width:10px;
  height:10px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.35);
  background:transparent;
  cursor:pointer;
}

.dot[aria-current="true"]{
  background: rgba(255,255,255,.75);
  border-color: rgba(255,255,255,.75);
}

/* =========================================================
   COVER (SIDA 1)
   ========================================================= */

/* Cover wrapper */
.coverGrid{
  height: 100%;
  display:grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "logo intro"
    "hero hero"
    "bottom bottom";
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
}

/* Placeringar */
.coverLogoWrap{ grid-area: logo; }
.coverIntro{ grid-area: intro; }
.coverHero{ grid-area: hero; }
.coverBottom{ grid-area: bottom; }

.coverIntro .kicker{
  /* “Raktvålar” ska vara stor som Bruk & grunder, men bara den raden */
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none; /* viktig: kicker brukar vara versaler annars */
}

/* Logo */
.coverLogo{
  width: clamp(180px, 28vw, 420px);
  max-width: 420px;
  height: auto;
  display:block;
  opacity:.85;
}

/* =========================
   HERO (LCP-safe)
   ========================= */

.hero,
.coverHero {
  width: 100%;
}

/* Container */
.hero .bg,
.coverHero .bg {
  position: relative;
  height: 340px;              /* samma höjd som tidigare */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Själva bilden (LCP-elementet) */
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(1.05) saturate(1.05);
}

/* Overlay med text */
.hero .overlay,
.coverHero .overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;

  /* din befintliga toning */
  background: linear-gradient(
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.35)
  );
}

/* Text */
.hero-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.hero-sub {
  color: #f3f3f3;
  font-size: 1rem;
}

/* Ursprungstext (om ni använder den) */
.hero-origin {
  opacity: 0.9;
}



/* HERO */
.hero{
  margin: 0;
}

.hero .bg{
  height: clamp(160px, 22vw, 260px);
  border-radius: 16px;
  overflow:hidden;
  position:relative;

  /* byt filnamn vid behov */
  background: url("../img/skogsbakgrund.avif") center/cover no-repeat;

  box-shadow: var(--shadow);
  filter: brightness(1.05) saturate(1.05);
}

.hero .overlay{
  position:absolute;
  inset:0;
  display:grid;
  place-content:center;
  text-align:center;
  padding: 18px;

  /* LJUS “dimma” som på hemsidan */
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.18),
    rgba(255,255,255,.42)
  );
}

.hero .hero-title{
  margin:0;
  font-size: clamp(16px, 3.4vw, 22px);
  line-height: 1.2;
  color:#fff;
  font-weight: 750;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}

.hero-sub{
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-top: 10px;
  opacity: .95;
  text-shadow:
    0 2px 6px rgba(0,0,0,0.55),
    0 0 18px rgba(0,0,0,0.35);
}

.hero-origin{
  font-weight: 700;          /* lite mer pondus */
  letter-spacing: .02em;
  opacity: 1;
}

/* =========================================================
   FOOTER (per sida)
   ========================================================= */

.pageFooter,
.coverFooter{
  position:absolute;
  right: clamp(24px, 5vw, 48px);
  bottom: clamp(18px, 4vh, 40px);
  display:flex;
  gap:16px;
  align-items:center;
  font-size:14px;
  color: var(--muted);
  z-index:2;
  text-align:right;
}

.footerLink{
  color: inherit;
  text-decoration:none;
  border-bottom: 1px solid rgba(255,255,255,.25);
}

.footerLink:hover{
  border-bottom-color: rgba(255,255,255,.6);
}
/* =========================================================
   MOBIL – behåll .book som scroll-container (JS funkar),
   footer bort, stabila bilder på sida 2–4
   ========================================================= */
@media (max-width: 820px){

  .book{
    height: 100svh;
    overflow: auto;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
  }

  .pageFooter,
  .coverFooter{ display:none !important; }

  .dots{ display:none !important; }

  section.page{
    height: auto;
    min-height: 100svh;
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
    padding: 16px;
  }

  .sheet{
    height: auto;
    width: 100%;
    gap: 14px;
    padding-bottom: 0;
  }

  /* Mobil: 2 kolumner */
  .twoCol{
    grid-template-columns: 1.15fr 0.85fr;
    gap: 14px;
    height: auto;
    align-items: start;
  }

  /* Typografi lite tajtare */
  h2{
    font-size: 26px;
    line-height: 1.05;
  }
  p{
    font-size: 16px;
    line-height: 1.35;
  }

  /* STOPPA avstavningar / konstiga bryt */
  p, h2, h3{
    hyphens: none;
    -webkit-hyphens: none;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

/* TIGHTER VERTICAL RHYTHM ON MOBILE */
  h2 {
     margin-bottom: 0.6em;
  }

  h3 {
    margin-top: 1.0em;
    margin-bottom: 0.4em;
  }

  p {
    margin-top: 0;
    margin-bottom: 0.9em;
  }

  .intro {
    margin-bottom: 1.0em;
  }


  /* Högerspalt som tydlig kolumn */
  .sideCol{
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .card{
    min-height: 0 !important;
    padding: 10px;
    border-radius: 14px;
  }

  /* Viktigt: inga height:100%-bilder på mobil */
  .card img{
    width: 100%;
    height: auto !important;
    max-height: 22svh;
    object-fit: contain;
    display: block;
  }

  /* Default: illusStack = vertikal stack */
  .illusStack{
    display:flex;
    flex-direction:column;
    gap:12px;
    height:auto !important;
    min-height:0 !important;
  }
  .illusStack .card{
    flex: 0 0 auto !important;
  }

  /* 4 bilder: gör 2×2 (gäller alla sidor där du sätter class="illusStack illus4") */
  .illusStack.illus4{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:10px;
    align-items:start;
  }
  .illusStack.illus4 .card{
    aspect-ratio: 1 / 1;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .illusStack.illus4 img{
    width:100%;
    height:100% !important;
    object-fit:contain;
    max-height: none; /* grid styr höjden via aspect-ratio */
  }

  /* Om du vill ha 2 + 1 när du har 3 bilder (illus3) */
  .illusStack.illus3{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:10px;
  }
  .illusStack.illus3 .card:nth-child(3){
    grid-column: 1 / -1;
  }
  .illusStack.illus3 .card{
    aspect-ratio: 1 / 1;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .illusStack.illus3 img{
    width:100%;
    height:100% !important;
    object-fit:contain;
  }
  

  /* illus4: 2 små uppe, 2 stora under (mockup) */
  .sideCol .illusStack.illus4{
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
  }

  /* små rutor: bild 1–2 */
  .sideCol .illusStack.illus4 .card:nth-child(1),
  .sideCol .illusStack.illus4 .card:nth-child(2){
    aspect-ratio: 1 / 1;
  }

  /* stora rutor: bild 3–4 (spänner över båda kolumnerna) */
  .sideCol .illusStack.illus4 .card:nth-child(3),
  .sideCol .illusStack.illus4 .card:nth-child(4){
    grid-column: 1 / -1;
    aspect-ratio: 16 / 10; /* justera 16/9 om du vill mer “wide” */
  }

  /* se till att bilderna fyller snyggt utan att bli jättelådor */
  .sideCol .illusStack.illus4 .card{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    min-height: 0 !important;
  }

  .sideCol .illusStack.illus4 img{
    width: 100%;
    height: 100% !important;
    object-fit: contain;
    display: block;
  }


  /* Cover */
  .coverGrid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "intro"
      "hero"
      "bottom";
    gap: 14px;
  }
  .coverLogo{ max-width: 210px; }
  .coverH1{ font-size: clamp(34px, 10vw, 46px); }
  .hero .bg{ height: 170px; }

  /* Knappar: full bredd */
  .navRow{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }
  .btn{
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
  }
  @media (max-width: 820px) {
  .seo-title {
    font-size: 0;
    line-height: 0;
  }

  .seo-title::after {
    content: "KÄYTTÖOHJE";
    font-size: 1.6rem;
    line-height: 1.2;
    display: block;
  }
}
}



