/* ============================================================
   PB Håndverkstjeneste — global styles
   Palette: navy #05131B / #0A1B33 · gold #E8C874 / #F4DA9A / #C9A24B
   Fonts:   Sora (headings) · Outfit (body)
   ============================================================ */

:root {
  --ink: #05131B;
  --navy: #0A1B33;
  --gold: #E8C874;
  --gold-light: #F4DA9A;
  --gold-dark: #C9A24B;
  --paper: #FDFDFB;
  --white: #F7F8FA;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--white);
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
::selection { background: var(--gold); color: var(--navy); }

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

/* ---------- keyframes ---------- */
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes goldShimmer { 0% { background-position: 200% center; } 100% { background-position: -200% center; } }
@keyframes floatSoft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ripple { to { transform: scale(3); opacity: 0; } }
@keyframes linkPulse { 0% { transform: scale(1); } 35% { transform: scale(.9); } 70% { transform: scale(1.06); } 100% { transform: scale(1); } }
/* figure slide-ins keep their resting translateX crop (percentage of own width, scales everywhere) */
@keyframes figInLeft { from { opacity: 0; transform: translateX(calc(-52% - 60px)); } to { opacity: 1; transform: translateX(-52%); } }
@keyframes figInRight { from { opacity: 0; transform: translateX(calc(58% + 60px)); } to { opacity: 1; transform: translateX(58%); } }

/* ============================================================
   HERO — exactly one viewport, self-contained (overflow hidden
   so the cutout figures never bleed into the next section)
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  position: relative;
  z-index: 30;
  animation: heroFadeUp .7s ease both;
}

.nav-logo {
  height: clamp(72px, 8vw, 110px);
  width: auto;
  margin: -18px 0;
  filter: brightness(1.25) drop-shadow(0 1px 6px rgba(0, 0, 0, .5));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 15px;
  font-weight: 500;
}

.nav-links a {
  color: rgba(247, 248, 250, .85);
  padding-bottom: 6px;
  position: relative;
  display: inline-block;
  transition: color .25s ease, transform .25s ease;
}
/* animated gold underline sliding in from the left */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.nav-links a:hover { color: var(--gold); transform: translateY(-2px); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a:active { transform: translateY(0) scale(.95); }
.nav-links a.is-clicked { animation: linkPulse .4s ease; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(232, 200, 116, .55);
  color: var(--gold);
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: all .25s ease;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 6px 24px rgba(232, 200, 116, .35);
  transform: translateY(-2px);
}
.nav-cta:active { transform: translateY(0) scale(.96); }

/* click ripple (JS injects .ripple span into the pill buttons) */
.nav-cta, .btn-gold, .btn-outline, .btn-dark-outline {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: .35;
  transform: scale(0);
  animation: ripple .55s ease-out forwards;
  pointer-events: none;
}

/* ---------- centered content ---------- */
.hero-content {
  position: relative;
  z-index: 20;
  pointer-events: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px clamp(24px, 16vw, 320px) 40px;
  min-height: 0;
}

.hero-trust {
  font-size: 14px;
  font-weight: 500;
  color: rgba(247, 248, 250, .8);
  letter-spacing: .01em;
  animation: heroFadeUp .8s ease .5s both;
}
.hero-trust .gold { color: var(--gold); }
.hero-trust strong { font-weight: 600; color: var(--white); }

.trust-link {
  pointer-events: auto;
  border-bottom: 1.5px solid rgba(232, 200, 116, .75);
  padding-bottom: 2px;
  transition: border-color .25s ease;
}
.trust-link:hover { border-color: var(--gold-light); }
.trust-link:hover strong { color: var(--gold); }
.trust-link strong { transition: color .25s ease; }

.hero-title {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 1.12;
  margin: 28px 0 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
  animation: heroFadeUp .9s ease .65s both;
}

.hero-sub {
  font-size: 17px;
  font-weight: 300;
  color: rgba(247, 248, 250, .72);
  max-width: 440px;
  line-height: 1.6;
  margin: 22px 0 0;
  animation: heroFadeUp .9s ease .8s both;
}

/* ---------- CTAs ---------- */
.hero-ctas {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: auto;
  animation: heroFadeUp .9s ease .95s both;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(110deg, var(--gold) 40%, var(--gold-light) 50%, var(--gold) 60%);
  background-size: 200% auto;
  color: var(--navy);
  border-radius: 999px;
  padding: 16px 36px;
  font-size: 15px;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: goldShimmer 4s linear infinite;
}
.btn-gold:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 30px rgba(232, 200, 116, .4);
  color: var(--navy);
}
.btn-gold:active { transform: translateY(0) scale(.98); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: transparent;
  color: var(--gold);
  border: 1.5px solid rgba(232, 200, 116, .6);
  border-radius: 999px;
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 600;
  transition: all .25s ease;
}
.btn-outline:hover {
  background: rgba(232, 200, 116, .12);
  border-color: var(--gold);
  transform: translateY(-2px);
  color: var(--gold-light);
}
.btn-outline:active { transform: translateY(0); }

/* ---------- verified badges ---------- */
.hero-verified {
  margin-top: clamp(36px, 5vh, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: heroFadeUp .9s ease 1.15s both;
}

.hero-verified-label {
  font-size: 13px;
  color: rgba(247, 248, 250, .55);
  letter-spacing: .04em;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-badge {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: rgba(247, 248, 250, .65);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .25s ease, transform .25s ease, border-color .25s ease;
  pointer-events: auto;
  border-bottom: 1.5px solid rgba(232, 200, 116, .75);
  padding-bottom: 4px;
}
.hero-badge:hover { color: var(--gold); transform: translateY(-2px); border-color: var(--gold-light); }

.badge-diamond {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 2px;
  display: inline-block;
  transform: rotate(45deg);
}

/* ---------- scroll cue ---------- */
.scroll-cue {
  margin-top: clamp(28px, 4vh, 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 1;
  transition: opacity .4s ease;
  animation: floatSoft 2.6s ease-in-out infinite;
}
.scroll-cue.is-hidden { opacity: 0; }

.scroll-cue-text {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(247, 248, 250, .45);
}

.scroll-cue-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--gold), transparent);
  display: block;
}

/* ---------- hero figures ----------
   Outer div = parallax transform (JS), inner img = slide-in
   animation. Keeping them separate avoids transform conflicts. */
.hero-figure {
  position: absolute;
  bottom: -3vh;
  z-index: 10;
  pointer-events: none;
  will-change: transform;
}
/* anchor the figures to a centered 1660px band instead of the screen
   edges — on ultrawide monitors they stay close to the content */
.hero-figure-left { left: max(0px, calc((100% - 1660px) / 2)); }
.hero-figure-right { right: max(0px, calc((100% - 1660px) / 2)); }

/* the crop is a translateX % of the image's own width — identical
   framing at every screen size, from desktop down to phone */
.figure-img {
  width: auto;
  max-width: none;
}
.figure-img-left {
  height: 90vh;
  transform: translateX(-52%);
  animation: figInLeft 1s cubic-bezier(.22, 1, .36, 1) .3s both;
}
.figure-img-right {
  height: 98vh;
  transform: translateX(58%);
  animation: figInRight 1s cubic-bezier(.22, 1, .36, 1) .3s both;
}

/* ============================================================
   VÅRE TJENESTER — light section, visually divided from hero
   ============================================================ */
.services {
  position: relative;
  background: var(--paper);
  color: var(--navy);
  min-height: 100vh;
  min-height: 100svh;
  padding: 110px 64px 120px;
  display: flex;
  align-items: center;
}

/* thin gold hairline marking the section boundary */
.services::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  opacity: .7;
}

