/* Gullvika Naturbarnehage v3 — spruce green + squirrel orange, Fredoka/Mulish */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/fredoka-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/mulish-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --gran: #2c5540;
  --gran-dyp: #22452f;
  --skog: #4e7d46;
  --ekorn: #d9731a;
  --ekorn-mork: #b95e0f;
  --fjord: #47799b;
  --sky: #e7f0f4;
  --bjork: #fbf7ef;
  --hvit: #ffffff;
  --ink: #253128;
  --ink-mild: #4b574e;
  --linje: #e3ddd0;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 2px 10px rgba(37, 49, 40, 0.07);
  --shadow-lift: 0 8px 24px rgba(37, 49, 40, 0.12);
  --font-display: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Mulish", "Segoe UI", sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bjork);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--gran);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--fjord); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gran); }
ul { margin: 0 0 1em; padding-left: 1.2em; }
:focus-visible {
  outline: 3px solid var(--ekorn);
  outline-offset: 2px;
  border-radius: 2px;
}
.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gran);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
  padding: 0.72rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ekorn); color: #fff; }
.btn-primary:hover { background: var(--ekorn-mork); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.85); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.btn-outline { border-color: var(--gran); color: var(--gran); }
.btn-outline:hover { background: var(--gran); color: #fff; }
.btn-tel { background: var(--gran); color: #fff; }
.btn-tel:hover { background: var(--gran-dyp); color: #fff; }
.btn-small { font-size: 0.94rem; padding: 0.5rem 1.05rem; }
.text-link {
  font-weight: 700;
  color: var(--skog);
  text-decoration: none;
}
.text-link::after { content: " →"; }
.text-link:hover { color: var(--gran); text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--hvit);
  border-bottom: 1px solid var(--linje);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}
.brand img { width: auto; height: 54px; }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav ul {
  display: flex;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav ul a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.99rem;
  text-decoration: none;
}
.site-nav ul a:hover { background: var(--sky); color: var(--gran); }
.site-nav ul a[aria-current="page"] { background: var(--gran); color: #fff; }
.nav-contact { display: flex; align-items: center; gap: 0.9rem; }
.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gran);
  font-weight: 800;
  font-size: 0.99rem;
  text-decoration: none;
  white-space: nowrap;
}
.nav-phone:hover { color: var(--ekorn); }
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 2px solid var(--gran);
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gran);
  cursor: pointer;
}
.nav-toggle-bar {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after { top: 5px; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(78vh, 680px);
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(78deg, rgba(24, 46, 33, 0.82) 0%, rgba(24, 46, 33, 0.55) 44%, rgba(24, 46, 33, 0.08) 78%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: clamp(3rem, 8vw, 5rem);
  max-width: 1160px;
}
.hero-content h1 {
  color: #fff;
  max-width: 13em;
  margin-bottom: 0.4em;
}
.hero-lead {
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.15rem;
  max-width: 34em;
  margin-bottom: 1.6em;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--gran);
  font-weight: 800;
  font-size: 0.98rem;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow);
}
.pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ekorn);
  flex: none;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.8rem; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.hero-facts li {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  backdrop-filter: blur(2px);
}

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--gran-dyp), var(--gran) 55%, #3a6a4e);
  color: #fff;
  padding-block: clamp(2.6rem, 6vw, 4rem);
}
.page-hero h1 { color: #fff; margin-bottom: 0.25em; }
.page-hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.12rem;
  max-width: 42em;
  margin: 0;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.8rem, 7vw, 4.6rem); }
.section-sky { background: var(--sky); }
.section-head { max-width: 44em; margin-bottom: 2.2rem; }
.section-head p { color: var(--ink-mild); font-size: 1.08rem; }

