/* ==========================================================================
   Vevra – stilark
   Ett samlet stilark for hele nettstedet. Strukturen er:
   1) Designvariabler (farger, avstand, typografi)  – endre merkevaren her
   2) Grunnstiler (reset, typografi, lenker)
   3) Gjenbrukbare komponenter (knapper, kort, container, seksjoner)
   4) Header / navigasjon
   5) Footer
   6) Sidespesifikke seksjoner (hero, steg, skjema osv.)
   7) Responsivt (mobil-først: vi bygger smått først og utvider for større skjerm)
   ========================================================================== */

/* 1) DESIGNVARIABLER -------------------------------------------------------
   Alt det visuelle styres herfra. Vil du bytte aksentfarge eller avstand,
   gjør du det ett sted, og hele siden følger med. */
:root {
  /* Farger – rolig, lyst og nøytralt med ÉN varm aksent (jordnær grønn) */
  --bg:            #ffffff;   /* hovedbakgrunn (hvit) */
  --bg-soft:       #f7f6f3;   /* dempet «papir»-bakgrunn for vekslende seksjoner */
  --ink:           #16191c;   /* nesten svart – brødtekst og overskrifter */
  --ink-muted:     #5c625f;   /* dempet tekst – ingresser og bildetekst */
  --accent:        #1f6f54;   /* den ene rolige aksentfargen (grønn) */
  --accent-soft:   #e7f0eb;   /* lys tone av aksenten – bakgrunn for små merker */
  --line:          #e7e5e0;   /* fine skillelinjer og kantlinjer */
  --black:         #16191c;   /* fylte hovedknapper */
  --black-hover:   #2c3035;   /* hover på svarte knapper */

  /* Typografi */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif; /* varm serif til store overskrifter */

  /* Mål og avstand */
  --maxw: 1120px;           /* maks bredde på innhold */
  --radius: 14px;           /* avrundede hjørner */
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,19,22,.04), 0 8px 30px rgba(16,19,22,.05);

  /* Vertikal rytme – seksjonsluft. Mye luft = rolig og proft. */
  --section-y: 88px;
}

/* 2) GRUNNSTILER ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Overskrifter bruker den varme serifen, brødtekst den nøytrale sansen */
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 .4em;
}
h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }   /* skalerer med skjermbredden */
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; display: block; }

/* Skjult-men-tilgjengelig (for skjermlesere) */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* «Hopp til innhold»-lenke for tastatur/skjermleser */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* 3) KOMPONENTER ---------------------------------------------------------- */

/* Container – sentrerer og begrenser bredden på innholdet */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

/* Seksjon – standard vertikal luft. Modifikator .section--soft gir papirbakgrunn */
.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-block: 56px; }

/* Liten overtittel over store overskrifter (kapitélaktig) */
.overline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* Ingress / leadtekst under overskrifter */
.lead {
  font-size: 1.18rem;
  color: var(--ink-muted);
  max-width: 60ch;
}

/* Seksjonshode – sentrert tittelblokk */
.section-head { max-width: 62ch; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }

/* Knapper ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 600; line-height: 1;
  padding: 15px 26px;
  border-radius: 999px;          /* pille-form */
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .05s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

/* Hovedhandling: svart, fylt */
.btn--primary { background: var(--black); color: #fff; }
.btn--primary:hover { background: var(--black-hover); color: #fff; }

/* Sekundær: rolig outline */
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); }

/* Liten variant til header */
.btn--sm { padding: 11px 18px; font-size: .95rem; }

/* Kort -------------------------------------------------------------------- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

/* Rutenett som brytes til én kolonne på mobil */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* Lite ikon/merke (sirkel med tall eller symbol) */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-head); font-size: 1.15rem; font-weight: 600;
  margin-bottom: 18px;
}

/* 4) HEADER / NAVIGASJON -------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
/* Logo (merke + navn + liten tagline). margin-right:auto skyver menyen til høyre. */
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--ink); margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; font-family: var(--font-body);
  flex-shrink: 0;
}
/* Navn + tagline stables i en liten kolonne */
.brand-name { display: flex; flex-direction: column; line-height: 1.02; }
.brand-name b {
  font-family: var(--font-head); font-size: 1.35rem; font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-tag {
  font-family: var(--font-body); font-size: .66rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-muted);
  margin-top: 2px;
}

/* Menylenker */
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink); font-weight: 500; font-size: .98rem;
  padding: 6px 0; position: relative;
}
.nav-links a:hover { text-decoration: none; color: var(--accent); }
/* Aktiv side markeres med dempet understrek */
.nav-links a[aria-current="page"] { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 18px; margin-left: 30px; }

/* CTA-knappen som ligger INNE i menyen skal kun vises i mobilmenyen.
   På desktop bruker vi knappen i .nav-right i stedet. */
.nav-menu > .btn { display: none; }