.services-inner {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 64px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  align-items: start;
}

/* ---------- left column ---------- */
.services-intro {
  position: sticky;
  top: 96px;
}

.services-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 22px;
}

.services-title {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: clamp(34px, 3.2vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 34px;
  text-wrap: balance;
}

.services-lead {
  font-size: 16px;
  font-weight: 300;
  color: rgba(10, 27, 51, .65);
  line-height: 1.65;
  margin: 0 0 38px;
  max-width: 300px;
}

.btn-dark-outline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid rgba(10, 27, 51, .25);
  color: var(--navy);
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: all .3s ease;
}
.btn-dark-outline .arrow { font-size: 15px; }
.btn-dark-outline:hover {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(10, 27, 51, .18);
}

/* ---------- cards grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  height: 580px;
}

.svc-snekker   { grid-area: 1 / 1 / 3 / 2; }
.svc-maling    { grid-area: 1 / 2 / 2 / 3; }
.svc-montering { grid-area: 2 / 2 / 3 / 3; }
.svc-renovering{ grid-area: 1 / 3 / 3 / 4; }

.svc-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  display: block;
  background: var(--navy);
  transition: box-shadow .35s ease;
}
.svc-card:hover { box-shadow: 0 24px 60px rgba(10, 27, 51, .28); }

.svc-media {
  position: absolute;
  inset: 0;
  transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}
.svc-card:hover .svc-media { transform: scale(1.06); }

.svc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.svc-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 19, 27, 0) 45%, rgba(5, 19, 27, .78) 100%);
}

.svc-text {
  position: absolute;
  left: 22px;
  right: 64px;
  bottom: 20px;
  pointer-events: none;
}

.svc-name {
  font-family: 'Sora', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.25;
}

.svc-sub {
  font-size: 13px;
  font-weight: 300;
  color: rgba(247, 248, 250, .75);
  margin-top: 5px;
}

.svc-plus {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(247, 248, 250, .6);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 18px;
  font-weight: 300;
  transition: all .35s ease;
}
.svc-card:hover .svc-plus {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  transform: rotate(90deg);
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s ease var(--d, 0s), transform .8s cubic-bezier(.22, 1, .36, 1) var(--d, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — same design, scaled down
   ============================================================ */
