/* ============================================================================
   CSS STYLES - Büro für Bauten
   ============================================================================ */

/* Fonts */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Regular.otf") format("otf"),
    url(https://rsms.me/inter/font-files/Inter-Regular.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-SemiBold.otf") format("otf"),
    url(https://rsms.me/inter/font-files/Inter-SemiBold.woff2) format("woff2");
  font-weight: 600;
  font-style: normal;
}

/* Base Styles & Reset
   ================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  min-width: 360px;
  width: 100%;
  color: #1a1f28;
  background-color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography
   ================================ */

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: #1a1f28;
}

h1 {
  font-size: 54px;
  line-height: 60px;
}

h2 {
  font-size: 24px;
  line-height: 32px;
}

h3,
h4,
h5,
h6 {
  font-size: 18px;
  line-height: 24px;
}

/* Body Text */
p {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 30px;
}

/* Links */
a {
  color: #19181b;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

a:hover {
  color: #404040;
}

@media (max-width: 767px) {
  h1 {
    font-size: 36px;
    line-height: 40px;
  }

  h2 {
    font-size: 20px;
    line-height: 28px;
  }

  h3,
  h4,
  h5,
  h6 {
    font-size: 16px;
    line-height: 24px;
  }
}

/* Layout & Structure
   ================================ */

/* Generic section layout */
section {
  scroll-margin-top: 120px;
  padding: 80px 0;
}

@media (max-width: 767px) {
  section {
    scroll-margin-top: 88px;
  }
}

/* Components
   ================================ */

/* Buttons */
.button {
  display: inline-block;
  padding: 8px 24px;
  background-color: #19181b;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.button:hover {
  background-color: #404040;
}

.button--secondary {
  background-color: #19181b;
}

.button--secondary:hover {
  background-color: #404040;
}

.button--large {
  padding: 16px 32px;
  font-size: 1.2rem;
}

select {
  appearance: none;
  background: none;
  border: none;
  font-size: 16px;
  line-height: 16px;
  font-weight: 400;
  padding: 12px;
  border-radius: 40px;
  min-width: 48px;
  text-align: center;
  color: #19181b;
}

/* Page content container - sits above fixed hero */
.home-page .page-content,
.about-page .page-content {
  margin-top: calc(max(80svh, 540px));
  position: relative;
  z-index: 3;
}

/* Navbar
   ================================ */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;

  padding: 56px 0;
  max-width: 100%;

  z-index: 1000;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.975);
  backdrop-filter: blur(2px);
  box-shadow: 0 10px 30px 10px rgba(0, 0, 0, 0.025);
  border: 1px solid #fff;
  transition: padding 0.4s ease-out, top 0.4s ease-out, max-width 0.4s ease-out;
  box-sizing: border-box;
}

.navbar.scrolled {
  border: 1px solid #eee;
  padding: 40px 0;
  top: 16px;

  max-width: calc(min(1220px, 100% - 40px));
  width: 100%;
}

.navbar-inner {
  position: absolute;

  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  max-width: 1200px;
  width: 100%;
  padding: 0 20px;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.4s ease-out;
}

/* Logo styling */
.navbar-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-logo {
  width: auto;
  height: 20px;
  flex: none;
  display: inline-block;
}

.navbar-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.navbar-link {
  text-decoration: none;
  color: #fff;
  font-size: 16px;
  line-height: 16px;
  font-weight: 400;
  padding: 10px 20px;
  border-radius: 40px;
  background-color: #19181b;
  transition: background-color 0.2s ease;
}
.navbar-link:hover {
  background-color: #404040;
  color: #fff;
}

@media (max-width: 767px) {
  .navbar {
    padding: 42px 0;
  }

  .navbar.scrolled {
    top: 10px;
    padding: 32px 0;
    max-width: calc(100% - 20px);

    .navbar-inner {
      padding: 0 10px;
    }
  }

  .navbar-logo {
    height: 14px;
  }

  .navbar-actions {
    gap: 4px;
  }

  .navbar-link {
    font-size: 15px;
    line-height: 15px;
  }
}

@media (max-width: 400px) {
  .navbar-link {
    padding: 8px 16px;
  }

  select {
    padding: 8px;
    min-width: 40px;
  }
}

