/* ==========================================================================
   GLOBAL VARIABLES & RESET (Used across all pages)
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: radial-gradient(ellipse at bottom, #1f1b24 0%, #0e0e11 70%);
  --text: #f2f1ed;
  --muted: #8c8c8c;
  --border: #222222;
  --card-bg: #161616;
  --font-serif: "Times New Roman", Times, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background: var(--bg);
  background-attachment: fixed; /* Keeps the bottom glow locked to the screen bottom */
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  padding: 0 2rem;
  max-width: 1100px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

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

/* ==========================================================================
   HEADER & NAVIGATION (Used across all pages)
   ========================================================================== */
header {
  padding: 2.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand .name {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand .role {
  font-size: 0.85rem;
  color: var(--muted);
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--text);
}

/* ==========================================================================
   COMMON COMPONENTS
   ========================================================================== */
/* Reusable Page Headers (Films & Photography) */
.page-title {
  padding: 4rem 0 3rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-title h1 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 400;
}

/* Reusable Video Wrapper (Landing Page & Films Page) */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background-color: #000;
  border-radius: 2px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   LANDING PAGE (index.html)
   ========================================================================== */
.hero {
  padding: 3rem 0 4rem 0;
  max-width: 850px;
}

.hero .location {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.7;
}

.showreel-block {
  margin-bottom: 6rem;
}

.showreel-caption {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ==========================================================================
   FILMS PAGE (films.html)
   ========================================================================== */
.films-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding-top: 5rem;    /* Creates breathing room below the header */
  margin-bottom: 3rem;  /* Keeps natural spacing above footer */
}

.film-card {
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
}

/* Tvinger kortet til at fylde begge kolonner, når der klikkes på det */
.film-card.expanded {
  grid-column: 1 / -1;
}

.film-card .video-wrapper {
  margin-bottom: 1rem;
}

.film-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.film-meta h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
}

.film-meta .year {
  font-size: 0.85rem;
  color: var(--muted);
}

.film-role {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.film-desc {
  font-size: 0.95rem;
  color: #a3a3a3;
  line-height: 1.5;
}

/* --- Custom YouTube Embeds & Covers --- */
.video-wrapper.custom-embed {
  position: relative;
  cursor: pointer;
  background-color: #000;
  overflow: hidden;
}

.custom-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.video-wrapper.custom-embed:hover .custom-poster {
  transform: scale(1.03);
  opacity: 0.85;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.play-btn svg {
  margin-left: 3px;
}

.video-wrapper.custom-embed:hover .play-btn {
  background: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
  border-color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   PHOTOGRAPHY GRID (UPDATED FOR LAZY LOADING + AUTO ORIENTATION)
   ========================================================================== */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  grid-auto-flow: dense;
  padding-top: 5rem;    /* Creates breathing room below the header */
  margin-bottom: 3rem;  /* Keeps natural spacing above footer */
}

/* Default container layout with fallback aspect ratio for lazy loading */
.photo-card {
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  background-color: #161616; /* Skeleton loading background */
  aspect-ratio: 3 / 2;       /* Initial height before image metadata triggers JS */
}

/* Vertical cards (span 1) establish portrait height when added by JS */
.photo-card.span-1,
.photo-card.portrait {
  grid-column: span 1;
  aspect-ratio: 2 / 3; /* Standard DSLR portrait ratio */
}

/* Horizontal cards (span 2) expand across 2 columns when added by JS */
.photo-card.span-2,
.photo-card.landscape {
  grid-column: span 2;
  aspect-ratio: 3 / 2; /* Maintains landscape ratio */
  height: 100%;
}

/* Image scaling */
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Aspect ratio overrides for explicitly tagged images */
.photo-card.portrait img {
  aspect-ratio: 4 / 5;
}

.photo-card.landscape img {
  aspect-ratio: 16 / 9;
}

/* Mobile Responsive Breakdown */
@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
  .photo-card.span-2,
  .photo-card.landscape {
    grid-column: span 1;
    aspect-ratio: 3 / 2;
  }
}

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

  .photo-card.portrait,
  .photo-card.landscape {
    grid-column: span 1;
  }
}

/* ==========================================================================
   EXACT ABOUT PAGE STYLING
   ========================================================================== */

/* Page Background & Container */
body {
  background-color: #0b0c0e; /* Deep obsidian background */
  color: #9da3ac;
  font-family: 'Inter', -apple-system, sans-serif;
}

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

/* --- Hero Section --- */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 5rem;
  align-items: start;
  margin-bottom: 7rem;
}

.about-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6c727c;
  display: block;
  margin-bottom: 1.5rem;
}

.about-content h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: 2.75rem;
  line-height: 1.2;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 2rem;
}

.about-content p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #9da3ac;
  margin-bottom: 1.5rem;
}

.about-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.45;
  color: #ffffff;
  margin: 1.25rem 0 2rem 0;
  padding: 0;
  border: none;
}

@media (max-width: 768px) {
  .about-quote {
    font-size: 1.25rem;
  }
}

.contact-link {
  color: #d49a53; /* Golden accent text */
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-block;
  margin-top: 1rem;
  transition: opacity 0.2s ease;
}

.contact-link:hover {
  opacity: 0.8;
}

/* --- Grid Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem 5rem;
}

/* Stacks right-column elements and controls vertical spacing between them */
.grid-column-right {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.grid-block h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Timeline & Recognition List Items */
.list-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.item-title {
  color: #e2e4e8;
  font-size: 0.95rem;
}

.item-date {
  color: #6c727c;
  font-size: 0.85rem;
}

.item-sub {
  display: block;
  color: #6c727c;
  font-size: 0.85rem;
}

/* Services 2-Column List */
.services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.services-list ul {
  list-style-type: disc;
  padding-left: 1.2rem;
  margin: 0;
}

.services-list li {
  color: #9da3ac;
  font-size: 0.95rem;
  line-height: 2;
}

.services-list li::marker {
  color: #6c727c;
}

/* Selected Clients Wrap */
.clients-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.75rem;
  margin-top: 1.2rem;
}

.clients-list span {
  color: #9da3ac;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Mobile Responsive Adjustments */
@media (max-width: 850px) {
  .about-hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

  .about-content h1 {
    font-size: 2.1rem;
  }
}

/* ==========================================================================
   CONTACT PAGE (contact.html)
   ========================================================================== */

.contact-container {
  width: 100%;
  max-width: 850px;
  margin: 6rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12rem;
  align-items: start;
}

/* --- Left Column --- */
.contact-main {
  margin-top: 2.5rem;
}

.contact-main .section-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #888888;
  display: block;
  margin-bottom: 1.25rem;
}

.contact-main h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.12;
  color: #ffffff;
  margin: 0 0 1rem 0;
}

.contact-subtext {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: #a0a5ad;
  margin: 0;
}

/* --- Right Column (Details) --- */
.contact-details-section h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.details-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-item {
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detail-item span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888888;
  font-weight: 400;
}

.detail-item a,
.detail-item p {
  color: #ffffff;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  text-decoration: none;
  margin: 0;
}

.detail-item a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding: 3rem 1.5rem 6rem 1.5rem;
  }

  .contact-main h1 {
    font-size: 2.75rem;
  }
}

/* ==========================================================================
   FOOTER & RESPONSIVE BREAKPOINTS (Used across all pages)
   ========================================================================== */
footer {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .films-grid {
    grid-template-columns: 1fr;
  }
  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .contact-container {
    flex-direction: column;
    gap: 4rem;
    padding: 4rem 0;
  }
  footer {
    flex-direction: column;
    gap: 1rem;
  }
}
