/* ============================================
   BRITTA THØGERSEN TOFT – PORTFOLIO
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #faf9f7;
  --bg-alt: #f0ece6;
  --dark: #111111;
  --text: #2c2c2c;
  --text-muted: #6b6b6b;
  --accent: #8b3a2a;
  --accent-light: #c4694a;
  --border: #e0d9d0;
  --white: #ffffff;
  --font-serif: 'Mona Sans', system-ui, sans-serif;
  --font-sans: 'Mona Sans', system-ui, sans-serif;
  --nav-height: 72px;
  --section-pad: 100px;
  --max-w: 1200px;
  --transition: 0.4s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* --- Typography helpers --- */
.section-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  font-stretch: expanded;
  line-height: 0.92;
  letter-spacing: 0;
  color: var(--dark);
  margin-bottom: 2rem;
}

.section-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  margin-bottom: 3rem;
  margin-top: -1rem;
}

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: var(--section-pad) 0;
}

/* ============================================
   NAVIGATION
   ============================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background var(--transition), box-shadow var(--transition);
}

/* Background + blur live on a pseudo-element: a filtered #nav would become the
   containing block for the fixed mobile menu inside it. */
#nav::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: background var(--transition), box-shadow var(--transition);
}

#nav.scrolled::before {
  background: rgba(250, 249, 247, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.01em;
  transition: color var(--transition);
}

#nav.scrolled .nav-logo {
  color: var(--dark);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-light);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: rgba(255,255,255,1);
}

#nav.scrolled .nav-links a {
  color: var(--text-muted);
}

#nav.scrolled .nav-links a:hover {
  color: var(--accent);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: all 0.3s;
}

#nav.scrolled .hamburger span {
  background: var(--dark);
}

/* While the menu is open, drop the blur entirely. Some older WebKit builds
   promote the parent of a backdrop-filtered pseudo-element to a containing
   block, which would trap the fixed menu inside the 72px bar again. */
html.menu-open #nav::before {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

/* Menu open: bars sit on the dark overlay, so keep them light */
.hamburger[aria-expanded="true"] span,
#nav.scrolled .hamburger[aria-expanded="true"] span {
  background: var(--white);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #1c1c1c;
  background-size: auto 100%;
  background-position: right center;
  background-repeat: no-repeat;
  transform: scale(1.02);
  transition: transform 8s ease;
  image-rendering: smooth;
}

.hero-bg.loaded {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.55) 45%,
    rgba(0,0,0,0.1) 75%,
    rgba(0,0,0,0.0) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 60px 80px;
  max-width: 800px;
}

.hero-tag {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 1rem;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3.6rem, 7.5vw, 8.5rem);
  font-weight: 700;
  font-stretch: expanded;
  line-height: 0.88;
  letter-spacing: 0;
  color: var(--white);
  margin-bottom: 2rem;
}

.hero-cta {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.5);
  padding: 14px 32px;
  transition: background 0.3s, border-color 0.3s;
}

.hero-cta:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.9);
}

.hero-scroll-arrow {
  position: absolute;
  bottom: 30px;
  right: 40px;
  z-index: 2;
  color: rgba(255,255,255,0.5);
  width: 28px;
  animation: bounce 2s ease-in-out infinite;
  transition: color 0.3s;
}

.hero-scroll-arrow:hover {
  color: rgba(255,255,255,0.9);
}

.hero-scroll-arrow svg {
  width: 100%;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ============================================
   ABOUT
   ============================================ */
.about-section {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.2rem;
  font-size: 1.0rem;
  line-height: 1.8;
  color: var(--text);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-subheading {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  font-stretch: expanded;
  letter-spacing: 0;
  color: var(--dark);
  margin: 2.5rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.section-title + .about-subheading {
  margin-top: 0;
}

.about-highlight {
  font-family: var(--font-serif);
  font-size: 1.1rem !important;
  font-weight: 500;
  color: var(--accent) !important;
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  margin-top: 2rem !important;
  line-height: 1.6 !important;
}

.about-image {
  position: relative;
  top: 20px;
}

.about-img-wrap {
  position: relative;
  z-index: 1;
}

.about-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.about-img-accent {
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  background: var(--bg-alt);
  z-index: 0;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-section {
  background: var(--bg-alt);
}

.gallery-section .container {
  margin-bottom: 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.gallery-img-wrap {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}

.gallery-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition), transform 0.6s ease;
}

/* B&W on top by default, fades out on hover to reveal color below */
.img-color {
  z-index: 1;
  opacity: 0;
}

.img-bw {
  z-index: 2;
  opacity: 1;
  filter: grayscale(1);
}

.gallery-item:hover .img-color {
  opacity: 1;
}

.gallery-item:hover .img-bw {
  opacity: 0;
}

.gallery-item:hover .img-color,
.gallery-item:hover .img-bw {
  transform: scale(1.04);
}

/* ============================================
   PRESS / QUOTES
   ============================================ */
.press-section {
  background: var(--white);
}

.press-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
}

.press-quote {
  background: var(--white);
  padding: 2.5rem 2rem;
  font-style: normal;
  transition: background 0.3s;
}

.press-quote:hover {
  background: var(--bg);
}

.press-quote p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--dark);
  margin-bottom: 1rem;
}

