/* ============================================================
   GJESVIK.NO — Design System
   Palette: Warm cream, sage green, sand
   Fonts:    Cormorant Garamond (headings) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@400;500&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:       #FAF7F2;
  --surface:     #F0EBE3;
  --surface-alt: #E8E1D8;
  --sage:        #7A9E7E;
  --sage-dark:   #4A6741;
  --sage-light:  #C8DBC9;
  --sand:        #C5A882;
  --sand-light:  #EDE0D0;
  --text:        #2C2C2C;
  --text-muted:  #7A7370;
  --white:       #FFFFFF;
  --radius:      8px;
  --radius-lg:   16px;
  --transition:  0.25s ease;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.07);
  --shadow:      0 4px 18px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.13);
  --max-w:       1000px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--cream);
}

img { display: block; max-width: 100%; height: auto; }
a   { color: var(--sage-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--sage); }
ul  { list-style: none; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 600; }
h3 { font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 400; }
h4 { font-size: 1.1rem; font-weight: 500; font-family: 'DM Sans', sans-serif; }

p  { margin-bottom: 1em; color: var(--text); }
p:last-child { margin-bottom: 0; }

/* ── Utility ──────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin-inline: auto; padding-inline: 1.5rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .65rem 1.6rem;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .03em;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  border: none;
  line-height: 1.4;
}
.btn-primary {
  background: var(--sage);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--sage-dark);
  color: var(--white);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--sage-dark);
  border: 1.5px solid var(--sage);
}
.prose .btn-outline, a.btn-outline {
  text-decoration: none;
}
.btn-outline:hover {
  background: var(--sage);
  color: var(--white);
  transform: translateY(-1px);
}

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-alt);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: .85rem;
}
.nav-brand { display: flex; flex-direction: column; gap: 0; line-height: 1; position: relative; padding-left: 44px; }
.nav-brand::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--sage-dark) 0%, var(--sage) 50%, var(--sand) 100%);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}
.nav-brand .brand-name {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  font-style: normal;
  color: var(--text);
  white-space: nowrap;
}.nav-brand .brand-title {
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: .1rem;
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text-muted);
  position: relative;
  padding-bottom: .2rem;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: var(--sage);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--sage-dark); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .4rem;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--surface-alt);
    box-shadow: var(--shadow);
    padding: .5rem 1.5rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding-block: .75rem; border-bottom: 1px solid var(--surface); font-size: 1rem; }
  .nav-links a:last-child { border-bottom: none; }
}

/* ── Hero split (homepage) ────────────────────────────────── */
.hero-split {
  background: var(--surface);
  padding-block: 3.5rem;
  border-bottom: 1px solid var(--surface-alt);
}
.hero-split-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-eyebrow {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: .75rem;
}
.hero-split-text h1 { margin-bottom: .75rem; }
.hero-split-text p  { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 0; }
.hero-split-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.hero-split-img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
@media (max-width: 700px) {
  .hero-split-inner { grid-template-columns: 1fr; }
  .hero-split-img   { display: none; }
}