/* ---------- Cards ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.value-card {
  background: var(--hvit);
  border: 1px solid var(--linje);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow);
}
.value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--sky);
  color: var(--gran);
  margin-bottom: 1rem;
}
.value-card h3 { margin-bottom: 0.4em; }
.value-card p { color: var(--ink-mild); }

.news-card {
  background: var(--hvit);
  border: 1px solid var(--linje);
  border-left: 5px solid var(--skog);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.news-card p { color: var(--ink-mild); flex: 1; }

/* ---------- Department cards ---------- */
.dept-card {
  background: var(--hvit);
  border: 1px solid var(--linje);
  border-top: 6px solid var(--gran);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.dept-card h3 { font-size: 1.45rem; margin-bottom: 0.35em; }
.dept-card p { color: var(--ink-mild); }
.dept-ages {
  align-self: flex-start;
  font-weight: 800;
  font-size: 0.86rem;
  border-radius: 999px;
  padding: 0.18rem 0.75rem;
  margin-bottom: 0.9rem;
}
.dept-ekorn { border-top-color: var(--ekorn); }
.dept-ekorn .dept-ages { background: #fbe9d8; color: var(--ekorn-mork); }
.dept-skog { border-top-color: var(--skog); }
.dept-skog .dept-ages { background: #e4eedd; color: #3c6236; }
.dept-fjord { border-top-color: var(--fjord); }
.dept-fjord .dept-ages { background: #e0ebf3; color: #35617f; }
.dept-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

/* Department tags on /avdelinger/ */
.dept-tag {
  display: inline-block;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 999px;
  padding: 0.22rem 0.85rem;
  margin-bottom: 0.9rem;
}
.tag-ekorn { background: #fbe9d8; color: var(--ekorn-mork); }
.tag-skog { background: #e4eedd; color: #3c6236; }
.tag-fjord { background: #e0ebf3; color: #35617f; }
.dept-section .split-text .btn { margin-top: 0.6rem; }

/* ---------- Split sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center;
}
.split-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}
.split-media { margin: 0; }
.split-media-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.split-media-duo img { aspect-ratio: 3 / 4; }
.split-reverse .split-media { order: 2; }
.split-reverse .split-text { order: 1; }
.split-text h2 { margin-bottom: 0.55em; }
.split-text p { color: var(--ink-mild); }

/* ---------- Lists ---------- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
}
.check-list li {
  position: relative;
  padding-left: 1.75em;
  margin-bottom: 0.55em;
  color: var(--ink-mild);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  background: var(--skog);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round" d="M4 12.5 10 18 20 6"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round" d="M4 12.5 10 18 20 6"/></svg>') center / contain no-repeat;
}

/* ---------- Photo grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.photo-grid figure { margin: 0; }
.photo-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.photo-grid figcaption {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-mild);
  padding-top: 0.5rem;
}

/* ---------- Quote panel (grunnsyn) ---------- */
.quote-panel {
  background: var(--gran);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.8rem) clamp(1.6rem, 5vw, 3.2rem);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.quote-mark {
  font-family: var(--font-display);
  font-size: 5.5rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.22);
  margin: 0 0 -2.6rem;
}
.quote-panel blockquote { margin: 0; }
.quote-panel blockquote p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.3;
  margin: 0;
}
.quote-source {
  margin: 0.9rem 0 0;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}
.prose-2col {
  columns: 2;
  column-gap: 2.6rem;
  max-width: 60em;
}
.prose-2col p { break-inside: avoid; color: var(--ink-mild); }

/* ---------- Staff ---------- */
.staff-group { margin-bottom: 1.9rem; }
.staff-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}
.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex: none;
}
.dot-ekorn { background: var(--ekorn); }
.dot-skog { background: var(--skog); }
.dot-fjord { background: var(--fjord); }
.dot-gran { background: var(--gran); }
.staff-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.staff-list li {
  background: var(--hvit);
  border: 1px solid var(--linje);
  border-radius: var(--radius-s);
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
}
.staff-list span { color: var(--ink-mild); font-size: 0.93rem; }

/* ---------- Info cards ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.info-card {
  background: var(--hvit);
  border: 1px solid var(--linje);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.info-card p { color: var(--ink-mild); }
.info-big {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  color: var(--gran) !important;
  margin-bottom: 0.2em;
}

/* ---------- Phone cards (kontakt) ---------- */
.phones-heading { margin: 2.6rem 0 1.2rem; }
.phone-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.phone-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--hvit);
  border: 1px solid var(--linje);
  border-top: 6px solid var(--gran);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.phone-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); color: var(--ink); }
