/* Single Page Portfolio CSS - AK47-F Modern Design */

/* Custom Color Palette */
:root {
  --color-dark: #120700;
  --color-primary: #ff7300;
  --color-secondary: #ffc286;
  --color-accent: #ffc400;
  --color-white: #ffffff;
  --color-black: #000000;
  /* NOTE: Full-bleed portfolio grid strip on homepage (behind tiles + captions only). */
  --color-projects-panel: #383838;
  /* NOTE: “Hvordan vi jobber” strip — mid grey (left) → very dark grey (right), matches panel tone. */
  --color-features-gradient-end: #151515;

  /* NOTE: Shared neutral surfaces/overlays to keep gray styling consistent across pages. */
  --bg-page-gradient: linear-gradient(180deg, #fafafa 0%, #f3f3f3 100%);
  --overlay-black-35: rgba(0, 0, 0, 0.35);
  --overlay-white-16: rgba(255, 255, 255, 0.16);
  --border-white: var(--color-white);
  --surface-neutral: rgba(31, 31, 31, 0.05);
  --border-neutral: rgba(31, 31, 31, 0.12);

  /* NOTE: Shared typography scale (kept equal to current visual sizes). */
  --font-family-base: 'Readex Pro', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-hero-title: clamp(2.25rem, 6vw, 4.5rem);
  --font-size-section-title: clamp(1.5rem, 3vw, 2.25rem);
  --font-size-section-kicker: 0.85rem;
  --font-size-body-md: 1rem;
  --font-size-body-sm: 0.95rem;
  --font-size-card-title: 1.05rem;
  --font-size-caption-sm: 0.92rem;
  --font-size-breadcrumb: 0.78rem;
  --line-height-tight: 1.05;
  --line-height-title: 1.2;
  --line-height-relaxed: 1.6;
  --line-height-loose: 1.7;
  --line-height-kicker: 1.35;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Timeline phase colors (5 phases): dark greys to orange scale */
  --timeline-phase-0: #383838; /* Brukeranalyse */
  --timeline-phase-1: #4a4a4a; /* Konseptutvikling */
  --timeline-phase-2: #5c5c5c; /* Prototype */
  --timeline-phase-3: #ff9a3d; /* Validering */
  --timeline-phase-4: #ff7300; /* Ferdigstilling */
}

/* NOTE: One box model everywhere; pages that load Tailwind already use border-box—this keeps plain CSS pages aligned. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Single Page Body - With Parallax Scrolling */
.single-page-body {
  font-family: var(--font-family-base);
  margin: 0;
  padding: 0;
  height: auto;
  width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  /* NOTE: Default global page background (very light gray gradient) across all pages. */
  background: var(--bg-page-gradient);
}

/* Right-side vertical navigation */
.side-nav {
  position: fixed;
  top: 50%;
  right: 1.25rem;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem;
  border-radius: 16px;
  background: var(--overlay-black-35);
  backdrop-filter: blur(10px);
}

.side-nav__content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.side-nav__toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--color-white);
  padding: 0;
  cursor: pointer;
}

.side-nav__toggle-icon {
  display: block;
  width: 18px;
  height: 18px;
  margin-top: 10px;
}

.side-nav__link {
  color: var(--color-white);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  opacity: 0.9;
}

.side-nav__link:hover {
  opacity: 1;
}

.side-nav__divider {
  height: 1px;
  background: var(--overlay-white-16);
  margin: 0.25rem 0;
}

/* Language switch (UI only) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-white);
  user-select: none;
}

.lang-switch__label {
  font-size: var(--font-size-section-kicker);
  font-weight: var(--font-weight-semibold);
  opacity: 0.85;
}

.lang-switch__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lang-switch__track {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--overlay-white-16);
  border: 1px solid var(--border-white);
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
}

.lang-switch__thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--color-primary);
  transform: translateX(0);
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-switch:focus-within .lang-switch__track {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.lang-switch__input:checked + .lang-switch__track .lang-switch__thumb {
  transform: translateX(18px);
}

/* Hero (redesign) */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh; /* NOTE: mobile-safe viewport unit */
  overflow: hidden;
  display: grid;
  align-items: end;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* NOTE: ensures full-screen cover without exceptions */
  object-position: center;
  filter: saturate(0.8);
  /* NOTE: Prevent global transition utility from animating clip switches. */
  transition: none;
}

/* NOTE: Crop me-drawing clip tighter (~25%) while preserving full-bleed hero sizing. */
.hero-video[data-hero-video-clip='me-drawing'] {
  transform: scale(1.25);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78),
    rgba(0, 0, 0, 0.15) 60%,
    rgba(0, 0, 0, 0.05)
  );
}

.hero-triangle-logo {
  position: absolute;
  top: 1.25rem;
  /* Align with the centered hero content container (same left edge as .hero-content padding). */
  left: max(1.25rem, calc((100vw - 70rem) / 2));
  z-index: 2;
  height: 27.3px;
  width: auto;
  pointer-events: none; /* Decorative mark; does not block navigation/inputs */
  opacity: 0.95;
}

.hero-logo-mark {
  height: 100%;
  width: auto;
  display: block;
}

.not-found-page {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(
    90deg,
    var(--color-projects-panel) 0%,
    var(--color-features-gradient-end) 100%
  );
}

.not-found-graphic {
  width: min(70vw, 420px);
  height: auto;
  display: block;
}

.not-found-logo {
  position: fixed;
  top: 1.25rem;
  left: max(1.25rem, calc((100vw - 70rem) / 2));
  pointer-events: auto;
  z-index: 20;
  transform: scale(0.75);
  transform-origin: top left;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 6rem 1.25rem 2.5rem 1.25rem;
  max-width: 70rem;
  width: 100%;
  margin: 0 auto;
  color: var(--color-white);
}