/* Footer
   ================================ */

.footer {
  position: relative;
  width: 100svw;
  margin-left: calc(50% - 50svw);
  box-sizing: border-box;
  padding: 40px 20px;
  background-color: #fff;
  color: #7f7b78;
  font-size: 16px;
  line-height: 32px;
  z-index: 4;
  margin-bottom: 0;
}

.footer-inner {
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  padding: 0 20px;
}

.footer-inner a {
  font-size: 16px;
  line-height: 32px;
  text-decoration: none;
  color: #7f7b78;
}

.footer-inner a:hover {
  color: #404040;
}

@media (max-width: 767px) {
  .footer-inner {
    flex-direction: column;
  }
}

/* Hero Section & Index Page
   ================================ */

/* Hero background */
.hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80svh;
  min-height: 540px;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: #19181b;
}

.hero canvas {
  position: relative !important;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  /* right: 0; */
  /* bottom: 0; */
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.35);
  /* background-color: #19181b; */

  /* background blur */
  /* backdrop-filter: blur(2px) saturate(0.5); */

  /* vignette */
  background-image: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0) rgba(0, 0, 0, 0.5)
  );
}

/* Hero overlay for index page */
.hero-overlay {
  position: fixed;
  inset: 0;
  height: 80svh;
  min-height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  width: 100%;
  max-width: 1200px;
  padding: 100px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
  pointer-events: auto;
}

/* Hero text styling */
.hero-title {
  /* font-size: clamp(1.8rem, 3.5vw, 2.8rem); */
  font-size: 64px;
  line-height: 68px;
  font-weight: 400;
  color: white;
  max-width: 580px;
  letter-spacing: -0.01em;
  /* max-width: 900px; */
  /* text-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.35); */
}

.hero-subtitle {
  /* font-size: clamp(1.15rem, 2.2vw, 1.45rem); */
  /* font-size: 24px;
  line-height: 36px; */
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
  color: #e8edf3;
  /* color: #7f7b78; */
  max-width: 480px;
  margin-bottom: 60px;
  /* max-width: 700px; */
  /* text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.25); */
}

.services-subtitle {
  /* font-size: clamp(1.15rem, 2.2vw, 1.45rem); */
  /* font-size: 24px;
  line-height: 36px; */
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
  /* color: #e8edf3; */
  color: #7f7b78;
  max-width: 480px;
  margin-bottom: 60px;
  /* max-width: 700px; */
  /* text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.25); */
}

.hero-scroll-down {
  width: fit-content;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 400;
  font-size: 18px;
  line-height: 20px;
}

.hero-scroll-down:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1279px) {
  .hero-title {
    font-size: 48px;
    line-height: 52px;
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 36px;
    line-height: 40px;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 32px;
    line-height: 36px;
  }
}

/* Content Sections
   ================================ */

/* Content sections - About & Contact */
.services,
.contact {
  background-color: #ffffff;
  position: relative;
  z-index: 3;
}