.phone-ekorn { border-top-color: var(--ekorn); }
.phone-skog { border-top-color: var(--skog); }
.phone-fjord { border-top-color: var(--fjord); }
.phone-gran { border-top-color: var(--gran); }
.phone-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--gran); }
.phone-ages { color: var(--ink-mild); font-size: 0.9rem; }
.phone-number { font-weight: 800; font-size: 1.18rem; margin-top: 0.45rem; color: var(--ink); }

/* ---------- Contact form ---------- */
.form-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: start;
}
.form-intro p { color: var(--ink-mild); }
.contact-form {
  background: var(--hvit);
  border: 1px solid var(--linje);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 1.1rem; }
.form-row label {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.optional { font-weight: 400; color: var(--ink-mild); }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bjork);
  border: 1.5px solid var(--linje);
  border-radius: var(--radius-s);
  padding: 0.65rem 0.85rem;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 3px solid rgba(217, 115, 26, 0.45);
  outline-offset: 0;
  border-color: var(--ekorn);
}
.form-row textarea { resize: vertical; }

/* ---------- CTA strip ---------- */
.section-cta { padding-block: clamp(2.4rem, 6vw, 3.6rem); }
.cta-strip {
  background: var(--gran);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.8rem) clamp(1.6rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-strip h2 { color: #fff; margin-bottom: 0.3em; }
.cta-strip p { color: rgba(255, 255, 255, 0.9); margin: 0; max-width: 36em; }
.cta-strip p a { color: #fff; font-weight: 800; }
.cta-strip .btn-outline { border-color: #fff; color: #fff; }
.cta-strip .btn-outline:hover { background: #fff; color: var(--gran); }
.cta-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- Treeline + footer ---------- */
.treeline { line-height: 0; }
.end-sky .treeline { background: var(--sky); }
.treeline svg { width: 100%; height: clamp(34px, 6vw, 80px); display: block; }
.site-footer {
  background: var(--gran);
  color: rgba(255, 255, 255, 0.9);
  padding-top: 2.6rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}
.footer-col h2 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.7em;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.45em; font-size: 0.97rem; }
.footer-col a { color: #fff; }
.footer-col a:hover { color: #f6c894; }
.footer-brand p { font-size: 0.97rem; color: rgba(255, 255, 255, 0.82); }
.footer-logo {
  display: inline-block;
  background: #fff;
  border-radius: var(--radius-s);
  padding: 0.5rem 0.8rem;
  margin-bottom: 1rem;
}
.footer-logo img { height: 44px; width: auto; }
.footer-note { font-size: 0.88rem; color: rgba(255, 255, 255, 0.68); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-block: 1.1rem;
}
.footer-bottom p { margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.68); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .phone-grid { grid-template-columns: repeat(2, 1fr); }
  .staff-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--hvit);
    border-bottom: 1px solid var(--linje);
    box-shadow: var(--shadow-lift);
    padding: 1rem clamp(1.1rem, 4vw, 2rem) 1.4rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0.15rem; }
  .site-nav ul a { padding: 0.65rem 0.9rem; border-radius: var(--radius-s); }
  .nav-contact { justify-content: space-between; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .cards-3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-media { order: 0; }
  .split-reverse .split-text { order: 0; }
  .info-grid { grid-template-columns: 1fr; }
  .form-wrap { grid-template-columns: 1fr; }
  .prose-2col { columns: 1; }
  .hero { min-height: min(72vh, 540px); }
  .hero-lead { font-size: 1.05rem; }
  .brand img { height: 44px; }
}

@media (max-width: 520px) {
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .phone-grid { grid-template-columns: 1fr; }
  .staff-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .split-media-duo { gap: 0.7rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .phone-card { transition: none; }
  .btn:hover, .phone-card:hover { transform: none; }
}