.hero-title {
  margin: 0 0 1rem 0;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
  line-height: var(--line-height-tight);
  font-size: var(--font-size-hero-title);
  text-shadow: 0 8px 22px var(--overlay-black-35);
}

.hero-subtitle {
  margin: 0;
  max-width: 48rem;
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-relaxed);
  opacity: 0.9;
  text-shadow: 0 6px 18px var(--overlay-black-35);
}

.hero-cta,
.inquiry-cta {
  color: var(--color-white);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  background: #000000;
  border: none;
  border-radius: 14px;
  padding: 1rem 1.25rem;
}

.hero-cta {
  display: inline-block;
  margin-top: 1.75rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.hero-cta:hover,
.inquiry-cta:hover {
  transform: translateY(-1px);
}

.hero-cta:hover {
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.32);
}

.hero-cta:active,
.inquiry-cta:active {
  transform: translateY(0);
}

/* White section (template) */
.section {
  position: relative;
  width: 100%;
}

.section--white {
  background: var(--color-white);
  color: var(--color-dark);
}

.section-inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.section-title {
  margin: 0 0 0.75rem 0;
  font-size: var(--font-size-section-title);
  line-height: var(--line-height-title);
  letter-spacing: -0.01em;
  font-weight: var(--font-weight-semibold);
}

.section-lead {
  margin: 0 0 2rem 0;
  max-width: 48rem;
  line-height: var(--line-height-loose);
  opacity: 0.9;
}

/* Spacing helper for content added after grids */
.section-lead--after-grid {
  margin-top: 2rem;
}

/* NOTE: Responsive section banner image that never scales wider than its original width. */
.section-banner-image {
  display: block;
  width: 100%;
  max-width: 1920px;
  height: auto;
  margin: 0 0 1.5rem 0;
}

/* NOTE: Keep inline portfolio summary CTA as plain black text link. */
.portfolio-summary-link,
.portfolio-summary-link:visited,
.portfolio-summary-link:hover,
.portfolio-summary-link:focus,
.portfolio-summary-link:active {
  color: #000;
}

/* NOTE: Shared visual style for all inline internal text links across page copy (semibold weight). */
.internal-text-link,
.internal-text-link:visited,
.internal-text-link:hover,
.internal-text-link:focus,
.internal-text-link:active {
  color: #000;
  font-weight: var(--font-weight-semibold);
}

.category-hero-media {
  position: relative;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 1.5rem;
  background: #000;
}

.category-hero-video {
  display: block;
  width: 100%;
  height: min(600px, 65vh);
  object-fit: cover;
  object-position: center;
  filter: saturate(0.88);
  transition: none;
}

/* NOTE: Category pages start hero media at top; breadcrumb stays overlaid on the image. */
section[aria-label='Kategori side'] .section-inner {
  padding-top: 0;
}

section[aria-label='Kategori side'] .breadcrumb {
  position: absolute;
  top: 1.25rem;
  z-index: 4;
  left: max(1.25rem, calc((100vw - 70rem) / 2 + 1.25rem));
  right: max(1.25rem, calc((100vw - 70rem) / 2 + 1.25rem));
  margin: 0;
}

section[aria-label='Kategori side'] .breadcrumb .breadcrumb__link {
  color: var(--color-white);
  opacity: 0.82;
}

section[aria-label='Kategori side'] .breadcrumb .breadcrumb__link:hover {
  opacity: 1;
}

section[aria-label='Kategori side'] .breadcrumb .breadcrumb__link[aria-current='page'] {
  opacity: 0.95;
}

section[aria-label='Kategori side'] .breadcrumb .breadcrumb__sep {
  color: var(--color-white);
  opacity: 0.58;
}

/* NOTE: Keeps strip spacing consistent with other content gaps on category pages. */
.category-ideas-strip-section {
  margin-top: 2rem;
}

/* NOTE: Enforce top spacing for injected strip on category pages (also covers fallback markup). */
section[aria-label='Kategori side'] .ideas-strip {
  margin-top: 2rem;
}

/* Section header helpers */
.section-head {
  position: relative;
}

.section-kicker {
  margin: 0 0 0.75rem 0;
  font-size: var(--font-size-section-kicker);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* NOTE: Shared breadcrumb navigation for all non-landing pages. */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem 0;
  font-size: var(--font-size-breadcrumb);
  letter-spacing: 0.02em;
  line-height: var(--line-height-kicker);
}

.breadcrumb__link {
  color: var(--color-dark);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 160ms ease;
}

.breadcrumb__link:hover {
  opacity: 0.75;
}

.breadcrumb__link[aria-current='page'] {
  opacity: 0.75;
}

.breadcrumb__sep {
  opacity: 0.5;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.service-card {
  grid-column: span 12;
  border: 1px solid var(--border-neutral);
  border-radius: 12px;
  padding: 1.25rem;
  background: var(--color-white);
  /* NOTE: Shared compact height so all service rectangles are smaller and equal. */
  height: 9rem;
  overflow: hidden;
}

.service-card--link {
  color: inherit;
  text-decoration: none;
}

.service-card--link:hover {
  border-color: rgba(31, 31, 31, 0.28);
}

/* Note: highlights Produktdesign card with primary border stroke */
.service-card--primary-stroke {
  border-color: var(--color-primary);
}

.service-title {
  margin: 0 0 0.5rem 0;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-card-title);
  letter-spacing: -0.01em;
}

.service-text {
  margin: 0;
  line-height: var(--line-height-relaxed);
  opacity: 0.85;
}

/* NOTE: Media service card fills the shared card box and crops to match neighboring cards. */
.service-card--media {
  padding: 0;
  overflow: hidden;
}

.service-card__media-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.service-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-neutral);
  border-radius: 999px;
  background: var(--surface-neutral);
  color: var(--color-dark);
  text-decoration: none;
  font-size: var(--font-size-breadcrumb);
  line-height: var(--line-height-title);
  letter-spacing: 0.01em;
}

