/* Bruker design-tokens.css fra shared/ som felles kilde.
   Endre font/farger der — gjelder baade nettside og RIFT Lab. */

/* Font lastes via <link> i HTML — ingen @import her */

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

:root {
  /* Aliaser som peker til design-tokens */
  --white: var(--color-white, #fafaf8);
  --off-white: var(--color-off-white, #f5f4f0);
  --warm-gray: var(--color-warm-gray, #e8e4e0);
  --text: var(--color-black, #1a1a1a);
  --text-secondary: var(--color-grey-500, #555);
  --text-muted: var(--color-grey-300, #999);
  --accent: var(--color-accent, #1a1a1a);
  --border: var(--color-border, #e0dcd6);
}

body {
  font-family: var(--font-family, 'Inter', sans-serif);
  color: var(--text);
  background: #fff;
  line-height: var(--line-height, 1.6);
  -webkit-font-smoothing: antialiased;
}

/* Tilgjengelighet — synlig fokus ved tastaturnavigasjon */
:focus-visible {
  outline: 2px solid var(--accent, #1a1a1a);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ========== Header ========== */
.header {
  padding: 1.2rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 1px 0 var(--border); }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo {
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.logo span { color: var(--text-muted); font-weight: 300; }
.logo-icon { height: 1.4em; width: auto; margin-right: 0.4rem; vertical-align: middle; }
.nav { display: flex; gap: 2.5rem; align-items: center; }
.nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav a:hover, .nav a.nav-active { color: var(--text); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: 0.3s;
}

/* ========== Hero slideshow ========== */
.hero {
  position: relative;
  height: 85vh;
  margin-top: 60px;
  overflow: hidden;
}
.hero-slides {
  position: absolute;
  inset: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.02) 50%);
  z-index: 1;
}
.hero-caption {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.hero-caption-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.hero-caption-tag {
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 2;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 1.4rem;
  animation: float 2.5s ease-in-out infinite;
}
.hero-scroll:hover { color: #fff; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ========== Page hero (subpages) ========== */
.page-hero {
  padding: 10rem 0 3rem;
}
.page-hero h1 {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* ========== Intro ========== */
.intro { padding: 5rem 0; }
.intro-grid { max-width: 700px; }
.intro-lead {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}
.intro-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

/* ========== Section labels ========== */
.section { padding: 5rem 0; }
.section-alt { background: #fff; }
.section-dark { background: var(--accent); color: #fff; }
.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3rem;
}
.section-label-light { color: rgba(255,255,255,0.5); }

/* ========== Projects ========== */
.project-feature {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 2rem;
}
.project-feature-img {
  width: 100%;
  aspect-ratio: 16/7;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
  transition: opacity 0.3s;
}
.project-feature-img img, .project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: filter 1s ease;
}
.project-feature:hover .project-feature-img img,
.project-card:hover .project-img img {
  filter: grayscale(0);
}
.project-feature-img,
.project-img {
  position: relative;
  overflow: hidden;
}
.project-feature-img::after,
.project-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0.35;
  transition: background 1s ease, opacity 1s ease;
  pointer-events: none;
}
.project-feature:hover .project-feature-img::after,
.project-card:hover .project-img::after {
  opacity: 0;
}
.project-feature:hover .project-feature-img { opacity: 0.9; }
.project-feature-info { display: flex; justify-content: space-between; align-items: baseline; }
.project-feature-info h3 {
  font-size: 1.1rem;
  font-weight: 500;
}
.project-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.project-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.project-img {
  width: 100%;
  aspect-ratio: 3/2;
  border-radius: 2px;
  margin-bottom: 0.8rem;
  transition: opacity 0.3s;
}
.project-img-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 2;
  pointer-events: none;
}
.project-card:hover .project-img-label {
  opacity: 1;
}

/* ========== CTA ========== */
.cta-section { padding: 6rem 0; }
.cta-inner { text-align: center; }
.cta-inner h2 {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}
.cta-inner p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.9rem 2.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.3s;
}
.btn:hover { background: #333; }

/* ========== About page ========== */
.about-content { max-width: 700px; }
.about-block { margin-bottom: 3rem; }
.about-block h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.about-block p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* ========== Team ========== */
.team-group-photo {
  margin-bottom: 2rem;
}
.team-group-img {
  width: 100%;
  aspect-ratio: 21/9;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
}
.about-intro {
  max-width: 640px;
  margin: 0 auto 2rem;
  text-align: center;
}
.about-intro p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}
.team-contact-shared {
  text-align: center;
  margin-bottom: 4rem;
  padding: 1.5rem 0;
}
.team-contact-shared .email-link {
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.team-contact-shared .email-link:hover { text-decoration: underline; }
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}
.team-card { text-align: center; min-width: 0; overflow-wrap: break-word; }
.team-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 2px;
  margin-bottom: 1rem;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  min-height: 0;
}
.team-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.team-role {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.team-email {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.team-email:hover { text-decoration: underline; }
.team-phone {
  font-size: 0.82rem;
  margin-top: 0.15rem;
}
.team-phone a {
  color: var(--text-secondary);
  text-decoration: none;
}
.team-phone a:hover { text-decoration: underline; }
.footer-email {
  color: inherit;
  text-decoration: none;
}
.footer-email:hover { text-decoration: underline; }

/* ========== Contact ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h2 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.contact-lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.contact-details { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.contact-item a, .contact-item p {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.6;
}
.contact-item a:hover { text-decoration: underline; }

/* ========== Footer ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-left {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-left span { color: var(--text-muted); font-weight: 300; }
.footer-center p {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}
.footer-right p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1.2rem;
  }
  .nav-toggle { display: flex; }
  .hero h1 { font-size: 2.4rem; }
  .hero { min-height: 70vh; }
  .project-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-inner { flex-direction: column; gap: 0.8rem; text-align: center; }
  .page-hero { padding: 8rem 0 2rem; }
  .page-hero h1 { font-size: 2.2rem; }
  .project-feature-img img, .project-img img { filter: none; }
  .project-feature-img::after, .project-img::after { display: none; }
  .project-img-label {
    opacity: 1;
    align-items: flex-end;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
    color: #fff !important;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ========== Prosjektside ========== */

.project-hero {
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  margin-top: 72px; /* header height */
}
.project-hero img {
  width: 100%;
  height: 70vh;
  object-fit: cover;
  display: block;
}

.project-back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: var(--text-sm);
  color: var(--color-grey-500);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color .2s;
}
.project-back:hover { color: var(--color-black); }

.project-header { margin-bottom: 2rem; }
.project-header h1 {
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  margin-bottom: .5rem;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font-size: var(--text-sm);
  color: var(--color-grey-500);
}

.project-status {
  font-size: var(--text-sm);
  color: var(--color-grey-500);
}

.project-content-section {
  background: #fff;
}

.project-description {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-grey-500);
  margin-bottom: 2rem;
}

/* To-kolonne: info venstre (smalere), plantegning høyre */
.project-split {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 4rem;
  align-items: start;
  margin-bottom: 3rem;
}
.project-split.no-plan {
  grid-template-columns: 1fr;
  max-width: 600px;
}
.project-split-left {}
.project-split-right {
  display: flex;
  align-items: start;
  justify-content: center;
}

.project-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.project-info-item h3 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-grey-300);
  margin-bottom: .3rem;
}
.project-info-item p,
.project-info-item li {
  font-size: var(--text-sm);
  color: var(--color-black);
  line-height: 1.6;
}
.project-info-item ul {
  list-style: none;
  padding: 0;
}

.project-plan-img {
  width: 100%;
  border-radius: 0;
}

.project-gallery-section { margin-bottom: 3rem; }
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-item {
  cursor: pointer;
  overflow: hidden;
  border-radius: 2px;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}
.gallery-item:hover img { opacity: .85; }

/* ========== Lightbox ========== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  z-index: 10000;
  opacity: .7;
  transition: opacity .2s;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-close { top: 1rem; right: 1rem; font-size: 2.5rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }

/* ========== Prosjektside responsivt ========== */

@media (max-width: 768px) {
  .project-hero img { height: 50vh; }
  .project-header h1 { font-size: 2rem; }
  .project-split { grid-template-columns: 1fr; gap: 2rem; }
  .project-gallery { grid-template-columns: repeat(2, 1fr); }
  .lightbox-prev, .lightbox-next { font-size: 2rem; }
}

@media (max-width: 480px) {
  .project-gallery { grid-template-columns: 1fr; }
}
