/* =====================================================
   Base & Variables
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Caprasimo&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
  /* Colors */
  --white: #fff;
  --black: #000;
  --accent-light: #f5eee6;
  --accent-blue: #92d5f6;

  /* Effects */
  --text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);

  /* Layout */
  --container-w: 1200px;
  --nav-h: 80px;                 /* bruges til sticky anchor offset */
}

/* ===== Reset & Global ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; width: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: "Neue Montreal", sans-serif;
  color: var(--white);
  background: var(--black);
  overflow-x: hidden;
}
.text-shadow { text-shadow: var(--text-shadow); }

/* Gør ankre lander under fixed nav. Finjustér med --nav-h */
section { scroll-margin-top: var(--nav-h); }

/* =====================================================
   Navigation
   ===================================================== */
nav {
  position: fixed; inset: 0 0 auto 0;
  height: var(--nav-h);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 1000;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.6) 0%,
    rgba(0,0,0,0.3) 60%,
    rgba(0,0,0,0) 100%
  );
  transition: background 0.3s ease;
}
nav.scrolled { background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

.left a { font-family: "Caprasimo", serif; font-size: 1.6rem; color: var(--white); text-decoration: none; }
.center { position: absolute; left: 50%; transform: translateX(-50%); font-size: 1.2rem; font-weight: 700; color: var(--white); }
nav .right { display: flex; gap: 4rem; }
nav a { font-family: "Playfair Display", serif; font-size: 1.2rem; color: var(--white); text-decoration: none; transition: transform .2s, color .2s; }
nav a:hover { transform: scale(1.08); }

/* =====================================================
   Hero
   ===================================================== */
.hero {
  position: relative;
  min-height: 100vh; /* stabil på desktop */
  display: flex; align-items: center;
  background: center 45% / cover no-repeat;
  background-image: url("img/kvindeienfantasy.png"); /* enkelt stabil kilde */
  color: var(--white);
}
@supports (height: 100svh) { .hero { min-height: 100svh; } } /* stabil mobil viewport højde */
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 220px;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 50%, var(--black) 100%);
}
.hero-text { position: relative; z-index: 2; max-width: 700px; margin-left: 5%; }
.hero-text h1 { font-family: "Migra", serif; font-size: 3.5rem; letter-spacing: .1em; text-transform: uppercase; }
.hero-text h2 { font-size: 1.2rem; font-weight: 400; text-transform: uppercase; margin-bottom: 1rem; }
.hero-text p  { font-size: 1rem; line-height: 1.5; }
.hero-ctas { margin-top: 1.5rem; display: flex; gap: 1rem; }