.service-tag:hover {
  background: var(--surface-neutral);
}

.pricing-estimator {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.pricing-estimator__services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.pricing-service-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'label check'
    'price check';
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-neutral);
  border-radius: 12px;
  background: var(--color-white);
  color: var(--color-dark);
  text-align: left;
  cursor: pointer;
}

.pricing-service-card__label {
  grid-area: label;
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.01em;
  text-align: left;
}

.pricing-service-card__price {
  grid-area: price;
  margin-left: 0;
  font-size: 0.88rem;
  opacity: 0.78;
  white-space: nowrap;
  text-align: left;
}

.pricing-service-card__check {
  grid-area: check;
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  min-height: 1.35rem;
  flex: 0 0 1.35rem;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid var(--border-neutral);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-section-kicker);
  color: transparent;
}

.pricing-service-card.is-selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-white);
}

.pricing-service-card.is-selected .pricing-service-card__check {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--color-white);
}

.pricing-service-card.is-selected .pricing-service-card__price {
  opacity: 0.95;
}

.pricing-estimator__summary {
  border: 1px solid var(--border-neutral);
  border-radius: 12px;
  padding: 1rem;
  background: var(--surface-neutral);
}

.pricing-estimator__summary-title {
  margin: 0 0 0.75rem 0;
  font-size: var(--font-size-body-md);
  font-weight: var(--font-weight-semibold);
}

.pricing-estimator__summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.pricing-estimator__summary-item {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: var(--font-size-body-sm);
}

.pricing-estimator__summary-name {
  opacity: 0.9;
}

.pricing-estimator__summary-price {
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.pricing-estimator__summary-empty {
  opacity: 0.7;
  font-size: var(--font-size-caption-sm);
}

.pricing-estimator__total {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-neutral);
  display: grid;
  gap: 0.25rem;
}

.pricing-estimator__total-label {
  font-size: 0.88rem;
  opacity: 0.7;
}

.pricing-estimator__total-value {
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: var(--font-weight-bold);
}

.pricing-process-list {
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.pricing-process-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  max-width: 62ch;
}

.pricing-process-list__number {
  font-size: 2rem;
  line-height: 1;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

.pricing-process-list__text {
  margin: 0;
  font-size: 0.98rem;
  line-height: var(--line-height-relaxed);
}

.pricing-process-section {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    var(--color-projects-panel) 0%,
    var(--color-features-gradient-end) 100%
  );
}

.pricing-process-section .section-title,
.pricing-process-section .section-lead,
.pricing-process-section .pricing-process-list__item {
  color: var(--color-white);
}

.pricing-process-section .inquiry-cta {
  margin-top: 1.75rem;
  background: var(--color-white);
  color: var(--color-dark);
  border: 1px solid var(--border-neutral);
}

.pricing-process-section .inquiry-cta:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-dark);
}

/* About page team section */
.about-top-graphic {
  position: relative;
  margin: 0 0 1.5rem 0;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
}

/* NOTE: Article template hero image follows content width (no full-bleed). */
.section--article-template .about-top-graphic {
  width: 100%;
  left: auto;
  transform: none;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* NOTE: Crop article hero image to 16:9 frame. */
.section--article-template .about-top-graphic__img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-top-graphic__img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
}

.about-top-graphic__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1rem 0 0;
}

/* NOTE: Breadcrumb overlay aligned to shared content container, with light color for contrast on image. */
.about-top-graphic__breadcrumb {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  color: var(--color-white);
}

.about-top-graphic__breadcrumb .breadcrumb__link,
.about-top-graphic__breadcrumb .breadcrumb__sep {
  color: var(--color-white);
  opacity: 0.85;
}

.about-top-graphic__breadcrumb .breadcrumb__link:hover,
.about-top-graphic__breadcrumb .breadcrumb__link[aria-current='page'] {
  opacity: 1;
}

.about-top-graphic__logo {
  position: absolute;
  top: 50%;
  left: max(1.25rem, calc((100vw - 70rem) / 2 + 1.25rem));
  transform: translateY(-50%);
  z-index: 2;
  height: clamp(1.4rem, 3.2vw, 2.4rem);
  width: auto;
  display: block;
  pointer-events: none;
}

/* NOTE: "Vi er" intro text pulses slowly (fade in -> hold -> fade out). */
.about-top-graphic__intro-wrap {
  position: absolute;
  top: calc(50% - 3.2rem);
  left: max(1.25rem, calc((100vw - 70rem) / 2 + 1.25rem));
  transform: none;
  z-index: 2;
  pointer-events: none;
  animation: aboutIntroPulse 7s ease-in-out infinite;
  opacity: 0;
}

.about-top-graphic__intro {
  /* NOTE: Keep pure `.section-kicker` typography; only color is overridden for image contrast. */
  font-family: 'Jura', sans-serif;
  text-transform: none;
  color: var(--color-white);
}

