/*
Theme Name:     Superkeys Child
Theme URI:      https://superkeys.no
Description:    Custom child-theme for Superkeys.no — basert på Blocksy. Implementerer designsystem fra design-system/MASTER.md.
Author:         Eirik Vika / Superdingser AS
Author URI:     https://superkeys.no
Template:       blocksy
Version:        2.0.5
Text Domain:    superkeys-child
*/

/* ============================================
   1. Designsystem-variabler
   Source of truth: design-system/MASTER.md
   ============================================ */

:root {
  /* Base */
  --bg: #F5F5F7;
  --white: #FFFFFF;
  --soft: #ECEDF0;

  /* Tekst */
  --ink: #0F0F14;
  --ink2: #3D3D50;
  --ink3: #6B6B82;
  --ink4: #9898AE;

  /* Borders */
  --border: #DDDDE4;
  --border-h: #C4C4D0;

  /* Brand — Teal */
  --accent: #0D7C6E;
  --accent-l: #E4F4F1;
  --accent-d: #095C52;

  /* Vipps — primær betalings-CTA */
  --vipps: #FF5B24;
  --vipps-l: #FFF0EB;

  /* Mørke spillkort */
  --cd: #101018;
  --cd2: #1A1A24;
  --cdb: #262636;

  /* Plattform-farger */
  --steam: #4A8EC4;
  --xbox: #4C8C4C;
  --ps: #6868B0;
  --ms: #2878C8;
  --nin: #C04848;
  --epic: #2D2D2D;
  --gog: #86328A;
  --ubi: #0070D1;
  --ea: #FF4747;
  --bnet: #00AEFF;

  /* Vendor (programvare) */
  --adobe: #EB1000;
  --norton: #FFC20E;
  --kasp: #06AB4D;
  --avast: #FF7800;
  --bitd: #5C6BC0;
  --eset: #0066B2;

  /* Best-of medaljer */
  --gold: #F59E0B;
  --silver: #94A3B8;
  --bronze: #A16207;

  /* Border radius */
  --r: 10px;
  --rs: 6px;
  --rp: 50px;

  /* Layout */
  --max: 1240px;
  --max-content: 760px;
  --px: clamp(16px, 4vw, 40px);

  /* Fonter */
  --fh: 'Outfit', system-ui, sans-serif;
  --fb: 'DM Sans', system-ui, sans-serif;
  --fm: 'JetBrains Mono', Consolas, monospace;

  /* Skygger */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 32px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 14px 44px rgba(0, 0, 0, 0.18);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ============================================
   2. Base
   ============================================ */

html { scroll-behavior: smooth; }

body {
  font-family: var(--fb);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--fh);
}

img { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { color: var(--accent-d); }

::selection {
  background: var(--accent);
  color: #fff;
}

/* ============================================
   3. Tabular numbers (priser)
   ============================================ */

.gc-price, .sc-price, .p-price,
.cart-item-price, .sticky-price,
.sum-item-price, .det-tot-r,
.gc-orig, .sc-orig, .p-orig,
.cart-item-orig, .sticky-orig,
.rank-price, .podium-price,
.cmp-price, .stat-num {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   4. Accessibility — UI/UX-audit Fase 1A
   ============================================ */

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--accent-l);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip-link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--rs);
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
  font-family: var(--fb);
}

.skip-link:focus { top: 8px; }

/* ============================================
   5. Scroll-margin for sticky nav
   ============================================ */

h1, h2, h3, section, [id] {
  scroll-margin-top: 110px;
}

/* ============================================
   6. Komponent-styling kommer i separate filer
   Se: assets/css/[komponent].css
   eller behold alt i denne filen for små child-themes
   ============================================ */

/* TODO: Migrér styles fra design/-prototyper inn her etter behov.
   Komponenter som skal bygges:
   - .nav (header)
   - .cat-bar (kategori-meny)
   - .gc (mørkt spillkort)
   - .sc (lyst programvarekort)
   - .p-hero (produktside-hero)
   - .cart-drawer
   - .checkout-stepper
   - osv.
*/