.leadership,
.about {
  background-color: #202020;
  position: relative;
  z-index: 3;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.services h2,
.projects h2,
.leadership h2,
.contact h2 {
  color: #19181b;
  font-weight: 400;
  margin-bottom: 40px;
  letter-spacing: 0.01em;
  font-size: 24px;
  line-height: 32px;
}

.leadership h2,
.about h2 {
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 40px;
  letter-spacing: 0.01em;
  font-size: 24px;
  line-height: 32px;
}

.about p {
  color: #9a9a9a;
  font-size: 18px;
  line-height: 30px;
  max-width: 440px;
  margin-bottom: 30px;
}

.contact {
  /* min-height: 640px; */
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.contact div {
  font-size: 18px;
  line-height: 30px;
}

.about-inner,
.contact-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;

  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.leadership-inner,
.projects-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;

  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.contact-content {
  width: 100%;
}

.contact-details-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

@media (max-width: 767px) {
  .contact-details-container {
    flex-direction: column;
    gap: 60px;
  }
}

.contact-details-container > * {
  flex: 1;
  width: 100%;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-details a {
  flex: none;
  width: fit-content;
  text-decoration: none;
  color: #19181b;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 30px;
  border: 1px solid #eee;
}

.contact-details a:hover {
  border-color: #ccc;
}

.contact-details a.contact-address {
  padding: 20px;
  min-width: 265px;
}

.contact-address-street,
.contact-address-zip {
  color: #7f7b78;
}

/* .contact-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.contact-image img {
  max-width: 570px;
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: 30px;
} */

.contact p {
  color: #7f7b78;
  font-size: 18px;
  line-height: 30px;
}

@media (max-width: 1023px) {
  .about-inner,
  .contact-inner {
    flex-direction: column;
    gap: 60px;
  }

  .contact-image img {
    height: 360px;
  }
}

/* About link styling */

.about-link-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}

.about-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 40px;
  font-weight: 400;
  font-size: 18px;
  line-height: 20px;
  transition: background-color 0.2s ease;
  letter-spacing: 0.01em;
}

.about-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Team section styling */

.about-content {
  flex: 1;
}

.about-team {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}

.team-member {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 275px;
}

.team-photo {
  width: 200px;
  height: 230px;
  border-radius: 30px;
  object-fit: cover;
  display: block;
}

.team-caption {
  font-size: 0.98rem;
  color: #ffffff;
  margin-top: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-name {
  font-size: 22px;
  font-weight: 400;
  line-height: 32px;
}

.team-role {
  font-size: 20px;
  font-weight: 400;
  color: #777777;
  line-height: 32px;
}

@media (max-width: 767px) {
  .about-team {
    flex-direction: column;
    gap: 60px;
  }
}

/* Services section
   ================================ */

/* Services section styling */
.services {
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  pointer-events: auto;
  width: 100%;
}

.services-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;

  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Services filters and cards */
.services-filters {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.services-filters button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  /* background: #f0f0f0; */
  background: none;
  border: 1px solid #ddd;
  font-size: 18px;
  line-height: 32px;
  border-radius: 40px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  /* opacity: 0.5; */
  color: #19181b;

  & .services-filter-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: transparent;
    border-radius: 50%;
    border: 1px solid #ddd;
  }

  &:hover {
    border-color: #999;
  }
}

.services-filters button.active {
  /* background: #19181b; */
  /* color: white; */
  color: #19181b;
  /* opacity: 1; */
  border: 1px solid #19181b;

  & .services-filter-icon {
    border-color: #19181b;
    background-color: #19181b;
  }
}

.services-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  gap: 20px;
  /* Ensure grid container can animate height changes if needed */
  transition: height 0.4s ease;
  /* Needed for absolute positioning of hidden cards */
  /* position: relative;  */
}

.services-card {
  background: #f4f4f4;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid #f4f4f4;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
  min-height: 130px;
  height: fit-content;

  /* Animation properties */
  /* transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); */
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  transition: transform 0.2s ease-in-out;

  &:hover {
    border-color: #aaa;
    transform: scale(1.01);
  }
}

.services-card.expanded {
  background: #ffffff;
  border: 1px solid #eee;
}

.services-card.inactive {
  opacity: 0.3;
  filter: grayscale(1);
  pointer-events: none;
  transform: scale(0.98);
}

.card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* justify-content: space-between; */
  gap: 20px;
  /* height: 100%; */
}

.card-header h3 {
  margin: 0;
  text-align: left;
  font-weight: 400;
}

.expand-btn {
  font-size: 20px;
  line-height: 20px;
  color: #19181b;
}

.card-description {
  text-align: left;
  color: #7f7b78;
  font-size: 16px;
  line-height: 20px;
  /* padding-left: 30px; */
}

/* About Page Styles
   ================================ */

/* Projects section
      ================================ */

.projects {
  background-color: #fafafa;
  position: relative;
  z-index: 3;
}

/* Projects Table */
.projects-table {
  width: 100%;
  overflow-x: auto;
}

.projects-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  /* font-size: 15px; */
  text-align: left;
}

.projects-data-table th {
  font-weight: 400;
  color: #7f7b78;
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.projects-data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  line-height: 24px;
}

.projects-data-table tr {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
}

.projects-data-table tr td,
.projects-data-table tr th {
  flex: 1;
}

.projects-data-table tbody tr {
  transition: background-color 0.3s ease-out;
}