@keyframes aboutIntroPulse {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  65% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* NOTE: Om oss starts with full-bleed hero artwork, so remove default section top padding. */
section[aria-label='Oss'] .section-inner {
  padding-top: 0;
}

.about-team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.about-team-card {
  margin: 0;
  background: var(--color-white);
}

.about-team-card__img {
  display: block;
  width: 100%;
  /* NOTE: Enforce stable 3:4 frame with explicit height so intrinsic image ratio does not override crop. */
  height: clamp(15rem, 26vw, 20rem);
  object-fit: cover;
  object-position: center;
  background: var(--surface-neutral);
}

/* NOTE: Story image keeps full width with natural height (no forced portrait crop). */
.about-story-image {
  height: auto;
  aspect-ratio: auto;
  object-fit: cover;
  background: transparent;
  margin-bottom: 1rem;
}

.about-team-card__meta {
  padding: 0.9rem 1rem 1rem;
}

.about-team-card__name {
  margin: 0 0 0.25rem 0;
  font-size: var(--font-size-card-title);
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.about-team-card__role {
  margin: 0;
  line-height: 1.5;
  opacity: 0.8;
}

.about-team-card__email {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: var(--font-size-caption-sm);
  color: var(--color-dark);
  text-decoration: none;
  opacity: 0.75;
}

.about-team-card__email:hover {
  color: var(--color-primary);
  opacity: 1;
}

/* Tips/news page article cards */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.article-card {
  margin: 0;
  border: 1px solid var(--border-neutral);
  background: var(--color-white);
}

.article-card__link {
  display: block;
  color: var(--color-dark);
  text-decoration: none;
}

.article-card__img {
  display: block;
  width: 100%;
  /* NOTE: Enforce stable 3:4 frame with explicit height so intrinsic image ratio does not override crop. */
  height: clamp(14rem, 24vw, 19rem);
  object-fit: cover;
  object-position: center;
  background: var(--surface-neutral);
}

.article-card__body {
  padding: 0.9rem 1rem 1rem;
}

.article-card__title {
  margin: 0 0 0.35rem 0;
  font-size: var(--font-size-card-title);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.article-card__excerpt {
  margin: 0;
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-relaxed);
  opacity: 0.86;
}

/* Article template (alternating text/image rows) */
.section--article-template .section-inner {
  max-width: 70rem;
  padding-top: 0;
}

.article-row__text {
  max-width: 37rem; /* NOTE: Keep measure narrow for easier desktop reading. */
  line-height: var(--line-height-loose);
}

.article-row__title {
  margin: 0 0 0.7rem 0;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.article-row__text p {
  margin: 0 0 0.85rem 0;
  opacity: 0.9;
}

.article-nav-buttons {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.article-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-black);
  border-radius: 0;
  background: var(--color-white);
  color: var(--color-black);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.01em;
}

.article-nav-button:hover {
  background: var(--surface-neutral);
}

/* Features section */
.section--features .section-inner {
  padding-bottom: 2rem;
}

/* NOTE: Keep gallery strip directly attached to the four-feature banner on home page. */
.section--features .feature-banner {
  margin-bottom: 0;
}

/* Quotes/testimonials section */
.section--quotes {
  background: var(--color-white);
}

.quotes-marquee {
  overflow: hidden;
  background: var(--color-white);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.quotes-track {
  display: flex;
  width: max-content;
  animation: quotes-scroll 48s linear infinite;
}

.quotes-grid {
  display: flex;
  gap: 1rem;
  padding-right: 1rem;
}

.quote-card {
  background: transparent;
  border: none;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  align-items: start;
  gap: 1rem;
  width: min(42rem, calc(100vw - 3rem));
  flex: 0 0 auto;
}

.quote-card__text {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: var(--line-height-loose);
  color: var(--color-dark);
  font-family: 'Readex Pro', cursive;
  font-style: italic;
}

.quote-card__media {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.quote-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quote-card__avatar {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  object-position: center;
  border-radius: 999px;
  background: var(--surface-neutral);
}

.quote-card__name {
  margin: 0;
  font-size: var(--font-size-caption-sm);
  color: var(--color-dark);
  opacity: 0.8;
}

@keyframes quotes-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.feature-banner {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 2rem;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 4vw, 1.5rem);
  min-height: clamp(20rem, 52vh, 36rem);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    90deg,
    var(--color-projects-panel) 0%,
    var(--color-features-gradient-end) 100%
  );
  color: var(--color-white);
}

.feature-points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: clamp(1.25rem, 3.5vw, 2.75rem);
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
}

.feature-point {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  line-height: var(--line-height-relaxed);
}

.feature-point__text {
  opacity: 0.92;
}

/* NOTE: Keep inline feature link visually consistent with surrounding feature text. */
.feature-point__inline-link,
.feature-point__inline-link:visited,
.feature-point__inline-link:hover,
.feature-point__inline-link:focus,
.feature-point__inline-link:active {
  color: inherit;
  font-weight: var(--font-weight-semibold);
}

/* Note: utility for highlighting specific text in primary color */
.text-primary {
  color: var(--color-primary);
}

.feature-icon {
  flex: 0 0 auto;
  /* ~= 2 text heights (line-height: 1.6) for a strong visual rhythm */
  width: 3.2em;
  height: 3.2em;
  display: block;
  margin-top: 0;
}

/* NOTE: Title ends with “:”; block + gap separates lead line from body copy in each point. */
.feature-banner .feature-point__text strong {
  display: block;
  margin-bottom: 0.65em;
  color: var(--color-white);
  font-weight: var(--font-weight-semibold);
}

@media (max-width: 1024px) {
  .feature-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-banner {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .feature-points {
    grid-template-columns: 1fr;
  }

  .quotes-grid {
    padding-right: 0.75rem;
  }

  .quote-card {
    grid-template-columns: 4.5rem 1fr;
    width: min(32rem, calc(100vw - 2rem));
  }

  .quote-card__avatar {
    width: 4.25rem;
    height: 4.25rem;
  }
}

/* Timeline section */
.timeline {
  margin-top: 2rem;
}

.timeline-anchors {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

.timeline-anchor {
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  opacity: 0.85;
}

.timeline-anchor--time {
  opacity: 0.9;
  display: none;
}

.timeline-track-wrap {
  position: relative;
  padding-top: 2.75rem;
  margin-bottom: 1.5rem;
}

.timeline-track {
  position: relative;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-neutral);
  border: 1px solid var(--border-neutral);
  overflow: hidden;
}

.timeline-labels {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2.5rem;
  pointer-events: none;
}

/* NOTE: Dedicated mobile-only start/end labels for timeline scale. */
.timeline-mobile-anchor {
  display: none;
}

.timeline-segments {
  position: absolute;
  inset: 0;
  display: flex;
}

.timeline-segment {
  height: 100%;
  width: 0%;
}

.timeline-segment[data-segment='0'] {
  background: var(--timeline-phase-0); /* Brukeranalyse */
}
.timeline-segment[data-segment='1'] {
  background: var(--timeline-phase-1); /* Konseptutvikling */
}
.timeline-segment[data-segment='2'] {
  background: var(--timeline-phase-2); /* Prototype */
}
.timeline-segment[data-segment='3'] {
  background: var(--timeline-phase-3); /* Validering */
}
.timeline-segment[data-segment='4'] {
  background: var(--timeline-phase-4); /* Ferdigstilling */
}

.timeline-handles {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  pointer-events: none;
}

.timeline-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--color-white);
  border: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
  cursor: ew-resize;
  touch-action: none;
}

