/* Fargerike Kongsberg — Editorial fargehåndverk
   Fonter: Fraunces (display) + Work Sans (body). Farger hentet fra kjedens logo. */

:root {
  --color-bg: #f7f2ea;
  --color-surface: #ffffff;
  --color-charcoal: #201c17;
  --color-text: #26221d;
  --color-text-muted: #6b6259;
  --color-border: #e4dcc9;
  --color-accent: #d9631c;
  --color-accent-dark: #b34f14;
  --color-on-accent: #fbf6ec;

  --swatch-purple: #7570b3;
  --swatch-orange: #f5821f;
  --swatch-green: #7fc242;
  --swatch-yellow: #fdb712;
  --swatch-magenta: #ed017b;

  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;

  --max-width: 1180px;
  --radius: 2px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--color-charcoal);
}
h1 { font-size: clamp(2.6rem, 5vw + 1rem, 4.4rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 2.6vw + 1rem, 2.8rem); font-weight: 500; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; color: var(--color-text); }
.lede { font-size: 1.2rem; line-height: 1.75; color: var(--color-text-muted); max-width: 46ch; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5.5rem 0; }
@media (max-width: 640px) { section { padding: 3.5rem 0; } }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 0.9rem;
}

/* ---------- Fargeprøve-motiv ---------- */
.swatch-row { display: flex; gap: 0.5rem; }
.swatch-row span {
  width: 1.9rem;
  height: 2.3rem;
  clip-path: polygon(0 0, 72% 0, 100% 32%, 100% 100%, 0 100%);
}
.swatch-row.small span { width: 0.9rem; height: 1.1rem; }
.swatch-row span:nth-child(1) { background: var(--swatch-purple); }
.swatch-row span:nth-child(2) { background: var(--swatch-orange); }
.swatch-row span:nth-child(3) { background: var(--swatch-green); }
.swatch-row span:nth-child(4) { background: var(--swatch-yellow); }
.swatch-row span:nth-child(5) { background: var(--swatch-magenta); }

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 2.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--color-charcoal); border-color: var(--color-charcoal); }
.btn-outline:hover { background: var(--color-charcoal); color: var(--color-on-accent); transform: translateY(-2px); }
.btn-ghost-light { background: transparent; color: var(--color-on-accent); border-color: rgba(251,246,236,0.5); }
.btn-ghost-light:hover { background: rgba(251,246,236,0.12); border-color: var(--color-on-accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled { border-color: var(--color-border); box-shadow: 0 6px 24px -18px rgba(32,28,23,0.4); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand img { height: 4.6rem; width: auto; }
.brand-text { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.1; color: var(--color-charcoal); }
.brand-text strong { display: block; font-size: 1.2rem; font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav > .btn { padding: 0.65rem 1.5rem; font-size: 0.9rem; }
.main-nav ul { display: flex; gap: 1.8rem; }
.main-nav ul a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: 0.3rem 0;
}
.main-nav ul a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 2px; background: var(--color-accent);
  transition: right 0.25s ease;
}
.main-nav ul a:hover::after, .main-nav ul a[aria-current="page"]::after { right: 0; }
.main-nav ul a[aria-current="page"] { color: var(--color-charcoal); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 2.4rem; height: 2.4rem; padding: 0.5rem;
}
.nav-toggle span { display: block; height: 2px; background: var(--color-charcoal); margin: 5px 0; transition: transform 0.25s ease, opacity 0.25s ease; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 340px); z-index: 60;
    background: var(--color-bg); flex-direction: column; align-items: flex-start;
    padding: 6.5rem 2rem 2rem; gap: 2rem;
    transform: translateX(100%); transition: transform 0.3s ease;
    border-left: 1px solid var(--color-border);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 1.4rem; font-size: 1.1rem; }
  .main-nav .btn { width: 100%; justify-content: center; }
  body.nav-locked { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero { padding-top: 3.5rem; padding-bottom: 4rem; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.hero-copy .swatch-row { margin-bottom: 1.6rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-figure { position: relative; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; border-radius: var(--radius); }
.hero-figure .figure-tag {
  position: absolute; left: -1.25rem; bottom: -1.25rem;
  background: var(--color-charcoal); color: var(--color-on-accent);
  padding: 1.1rem 1.4rem; max-width: 15rem; font-size: 0.9rem;
  font-family: var(--font-display); font-style: italic;
}
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 26rem; }
  .hero-figure .figure-tag { left: 1rem; bottom: -1rem; }
}

/* ---------- Page hero (undersider) ---------- */
.page-hero { background: var(--color-charcoal); color: var(--color-on-accent); padding: 5rem 0 3.5rem; }
.page-hero h1 { color: var(--color-on-accent); }
.page-hero .lede { color: rgba(251,246,236,0.78); }
.page-hero .eyebrow { color: var(--swatch-yellow); }
.breadcrumb { font-size: 0.85rem; color: rgba(251,246,236,0.6); margin-bottom: 1.2rem; }
.breadcrumb a:hover { color: var(--color-on-accent); }

/* ---------- Sections ---------- */
.section-dark { background: var(--color-charcoal); color: var(--color-on-accent); }
.section-dark h2, .section-dark h3 { color: var(--color-on-accent); }
.section-dark p { color: rgba(251,246,236,0.8); }
.section-dark .eyebrow { color: var(--swatch-yellow); }

.section-head { max-width: 42rem; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Grid utilities ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.8rem; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Kort ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 2rem;
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -28px rgba(32,28,23,0.35); border-color: var(--color-charcoal); }
.card .icon { width: 2.6rem; height: 2.6rem; margin-bottom: 1.2rem; color: var(--color-accent); }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--color-text-muted); margin-bottom: 0; }
.card-link { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1rem; font-weight: 600; font-size: 0.9rem; color: var(--color-accent-dark); }
.card-link svg { width: 1em; height: 1em; flex: none; transition: transform 0.2s ease; }
.card:hover .card-link svg, .case-card:hover .card-link svg { transform: translateX(3px); }

