/* 
© 2026 Bergen Byggmontering AS
Design System - "Flexis" Inspired (Hybrid Dark/Light)
*/

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  /* Colors */
  --bg-deep: #050505;
  --bg-white: #ffffff;
  --bg-light: #f1f5f9;
  
  --text-main: #FFFFFF;
  --text-inverse: #0f172a;
  --text-muted: #9CA3AF;
  --text-muted-inverse: #475569;

  --brand-primary: #00B7B5; /* Teal/Cyan */
  --brand-darker: #0d9488;
  
  --border-light: rgba(255, 255, 255, 0.1);
  --border-dark: rgba(0, 0, 0, 0.08);

  /* Typography Scale */
  --fs-h1: clamp(2.5rem, 6vw, 5rem);
  --fs-h2: clamp(2rem, 5vw, 4rem);
  --fs-h3: clamp(1.5rem, 3vw, 2.5rem);
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* --- SECTIONS --- */
.section-dark {
  background-color: var(--bg-deep);
  color: var(--text-main);
}

.section-white {
  background-color: var(--bg-white);
  color: var(--text-inverse);
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.section-white h2, 
.section-white h3, 
.section-white h4 {
  color: var(--text-inverse);
}

.section-white p, 
.section-white li {
  color: var(--text-muted-inverse);
}

/* --- BENTO GRID (ARKITEKT-STIL) --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  padding: 1rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 300px;
  }
}

.bento-item {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--border-light);
  group: 1;
}

.bento-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bento-item:hover img {
  transform: scale(1.05);
}

.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  transition: all 0.3s ease;
}

/* --- COMPONENTS --- */

/* A1-A11 List Styling (Accordion) */
.aeo-list details {
  border-bottom: 1px solid var(--border-dark);
  margin-bottom: 0.5rem;
}

.aeo-list details > summary {
  padding: 1.25rem 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none; /* Hide default triangle */
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-inverse);
  transition: color 0.2s;
}

/* Hide webkit default marker */
.aeo-list details > summary::-webkit-details-marker {
  display: none;
}

/* Custom + / - Sign */
.aeo-list details > summary::after {
  content: "+";
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--brand-darker);
  margin-left: 1rem;
}

.aeo-list details[open] > summary::after {
  content: "−"; /* Minus sign */
}

.aeo-list summary:hover {
  color: var(--brand-darker);
}

.aeo-list .content {
  padding-bottom: 1.5rem;
  color: var(--text-muted-inverse);
  font-size: 0.95rem;
  line-height: 1.7;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.aeo-list .content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.aeo-list .content li {
  margin-bottom: 0.25rem;
}

.aeo-list .content a {
  color: var(--brand-darker);
  text-decoration: underline;
}

/* Buttons */
.btn-primary {
  background: transparent;
  border: 1px solid var(--brand-primary);
  color: var(--brand-primary);
  border-radius: 9999px;
  padding: 1rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background: var(--brand-primary);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 183, 181, 0.4);
}

.btn-solid {
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  color: #000;
  border-radius: 9999px;
  padding: 1rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.btn-solid:hover {
  background: #fff;
  border-color: #fff;
}

/* Map & About */
.map-container {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: 1.5rem;
  overflow: hidden;
  filter: grayscale(100%) invert(92%);
}

/* Skjult tilstand */
.extra-text-hidden {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

/* Synlig tilstand */
.extra-text-visible {
  max-height: 500px; /* Juster etter behov */
  opacity: 1;
  margin-top: 1rem;
}

/* Plusstegn-rotasjon */
.rotate-45 {
  transform: rotate(45deg);
}

/* Smooth transitions (allerede i HTML, men kan også defineres her) */
.transition-all {
  transition: all 0.5s ease-in-out;
}