.timeline-handle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.timeline-handle-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: var(--font-size-section-kicker);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  color: var(--color-dark);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-neutral);
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

.timeline-summary {
  margin-top: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border-neutral);
  background: var(--surface-neutral);
  padding: 1.25rem;
}

.timeline-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
}

.timeline-summary-item__name {
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
}

.timeline-summary-item__value {
  opacity: 0.8;
}

/* Match summary text color to timeline segments */
.timeline-summary-item[data-phase-summary='0'] .timeline-summary-item__name,
.timeline-summary-item[data-phase-summary='0'] .timeline-summary-item__value {
  color: var(--timeline-phase-0);
  opacity: 1;
}
.timeline-summary-item[data-phase-summary='1'] .timeline-summary-item__name,
.timeline-summary-item[data-phase-summary='1'] .timeline-summary-item__value {
  color: var(--timeline-phase-1);
  opacity: 1;
}
.timeline-summary-item[data-phase-summary='2'] .timeline-summary-item__name,
.timeline-summary-item[data-phase-summary='2'] .timeline-summary-item__value {
  color: var(--timeline-phase-2);
  opacity: 1;
}
.timeline-summary-item[data-phase-summary='3'] .timeline-summary-item__name,
.timeline-summary-item[data-phase-summary='3'] .timeline-summary-item__value {
  color: var(--timeline-phase-3);
  opacity: 1;
}
.timeline-summary-item[data-phase-summary='4'] .timeline-summary-item__name,
.timeline-summary-item[data-phase-summary='4'] .timeline-summary-item__value {
  color: var(--timeline-phase-4);
  opacity: 1;
}

@media (max-width: 768px) {
  :root {
    --timeline-mobile-left-gap: 0.9rem;
  }

  .timeline-anchors {
    display: none;
  }

  .timeline-track-wrap {
    position: relative;
    display: block;
    min-height: 15rem;
    /* NOTE: Reserve space for fixed start/end labels around the vertical scale. */
    padding-left: var(
      --timeline-mobile-left-gap
    ); /* NOTE: Keeps the vertical timeline column offset from the left edge. */
    padding-top: 1.5rem;
    padding-bottom: 1.75rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
  }

  .timeline-mobile-anchor {
    position: absolute;
    left: var(--timeline-mobile-left-gap);
    transform: none;
    font-size: 0.9rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
    color: var(--color-dark);
    opacity: 0.85;
    white-space: normal;
    text-align: left;
    pointer-events: none;
    z-index: 3;
    display: block;
  }

  .timeline-mobile-anchor--end {
    top: 0;
  }

  .timeline-mobile-anchor--start {
    bottom: 0;
  }

  .timeline-track {
    position: absolute;
    left: var(--timeline-mobile-left-gap);
    top: 1.5rem;
    bottom: 1.75rem;
    width: 2.25rem;
    height: auto;
  }

  .timeline-segments {
    flex-direction: column-reverse;
  }

  .timeline-handles {
    position: absolute;
    left: var(--timeline-mobile-left-gap);
    right: auto;
    width: 2.25rem;
    top: 1.5rem;
    bottom: 1.75rem;
    height: auto;
  }

  .timeline-handle {
    width: 22px;
    height: 22px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: ns-resize;
  }

  .timeline-labels {
    position: absolute;
    left: calc(var(--timeline-mobile-left-gap) + 2.25rem + 0.75rem);
    right: 0;
    top: 0;
    bottom: 0;
    height: auto;
    pointer-events: none;
  }

  .timeline-handle-label {
    position: absolute;
    left: 0;
    transform: translateY(-50%);
    font-size: 0.8rem;
    background: transparent;
    border: 0;
    padding: 0;
    border-radius: 0;
    white-space: normal;
    text-align: left;
  }

  .timeline-summary-item__name {
    display: none;
  }
}

/* Inquiry form */
.inquiry-form {
  margin-top: 2rem;
  border-radius: 16px;
  border: none;
  background: var(--surface-neutral);
  padding: 1.25rem;
}

/* NOTE: Application form heading displayed in top-left on desktop and mobile. */
.inquiry-form__title {
  margin: 0 0 1rem 0;
  font-size: var(--font-size-section-title);
  line-height: var(--line-height-title);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  color: var(--color-dark);
}

.inquiry-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  grid-column: span 12;
}

.field--full {
  margin-top: 1rem;
}

.field__label {
  display: block;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.field__input,
.field__textarea {
  width: 100%;
  /* Prevent padding + borders from overflowing the grid column */
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid var(--border-neutral);
  background: var(--color-white);
  padding: 0.9rem 1rem;
  font-family: inherit;
  font-size: var(--font-size-body-md);
  line-height: 1.4;
}

.field__textarea {
  resize: vertical;
  min-height: 140px;
}

.field__input:focus-visible,
.field__textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.inquiry-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.inquiry-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}

