/* =============================
   Reset & Base
   ============================= */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --stone-50: #fafaf9;
  --stone-200: #e7e5e3;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-800: #292524;
  --stone-900: #1c1917;

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Playfair Display", ui-serif, Georgia, serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--stone-50);
  color: var(--stone-900);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

::selection {
  background-color: var(--stone-900);
  color: var(--stone-50);
}

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

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

ul {
  list-style: none;
}

address {
  font-style: normal;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* =============================
   Layout
   ============================= */

.container {
  max-width: 1258px;
  margin: 0 auto;
  padding: 0 37px;
}

/* =============================
   Navbar
   ============================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  padding: 1.5rem 0;
  color: white;
  transition: all 0.5s;
}

.navbar.scrolled {
  background: rgba(250, 250, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 0;
  color: var(--stone-900);
}

.navbar-inner {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: auto;
}

.logo {
  margin-right: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.logo-icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: white;
}

.navbar.scrolled .logo-icon {
  fill: var(--stone-900);
}

.logo span {
  opacity: 0.5;
}

.nav-links {
  display: none;
  gap: 2rem;
  margin-right: 2rem;
}

.nav-links a {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.5;
}

.nav-cta {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  transition: opacity 0.3s;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

.nav-cta:hover {
  opacity: 0.5;
}

.menu-btn {
  display: block;
}

.menu-icon-close {
  display: none;
}

.menu-btn.open .menu-icon {
  display: none;
}

.menu-btn.open .menu-icon-close {
  display: block;
}

.nav-cta {
  display: none;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
  .nav-cta {
    display: inline-flex;
  }
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 2rem;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.5rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s;
}

.mobile-menu-close:hover {
  opacity: 0.7;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.mobile-nav-link {
  color: white;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: opacity 0.3s;
  cursor: pointer;
}

.mobile-nav-link:hover {
  opacity: 0.7;
}

.mobile-nav-cta {
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  background: white;
  color: var(--stone-900);
  border: 1px solid white;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.mobile-nav-cta:hover {
  background: var(--stone-200);
  border-color: var(--stone-200);
}

/* =============================
   Hero
   ============================= */

.hero {
  height: 100vh;
  position: relative;
  background: url('images/hero.png') center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  --hero-offset: 90px;
}

/* Ebene 2: Logo + Text hinter dem Gebaeude */
.hero-text-behind {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-100% - var(--hero-offset)));
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.5vw;
  font-family: var(--font-sans);
  font-size: 8.1vw;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

.hero-text-logo {
  height: 1.1em;
  width: auto;
  flex-shrink: 0;
}

/* Ebene 3: Freigestelltes Gebaeude (verdeckt den Text) */
.hero-building {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: url('images/herobuilding.png') center / cover no-repeat;
  pointer-events: none;
}

/* Dark gradient for text readability */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
  z-index: 3;
  pointer-events: none;
}

/* Label centered above HAUPTWERK */
.hero-pill {
  position: absolute;
  z-index: 4;
  top: calc(50% - 8.1vw - var(--hero-offset) - 2rem - 50px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

/* Content overlay */
.hero-content {
  position: absolute;
  bottom: 5rem;
  left: 0;
  right: 0;
  z-index: 4;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
  color: white;
  text-align: left;
}

.hero-content::before {
  content: '';
  position: absolute;
  width: 990px;
  height: 660px;
  left: -250px;
  top: -46px;
  background:
    linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.25) 100%),
    radial-gradient(
      circle at 30% 50%,
      rgba(0, 0, 0, 0.35) 0%,
      rgba(0, 0, 0, 0.3) 30%,
      rgba(0, 0, 0, 0) 100%
    );
  border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%;
  z-index: -1;
  display: none;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: 4.8rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.35rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 3rem;
  line-height: 1.5;
}

.hero-cta,
.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-width: 12rem;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.875rem 1.75rem;
  backdrop-filter: blur(8px);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.hero-cta {
  color: var(--stone-900);
  background: white;
  border: 1px solid white;
}

.hero-cta:hover {
  background: var(--stone-200);
  border-color: var(--stone-200);
}

.hero-cta-secondary {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-cta svg,
.hero-cta-secondary svg {
  width: 14px;
  height: 14px;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero {
    --hero-offset: 70px;
  }

  .hero-pill {
    top: calc(50% - 7.5vw - var(--hero-offset) - 2rem - 50px);
    font-size: 0.8rem;
  }

  .hero-text-behind {
    font-size: 7.5vw;
    gap: 1.2vw;
    transform: translate(-50%, calc(-100% - var(--hero-offset)));
  }
}

@media (max-width: 767px) {
  .hero {
    --hero-offset: 30px;
    background-position: 58% center;
  }

  .hero-building {
    background-position: 58% center;
  }

  .hero-pill {
    top: calc(33% - 9.72vw - var(--hero-offset) - 1.5rem - 50px);
    font-size: 0.75rem;
  }

  .hero-text-behind {
    font-size: 9.72vw;
    top: 33%;
    transform: translate(-50%, calc(-100% - var(--hero-offset)));
  }

  .hero-content {
    padding: 0 1.5rem;
    bottom: 3rem;
    text-align: center;
  }

  .hero-content::before {
    width: 120%;
    height: 380px;
    left: -10%;
    top: -20px;
    background:
      linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 100%),
      radial-gradient(
        ellipse at 50% -30%,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0) 100%
      );
    border-radius: 50%;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-headline {
    font-size: 2.75rem;
  }

  .hero-sub {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
  }

  .hero-cta,
  .hero-cta-secondary {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
  }
}

