/* Redesigned CSS for Novabase - Light Huashu-Design Style */

:root {
  --bg: oklch(98% 0.003 75);            /* Warm cream off-white / Alabaster */
  --text-main: oklch(24% 0.008 75);      /* Deep charcoal */
  --text-muted: oklch(50% 0.015 75);     /* Muted clay/slate */
  --text-dim: oklch(62% 0.012 75);       /* Dim grey for tags/meta */
  
  --border: oklch(90% 0.008 75);         /* Soft sand borders */
  --border-hover: oklch(76% 0.015 75);   /* Accentuated sand borders on hover */
  
  --accent: oklch(58% 0.12 60);          /* Rich terracotta/copper accent */
  --accent-hover: oklch(50% 0.11 60);
  
  --cell-bg: oklch(100% 0 0);            /* Crisp pure white */
  --cell-bg-hover: oklch(99% 0.003 75);  /* Soft off-white cream on hover */
  
  --hero-grid: oklch(86% 0.008 75 / 60%); /* Subtle grid lines in hero */
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem 6rem 2rem;
}

/* Header Navbar */
.navbar {
  background: oklch(98% 0.003 75 / 80%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-item {
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.nav-item:hover {
  color: var(--text-main);
}

.nav-item.active {
  background: oklch(95% 0.006 75);
  border: 1px solid var(--border);
  color: var(--text-main);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 8rem 2rem 5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

/* Architectural background lines */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--hero-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hero-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 15% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 15% 50%, black 20%, transparent 70%);
  opacity: 0.8;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.overline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 7.5vw, 5.2rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  text-wrap: pretty;
}

.hero-title span {
  font-style: normal;
  font-weight: 500;
  color: var(--accent);
}

.hero-sub {
  font-family: 'Inter', sans-serif;
  font-size: clamp(14px, 1.8vw, 16px);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
  text-wrap: pretty;
}

/* Lando-Style Bordered Grid */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.feat-cell {
  background: var(--cell-bg);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 290px;
  padding: 0; /* Clear default padding for edge-to-edge images */
}

.feat-cell:hover {
  background-color: var(--cell-bg-hover);
}

/* Desktop Grid Spans */
.cell-wide {
  grid-column: span 8;
}

.cell-narrow {
  grid-column: span 4;
}

/* Layout for cells with top images */
.cell-image-top {
  width: 100%;
  height: 170px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.feat-image-card {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feat-cell:hover .feat-image-card {
  transform: scale(1.03);
}

/* Produktlogga istället för skärmdump/foto - visa hela loggan (ingen
   beskärning) med matchande mörk bakgrund istället för att fylla/beskära
   som feat-image-card annars gör. */
.feat-image-contain {
  object-fit: contain;
  background: #0a1f1c;
}

/* Layout for wide split card */
.cell-split {
  display: flex;
  width: 100%;
  min-height: 100%;
  flex-direction: row;
}

.cell-wide .cell-body {
  padding: 3rem 2.5rem;
  flex: 1.3;
}

.cell-image-side {
  flex: 1;
  overflow: hidden;
  border-left: 1px solid var(--border);
  position: relative;
  display: flex;
}

.feat-image-wide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feat-cell:hover .feat-image-wide {
  transform: scale(1.03);
}

/* Card content body */
.cell-body {
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.cell-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.95;
}

.cell-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

/* Icon Wrap */
.icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(96% 0.006 75);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.feat-cell:hover .icon-wrap {
  border-color: var(--accent);
  background: oklch(94% 0.008 75);
}

.feat-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: grayscale(0.1) brightness(0.95);
  transition: filter 0.25s ease;
}

.feat-cell:hover .feat-icon-img {
  filter: grayscale(0) brightness(1);
}

.icon-wrap i {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.icon-wrap i.text-amber {
  color: oklch(58% 0.12 60); /* Match terracotta accent */
}

.feat-cell:hover .icon-wrap i {
  color: var(--accent);
}

/* Typography inside cells */
.feat-h {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition: color 0.25s ease;
  text-wrap: pretty;
}

.feat-cell:hover .feat-h {
  color: var(--accent);
}

.feat-p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 0.5rem;
  text-wrap: pretty;
}

/* Action link at bottom */
.cell-action {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.25s ease;
  margin-top: 2rem;
}

.feat-cell:hover .cell-action {
  color: var(--accent);
}

.cell-action i {
  font-size: 0.75rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.feat-cell:hover .cell-action i {
  transform: translateX(5px);
}

/* Footer */
footer {
  width: 100%;
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  background: var(--bg);
  text-align: center;
  margin-top: auto;
}

footer p {
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* Responsive Grid layouts */
@media (max-width: 900px) {
  .feat-grid {
    grid-template-columns: repeat(12, 1fr);
  }
  
  .cell-wide {
    grid-column: span 12;
  }
  
  .cell-narrow {
    grid-column: span 6;
  }
  
  .cell-split {
    flex-direction: column;
  }
  
  .cell-image-side {
    height: 180px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  
  .hero {
    padding: 6rem 2rem 4rem 2rem;
  }
}

@media (max-width: 600px) {
  .cell-wide, .cell-narrow {
    grid-column: span 12;
  }
  
  .cell-body {
    padding: 2.2rem 1.5rem;
  }
  
  .feat-cell {
    min-height: auto;
  }
  
  .container {
    padding: 2rem 1.25rem 4rem 1.25rem;
  }
  
  .hero {
    padding: 5rem 1.25rem 3.5rem 1.25rem;
  }
}