.press-quote p::before {
  content: '"';
  font-size: 3rem;
  line-height: 0;
  vertical-align: -0.6rem;
  color: var(--accent);
  margin-right: 0.2rem;
  font-family: var(--font-serif);
}

.press-quote cite {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-style: normal;
}

.press-quote cite em {
  color: var(--accent);
  font-style: italic;
}

.featured-quote {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 4rem;
}

.featured-quote p {
  font-size: 1.35rem;
  max-width: 700px;
  margin: 0 auto 1rem;
}

/* ============================================
   CV
   ============================================ */
.cv-section {
  background: var(--bg-alt);
}

.cv-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}

.cv-heading {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  font-stretch: expanded;
  letter-spacing: 0;
  color: var(--dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.cv-entries {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cv-entry {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: start;
}

.cv-year {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
  padding-top: 0.15rem;
  white-space: nowrap;
}

.cv-details strong {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.cv-details span {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* CV Table */
.cv-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cv-table thead th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 1rem 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.cv-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.cv-table tbody tr:hover {
  background: rgba(139, 58, 42, 0.04);
}

.cv-table tbody td {
  padding: 0.9rem 1rem 0.9rem 0;
  color: var(--text);
  line-height: 1.4;
  vertical-align: top;
}

.cv-table tbody td:first-child {
  color: var(--dark);
  font-weight: 400;
}

.cv-table tbody td em {
  font-style: italic;
  color: var(--accent);
}

.cv-text {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text);
}

/* ============================================
   VIDEO
   ============================================ */
.video-section {
  background: var(--white);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
}

.video-item {
  background: var(--white);
  padding: 2rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background 0.3s;
}

.video-item:hover {
  background: var(--bg);
}

.video-wrap {
  width: 100%;
  height: 260px;
  background: var(--dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.video-caption {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  font-stretch: expanded;
  letter-spacing: 0;
  color: var(--dark);
}

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

/* ============================================
   CONTACT
   ============================================ */
.contact-section {
  background: var(--dark);
}

.contact-section .section-label {
  color: var(--accent-light);
}

.contact-section .section-title {
  color: var(--white);
}

.contact-intro {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  margin-bottom: 3.5rem;
  max-width: 500px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: rgba(255,255,255,0.08);
  max-width: 540px;
}

.contact-item {
  background: var(--dark);
  padding: 2.5rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: background 0.3s;
}

.contact-item:hover {
  background: #1e1e1e;
}

.contact-icon {
  width: 28px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-light);
}

.contact-icon svg {
  width: 100%;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.contact-details a,
.contact-details span {
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  line-height: 1.5;
  transition: color 0.2s;
}

.contact-details a:hover {
  color: var(--accent-light);
}

/* ============================================
   SAMARBEJDSPARTNER (i bunden af Kontakt)
   ============================================ */
.partners-block {
  max-width: 800px;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.partners-title {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1.4rem;
}

.partners-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.25rem;
}

.partners-list a {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.partners-list a:hover,
.partners-list a:focus-visible {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #0a0a0a;
  padding: 2.5rem 0;
  text-align: center;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

.footer-sub {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.25);
  margin: 0.4rem 0 1rem;
  text-transform: uppercase;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  transition: opacity 0.2s;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  padding: 12px;
  transition: color 0.2s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--white);
}

.lightbox-close {
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
  width: 28px;
  height: 28px;
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.press-quote.reveal { transition-delay: calc(var(--i, 0) * 0.08s); }
.gallery-item.reveal { transition-delay: calc(var(--i, 0) * 0.03s); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr 300px;
    gap: 50px;
  }

  .cv-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 70px;
  }

  .container {
    padding: 0 24px;
  }

  .nav-inner {
    padding: 0 24px;
  }

  /* Mobile nav */
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--dark);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 105;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
  }

  #nav.scrolled .nav-links a {
    color: rgba(255,255,255,0.8);
  }

  .hero-content {
    padding: 0 24px 60px;
  }

  .hero-name {
    font-size: clamp(3rem, 12vw, 5rem);
  }

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

  .about-image {
    order: -1;
    max-width: 320px;
  }

  .about-img-accent {
    display: none;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .featured-quote {
    padding: 2rem 1.5rem;
  }

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

  .cv-entry {
    grid-template-columns: 70px 1fr;
  }


}

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

  .hero-name {
    font-size: 3rem;
  }
}
