/* Delt stilark for heile sida — komponentar og layout.
   Fargepalett/tokens ligg i palette.css (IKKJE del av dette delte stilarket). */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Outfit", "Inter", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-forest-dark);
}

h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.7rem, 2.5vw + 1rem, 2.4rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }

p { color: var(--color-text-muted); }

a {
  color: var(--color-forest);
  text-decoration: none;
}

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

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

section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-forest {
  background: var(--color-forest);
  color: var(--color-white);
}
.section-forest h2, .section-forest h3 { color: var(--color-white); }
.section-forest p { color: rgba(255,255,255,0.85); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  background: rgba(var(--color-accent-rgb), 0.12);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.15rem;
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-accent-dark); }

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.6);
  color: var(--color-white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--color-forest);
  color: var(--color-forest);
}
.btn-outline-dark:hover { background: var(--color-forest); color: var(--color-white); }

/* ---------- Status banner ---------- */
.status-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #7a3b12;
  color: #fff8ee;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  position: relative;
}
.status-banner.show { display: flex; }
.status-banner .status-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 242, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15, 30, 55, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  /* Header carries more items (nav + external links + lang switch) than the
     rest of the page, so it needs more room than --container-width gives —
     otherwise a nav with many items wraps a lone link onto its own line. */
  max-width: 1400px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-forest-dark);
}

.logo-img { height: 40px; width: auto; flex-shrink: 0; }
.logo-img-footer { height: 34px; }
.logo span { color: var(--color-accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text);
  padding: 0.3rem 0;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.15s ease;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav a[aria-current="page"] {
  color: var(--color-forest-dark);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  margin-left: 1rem;
  flex-shrink: 0;
}
.lang-switch a {
  color: var(--color-text-muted);
  padding: 0.2rem 0.4rem;
}
.lang-switch a.active {
  color: var(--color-forest-dark);
  text-decoration: underline;
}
.lang-switch span { color: rgba(0,0,0,0.2); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--color-forest-dark);
}

@media (max-width: 1300px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
    box-shadow: var(--shadow);
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    width: 100%;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-forest) 0%, var(--color-forest-light) 60%, var(--color-hero-end) 100%);
  color: var(--color-white);
  padding: 5rem 0 6rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 85% 20%, rgba(var(--color-sky-rgb), 0.35), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,0.12), transparent 45%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.hero h1 { color: var(--color-white); margin-bottom: 1rem; }
.hero p { color: rgba(255,255,255,0.88); margin-bottom: 2rem; }
.hero .btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-disc {
  width: min(320px, 80%);
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.25));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 1.75rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15,30,55,0.06);
}

.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  font-size: 1.5rem;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}
.section-head.left { text-align: left; margin: 0 0 3rem; }

/* ---------- Info list ---------- */
.info-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}
.info-list li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--color-white);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.info-list .tag {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--color-accent-dark);
}

/* ---------- Team ---------- */
.person-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.person-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto 1rem;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-forest);
}
.person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.person-role {
  color: var(--color-accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ---------- Events ---------- */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.event-card {
  display: flex;
  gap: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15,30,55,0.06);
}
.event-date {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.event-day {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--color-forest-dark);
  line-height: 1;
}
.event-month {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}
@media (max-width: 560px) {
  .event-card { flex-direction: column; }
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: linear-gradient(140deg, var(--color-bg-alt), var(--color-mist));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-forest-light);
  font-size: 2rem;
  overflow: hidden;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Caddy book slider ---------- */
.cb-viewer {
  max-width: 460px;
  margin: 0 auto;
}
.cb-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}
.cb-frame img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  user-select: none;
}
.cb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-forest);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.cb-nav:hover { background: var(--color-white); }
.cb-prev { left: -8px; }
.cb-next { right: -8px; }

.cb-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.cb-counter {
  font-weight: 600;
  color: var(--color-text-muted);
  min-width: 90px;
  text-align: center;
}

@media (max-width: 560px) {
  .cb-nav { width: 38px; height: 38px; font-size: 1.3rem; }
  .cb-prev { left: 4px; }
  .cb-next { right: 4px; }
  .cb-controls { gap: 0.7rem; }
  .cb-controls .btn { padding: 0.7rem 1rem; font-size: 0.88rem; }
}

/* ---------- Tilgjenge ---------- */
/* Synleg berre for skjermlesarar - t.d. <caption> som forklarar ein tabell. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Sponsor logos ---------- */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}
.sponsor-logo-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
}
.sponsor-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.sponsor-logo-col {
  width: 1%;
  white-space: nowrap;
}
.sponsor-logo-table {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

/* ---------- Table (schedule) ---------- */
.table-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid rgba(15,30,55,0.08);
}
th { background: var(--color-bg-alt); font-family: "Outfit", sans-serif; }
tr:last-child td { border-bottom: none; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-banner h2, .cta-banner p { color: var(--color-white); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-forest-dark);
  color: rgba(255,255,255,0.85);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 1rem;
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--color-accent); }
.footer-list { list-style: none; display: grid; gap: 0.6rem; }
.social-row { display: flex; gap: 0.9rem; margin-top: 1rem; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { background: var(--color-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: rgba(255,255,255,0.6);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.badge {
  display: inline-block;
  background: var(--color-bg-alt);
  color: var(--color-forest);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

