/* ============================================================
   Morten Aarsland & CO — drens.no
   Gjenskaper dagens design (Nicepage-palett), ryddet opp.
   ============================================================ */
:root {
  --blue:        #143472;   /* palette-1-base  */
  --blue-light:  #7ca2ea;   /* palette-1-light */
  --red:         #db545a;   /* palette-2-base (hover) */
  --yellow:      #f5d654;   /* palette-3-light / accent */
  --yellow-deep: #f1c50e;   /* palette-3-base */
  --grey-light:  #d7d7de;   /* palette-5-light-2 (hero bg) */
  --grey-foot:   #333333;   /* grey-80 (footer) */
  --black:       #000000;
  --white:       #ffffff;
  --ink:         #111111;

  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--blue); color: #fff; padding: 10px 16px; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }

/* ============================================================ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; font-size: .95rem; line-height: 1;
  padding: 19px 50px; border: none; border-radius: 0; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.btn-black { background: var(--black); color: var(--white); letter-spacing: 2px; padding: 21px 60px; }
.btn-black:hover { background: #333; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: var(--white); color: var(--ink); }

/* ============================================================ Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid #e6e6ea;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 104px; padding: 16px 0; gap: 16px; }
.logo img { width: clamp(150px, 16vw, 200px); height: auto; }

.main-nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 6px; padding: 0; }
.nav-list a {
  display: inline-block; padding: 10px 20px; font-family: var(--font-head);
  font-weight: 400; font-size: 1.05rem; color: var(--ink);
  text-transform: none; transition: color .2s;
}
.nav-list a:hover, .nav-list a.active { color: var(--red); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 46px; height: 46px; background: none; border: none; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================ Seksjon 1: Hero */
.section-hero { position: relative; background: var(--grey-light); padding: 80px 0 90px; overflow: hidden; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.38fr 0.74fr; gap: 48px; align-items: center; }