/* =============================
   Services
   ============================= */

.services {
  padding: 8rem 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, var(--stone-50) 75%),
    linear-gradient(var(--stone-300) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--stone-300) 0.5px, transparent 0.5px);
  background-color: var(--stone-50);
  background-size: 100% 100%, 37px 37px, 37px 37px;
  background-position: center, 0 0, 37px 0;
  position: relative;
  overflow: hidden;
}

/* Logo watermark */
.services::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -5%;
  width: 600px;
  height: 600px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 170.08 170.08' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%231c1917' d='M14.187,1.848c2.101,0,4.2,0,6.301,0c27.202,58.228,45.878,70.551,64.559,70.551 c18.678,0,37.361-12.323,64.549-70.551c2.101,0,4.197,0,6.299,0c-6.951,55.46-13.904,110.924-20.855,166.385 c-16.666-19.621-33.332-39.243-49.998-58.862c-16.666,19.619-33.331,39.241-49.997,58.862 C28.092,112.771,21.139,57.308,14.187,1.848z M140.519,33.296c-4.051,7.033-8.41,13.894-13.374,20.315 c-3.255,4.212-6.768,8.236-10.684,11.838c-2.004,1.841-4.113,3.573-6.336,5.137c-2.016,1.416-4.123,2.693-6.332,3.787 c-2.04,1.012-4.168,1.864-6.347,2.526c-4.013,1.223-8.2,1.798-12.399,1.801c-4.197,0-8.403-0.576-12.41-1.801 c-4.526-1.38-8.795-3.588-12.675-6.312c-2.227-1.562-4.325-3.296-6.325-5.138c-1.466-1.351-2.88-2.761-4.245-4.216 c-2.275-2.43-4.411-4.989-6.445-7.621c-4.966-6.425-9.332-13.292-13.385-20.33c3.481,39.791,6.962,79.584,10.444,119.376 c16.023-18.866,32.046-37.729,48.071-56.592c14.187,16.704,28.378,33.41,42.566,50.116 C133.934,108.554,137.226,70.924,140.519,33.296z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.03;
  pointer-events: none;
}

.services-header {
  margin-bottom: 4rem;
}

.section-pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone-500);
  border: 1px solid var(--stone-300);
  border-radius: 999px;
  padding: 0.375rem 1rem;
  margin-bottom: 1.25rem;
}

.services-header h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--stone-200);
  position: relative;
  --cross-bg:
    linear-gradient(var(--stone-400), var(--stone-400)) center / 1px 100% no-repeat,
    linear-gradient(var(--stone-400), var(--stone-400)) center / 100% 1px no-repeat;
  --cross-size: 9px;
}

.service-card {
  padding: 2rem;
  position: relative;
  background: var(--stone-50);
}

.service-card:not(:last-child) {
  border-bottom: 1px solid var(--stone-200);
}

.service-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--stone-900);
  margin-bottom: 1.5rem;
  stroke-width: 1.5;
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--stone-500);
  max-width: 30rem;
}

@media (min-width: 768px) {
  .services {
    padding: 10rem 0;
    background-position: center, 0 0, 37px 0;
  }

  .services-header h2 {
    font-size: 3rem;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
  }

  .service-card {
    padding: 2.5rem;
  }

  .service-card:not(:last-child) {
    border-bottom: none;
  }

  /* Vertical divider */
  .service-card:nth-child(odd) {
    border-right: 1px solid var(--stone-200);
  }

  /* Horizontal dividers (all except last row) */
  .service-card:nth-child(-n+4) {
    border-bottom: 1px solid var(--stone-200);
  }

  .service-card h3 {
    font-size: 1.5rem;
  }

  /* Cross marks at all grid junctions */
  .service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--cross-size);
    height: var(--cross-size);
    z-index: 2;
    transform: translate(-50%, -50%);
    background: var(--cross-bg);
  }

  .service-card:nth-child(even)::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: var(--cross-size);
    height: var(--cross-size);
    z-index: 2;
    transform: translate(50%, -50%);
    background: var(--cross-bg);
  }

  .service-card:nth-child(5)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: var(--cross-size);
    height: var(--cross-size);
    z-index: 2;
    transform: translate(-50%, 50%);
    background: var(--cross-bg);
  }

  /* Bottom row crosses via grid container */
  .services-grid::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: var(--cross-size);
    height: var(--cross-size);
    z-index: 2;
    transform: translate(-50%, 50%);
    background: var(--cross-bg);
  }

  .services-grid::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: var(--cross-size);
    height: var(--cross-size);
    z-index: 2;
    transform: translate(50%, 50%);
    background: var(--cross-bg);
  }
}