/* Buttons */
.btn { display: inline-block; padding: .7rem 1.2rem; background: #fff; color: #000; font-weight: 600; text-decoration: none; border-radius: 30px; transition: background .25s; }
.btn:hover { background: #f0f0f0; }
.btn-ghost { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* =====================================================
   About section
   ===================================================== */
.about { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3rem; padding: 10rem 10%; }
.about-left img { width: 100%; max-width: 280px; border-radius: 16px; box-shadow: 0 4px 24px rgba(185,171,171,0.5); }
.about-text { flex: 1; max-width: 520px; font-size: 1.2rem; line-height: 1.7; color: #f5f5f5; }
.about-text a, .about-text a:visited { color: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); transition: color .2s, text-decoration-color .2s; }
.about-text a:hover, .about-text a:focus { color: var(--accent-blue); text-decoration-color: var(--accent-blue); }

/* =====================================================
   Projects / Oplev
   ===================================================== */
.oplev { display: flex; flex-direction: column; align-items: center; width: min(1198px, 96%); margin: 100px auto 0; }
.oplev-text { text-align: center; }
.oplev-text h1 { font-size: 48px; }
.oplev-text h2 { font-size: 48px; font-weight: 300; color: #939fa4; margin-bottom: 50px; }
.yeah p { font-size: 30px; margin-bottom: 50px; }

.oplev-carousel { width: 100%; max-width: var(--container-w); }
.oplev-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px; }

.oplev-box { width: 100%; height: 597px; background: var(--white); border-radius: 10px; display: flex; flex-direction: column; transition: box-shadow .3s, transform .3s; will-change: transform; }
.oplev-box:hover { box-shadow: 0 8px 20px rgba(0,0,0,.2); transform: translateY(-5px); }
.oplev-box-image { width: 100%; height: 378px; object-fit: cover; transition: transform .3s; }
.oplev-box:hover .oplev-box-image { transform: scale(1.05); }
.oplev-box video.oplev-box-image { height: 378px; object-fit: cover; }

.oplev-box-content { padding: 30px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.oplev-box-content h3 { font-family: "Rubik", sans-serif; font-size: 20px; color: #333; }
.oplev-box-content p  { font-family: "Rubik", sans-serif; font-size: 16px; color: #333; }
.oplev-box-link { font-family: "Rubik", sans-serif; font-size: 16px; font-weight: 500; color: #272829; text-decoration: none; margin-top: auto; }
.oplev-box-link:hover { color: #776c71; }
.oplev-box-link::after { content: "→"; margin-left: 5px; transition: transform .3s; }
.oplev-box-link:hover::after { transform: translateX(5px); }

/* Initial reveal state (aktiveres af JS) */
.js-enabled .oplev-box { opacity: 0; transform: translateY(24px); }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px);} to { opacity: 1; transform: none; } }
.card-visible { animation: cardIn .8s ease-out forwards; } /* fallback */

/* Collapsed state: vis 6 projekter */
.oplev.is-collapsed .oplev-boxes .oplev-box:nth-child(n+7) { display: none; }

/* See more btn */
.see-more-wrap { display: flex; justify-content: center; margin: 10px 0 0; }
.see-more-btn {
  cursor: pointer;
  padding: 15px 20px;
  border: 1px solid var(--accent-light);
  border-radius: 30px;
  text-decoration: none;
  background: transparent;      /* gennemsigtig baggrund */
  color: var(--white);          /* hvid tekst */
  font-size: 18px;
  transition: .3s;
}
.see-more-btn:hover { background-color: rgba(245,238,230,.2); color: var(--white); }

/* =====================================================
   Cake section
   ===================================================== */
.cake-section { margin: 0 auto; max-width: 800px; }
.cake-heading { margin-top: 60px; text-align: center; font-size: 2.5rem; font-weight: 300; }
.cake-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-top: 2rem; padding: 0 20px; margin-bottom: 2rem; }
.cake-btn { padding: 10px 20px; border: 1px solid var(--accent-light); border-radius: 30px; text-decoration: none; color: var(--accent-light); font-size: 18px; transition: .3s; }
.cake-btn:hover { background-color: rgba(245,238,230,.2); }

/* =====================================================
   Footer
   ===================================================== */
footer { background: var(--black); color: var(--white); padding: 3rem 0 4rem; text-align: center; }

/* =====================================================
   Tab bar (mobile)
   ===================================================== */
.tab-bar { display: none; position: fixed; inset: auto 0 0 0; background: rgba(0,0,0,0.9); justify-content: space-around; align-items: center; padding: .7rem 0; border-top: 1px solid rgba(255,255,255,0.1); z-index: 1001; }
.tab-bar a { color: var(--white); font-size: .85rem; text-decoration: none; flex-grow: 1; text-align: center; transition: color .3s; }
.tab-bar a:hover, .tab-link.active { color: var(--accent-blue); }

/* =====================================================
   Illustrations page
   ===================================================== */
.illustrations-main { padding-top: calc(var(--nav-h) + 20px); }
.illustrations-main > h2 { margin: 0 2rem .75rem; font-family: "Playfair Display", serif; font-size: 2rem; }
.illustrations-main > p { margin: 0 2rem 2rem; max-width: 70ch; line-height: 1.7; color: #f5f5f5; }

.illustrations-gallery { column-count: 3; column-gap: 1.5rem; padding: 0 2rem 4rem; background: #000; }
.illustrations-gallery img {
  width: 100%; margin-bottom: 1.5rem; border-radius: 12px; display: block;
  box-shadow: 0 4px 16px rgba(0,0,0,.5); transition: transform .2s, opacity .3s;
  break-inside: avoid; will-change: transform; backface-visibility: hidden;
  content-visibility: auto; contain-intrinsic-size: 400px 600px; opacity: 0;
}
.illustrations-gallery img.is-loaded { opacity: 1; }
.illustrations-gallery img:hover { opacity: .98; transform: none; }

/* =====================================================
   Contact page
   ===================================================== */
main.container { padding: 8rem 2rem 4rem; max-width: 800px; margin: 0 auto; color: var(--white); }
main.container h1 { font-family: "Playfair Display", serif; font-size: 2.5rem; margin-bottom: 1rem; }
.lead { font-size: 1.1rem; margin-bottom: 2rem; color: #ddd; }

form { display: flex; flex-direction: column; gap: 1.5rem; background: linear-gradient(135deg, rgba(128,126,126,.05), rgba(227,216,216,.1), rgba(225,203,203,.1)); padding: 2rem; border-radius: 12px; box-shadow: 0 4px 16px rgba(112,108,108,.5); }
label { display: block; font-weight: 600; margin-bottom: .4rem; font-family: "Playfair Display", serif; }
input, textarea { width: 100%; padding: .8rem 1rem; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; font-size: 1rem; font-family: inherit; background: #111; color: var(--white); }
input:focus, textarea:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(146,213,246,.3); }
textarea { min-height: 150px; resize: vertical; }
button[type="submit"] { background: darkgray; color: var(--black); border: none; padding: .9rem 1.4rem; border-radius: 8px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: background .3s, transform .2s; }
button[type="submit"]:hover { background: #d93e0f; transform: translateY(-2px); }
.muted { font-size: .9rem; color: #aaa; margin-top: .5rem; }
.muted a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); }
.muted a:hover { color: var(--accent-blue); text-decoration-color: var(--accent-blue); }

/* =====================================================
   Media queries
   ===================================================== */
@media (max-width: 1300px) {
  .oplev { width: 95%; padding: 0 2vw; }
  .oplev-box { max-width: 370px; }
}

@media (max-width: 1000px) {
  .about { padding: 7rem 6%; gap: 2rem; }
  .about-left img { max-width: 240px; }
  .about-text { max-width: 46ch; font-size: 1.1rem; line-height: 1.75; }
}

@media (max-width: 900px) {
  /* Nav væk, vis tabbar */
  nav { display: none !important; border-bottom: 0 !important; background: none !important; }
  .tab-bar { display: flex; }

  /* Sørg for at indhold ikke ligger under tab-baren */
  .oplev { padding-bottom: 72px; }

  /* Illustrations layout */
  .illustrations-main { padding-top: 0; }
}
@media (max-width: 1200px) {
  .center { display: none; }
  nav .right { gap: 2rem; }       /* lidt strammere mellemrum */
  nav a { font-size: 1.05rem; }   /* en anelse mindre tekst */
}
@media (max-width: 1350px) {
  .center { display: none; }
  
}

@media (max-width: 768px) {
  .center { display: none; }
  .oplev-boxes { grid-template-columns: 1fr 1fr; }
  .oplev-box { margin-bottom: 2rem; }
  .illustrations-main > h2 { margin: 1rem 1rem .5rem; }
  .illustrations-main > p, .illustrations-gallery { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 600px) {
  /* Mindre hero på små skærme */
  .hero { height: 75vh; background-position: center; background-size: cover; }
  .hero::after { height: 120px; }
  .hero-text { margin-left: 4%; }
  .hero-text h1 { font-size: 2rem; }
  .hero-text h2 { font-size: 1rem; }

  .about { padding: 3rem 2vw; }
  .about-left img { max-width: 90vw; }
  .cake-heading { font-size: 2rem; }
  .oplev-boxes { grid-template-columns: 1fr; }

  /* Illustrations: én kolonne */
  .illustrations-gallery { column-count: 1; padding: 6rem 1rem 3rem; }

  /* Contact */
  main.container { padding: 6rem 1rem 3rem; }
  main.container h1 { font-size: 2rem; }
}