.hero-media { position: relative; display: flex; justify-content: flex-end; align-items: center; }
.hero-frame { position: relative; isolation: isolate; width: 100%; max-width: 600px; }
/* Gul "backing"-blokk som sporer bildestørrelsen og titter 38px ut nede til venstre */
.hero-frame::before {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: var(--yellow); transform: translate(-38px, 38px);
}
/* Prikkemønster bak gulfargen — L-form (2 rader bunn, 3 kolonner venstre) utenfor gulhjørnet */
.hero-dots {
  display: none; /* prikkene midlertidig skjult – fjern denne linja for å vise dem igjen */
  position: absolute; z-index: 1; left: -123px; bottom: -95px;
  width: 320px; height: 460px; pointer-events: none;
  background: url("../images/texture.png") repeat;
  background-position: left bottom;
  -webkit-mask-image:
    linear-gradient(to top, #000 55%, transparent),
    linear-gradient(to right, #000 60%, transparent);
  -webkit-mask-size: 85px 100%, 100% 57px;
  -webkit-mask-position: left bottom, left bottom;
  -webkit-mask-repeat: no-repeat;
  mask-image:
    linear-gradient(to top, #000 55%, transparent),
    linear-gradient(to right, #000 60%, transparent);
  mask-size: 85px 100%, 100% 57px;
  mask-position: left bottom, left bottom;
  mask-repeat: no-repeat;
}
/* Bildet forrest */
.hero-img {
  position: relative; z-index: 3; display: block;
  width: 100%; height: 545px;
  object-fit: cover; object-position: center 28%;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}

.hero-card { position: relative; z-index: 3; background: var(--white); padding: 50px 52px; margin-left: -170px; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.hero-card h1 { font-family: var(--font-head); font-weight: 400; font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.06; color: var(--ink); }
.hero-text { line-height: 1.85; margin-top: 20px; color: #2a2a2a; }
.hero-phone { margin-top: 20px; font-size: 1.3rem; font-family: var(--font-head); font-weight: 400; }
.hero-phone a { color: var(--blue); }
.hero-phone a:hover { color: var(--red); }
.hero-card .btn { margin-top: 30px; }

/* ============================================================ Seksjon 4: Bilde-felt (kun mobil, etter kontakt) */
.section-photo { display: none; background: var(--grey-light); padding: 72px 0; }
.photo-band { position: relative; max-width: 900px; margin-inline: auto; }
/* Gult hjørne som ekko av hero-en */
.photo-band::before {
  content: ""; position: absolute; z-index: 1; inset: 0;
  background: var(--yellow); transform: translate(28px, 28px);
}
.photo-band-img {
  position: relative; z-index: 2; width: 100%; height: 460px;
  object-fit: cover; object-position: center 28%;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}

/* ============================================================ Seksjon 2: Svart */
.section-dark { background: var(--black); color: var(--white); padding: 80px 0; }
.dark-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.dark-text h2 { font-family: var(--font-head); font-weight: 300; font-size: clamp(1.9rem, 4.5vw, 3rem); }
.dark-text p { font-size: 1.125rem; line-height: 2; margin-top: 28px; color: #e6e6e6; }
.dark-text-em { text-shadow: 2px 2px 8px rgba(0,0,0,.4); font-weight: 600; }
.dark-text .btn { margin-top: 40px; font-size: .875rem; }

.dark-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dark-gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* ============================================================ Seksjon 3: Kontakt (blå) */
.section-contact { background: var(--blue); color: var(--white); padding: 70px 0 80px; text-align: center; }
.contact-title { font-family: var(--font-head); font-weight: 300; font-size: clamp(2rem, 5vw, 3.25rem); }
.contact-subtitle { margin-top: 12px; font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
.contact-subtitle a { color: inherit; text-decoration: none; white-space: nowrap; border-bottom: 2px solid var(--yellow); }
.contact-subtitle a:hover { color: var(--yellow); }

.contact-form-wrap { max-width: 760px; margin: 40px auto 0; text-align: left; }
.contact-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: #dbe4f7; }
.field-hint { font-weight: 400; color: #a9bbe0; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 13px 15px; border: 2px solid transparent; border-radius: 0; background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(245,214,84,.35); }
.field textarea { resize: vertical; min-height: 130px; }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn-send { width: 100%; margin-top: 6px; }
.form-status { margin-top: 16px; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: var(--yellow); }
.form-status.err { color: #ffd1d1; }

.contact-line { width: min(912px, 100%); height: 3px; background: var(--white); margin: 56px auto 0; }

.contact-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 760px; margin: 36px auto 0; }
.contact-col h5 { font-family: var(--font-head); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 1.375rem; }
.contact-col p { font-size: 1.05rem; line-height: 1.7; margin-top: 18px; }
.contact-col a:hover { color: var(--yellow); }
.contact-link { color: var(--yellow); font-weight: 700; }
.contact-link:hover { color: var(--white); }

/* ============================================================ Innholdsside (personvern o.l.) */
.page-head { background: var(--blue); color: var(--white); padding: 56px 0; }
.page-head h1 { font-family: var(--font-head); font-weight: 300; font-size: clamp(2rem, 5vw, 3.25rem); }
.page-head p { margin-top: 8px; color: #cfe0f5; }
.legal { padding: 64px 0; }
.legal .container { max-width: 820px; }
.legal h2 { font-family: var(--font-head); font-weight: 600; font-size: 1.45rem; margin: 36px 0 12px; color: var(--blue); }
.legal h2:first-of-type { margin-top: 0; }
.legal p { color: var(--ink-soft, #44545f); margin-bottom: 14px; }
.legal ul { margin: 0 0 16px 20px; color: var(--ink-soft, #44545f); }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--blue); font-weight: 600; }
.legal a:hover { color: var(--red); }
/* Knapper i legal-seksjoner skal beholde sine egne farger, ikke lenkefargen */
.legal a.btn-yellow, .legal a.btn-yellow:hover { color: var(--ink); }
.legal a.btn-black, .legal a.btn-black:hover { color: var(--white); }
.legal .updated { margin-top: 36px; font-size: .9rem; color: var(--muted, #6b7a85); }

/* ============================================================ Footer */
.site-footer { background: var(--grey-foot); color: var(--white); padding: 52px 0 24px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding-bottom: 32px; }
.footer-col h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 1.1rem; color: var(--white); margin-bottom: 12px; }
.footer-col p { font-size: .95rem; line-height: 1.8; color: #d4d4d4; }
.footer-col a { color: #d4d4d4; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px; }
.footer-bottom p { font-size: .85rem; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-size: .85rem; }
.site-footer a:hover { color: var(--yellow); }
@media (max-width: 767px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 575px) {
  .footer-cols { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 10px; }
}

/* ============================================================ Responsive */
@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-card { margin-left: 0; }
  .hero-media { order: -1; justify-content: center; }
  .hero-frame { max-width: 520px; }
  .hero-img { height: 420px; }
  .hero-dots { width: 260px; height: 360px; left: -95px; bottom: -85px; }
  .dark-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .nav-list {
    position: absolute; top: 104px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--white); border-bottom: 1px solid #e6e6ea;
    box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 10px 20px 16px; display: none;
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: 12px 6px; }
  .contact-cols { grid-template-columns: 1fr; gap: 30px; text-align: center; }

  /* Luft rundt logo/meny på mobil (header-inner nullstiller ellers container-paddingen) */
  .header-inner { padding-inline: 20px; }

  /* --- Kun mobil: bildet flyttes ned, gul ramme rundt tekstkortet --- */
  .hero-media { display: none; }              /* skjul hero-bildet på mobil */
  .section-photo { display: block; }          /* vis bilde-feltet etter kontakt */
  /* z-index:auto (overstyrer desktop-kortets z-index:3) så kortet IKKE lager
     egen stacking context – da havner den gule ::before-blokka bak kortet */
  .hero-card { position: relative; z-index: auto; }
  .hero-card::before {
    content: ""; position: absolute; z-index: -1; inset: 0;
    background: var(--yellow); transform: translate(-12px, 12px);
  }
}
@media (max-width: 575px) {
  .contact-form .field-row { grid-template-columns: 1fr; }
  .hero-card { padding: 32px 24px; }
  .hero-img { height: 340px; }
  .hero-dots { display: none; }
  .photo-band::before { transform: translate(14px, 14px); }
  .photo-band-img { height: 300px; }
  .dark-gallery { gap: 10px; }
  .section-hero, .section-dark, .section-contact, .section-photo { padding: 52px 0; }
}
/* ============================================================ Cookie-samtykke */
.cookie-consent {
  position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center;
  padding: 16px; pointer-events: none;   /* banneret blokkerer ikke resten av siden */
}
.cookie-consent[hidden] { display: none; }
/* hidden-attributtet må vinne over display-reglene under */
.cc-settings[hidden], .cc-save[hidden] { display: none; }
.cc-inner {
  pointer-events: auto;
  width: 100%; max-width: 720px;
  background: var(--white); color: var(--ink);
  border-top: 4px solid var(--yellow);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  padding: 24px 26px;
  display: flex; flex-direction: column; gap: 18px;
}
.cc-title { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; }
.cc-text { font-size: .95rem; line-height: 1.6; color: #333; }
.cc-text a { color: var(--blue); font-weight: 600; text-decoration: underline; }
.cc-settings { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid #e6e6ea; padding-top: 16px; }
.cc-option { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; line-height: 1.5; }
.cc-option input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--blue); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cc-btn { padding: 13px 24px; font-size: .8rem; letter-spacing: 1px; }
.cc-btn-primary { background: var(--blue); color: var(--white); }
.cc-btn-primary:hover { background: #0f2657; }
.cc-btn-ghost { background: transparent; color: var(--ink); border: 2px solid #c9c9d2; }
.cc-btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
@media (max-width: 575px) {
  .cookie-consent { padding: 0; }
  .cc-inner { padding: 20px 18px; gap: 14px; }
  .cc-actions { justify-content: stretch; }
  .cc-actions .cc-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