.projects-data-table tbody tr.hover-active {
  background-color: #f5f5f5;
  transition: none; /* Immediate change on hover enter */
}

.projects-data-table tr:last-child td {
  border-bottom: none;
}

/* Specific column widths */
.projects-data-table th:nth-child(1),
.projects-data-table td:nth-child(1) {
  flex: none;
  white-space: nowrap;
  color: #7f7b78;
  width: 120px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.projects-data-table th:nth-child(2),
.projects-data-table td:nth-child(2) {
  flex: 2;
  font-weight: 400;
  max-width: 660px;
  /*text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;*/
}

.projects-data-table th:nth-child(3),
.projects-data-table td:nth-child(3) {
  flex: none;
  color: #7f7b78;
  /* width: 360px; */
  flex: 1;
}

.projects-data-table th:nth-child(4),
.projects-data-table td:nth-child(4) {
  flex: none;
  color: #7f7b78;
  flex: 1;
}

@media (max-width: 767px) {
  .projects-data-table {
    width: 100%;
  }

  .projects-data-table tbody {
    width: 100%;
  }

  .projects-data-table th,
  .projects-data-table td {
    display: block;
    width: 100%;
  }

  .projects-data-table tr {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
  }

  .projects-data-table thead {
    display: none; /* Hide headers on mobile if stacking */
  }

  .projects-data-table td {
    padding: 4px 0;
    border: none;
  }

  .projects-data-table td:nth-child(1) {
    text-align: left;
  }

  .projects-data-table th:nth-child(2),
  .projects-data-table td:nth-child(2) {
    flex: 1;
    max-width: initial;
    text-overflow: initial;
    overflow: initial;
    white-space: initial;
  }
}

/* Leadership Section */

.leadership-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 60px; /* Increased gap */
}

.leadership-team {
  display: flex;
  flex-direction: column;
  gap: 80px; /* Space between partners */
  width: 100%;
}

.leadership-member {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  /* padding: 40px 0; */
  padding: 0 0 40px;
  /* padding: 0; */
}

/* Left side: Profile info */
.leadership-member .team-member {
  flex: 1;
  gap: 20px;
}

.leadership-member-credentials {
  color: #777;
  font-size: 18px;
  line-height: 28px;
}

.leadership-member-contact {
  margin-top: 10px;
}

.leadership-member-email {
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.leadership-member-email:hover {
  text-decoration: none;
  color: #fff;
}

/* Right side: CV */
.leadership-member-cv {
  flex: 1;
  padding-top: 10px; /* Visual alignment with name */
}

.leadership-member-cv ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.leadership-member-cv-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;

  & strong {
    font-weight: 400;
    color: #fff;
    display: block;
    width: 104px;
    text-align: right;
    font-size: 18px;
    line-height: 28px;
    font-variant-numeric: tabular-nums;
  }
}

.leadership-member-cv li {
  position: relative;
  padding-left: 24px;
  color: #999;
  font-size: 18px;
  line-height: 28px;
}

/* Bullet point style */
.leadership-member-cv li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #fff;
}

/* First line of list item (Year) highlights */
.leadership-member-cv li {
  color: #777; /* Default text color */
}

@media (max-width: 767px) {
  .leadership-inner {
    gap: 0px;
  }

  .leadership-team {
    gap: 40px;
  }

  .leadership-member {
    flex-direction: column;
    gap: 60px;
  }

  .leadership-member .team-member {
    flex: auto;
    width: 100%;
  }
}

/* 
 Legal Page Styles
   ================================ */

.legal {
  background-color: #fafafa;
  padding-top: 160px;
}

.legal-inner {
  display: flex;
  flex-direction: row;
  gap: 20px;

  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.legal-title {
  top: 80px;
  margin: 80px 0;
  max-width: 570px;
  width: 100%;
}

.legal-content-wrapper {
  margin: 80px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.legal-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 570px;
  width: 100%;
}

@media (max-width: 1279px) {
  .legal-inner {
    flex-direction: column;
    gap: 0px;
  }

  .legal-title {
    margin: 40px 0;
  }

  .legal-content-wrapper {
    margin: 40px 0;
  }
}
