/* ============================================================
   Attvin designsystem – felles grunnlag for attvinsekken.no
   Fonter (Graphik + Sentinel) og designtokens fra Attvin-manualen.
   Lastes FØRST, før base.css / checkout.css / receipt.css.
   Hovedfarge for dette produktet: blå.
   ============================================================ */

/* ---------- Graphik (sans / brødtekst) ---------- */
@font-face {
  font-family: "Graphik Web";
  src: url("../fonts/graphik/Graphik-Regular-Web.woff2") format("woff2"),
       url("../fonts/graphik/Graphik-Regular-Web.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Graphik Web";
  src: url("../fonts/graphik/Graphik-RegularItalic-Web.woff2") format("woff2"),
       url("../fonts/graphik/Graphik-RegularItalic-Web.woff") format("woff");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Graphik Web";
  src: url("../fonts/graphik/Graphik-Semibold-Web.woff2") format("woff2"),
       url("../fonts/graphik/Graphik-Semibold-Web.woff") format("woff");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Graphik Web";
  src: url("../fonts/graphik/Graphik-Bold-Web.woff2") format("woff2"),
       url("../fonts/graphik/Graphik-Bold-Web.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Graphik Web";
  src: url("../fonts/graphik/Graphik-Black-Web.woff2") format("woff2"),
       url("../fonts/graphik/Graphik-Black-Web.woff") format("woff");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Graphik Web";
  src: url("../fonts/graphik/Graphik-Super-Web.woff2") format("woff2"),
       url("../fonts/graphik/Graphik-Super-Web.woff") format("woff");
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ---------- Sentinel (serif / overskrifter) ---------- */
@font-face {
  font-family: "Sentinel";
  src: url("../fonts/sentinel/Sentinel-Light.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sentinel";
  src: url("../fonts/sentinel/Sentinel-Book.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sentinel";
  src: url("../fonts/sentinel/Sentinel-Semibold.otf") format("opentype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sentinel";
  src: url("../fonts/sentinel/Sentinel-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sentinel";
  src: url("../fonts/sentinel/Sentinel-Black.otf") format("opentype");
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  /* ---- Attvin-paletten (fra designmanualen) ---- */
  --attvin-purple: #5C3CB5;
  --attvin-purple-hover: #392080;
  --attvin-purple-dark: #392080;
  --attvin-purple-medium: #DED8F0;
  --attvin-purple-light: #EFECF8;
  --attvin-purple-box: #5536AB;

  --attvin-blue: #0065C1;
  --attvin-blue-hover: #004382;
  --attvin-blue-dark: #004382;
  --attvin-blue-medium: #6BB8FF;
  --attvin-blue-light: #CCE0F3;
  --attvin-blue-tint: #EAF3FC;      /* ekstra lys blå til flater/bakgrunn */

  --attvin-green: #3FC564;
  --attvin-green-hover: #25763C;
  --attvin-green-dark: #25763C;
  --attvin-green-medium: #9CFBA6;
  --attvin-green-light: #D9F3E0;

  --attvin-yellow: #FFD80A;
  --attvin-yellow-dark: #CCAC08;
  --attvin-yellow-medium: #FFEB84;
  --attvin-yellow-light: #FFF4CC;

  --attvin-red: #FD5443;
  --attvin-red-hover: #C71D0C;
  --attvin-red-dark: #C71D0C;
  --attvin-red-medium: #FFB6AD;
  --attvin-red-light: #F7D5D1;

  --attvin-pink: #F7D5D1;
  --attvin-pink-hover: #FFA8A8;
  --attvin-pink-light: #FAE6E3;

  --attvin-orange: #F0910A;
  --attvin-black: #231F20;
  --attvin-white: #FFFFFF;

  /* ---- Semantiske tokens (blå-forankret produkt) ---- */
  --ink: #231F20;
  --muted: #55606B;
  --line: #DCE6F1;                  /* nøytral, lett blåtonet kantlinje */
  --primary: var(--attvin-blue);
  --primary-strong: var(--attvin-blue-hover);
  --page-bg: #DCEAF7;
  --surface: #FFFFFF;

  /* ---- Typografi ---- */
  --font-sans: "Graphik Web", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Sentinel", Georgia, "Times New Roman", serif;

  --w-regular: 400;
  --w-semibold: 600;
  --w-bold: 700;
  --w-black: 800;
  --w-super: 900;

  /* Skalaer (speiler attvin.no clamp-verdier) */
  --fs-display: clamp(2.625rem, 1.74rem + 3.62vw, 5rem);
  --fs-h1: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.29rem + 1.9vw, 3rem);
  --fs-h3: clamp(1.5rem, 1.31rem + 0.76vw, 2rem);
  --fs-h4: clamp(1.125rem, 0.99rem + 0.57vw, 1.5rem);
  --fs-lead: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;

  /* ---- Form / flater ---- */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 5px 14px rgba(0, 67, 130, 0.08);
  --shadow-md: 0 12px 30px rgba(0, 67, 130, 0.10);
  --shadow-lg: 0 22px 48px rgba(0, 67, 130, 0.14);
  --shadow-blue: 0 12px 24px rgba(0, 101, 193, 0.22);

  --focus-ring: 0 0 0 4px rgba(107, 184, 255, 0.45);
}

/* Tall som ikke hopper i pris/antall-visning */
.attvin-tnum,
.attv-summary-row,
.attv-summary-item,
.attv-pick-builder-price,
.attv-qtyval,
.attv-line-price {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Attvin-footer (fra Figma) – delt av alle sider.
   Blå flate, stor A-logo, tre lenkekolonner, sosiale lenker,
   sortere.no-merke og juridisk linje.
   ============================================================ */
.attv-footer{
  background: var(--attvin-blue);
  color: #fff;
  font-family: var(--font-sans);
}
.attv-footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 32px;
}
.attv-footer-top{
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 32px 48px;
  align-items: start;
}
.attv-footer-logo{ display:block; }
.attv-footer-logo svg{
  width: 132px; height: auto; display:block;
}
.attv-footer-cols{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 32px;
}
.attv-footer-col{ display:flex; flex-direction: column; align-items:flex-start; gap: 12px; }
.attv-footer-col h3{
  margin: 0 0 4px;
  font-size: 16px; font-weight: 700; color: #fff;
  letter-spacing: -0.005em;
}
.attv-footer-col p,
.attv-footer-col a{
  margin: 0;
  font-size: 15px; line-height: 1.4; color: #fff;
  font-weight: 400;
}
.attv-footer-col a{ text-decoration: none; transition: opacity .15s ease; }
.attv-footer-col a:hover{ text-decoration: underline; opacity: .9; }
.attv-footer-col p a{ text-decoration: underline; }

.attv-footer-bottom{
  margin-top: 56px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.attv-footer-follow{
  margin: 0;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 800; letter-spacing: -0.02em; color: #fff;
}
.attv-footer-follow a{
  color: var(--attvin-pink-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .15s ease;
}
.attv-footer-follow a:hover{ color: #fff; }
.attv-footer-legal{
  margin: 14px 0 0;
  font-size: 13px; color: rgba(255,255,255,0.7);
}
.attv-footer-sortere{
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: #fff; max-width: 260px;
}
.attv-footer-sortere-mark{
  width: 56px; height: 56px; border-radius: 6px;
  background: #fff; flex: 0 0 auto;
  display:flex; align-items:center; justify-content:center;
  padding: 8px;
}
.attv-footer-sortere-mark img{ width: 100%; height: 100%; object-fit: contain; display:block; }
.attv-footer-sortere span:last-child{ font-size: 12.5px; line-height: 1.35; color: rgba(255,255,255,0.85); }
.attv-footer-sortere:hover span:last-child{ color: #fff; }

@media (max-width: 860px){
  .attv-footer-top{ grid-template-columns: 1fr; gap: 28px; }
  .attv-footer-cols{ grid-template-columns: 1fr 1fr; }
  .attv-footer-logo svg{ width: 104px; }
}
@media (max-width: 560px){
  .attv-footer-inner{ padding: 40px 20px 28px; }
  .attv-footer-cols{ grid-template-columns: 1fr; }
  .attv-footer-bottom{ flex-direction: column; align-items: flex-start; gap: 28px; }
}

/* ============================================================
   Header-menyknapp + blått meny-overlay (Attvin-stil, bedrift)
   ============================================================ */
.site-menu-btn{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  border: 2px solid rgba(0,101,193,0.35); background: #fff;
  color: var(--attvin-blue-dark);
  font-family: var(--font-sans); font-weight: 700; font-size: 15px;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .06s ease;
}
.site-menu-btn:hover{ border-color: var(--attvin-blue); background: var(--attvin-blue-light); }
.site-menu-btn:active{ transform: translateY(1px); }
.site-menu-btn:focus-visible{ outline: none; box-shadow: var(--focus-ring); }
.site-menu-lines{ display:inline-flex; flex-direction: column; gap: 3px; width: 18px; }
.site-menu-lines span{ height: 2px; border-radius: 2px; background: currentColor; display:block; }

/* Overlay */
.attv-menu{ position: fixed; inset: 0; z-index: 300; display: none; }
.attv-menu.is-open{ display: block; }
.attv-menu-backdrop{
  position: absolute; inset: 0; background: rgba(35,31,32,0.35);
  backdrop-filter: blur(3px);
  animation: attvMenuFade .2s ease;
}
@keyframes attvMenuFade{ from{ opacity:0; } to{ opacity:1; } }
.attv-menu-panel{
  position: absolute; top: 0; right: 0; left: 0;
  background: var(--attvin-blue);
  color: #fff;
  max-height: 100dvh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,67,130,0.35);
  animation: attvMenuDrop .28s cubic-bezier(0.2,0.8,0.2,1);
}
@keyframes attvMenuDrop{ from{ transform: translateY(-16px); opacity:.4; } to{ transform: translateY(0); opacity:1; } }
.attv-menu-close{
  position: absolute; top: 18px; right: 24px;
  width: 44px; height: 44px; border-radius: 999px;
  border: none; background: rgba(255,255,255,0.12); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer;
  transition: background-color .15s ease;
}
.attv-menu-close:hover{ background: rgba(255,255,255,0.22); }
.attv-menu-inner{
  max-width: 1200px; margin: 0 auto;
  padding: 72px 32px 48px;
  display: grid; grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 48px;
}
.attv-menu-mark{ width: 116px; height: auto; display:block; margin-bottom: 20px; }
.attv-menu-badge{
  display:inline-block; padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.15); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}

.attv-menu-auth{ margin-top: 22px; }
.attv-menu-lead{ margin: 0 0 14px; font-size: 16px; line-height: 1.45; color: rgba(255,255,255,0.92); max-width: 34ch; }
.attv-menu-login{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 12px 24px; border-radius: 999px; border: none; cursor: pointer;
  background: #fff; color: var(--attvin-blue-dark);
  font-family: var(--font-sans); font-weight: 800; font-size: 16px;
  transition: transform .06s ease, background-color .15s ease;
}
.attv-menu-login:hover{ background: var(--attvin-blue-light); }
.attv-menu-login:active{ transform: translateY(1px); }
.attv-menu-note{ margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.72); max-width: 36ch; }
.attv-menu-note a{ color: #fff; text-decoration: underline; }

/* Innlogget konto-kort */
.attv-menu-account{ display:flex; align-items:center; gap: 12px; }
.attv-menu-account-logo{
  width: 48px; height: 48px; border-radius: 12px; flex: 0 0 auto;
  background: #fff center/cover no-repeat;
  display:flex; align-items:center; justify-content:center;
  color: var(--attvin-blue-dark); font-weight: 800; font-size: 20px;
  overflow: hidden;
}
.attv-menu-account-text{ display:flex; flex-direction: column; min-width: 0; }
.attv-menu-account-name{ font-size: 17px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.attv-menu-account-role{ font-size: 13px; color: rgba(255,255,255,0.75); text-transform: capitalize; }
.attv-menu-switch{
  margin-top: 14px;
  display:inline-flex; align-items:center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.14); border: none; color: #fff;
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  transition: background-color .15s ease;
}
.attv-menu-switch:hover{ background: rgba(255,255,255,0.24); }
.attv-menu-switch i{ font-size: 16px; }
.attv-menu-switch-list{ margin-top: 12px; display:flex; flex-direction: column; gap: 8px; }
.attv-menu-switch-item{
  display:flex; align-items:center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); color: #fff;
  transition: background-color .15s ease, border-color .15s ease;
}
.attv-menu-switch-item:hover{ background: rgba(255,255,255,0.18); }
.attv-menu-switch-item.is-active{ border-color: #fff; background: rgba(255,255,255,0.22); }
.attv-menu-switch-avatar{
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto; overflow:hidden;
  background: #fff center/cover no-repeat;
  display:flex; align-items:center; justify-content:center;
  color: var(--attvin-blue-dark); font-weight: 800; font-size: 13px;
}
.attv-menu-switch-avatar img{ width:100%; height:100%; object-fit: cover; }
.attv-menu-switch-item .nm{ font-size: 14px; font-weight: 600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attv-menu-switch-item .rl{ margin-left:auto; font-size: 12px; color: rgba(255,255,255,0.7); }
.attv-menu-logout{
  margin-top: 16px; display:block;
  background: none; border: none; color: #fff; cursor: pointer;
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px; padding: 0;
}
.attv-menu-logout:hover{ color: var(--attvin-pink-hover); }

.attv-menu-contact{ margin-top: 32px; }
.attv-menu-contact h3{ margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #fff; }
.attv-menu-contact p{ margin: 0 0 6px; font-size: 14px; color: rgba(255,255,255,0.85); }
.attv-menu-contact a{ color: #fff; text-decoration: underline; }

/* Lenkeliste (høyre) */
.attv-menu-right{ display:flex; flex-direction: column; }
.attv-menu-link{
  display:flex; align-items:center; justify-content: space-between; gap: 16px;
  padding: 16px 4px; border-bottom: 1px solid rgba(255,255,255,0.16);
  color: #fff; text-decoration: none;
  font-size: clamp(1.1rem, 0.9rem + 0.9vw, 1.5rem); font-weight: 700;
  letter-spacing: -0.01em;
  transition: padding-left .15s ease, color .15s ease;
}
.attv-menu-link:hover{ padding-left: 10px; color: var(--attvin-pink-hover); }
.attv-menu-link i{ font-size: 20px; opacity: .8; flex: 0 0 auto; }
.attv-menu-group{ margin-top: 22px; }
.attv-menu-group-title{
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.6); margin-bottom: 4px;
}

@media (max-width: 860px){
  .attv-menu-inner{ grid-template-columns: 1fr; gap: 28px; padding: 68px 22px 40px; }
  .attv-menu-right{ order: -1; }
}
@media (max-width: 640px){
  .site-menu-btn span:first-child{ display:none; }
  .site-menu-btn{ padding: 10px; }
}

/* ---------- Header-logo (Attvin-ordmerke) + "Min side" ---------- */
.site-logo-word{
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--attvin-blue);
  line-height: 1;
}
.site-account{
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 999px;
  border: none; background: transparent; cursor: pointer;
  color: var(--attvin-blue-dark);
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  max-width: 220px;
  transition: background-color .15s ease;
}
.site-account:hover{ background: var(--attvin-blue-light); }
.site-account:focus-visible{ outline: none; box-shadow: var(--focus-ring); }
.site-account i{ font-size: 20px; flex: 0 0 auto; }
.site-account span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-account.is-authed span{ font-weight: 700; }