/* =============================
   Animations
   ============================= */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in[data-delay="1"] { transition-delay: 0.4s; }
.fade-in[data-delay="2"] { transition-delay: 0.8s; }
.fade-in[data-delay="3"] { transition-delay: 1s; }

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up[data-delay="1"] { transition-delay: 0.2s; }
.fade-up[data-delay="2"] { transition-delay: 0.4s; }

/* =============================
   Contact Modal
   ============================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 1rem;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone-400);
  transition: color 0.3s;
  z-index: 101;
}

.modal-close:hover {
  color: var(--stone-900);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  color: var(--stone-900);
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--stone-500);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--stone-900);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--stone-200);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--stone-900);
  background: var(--stone-50);
  transition: border-color 0.3s, background-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--stone-500);
  background: white;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-sans);
}

.form-submit {
  width: 100%;
  padding: 0.875rem 1.75rem;
  background: var(--stone-900);
  color: white;
  border: 1px solid var(--stone-900);
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}

.form-submit:hover {
  background: var(--stone-800);
  border-color: var(--stone-800);
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-message {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  text-align: center;
  display: none;
}

.form-message.success {
  background: #dbeafe;
  color: #0c4a6e;
  display: block;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
  display: block;
}

@media (max-width: 767px) {
  .modal {
    padding: 1.75rem;
  }

  .modal-title {
    font-size: 1.5rem;
  }
}

/* =============================
   Legal Pages (Impressum, Datenschutz)
   ============================= */

.legal-header {
  padding: 8rem 0 3rem;
  text-align: center;
}

.legal-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: 1.25rem;
}

.legal-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 400;
  color: var(--stone-900);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.legal-subtitle {
  font-size: 1.0625rem;
  color: var(--stone-400);
  font-weight: 300;
}

.legal-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

.legal-divider {
  border: none;
  border-top: 1px solid var(--stone-200);
  margin-bottom: 3rem;
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section h2 {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--stone-900);
  letter-spacing: -0.01em;
  margin-bottom: 0.625rem;
}

.legal-section p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--stone-500);
}

.legal-section p + p {
  margin-top: 0.75rem;
}

.legal-section a {
  color: var(--stone-900);
  transition: color 0.3s;
}

.legal-section a:hover {
  color: var(--stone-500);
}

/* Imprint grid */
.imprint-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4rem;
}

.imprint-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: 0.5rem;
}

.imprint-value {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--stone-900);
}

.imprint-value a {
  transition: color 0.3s;
}

.imprint-value a:hover {
  color: var(--stone-500);
}

@media (max-width: 640px) {
  .legal-title {
    font-size: 2.5rem;
  }

  .imprint-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* =============================
   Team Cards
   ============================= */

.team-card {
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--stone-200);
}

.team-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.team-card-photo {
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.team-card-photo img {
  width: 100%;
  height: auto;
  position: relative;
  top: -30px;
}

.team-card-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  aspect-ratio: 4 / 3;
}

.team-photo-initials {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--stone-400);
  user-select: none;
}

.team-card-photo::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(to top, white 0%, rgba(255,255,255,0.4) 40%, transparent 100%);
  pointer-events: none;
}

.team-card-info {
  padding: 2rem 1.5rem 2.5rem;
}

.team-card-role {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin-bottom: 0.5rem;
}

.team-card-name {
  font-size: 1.625rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--stone-900);
  line-height: 1.2;
}

.team-card-divider {
  width: 24px;
  height: 1px;
  background: var(--stone-400);
  margin: 1.25rem 0;
}

.team-card-cv {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5rem;
}

.team-card-cv tr + tr td {
  padding-top: 0.625rem;
}

.team-cv-year {
  font-size: 0.8125rem;
  color: var(--stone-400);
  white-space: nowrap;
  vertical-align: top;
  padding-right: 1.5rem;
  line-height: 1.5;
}

.team-cv-desc {
  font-size: 0.8125rem;
  color: var(--stone-800);
  vertical-align: top;
  line-height: 1.5;
}

.team-card-education {
  padding-top: 1.25rem;
  border-top: 1px solid var(--stone-200);
}

.team-card-education p {
  font-size: 0.8125rem;
  color: var(--stone-500);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .team-card {
    grid-template-columns: 2fr 3fr;
    gap: 2.5rem;
    margin-bottom: 4rem;
    padding-bottom: 4rem;
  }

  .team-card-photo {
    align-self: center;
  }

  .team-card-info {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .team-card-name {
    font-size: 1.75rem;
  }

  .team-cv-year {
    padding-right: 2.5rem;
  }
}

/* =============================
   Footer Mobile
   ============================= */

@media (max-width: 767px) {
  footer .grid {
    text-align: center;
  }

  footer h3,
  footer h4 {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  footer ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  footer .flex {
    justify-content: center;
  }
}