/* Hamburger-knapp (kun synlig på mobil) */
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 44px; height: 44px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink);
  position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }
/* Åpen tilstand: gjør krysset */
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* 5) FOOTER --------------------------------------------------------------- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding-block: 56px 28px;
  font-size: .96rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  font-family: var(--font-body); font-size: .85rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted);
  margin: 0 0 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--ink); }
.footer-grid a:hover { color: var(--accent); }
.footer-brand p { color: var(--ink-muted); max-width: 34ch; margin-top: 12px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 22px;
  color: var(--ink-muted); font-size: .9rem;
}

/* 6) SIDESPESIFIKKE SEKSJONER -------------------------------------------- */

/* HERO (forside) */
.hero { padding-block: 96px 80px; }
.hero .lead { margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note {
  margin-top: 22px; color: var(--ink-muted); font-size: .95rem;
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-note svg { flex-shrink: 0; }

/* «Slik jobber vi» – kort trippel under hero */
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 18px; font-weight: 500; font-size: .96rem;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Steg (Slik fungerer det) */
.steps { counter-reset: step; }
.step-card { position: relative; }
.step-num {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 600;
  color: var(--accent); margin-bottom: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft);
}

/* «Hvorfor velge Vevra» – liste med hake-ikoner */
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .check {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; margin-top: 2px;
}
.feature h3 { margin-bottom: .25em; }
.feature p { color: var(--ink-muted); margin: 0; }

/* Sitatblokk (kundereferanse) */
.quote {
  text-align: center; max-width: 64ch; margin-inline: auto;
}
.quote blockquote {
  font-family: var(--font-head); font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.35; margin: 0 0 18px; color: var(--ink);
}
.quote .cite { color: var(--ink-muted); font-style: normal; font-size: .98rem; }

/* CTA-bånd (oppfordring nederst på sider) */
.cta-band {
  background: var(--ink); color: #fff; border-radius: 20px;
  padding: 56px 40px; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.75); max-width: 50ch; margin-inline: auto; }
.cta-band .btn--primary { background: #fff; color: var(--ink); }
.cta-band .btn--primary:hover { background: #ececec; }

/* SKJEMA (kontakt + nyhetsbrev) */
.form { max-width: 560px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 140px; resize: vertical; }

/* Statusmelding etter innsending */
.form-status {
  display: none; margin-top: 6px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent); font-weight: 500;
}
.form-status.is-visible { display: block; }
.form-status.is-error { background: #fdecec; color: #b3261e; }

/* Nyhetsbrev – kompakt inline-skjema */
.newsletter { background: var(--bg-soft); border-radius: 20px; padding: 48px 40px; }
.newsletter-form { display: flex; gap: 12px; flex-wrap: wrap; max-width: 480px; }
.newsletter-form input {
  flex: 1 1 220px; font-family: inherit; font-size: 1rem;
  padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
}
.newsletter-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.newsletter-mini { font-size: .85rem; color: var(--ink-muted); margin-top: 12px; }

/* Kontakt-layout: info ved siden av skjema */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.contact-info dl { margin: 0; }
.contact-info dt { font-weight: 600; margin-bottom: 4px; }
.contact-info dd { margin: 0 0 22px; color: var(--ink-muted); }
.contact-info a { color: var(--accent); }

/* Enkel artikkel/blogg */
.article { max-width: 720px; margin-inline: auto; }
.article h1 { margin-bottom: .2em; }
.article .meta { color: var(--ink-muted); font-size: .95rem; margin-bottom: 32px; }
.article h2 { margin-top: 1.6em; }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.post-list a { color: var(--ink); }
.post-list .card:hover { border-color: var(--ink); }

/* 7) RESPONSIVT ----------------------------------------------------------
   Mobil-først: stilene over gjelder små skjermer. Her utvider vi oppover. */

/* Under 860px: stable rutenett, vis hamburger, skjul desktop-meny */
@media (max-width: 860px) {
  :root { --section-y: 64px; }

  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }

  .nav-toggle { display: inline-flex; }

  /* Mobilmeny: skjult som standard, glir ned når åpen */
  .nav-menu {
    position: fixed; inset: 70px 0 auto 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 18px 22px 26px;
    display: none; flex-direction: column; gap: 0;
    box-shadow: var(--shadow);
  }
  .nav-menu.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links a { display: block; padding: 14px 2px; font-size: 1.05rem; }
  /* I mobilmenyen viser vi CTA-knappen igjen */
  .nav-menu > .btn { display: inline-flex; margin-top: 18px; width: 100%; }
  /* CTA-knappen i header flyttes inn i mobilmenyen */
  .nav-right .btn--header { display: none; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .brand-tag { display: none; } /* spar plass ved siden av hamburgeren */
  .cta-band, .newsletter { padding: 36px 22px; }
  .card { padding: 24px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Respekter brukere som foretrekker mindre bevegelse */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