/* NOTE: Keep warning text left and CTA button right in inquiry footer on desktop. */
.inquiry-footer .inquiry-note {
  order: 1;
}

.inquiry-footer .inquiry-cta {
  order: 2;
}

.inquiry-cta:hover {
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.2);
}

.inquiry-note {
  margin: 0;
  max-width: 52rem;
  line-height: var(--line-height-relaxed);
  opacity: 0.85;
}

@media (min-width: 768px) {
  .field {
    grid-column: span 6;
  }
}

/* Projects grid */
.section--projects .section-inner {
  padding-top: 0;
}

/* NOTE: Breakout wrapper: dark band sits under section heading; padding-top adds grey strip above image row. */
.projects-grid-panel {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-top: 2rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-bottom: 2.5rem;
  /* Same left→right greys as `.feature-banner` (“Hvordan vi jobber”). */
  background: linear-gradient(
    90deg,
    var(--color-projects-panel) 0%,
    var(--color-features-gradient-end) 100%
  );
}

.projects-grid-panel .project-tile {
  color: var(--color-white);
}

.ideas-strip {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 1rem;
}

.ideas-strip__link {
  display: block;
  text-decoration: none;
}

.ideas-strip__grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(8rem, 1fr);
  gap: 0;
  overflow: hidden;
}

.ideas-strip__item {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-neutral);
}

.ideas-strip__item img,
.ideas-strip__item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-page-body {
  background: linear-gradient(
    90deg,
    var(--color-projects-panel) 0%,
    var(--color-features-gradient-end) 100%
  );
}

.gallery-page {
  margin: 0;
  padding: 0;
}

/* NOTE: Gallery copy block under grid: less padding above; more space between category tags and kicker. */
main.gallery-page section[aria-label='Om idegalleriet'] .section-inner {
  padding-top: 2rem;
}

main.gallery-page section[aria-label='Om idegalleriet'] .service-tags {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
}

.gallery-grid__item {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.gallery-grid__item img,
.gallery-grid__item video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox__media {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__media img,
.gallery-lightbox__media video {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.gallery-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  border: none;
  background: transparent;
  color: var(--color-white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  border: none;
  background: transparent;
  padding: 0.4rem;
  cursor: pointer;
}

.gallery-lightbox__nav img {
  width: 1.2rem;
  height: auto;
  filter: invert(1);
  display: block;
}

.gallery-lightbox__nav--prev {
  left: 0.75rem;
}

.gallery-lightbox__nav--prev img {
  transform: scaleX(-1);
}

.gallery-lightbox__nav--next {
  right: 0.75rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.projects-sentinel {
  width: 100%;
  height: 1px;
}

.project-tile {
  display: block;
  text-decoration: none;
  color: var(--color-dark);
}

.project-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-neutral);
}

.project-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  filter: saturate(0.95);
}

.project-meta {
  padding-top: 0.9rem;
}

.project-title {
  margin: 0 0 0.35rem 0;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  font-size: var(--font-size-card-title);
  line-height: 1.25;
}

.project-tile:hover .project-thumb__img {
  transform: scale(1.06);
}

/* Project pages: shared hero layout (`section--project-hero-template`) with thumbnail rail navigation. */
.section--project-hero-template {
  padding: 0;
}

.project-hero-gallery {
  display: flex;
  flex-direction: column;
  width: 100%;
  /* NOTE: Space after full-bleed hero (doubled rhythm vs former ~2.5rem + 1rem gap). */
  margin-bottom: 5rem;
}

.project-hero-stage {
  --project-hero-thumb-w: clamp(4rem, 9vw, 5.6rem);
  /* NOTE: Left edge of `.section-inner` / hero text column; used to center thumb rail in the gutter. */
  --project-hero-text-start: max(1.25rem, calc((100vw - 70rem) / 2 + 1.25rem));
  position: relative;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: auto;
  min-height: min(100vh, 60rem);
  min-height: min(100svh, 60rem);
  overflow: hidden;
  display: grid;
  align-items: end;
  background: var(--color-black);
}

.project-hero-stage__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.project-hero-stage__media img,
.project-hero-stage__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.9);
}

.project-hero-stage__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78),
    rgba(0, 0, 0, 0.15) 60%,
    rgba(0, 0, 0, 0.05)
  );
}

/* NOTE: Breadcrumb on image; horizontal inset matches `.section-inner` text (same as `.hero-content`). */
.project-hero-stage__breadcrumb {
  position: absolute;
  top: 1.25rem;
  z-index: 4;
  left: max(1.25rem, calc((100vw - 70rem) / 2 + 1.25rem));
  right: max(1.25rem, calc((100vw - 70rem) / 2 + 1.25rem));
  margin: 0;
}

.project-hero-stage__breadcrumb .breadcrumb__link {
  color: var(--color-white);
  opacity: 0.8;
}

.project-hero-stage__breadcrumb .breadcrumb__link:hover {
  opacity: 1;
}

.project-hero-stage__breadcrumb .breadcrumb__link[aria-current='page'] {
  opacity: 0.95;
}

.project-hero-stage__breadcrumb .breadcrumb__sep {
  color: var(--color-white);
  opacity: 0.55;
}

.project-hero-stage__content {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  padding: 5rem 1.25rem 2.5rem;
  max-width: 70rem;
  width: 100%;
  margin: 0 auto;
  color: var(--color-white);
}

.project-hero-stage__title {
  margin: 0 0 1rem 0;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
  line-height: var(--line-height-tight);
  font-size: clamp(2rem, 5vw, 3.75rem);
  text-shadow: 0 8px 22px var(--overlay-black-35);
}

.project-hero-stage__lead {
  margin: 0 0 1rem 0;
  max-width: 48rem;
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-relaxed);
  opacity: 0.9;
  text-shadow: 0 6px 18px var(--overlay-black-35);
}

