/* ============================================================
   VAN BERKUM — Corporate Law Firm
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-purple: #8947A6;
  --color-purple-hover: #a266c2;
  --color-purple-dark: #6e3388;
  --color-white: #FFFFFF;
  --color-bg-dark: #0a0410;
  --color-text-muted: rgba(255, 255, 255, 0.6);
  --color-link: var(--color-purple);

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans Pro', 'Source Sans 3', sans-serif;

  --nav-font-size: 0.95rem;
  --h1-font-size: 2.4rem;
  --h2-font-size: 1.6rem;
  --h3-font-size: 1.25rem;
  --body-font-size: 1rem;
  --small-font-size: 0.875rem;

  --max-content-width: 780px;
  --page-padding: 2rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--body-font-size);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-white);
  background-color: var(--color-bg-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Background Images --- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-bg--home {
  background-image: url('../images/background-homepage.webp');
}

.page-bg--content {
  background-image: url('../images/background-content.webp');
}

/* Fallback for browsers without WebP */
.no-webp .page-bg--home {
  background-image: url('../images/background-homepage.png');
}
.no-webp .page-bg--content {
  background-image: url('../images/background-content.png');
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: var(--h1-font-size);
  color: var(--color-purple);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: var(--h2-font-size);
  color: var(--color-purple);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: var(--h3-font-size);
  color: var(--color-purple);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-purple);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--color-purple-hover);
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.35rem;
}

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem var(--page-padding);
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  justify-content: space-between;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.nav-list a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--nav-font-size);
  color: var(--color-white);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--color-purple);
  text-decoration: none;
}

.nav-list a.active {
  color: var(--color-purple);
}

.nav-lang {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--nav-font-size);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-lang a {
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-lang a:hover,
.nav-lang a:focus-visible {
  color: var(--color-purple);
  text-decoration: none;
}

.nav-lang .separator {
  color: var(--color-text-muted);
  margin: 0 0.25rem;
}

.nav-lang .current-lang {
  color: var(--color-purple);
}

/* Hamburger menu button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Main Content --- */
.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Homepage layout */
.home-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: var(--page-padding);
  position: relative;
}

.home-logo {
  position: absolute;
  bottom: 5rem;
  right: var(--page-padding);
  max-width: 340px;
  height: auto;
}

/* Homepage quote */
.home-quote {
  text-align: center;
  margin: 0 0 3rem;
  padding: 0;
  border: none;
  max-width: 900px;
  letter-spacing: 0.04em;
}

.home-quote-text {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.7vw, 1.875rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.6;
  color: var(--color-white);
  margin-bottom: 0.75rem;
  white-space: nowrap;
}

.home-quote-author {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.7vw, 1.875rem);
  font-style: normal;
  font-weight: 600;
  color: var(--color-purple);
}

/* Content page layout */
.content-page {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 7rem var(--page-padding) 4rem;
  width: 100%;
}

/* Logo on content pages */
.content-logo {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10;
  max-width: 220px;
  height: auto;
  opacity: 0.85;
}

/* --- About/Over Page --- */
.about-intro {
  margin-bottom: 2rem;
}

.about-profile {
  margin-top: 2rem;
}

.about-photo {
  float: left;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: none;
  margin: 0.25rem 2rem 1.5rem 0;
  shape-outside: circle(50%);
}

/* Clear float after profile section */
.about-profile::after {
  content: '';
  display: table;
  clear: both;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.contact-block h2 {
  margin-top: 0;
  font-size: var(--h2-font-size);
}

.contact-block a {
  color: var(--color-white);
}

.contact-block a:hover {
  color: var(--color-purple-hover);
}

.contact-links {
  margin-top: 2rem;
}

.contact-links p {
  margin-bottom: 0.5rem;
}

/* --- M&A Page --- */
.ma-list {
  list-style: disc;
  padding-left: 1.25rem;
}

.ma-list li {
  margin-bottom: 0.5rem;
}

/* --- Legal/Notice Pages --- */
.legal-content h2 {
  margin-top: 2rem;
}

.legal-content h3 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-white);
  font-size: 1.05rem;
}

/* --- Cookie Banner --- */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(10, 4, 16, 0.95);
  border-top: 1px solid var(--color-purple);
  padding: 1.25rem var(--page-padding);
}

.cookie-banner.visible {
  display: block;
}

.cookie-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  font-size: var(--small-font-size);
  min-width: 250px;
}

.cookie-text a {
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: var(--font-body);
  font-size: var(--small-font-size);
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--color-purple);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.cookie-btn--accept {
  background: var(--color-purple);
  color: var(--color-white);
}

.cookie-btn--accept:hover {
  background: var(--color-purple-hover);
}

.cookie-btn--decline {
  background: transparent;
  color: var(--color-white);
}

.cookie-btn--decline:hover {
  background: rgba(137, 71, 166, 0.25);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --h1-font-size: 1.9rem;
    --h2-font-size: 1.35rem;
    --page-padding: 1.25rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    inset: 0;
    background: rgba(10, 4, 16, 0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 105;
  }

  .nav-menu.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .nav-list a {
    font-size: 1.25rem;
  }

  .nav-lang {
    font-size: 1.1rem;
  }

  .home-content {
    justify-content: center;
    align-items: center;
    padding-bottom: 6rem;
  }

  .home-quote-text {
    white-space: normal;
  }

  .home-logo {
    max-width: 200px;
    bottom: 3rem;
    right: 50%;
    transform: translateX(50%);
  }

  .content-logo {
    max-width: 150px;
    bottom: 1rem;
    right: 1rem;
    opacity: 0.7;
  }

  .about-photo {
    float: none;
    display: block;
    margin: 0 auto 1.5rem;
    width: 180px;
    height: 180px;
    shape-outside: none;
  }

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

  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-buttons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --h1-font-size: 1.65rem;
    --h2-font-size: 1.2rem;
    --page-padding: 1rem;
  }

  .home-logo {
    max-width: 220px;
  }

  .about-photo {
    width: 150px;
    height: 150px;
  }
}