/* ── Homepage service tiles ───────────────────────────────── */
.services-grid-home {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.service-tile {
  display: block;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition);
}
.service-tile:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  color: inherit;
}
.service-tile-img {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.service-tile:hover .service-tile-img { transform: scale(1.04); }
.service-tile-body {
  padding: 1.1rem 1.25rem 1.4rem;
}
.service-tile-body h3 {
  font-size: 1.15rem;
  margin-bottom: .35rem;
  color: var(--text);
}
.service-tile-body p {
  font-size: .88rem;
  color: var(--text-muted);
  margin: 0;
}


.hero {
  position: relative;
  min-height: 324px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(30, 40, 30, .55) 0%,
    rgba(74, 103, 65, .40) 50%,
    rgba(30, 40, 30, .20) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 4rem 1.5rem 3.5rem;
  max-width: var(--max-w);
  margin-inline: auto;
  width: 100%;
}
.hero-content h1 {
  color: var(--white);
  max-width: 600px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
  margin-bottom: .5rem;
}
.hero-content p {
  color: rgba(255,255,255,.9);
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 1.5rem;
}
.hero-content .btn-primary {
  background: var(--white);
  color: var(--sage-dark);
}
.hero-content .btn-primary:hover {
  background: var(--sand-light);
  color: var(--sage-dark);
}

/* ── Section helpers ──────────────────────────────────────── */
.section { padding-block: 4rem; }
.section-alt { background: var(--surface); }
.section-dark { background: var(--sage-dark); }

.section-header { margin-bottom: 2.5rem; }
.section-header h2 { margin-bottom: .5rem; }
.section-header p  { color: var(--text-muted); max-width: 560px; }

.divider {
  width: 48px; height: 3px;
  background: var(--sage);
  border-radius: 2px;
  margin-top: .75rem;
}

/* ── About preview (homepage) ─────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 680px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-img-wrap { order: -1; max-width: 260px; margin-inline: auto; }
}
.about-img-wrap img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 3/4;
}
.about-text h2 { margin-bottom: .75rem; }
.about-text .divider { margin-bottom: 1.25rem; }
.about-text p { color: var(--text-muted); }
.about-text .btn { margin-top: 1.25rem; }

/* ── Service cards grid ───────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.service-card a { color: inherit; }
.service-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.service-card:hover .service-card-img { transform: scale(1.04); }
.service-card-body {
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.service-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: .3rem;
  color: var(--text);
}
.service-card-body p {
  font-size: .85rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: .75rem;
}
.service-card-link {
  font-size: .8rem;
  font-weight: 500;
  color: var(--sage-dark);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  letter-spacing: .02em;
}
.service-card-link::after { content: '→'; transition: transform var(--transition); }
.service-card:hover .service-card-link::after { transform: translateX(3px); }

/* ── Page hero (inner pages) ──────────────────────────────── */
.page-hero {
  background: var(--surface);
  padding-block: 3.5rem 2.5rem;
  border-bottom: 1px solid var(--surface-alt);
}
.page-hero h1 { color: var(--text); margin-bottom: .5rem; }
.page-hero .page-hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
}
.page-hero .divider { margin-top: .75rem; }

/* ── Prose content ────────────────────────────────────────── */
.prose { max-width: 680px; }
.prose h2 { margin-bottom: .75rem; margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-bottom: .5rem; margin-top: 1.5rem; color: var(--sage-dark); }
.prose p  { color: var(--text-muted); }
.prose ul { margin: .5rem 0 1em 1.2rem; list-style: disc; }
.prose ul li { color: var(--text-muted); margin-bottom: .3rem; }
.prose a  { color: var(--sage-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ── Pricing table ────────────────────────────────────────── */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.pricing-table thead tr {
  background: var(--sage-dark);
  color: var(--white);
}
.pricing-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pricing-table td {
  padding: .9rem 1.25rem;
  font-size: .9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface);
  vertical-align: top;
}
.pricing-table td:first-child { color: var(--text); font-weight: 500; }
.pricing-table td:last-child  { color: var(--sage-dark); font-weight: 500; white-space: nowrap; }
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table tbody tr:nth-child(even) { background: var(--surface); }
.pricing-table tbody tr:hover { background: var(--sand-light); transition: background var(--transition); }

.pricing-note {
  background: var(--sand-light);
  border-left: 4px solid var(--sand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  font-size: .9rem;
  color: var(--text-muted);
}
.pricing-note strong { color: var(--text); }

@media (max-width: 600px) {
  .pricing-table th:nth-child(2), .pricing-table td:nth-child(2) { display: none; }
}

/* ── Contact cards ────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.contact-card-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: .5rem;
}
.contact-card h4 {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.contact-card a, .contact-card p {
  font-size: 1rem;
  color: var(--text);
  margin: 0;
}
.contact-card a:hover { color: var(--sage-dark); }

.location-note {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── Tjenester detail page ────────────────────────────────── */
.tjeneste-hero-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.back-link:hover { color: var(--sage-dark); }
.back-link::before { content: '←'; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--sage-dark);
  color: rgba(255,255,255,.75);
  padding-block: 3rem 1.5rem;
  margin-top: 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1;
  position: relative;
  padding-left: 44px;
}
.footer-brand::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--sage-dark) 0%, var(--sage) 50%, var(--sand) 100%);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}
.footer-brand .brand-name {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  font-style: normal;
  color: var(--white);
  white-space: nowrap;
}
.footer-brand .brand-title {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sage-light);
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: 1.5rem;
}
.footer-nav a {
  font-size: .875rem;
  color: rgba(255,255,255,.7);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--white); }
.footer-logo img {
  border-radius: var(--radius);
  opacity: .85;
}
.footer-copy {
  text-align: center;
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  padding-top: 1.25rem;
}