@media (max-width: 1200px) {
  .figure-img-left { height: 76vh; }
  .figure-img-right { height: 84vh; }
  .hero-content { padding-left: 13vw; padding-right: 13vw; }
}

@media (max-width: 1024px) {
  .services { padding: 90px 40px 100px; }
  .services-inner { grid-template-columns: 1fr; gap: 48px; }
  .services-intro { position: static; }
  .services-grid {
    height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .svc-snekker   { grid-area: auto; min-height: 340px; }
  .svc-maling    { grid-area: auto; min-height: 340px; }
  .svc-montering { grid-area: auto; min-height: 340px; }
  .svc-renovering{ grid-area: auto; min-height: 340px; }
}

@media (max-width: 900px) {
  .nav { padding: 16px 24px; }
  .nav-links { gap: 24px; font-size: 14px; }
  .figure-img-left { height: 58vh; }
  .figure-img-right { height: 64vh; }
  .hero-content { padding-left: 32px; padding-right: 32px; }
}

/* nav wraps to two rows: logo + Ring oss on top, links centered below */
@media (max-width: 700px) {
  .nav { flex-wrap: wrap; padding: 14px 20px 10px; }
  .nav-logo { height: 54px; margin: -6px 0; }
  .nav-cta { padding: 8px 16px; font-size: 13px; }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 22px;
    font-size: 13px;
    margin-top: 8px;
  }
}

@media (max-width: 640px) {
  /* let the hero grow if content needs it — figures stay pinned to its bottom edge */
  .hero { height: auto; min-height: 100vh; min-height: 100svh; }
  .hero-content { padding: 20px 24px 32px; }
  .hero-title { font-size: clamp(30px, 8.6vw, 36px); margin-top: 22px; }
  .hero-sub { font-size: 15px; margin-top: 16px; max-width: 320px; }
  .hero-ctas { flex-direction: column; width: 100%; max-width: 320px; margin-top: 26px; }
  .btn-gold, .btn-outline { width: 100%; padding: 14px 28px; }
  .hero-verified { margin-top: 30px; gap: 12px; }
  .scroll-cue { margin-top: 22px; }
  /* same figures, minimized — identical crop thanks to % transform */
  .figure-img-left { height: 36vh; }
  .figure-img-right { height: 42vh; }
  .services { padding: 72px 20px 80px; }
  .services-grid { grid-template-columns: 1fr; }
  .svc-card { min-height: 280px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav, .hero-trust, .hero-title, .hero-sub, .hero-ctas,
  .hero-verified { animation: none; }
  .figure-img-left { animation: none; transform: translateX(-52%); }
  .figure-img-right { animation: none; transform: translateX(58%); }
  .btn-gold { animation: none; }
  .scroll-cue { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ripple { animation: none; display: none; }
  .nav-links a.is-clicked { animation: none; }
  .hero-figure { transform: none !important; }
}