.project-template-thumbs {
  position: static;
  display: grid;
  gap: 0.65rem;
  width: 100%;
}

.project-template-thumb {
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.project-template-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.project-template-thumb.is-active {
  border-color: var(--color-primary);
}

.project-template-thumb:hover {
  transform: translateY(-1px);
}

/* NOTE: Thumb rail pager wraps thumbnail list and places navigation controls around it. */
.project-thumb-rail {
  position: absolute;
  top: 50%;
  left: max(1.25rem, calc((var(--project-hero-text-start) - var(--project-hero-thumb-w)) / 2));
  transform: translateY(-50%);
  z-index: 3;
  width: var(--project-hero-thumb-w);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.project-thumb-rail__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.2rem;
}

.project-thumb-rail__nav.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.project-thumb-rail__icon {
  width: 1rem;
  height: auto;
  display: block;
}

.project-thumb-rail__icon--prev {
  transform: rotate(180deg);
}

.project-thumb-rail__icon--next {
  transform: rotate(0deg);
}

/* NOTE: Thumb rail centered in gutter: equal inset from screen left and from text column (`--project-hero-text-start`). */
.project-hero-stage .project-hero-stage__thumbs {
  grid-template-columns: 1fr;
}

.section--project-cta .section-inner {
  padding-top: 1rem;
  padding-bottom: 4rem;
}

/* NOTE: Problem / Solution / Outcome narrative block shown below project hero/nav. */
.section--project-summary .section-inner {
  padding-top: 0;
  padding-bottom: 1rem;
}

.project-summary {
  max-width: 70rem;
  margin: 0 auto;
}

.project-summary__item {
  margin: 0 0 0.8rem 0;
  line-height: var(--line-height-relaxed);
  color: var(--color-dark);
}

.project-summary__item strong {
  font-weight: var(--font-weight-semibold);
}

/* NOTE: CTA sections stay transparent so global page gradient flows continuously. */
.section--project-cta {
  background: transparent;
}

/* NOTE: Extra top padding after hero template (doubles default 1rem for this transition only). */
.section--project-hero-template + .section--project-cta .section-inner {
  padding-top: 2rem;
}

.section--project-cta .inquiry-cta {
  margin-top: 0.75rem;
}

/* NOTE: Prev/next links: fixed overlay, triangle icons (`assets/triangle.svg`), vertical anchor 90% (hero stage sync in script.js); desktop only. */
.project-page-nav {
  display: none;
}

@media (max-width: 1023px) {
  .project-hero-gallery {
    margin-bottom: 0.75rem;
  }

  .project-page-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.35rem 1.25rem 1.5rem;
  }

  .project-page-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0;
    background: none;
    border: none;
    color: var(--color-dark);
    text-decoration: none;
    opacity: 0.75;
  }

  .project-page-nav__icon {
    display: block;
    width: 1.11rem;
    height: auto;
    filter: brightness(0) saturate(100%);
  }

  .project-page-nav__link--prev .project-page-nav__icon {
    transform: scaleX(-1);
  }

  .project-page-nav__label {
    font-size: 0.72rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.03em;
    text-transform: lowercase;
    color: var(--color-dark);
    white-space: nowrap;
  }

  .project-page-nav__link.is-disabled {
    opacity: 0.28;
    pointer-events: none;
    cursor: default;
  }
}

@media (min-width: 1024px) {
  .project-page-nav {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
    overflow: visible;
  }

  .project-page-nav__link {
    position: absolute;
    /* NOTE: `--project-page-nav-anchor-y` from script on hero template; otherwise 90% viewport. */
    top: var(--project-page-nav-anchor-y, 90%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem;
    margin: 0;
    background: none;
    border: none;
    color: var(--color-dark);
    text-decoration: none;
    opacity: 0.65;
    pointer-events: auto;
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  .project-page-nav__link--prev {
    left: clamp(1.25rem, calc((100vw - 70rem) / 4), 10rem);
    transform: translateY(-50%);
  }

  .project-page-nav__link--next {
    right: clamp(5.5rem, calc((100vw - 70rem) / 4), 10rem);
    transform: translateY(-50%);
  }

  .project-page-nav__link:hover:not(.is-disabled) {
    opacity: 1;
    transform: translateY(-50%) scale(1.06);
  }

  .project-page-nav__link.is-disabled {
    opacity: 0.28;
    pointer-events: none;
    cursor: default;
  }

  /* NOTE: Triangle uses white stroke in SVG; light drop-shadow keeps it legible on white sections. */
  .project-page-nav__icon {
    display: block;
    width: 1.85rem;
    height: auto;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
  }

  .project-page-nav__link--prev .project-page-nav__icon {
    transform: scaleX(-1);
  }

  /* NOTE: Small side labels (lowercase); paired with triangle — link `aria-label` covers screen readers. */
  .project-page-nav__label {
    font-size: 0.72rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.03em;
    text-transform: lowercase;
    color: var(--color-white);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
  }
}

/* Contact section */
.section--contact .section-inner {
  padding-top: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 60rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-link {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-neutral);
  background: var(--surface-neutral);
  color: var(--color-dark);
  text-decoration: none;
}

.social-link svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.social-link:hover {
  border-color: rgba(255, 115, 0, 0.42);
  color: var(--color-primary);
  background: rgba(255, 115, 0, 0.06);
}

.contact-item {
  display: block;
  margin: 0;
  border: 1px solid var(--border-neutral);
  background: var(--surface-neutral);
  padding: 1rem 1.1rem;
  color: var(--color-dark);
  text-decoration: none;
}

.contact-item__label {
  display: block;
  font-size: var(--font-size-section-kicker);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.35rem;
}

.contact-item__value {
  display: block;
  font-size: var(--font-size-card-title);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  color: var(--color-dark);
}

.contact-link:hover {
  border-color: rgba(255, 115, 0, 0.42);
  background: rgba(255, 115, 0, 0.06);
}

.contact-link:hover .contact-item__value {
  color: var(--color-primary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-neutral);
  background: linear-gradient(
    90deg,
    var(--color-projects-panel) 0%,
    var(--color-features-gradient-end) 100%
  );
}

.site-footer__inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 1.1rem 1.25rem 1.35rem;
}

.site-footer__links {
  margin-bottom: 0.8rem;
}

.site-footer__links-title {
  margin: 0 0 0.45rem 0;
  font-size: var(--font-size-breadcrumb);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-white);
  opacity: 0.78;
}