/* Team */
.team-card { text-align: left; }
.team-card .photo { aspect-ratio: 4/5; overflow: hidden; margin-bottom: 1.2rem; border-radius: var(--radius); }
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card .role { color: var(--color-accent-dark); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.6rem; display: block; }

/* Referanser */
.case-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--color-border); overflow: hidden; align-items: stretch; }
.case-card .photo { min-height: 20rem; }
.case-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.case-card .content { padding: 2.6rem; display: flex; flex-direction: column; justify-content: center; background: var(--color-surface); }
.case-card:nth-child(even) { direction: rtl; }
.case-card:nth-child(even) .content { direction: ltr; }
@media (max-width: 780px) { .case-card, .case-card:nth-child(even) { grid-template-columns: 1fr; direction: ltr; } .case-card .photo { min-height: 14rem; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stats .num { font-family: var(--font-display); font-size: clamp(2.2rem, 3vw, 3rem); color: var(--swatch-yellow); }
.stats .label { font-size: 0.9rem; color: rgba(251,246,236,0.75); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Divider */
.divider { border: none; border-top: 1px solid var(--color-border); margin: 0; }

/* Timeline (om oss) */
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid var(--color-border); }
.timeline-item { position: relative; padding-bottom: 2.6rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -2.36rem; top: 0.3rem;
  width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--color-accent);
}
.timeline-year { font-family: var(--font-display); font-size: 1.3rem; color: var(--color-charcoal); }

/* Sortiment */
.product-row { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: center; padding: 3.5rem 0; border-bottom: 1px solid var(--color-border); }
.product-row:last-child { border-bottom: none; }
.product-row img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.tag-list li { border: 1px solid var(--color-border); padding: 0.4rem 0.85rem; font-size: 0.85rem; border-radius: 999px; color: var(--color-text-muted); }
@media (max-width: 780px) { .product-row { grid-template-columns: 1fr; } }

/* Campaign strip */
.campaign-strip {
  background: var(--color-accent); color: var(--color-on-accent);
  padding: 1.1rem 0; text-align: center; font-weight: 600; font-size: 0.95rem;
}

/* Kontakt / skjema */
.contact-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3.5rem; align-items: start; }
.info-list { display: flex; flex-direction: column; gap: 1.6rem; margin-top: 2rem; }
.info-list li { display: flex; gap: 1rem; align-items: flex-start; }
.info-list svg { width: 1.4rem; height: 1.4rem; color: var(--color-accent); flex: none; margin-top: 0.15rem; }
.info-list .label { font-weight: 600; color: var(--color-charcoal); display: block; }
.map-embed { border: 1px solid var(--color-border); margin-top: 2rem; height: 16rem; overflow: hidden; }
.map-embed iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.2) contrast(1.05); }

form.booking { background: var(--color-surface); border: 1px solid var(--color-border); padding: 2.4rem; border-radius: var(--radius); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--color-charcoal); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.75rem 0.9rem; font-family: var(--font-body); font-size: 1rem;
  border: 1px solid var(--color-border); background: var(--color-bg); border-radius: var(--radius);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--color-accent); background: var(--color-surface);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field-hint { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 0.35rem; }
.form-note { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 1rem; }
.success-message {
  background: #eef6e6; border: 1px solid var(--swatch-green); color: #345b1c;
  padding: 1.3rem 1.5rem; border-radius: var(--radius); font-weight: 600;
}
@media (max-width: 780px) { .contact-layout { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { background: var(--color-charcoal); color: var(--color-on-accent); padding: 4.5rem 0; text-align: center; }
.cta-band h2 { color: var(--color-on-accent); }
.cta-band .lede { color: rgba(251,246,236,0.78); margin-left: auto; margin-right: auto; }
.cta-band .swatch-row { justify-content: center; margin: 0 auto 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-charcoal); color: rgba(251,246,236,0.75); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(251,246,236,0.12); }
.footer-brand .brand-text { color: var(--color-on-accent); }
.footer-brand p { color: rgba(251,246,236,0.65); margin-top: 1rem; max-width: 26ch; }
.site-footer h4 { color: var(--color-on-accent); font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer ul li { margin-bottom: 0.7rem; }
.site-footer a:hover { color: var(--color-on-accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 1.6rem; font-size: 0.85rem; }
.footer-bottom p { color: rgba(251,246,236,0.75); margin: 0; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal (påkrevd av Akari Engine-editor) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Skip link / a11y ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-charcoal); color: var(--color-on-accent);
  padding: 0.8rem 1.2rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Misc ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 780px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Lyse overflater (kort, case-innhold) beholder mørk tekst
   uansett om de ligger inni en .section-dark-seksjon ---------- */
.card h3, .team-card h3, .case-card .content h2, .case-card .content h3 {
  color: var(--color-charcoal);
}
.card p, .team-card p, .case-card .content p {
  color: var(--color-text-muted);
}
.case-card .content .eyebrow {
  color: var(--color-accent-dark);
}
.case-card .content .card-link {
  color: var(--color-accent-dark);
}