.site-footer__links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
}

.site-footer__link {
  color: var(--color-white);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.9;
}

.site-footer__link:hover {
  opacity: 1;
  color: var(--color-white);
}

.site-footer__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-white);
  opacity: 0.86;
}

@media (max-width: 1024px) {
  .about-team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-row__text {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .pricing-estimator {
    grid-template-columns: 1fr;
  }

  .pricing-service-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'label check'
      'price check';
    text-align: left;
    row-gap: 0.25rem;
  }

  .pricing-service-card__label {
    width: auto;
  }

  .pricing-service-card__price {
    width: auto;
    margin-left: 0;
    font-size: var(--font-size-breadcrumb);
  }

  .pricing-estimator__summary-price {
    font-size: 0.82rem;
  }

  .pricing-estimator__total-value {
    font-size: 1.1rem;
  }

  .service-card {
    height: 8rem;
  }

  .inquiry-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
  }

  .inquiry-note {
    order: 1;
  }

  .inquiry-cta {
    order: 2;
    width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-team-grid {
    grid-template-columns: 1fr;
  }

  /* NOTE: On mobile, keep team portraits at a consistent 3:4 frame. */
  .about-team-card__img {
    height: auto;
    aspect-ratio: 3 / 4;
  }

  /* NOTE: Keep story image in natural ratio on mobile (no forced portrait frame). */
  .about-story-image {
    aspect-ratio: auto;
    height: auto;
    object-fit: cover;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .side-nav {
    --mobile-toggle-size: 2.5rem;
    top: 1rem;
    right: 1rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    transform: none;
    transition: none;
  }

  .side-nav__content {
    display: none;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.5rem;
    padding: 0.65rem;
    background: var(--overlay-black-35);
    backdrop-filter: blur(10px);
    border-radius: 12px;
  }

  .side-nav.is-open .side-nav__content {
    display: flex;
  }

  .side-nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--mobile-toggle-size);
    height: var(--mobile-toggle-size);
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    touch-action: manipulation;
  }

  .side-nav__toggle-icon {
    width: 13px;
    height: 13px;
    transform: rotate(0deg);
    transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .side-nav.is-open .side-nav__toggle-icon {
    transform: rotate(180deg);
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .ideas-strip__grid {
    grid-auto-columns: minmax(6.5rem, 1fr);
  }

  /* NOTE: Reduce mobile bottom spacing in the "Dette gjør vi" start section. */
  #start .section-inner {
    padding-bottom: 2rem;
  }

  .projects-grid-panel {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .project-hero-stage {
    min-height: min(94vh, 46rem);
  }

  .project-hero-stage__breadcrumb {
    left: max(1.25rem, calc((100vw - 70rem) / 2 + 1.25rem));
    right: max(1.25rem, calc((100vw - 70rem) / 2 + 1.25rem));
  }

  /* NOTE: Keep me-drawing clip flush to the right edge on mobile hero shuffle. */
  .hero-video[data-hero-video-clip='me-drawing'] {
    object-position: 66% center;
    transform-origin: 66% center;
  }

  .project-hero-stage__content {
    padding: 4.25rem 1.25rem 1.25rem;
    padding-bottom: 5.75rem;
  }

  .project-hero-stage__title {
    font-size: clamp(1.55rem, 6.2vw, 2rem);
  }

  .project-hero-stage__lead {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* NOTE: Mobile thumb rail moves to bottom and uses side arrows with a 3-thumb row. */
  .project-thumb-rail {
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    width: auto;
    top: auto;
    bottom: 1rem;
    transform: none;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 1fr;
    align-items: center;
    gap: 0.45rem;
  }

  .project-thumb-rail__nav {
    width: 2rem;
    min-height: 2rem;
    padding: 0.25rem;
  }

  .project-thumb-rail__icon {
    transform: rotate(90deg) !important;
  }

  .project-thumb-rail__icon--prev {
    transform: rotate(90deg);
  }

  .project-thumb-rail__icon--next {
    transform: rotate(90deg);
  }

  .project-hero-stage .project-hero-stage__thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }
}

/* Mobile: Adjust text container width */
@media (max-width: 768px) {
  .hero-content {
    padding-top: 5rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    line-height: 1.1;
  }

  .hero-subtitle {
    font-size: var(--font-size-caption-sm);
    line-height: 1.5;
  }
}

@media (min-width: 768px) {
  .service-card {
    grid-column: span 4;
  }
}

/* Remove corner rounding on rectangles/buttons */
.hero-cta,
.inquiry-cta,
.side-nav,
.inquiry-form,
.field__input,
.field__textarea,
.project-thumb,
.service-card {
  border-radius: 0;
}

/* Smooth Transitions */
* {
  transition-property:
    color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow,
    transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Custom Scrollbar (if needed) */
::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for Firefox */
html {
  scrollbar-width: none;
}

/* Enable smooth scrolling */
body,
html {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  width: 100%;
}

/* Print Styles */
@media print {
  .single-page-body {
    overflow: visible;
    height: auto;
    width: auto;
  }

  .background-image {
    background-attachment: scroll;
  }
}
