/* =========================================================
   PALMA LAB
   ========================================================= */

/* Icon libraries used by the common footer */

:root {
  --max-width: 1400px;
  --content-width: 1100px;
  --page-padding: 5%;

  --gold: #ffc425;
  --gold-dark: #9b6b00;

  --brown: #492f24;
  --brown-dark: #2f211a;

  --text: #262626;
  --text-mid: #555555;
  --text-light: #777777;

  --border: #e8e5e2;
  --soft-background: #faf9f7;
}


/* =========================================================
   GLOBAL
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}

img {
  max-width: 100%;
}

a {
  color: var(--brown);
}


/* =========================================================
   HEADER
   ========================================================= */

header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);

  min-height: 92px;

  margin: 0 auto;

  padding-left: var(--page-padding);
  padding-right: var(--page-padding);

  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* =========================================================
   LOGO
   ========================================================= */

.logo {
  flex-shrink: 0;
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  display: block;

  width: 205px;
  height: auto;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav a {
  position: relative;

  padding: 34px 0 30px;

  color: #383838;
  text-decoration: none;

  font-size: 0.93rem;
  font-weight: 500;

  white-space: nowrap;
}

nav a:hover {
  color: var(--brown);
}

nav a.active {
  color: var(--brown);
  font-weight: 600;
}

nav a.active::after,
nav a:hover::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: 25px;

  height: 2px;

  background: var(--gold);
}


/* =========================================================
   EYEBROW
   ========================================================= */

.eyebrow {
  margin: 0 0 18px;

  color: var(--gold-dark);

  font-size: 0.78rem;
  font-weight: 700;

  letter-spacing: 0.15em;
  text-transform: uppercase;
}


/* =========================================================
   HOMEPAGE
   ========================================================= */

.hero {
  width: 100%;
  max-width: var(--max-width);

  margin: 0 auto;

  padding: 95px var(--page-padding) 75px;
}

.hero h1 {
  max-width: 1000px;

  margin: 0 0 28px;

  color: var(--brown-dark);

  font-size: clamp(1.8rem, 2.7vw, 2.8rem);
  line-height: 1.12;

  letter-spacing: -0.025em;
}

.hero-text {
  max-width: 820px;

  margin: 0 0 36px;

  color: var(--text-mid);

  font-size: 1.18rem;
  line-height: 1.75;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;

  padding: 11px 22px;

  text-decoration: none;

  font-size: 0.94rem;
  font-weight: 600;

  border-radius: 3px;
}

.primary-button {
  background: var(--gold);
  border: 2px solid var(--gold);

  color: #241c14;
}

.primary-button:hover {
  background: #e8b31a;
  border-color: #e8b31a;

  color: #241c14;
}

.secondary-button {
  background: #ffffff;
  border: 2px solid #d5aa21;

  color: var(--brown);
}

.secondary-button:hover {
  background: #fff9e7;
}


/* =========================================================
   STANDARD PAGE
   ========================================================= */

.page {
  width: 100%;
  max-width: var(--max-width);

  margin: 0 auto;

  padding: 85px var(--page-padding) 70px;
}

.page-intro {
  max-width: 900px;
  margin-bottom: 70px;
}

.page-intro h1 {
  margin: 0 0 28px;

  color: var(--brown-dark);

  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 1.05;

  letter-spacing: -0.035em;
}

.page-lead {
  max-width: 800px;

  margin: 0;

  color: var(--text-mid);

  font-size: 1.18rem;
  line-height: 1.8;
}


/* =========================================================
   GENERAL CONTENT
   ========================================================= */

.content-section {
  max-width: var(--content-width);

  margin-bottom: 75px;
}

.content-section h2 {
  margin: 0 0 18px;

  color: var(--brown-dark);

  font-size: 2rem;
  line-height: 1.2;
}

.content-section h3 {
  color: var(--brown-dark);
}

.content-section p,
.content-section li {
  color: var(--text-mid);

  font-size: 1.05rem;
  line-height: 1.8;
}

.content-section p {
  max-width: 820px;
}

.content-section ul {
  max-width: 820px;

  padding-left: 21px;
}

.section-divider {
  width: 100%;
  max-width: var(--content-width);

  margin: 10px 0 70px;

  border: 0;
  border-top: 1px solid var(--border);
}


/* =========================================================
   TEAM GRID
   ========================================================= */

.team-grid {
  width: 100%;
  max-width: 1000px;

  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 70px;

  align-items: start;

  margin-bottom: 90px;
}

.team-member {
  min-width: 0;
}


/* Team member photos */

.team-member-photo {
  width: 220px;
  height: 275px;

  margin-bottom: 25px;

  overflow: hidden;

  background: #f4f2ef;
}

.team-member-photo img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center top;
}


/* Photo placeholder */

.team-photo-placeholder {
  display: flex;

  align-items: center;
  justify-content: center;

  background: #f4f2ef;

  border: 1px solid var(--border);

  color: #aaaaaa;

  font-size: 0.78rem;
  font-weight: 600;

  letter-spacing: 0.12em;
  text-transform: uppercase;
}


/* Team member information */

.team-member-content {
  max-width: 400px;
}

.team-member-content h2 {
  margin: 0 0 7px;

  color: var(--brown-dark);

  font-size: 1.8rem;
  line-height: 1.15;
}

.pi-kicker {
  margin: 0 0 9px;

  color: var(--gold-dark);

  font-size: 0.76rem;
  font-weight: 700;

  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pi-position {
  margin: 0 0 7px;

  color: var(--brown);

  font-size: 1.02rem;
  font-weight: 600;
}

.pi-departments {
  margin: 0 0 22px;

  color: var(--text-light);

  font-size: 0.94rem;
  line-height: 1.6;
}

.team-email {
  margin: 22px 0 0;

  color: var(--text-mid);

  font-size: 0.95rem;
  line-height: 1.7;
}


/* =========================================================
   OLD PI PROFILE
   Kept for compatibility if used elsewhere
   ========================================================= */

.pi-profile {
  display: grid;

  grid-template-columns: 220px minmax(0, 650px);

  gap: 48px;

  align-items: start;

  max-width: 950px;

  margin-bottom: 90px;
}

.pi-photo {
  width: 220px;
  height: 275px;

  overflow: hidden;

  background: #f4f2ef;
}

.pi-photo img {
  display: block;

  width: 220px;
  height: 275px;

  object-fit: cover;
  object-position: center top;
}

.pi-content {
  padding-top: 2px;
}

.pi-content h2 {
  margin: 0 0 7px;

  color: var(--brown-dark);

  font-size: 2.15rem;
  line-height: 1.12;
}

.pi-contact p {
  margin: 22px 0 0;

  color: var(--text-mid);

  font-size: 0.95rem;
  line-height: 1.7;
}


/* =========================================================
   TEAM RECRUITING
   ========================================================= */

.team-recruiting {
  width: 100%;
  max-width: 1050px;

  padding: 50px 55px;

  background: #faf7ee;

  border-top: 3px solid var(--gold);
}

.team-recruiting-inner {
  max-width: 720px;
}

.team-recruiting-label {
  margin: 0 0 10px;

  color: var(--gold-dark);

  font-size: 0.78rem;
  font-weight: 700;

  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.team-recruiting h2 {
  margin: 0 0 18px;

  color: var(--brown-dark);

  font-size: 2rem;
}

.team-recruiting p {
  margin: 0 0 28px;

  color: var(--text-mid);

  font-size: 1.05rem;
  line-height: 1.75;
}


/* =========================================================
   CONTACT PAGE
   ========================================================= */

.contact-page {
  width: 100%;
  max-width: var(--max-width);

  margin: 0 auto;

  padding: 80px var(--page-padding) 75px;
}

.contact-hero-image {
  width: 100%;
  max-width: 1100px;

  height: 430px;

  margin-bottom: 32px;

  overflow: hidden;
}

.contact-hero-image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}


/* =========================================================
   CONTACT THREE-CARD GRID
   ========================================================= */

.contact-grid {
  width: 100%;
  max-width: 1100px;

  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 20px;
}

.contact-box {
  min-width: 0;
  min-height: 280px;

  padding: 30px;

  background: #faf9f7;

  border-top: 3px solid var(--gold);
}

.contact-box h2 {
  margin: 0 0 20px;

  color: var(--brown-dark);

  font-size: 1.55rem;
  line-height: 1.2;
}

.contact-box p {
  margin: 0 0 17px;

  color: var(--text-mid);

  font-size: 0.97rem;
  line-height: 1.7;
}

.contact-box a {
  color: var(--brown);

  text-decoration: none;

  font-size: 0.95rem;
  font-weight: 600;
}

.contact-box a:hover {
  text-decoration: underline;

  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}


/* =========================================================
   JOIN
   ========================================================= */

.opportunity {
  max-width: 820px;

  padding-bottom: 45px;

  margin-bottom: 45px;

  border-bottom: 1px solid var(--border);
}

.opportunity:last-child {
  border-bottom: 0;
}

.opportunity h2 {
  margin: 0 0 15px;

  color: var(--brown-dark);

  font-size: 1.9rem;
}

.opportunity p {
  color: var(--text-mid);

  font-size: 1.05rem;
  line-height: 1.8;
}


/* =========================================================
   PUBLICATIONS
   ========================================================= */

.publication {
  max-width: 900px;

  margin-bottom: 32px;
}

.publication-title {
  margin-bottom: 7px;

  color: var(--brown-dark);

  font-weight: 600;
}

.publication-meta {
  color: var(--text-light);

  font-size: 0.96rem;
}


/* =========================================================
   INTERNAL
   ========================================================= */

.internal-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 24px;

  margin-top: 40px;
}

.internal-card {
  padding: 26px;

  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);

  background: #ffffff;
}

.internal-card h2 {
  margin: 0 0 10px;

  color: var(--brown-dark);
}

.internal-card p {
  margin: 0;

  color: var(--text-light);
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
  width: 100%;

  color: var(--text-light);

  background: #ffffff;

  border-top: 1px solid var(--border);
}


/* =========================================================
   FOOTER MAIN ROW
   ========================================================= */

.footer-main-row {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 24px;
  padding: 38px var(--page-padding) 14px;

  position: relative;
  z-index: 3;
}


/* =========================================================
   FOOTER SOCIAL / PROFILE LINKS
   ========================================================= */

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 22px;

  margin: 0;
  padding: 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 26px;
  height: 26px;

  color: var(--brown-dark);
  text-decoration: none;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.footer-social svg {
  display: block;
  width: 22px;
  height: 22px;
}

.footer-social .linkedin-icon {
  width: 20px;
  height: 20px;
}

.footer-social a:hover {
  color: var(--gold);
  transform: translateY(-2px);
}

.footer-social a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}


/* =========================================================
   FOOTER INSTITUTIONAL LINKS
   ========================================================= */

.footer-info {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  width: 100%;

  margin: 0;
  padding: 0;

  color: var(--text-light);

  font-size: 0.86rem;
  line-height: 1.5;

  text-align: center;
}

.footer-info a {
  color: var(--brown);
  text-decoration: none;
}

.footer-info a:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

.footer-divider {
  margin: 0 7px;
  color: var(--text-light);
}


/* Legacy footer support */

.footer-content {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 15px var(--page-padding) 8px;
  text-align: center;
  font-size: 0.86rem;
  position: relative;
  z-index: 2;
}

.footer-content a {
  color: var(--brown);
  text-decoration: none;
}

.footer-content a:hover {
  color: var(--brown-dark);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}


/* =========================================================
   MOUNTAIN FOOTER
   ========================================================= */

/*
   Keep the complete mountain image visible.
   The whole image is pulled upward by 200px.
*/

.footer-mountains {
  width: 100%;

  margin-top: -380px;

  overflow: visible;
}

.footer-mountains img {
  display: block;

  width: 100%;
  height: auto;

  margin: 0;

  opacity: 0.28;

  pointer-events: none;
  user-select: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 950px) {

  :root {
    --page-padding: 6%;
  }

  .header-inner {
    min-height: auto;

    padding-top: 17px;
    padding-bottom: 14px;

    flex-direction: column;
    align-items: flex-start;
  }

  .logo img {
    width: 185px;
  }

  nav {
    width: 100%;

    margin-top: 12px;

    gap: 20px;

    flex-wrap: wrap;
  }

  nav a {
    padding: 5px 0 8px;
  }

  nav a.active::after,
  nav a:hover::after {
    bottom: 2px;
  }

  .page,
  .contact-page {
    padding-top: 65px;
  }


  /* Team */

  .team-grid {
    gap: 45px;
  }

  .team-member-photo {
    width: 190px;
    height: 238px;
  }

  .pi-profile {
    grid-template-columns: 190px 1fr;

    gap: 38px;
  }

  .pi-photo,
  .pi-photo img {
    width: 190px;
    height: 238px;
  }


  /* Contact */

  .contact-hero-image {
    height: 350px;
  }

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

  .contact-box:last-child {
    grid-column: 1 / -1;
  }


  /* Internal */

  .internal-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

  :root {
    --page-padding: 7%;
  }

  .logo img {
    width: 165px;
  }

  nav {
    gap: 8px 18px;
  }

  nav a {
    font-size: 0.87rem;
  }


  /* Homepage */

  .hero {
    padding-top: 55px;
    padding-bottom: 55px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-text {
    font-size: 1.05rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: flex-start;
  }


  /* Standard pages */

  .page,
  .contact-page {
    padding-top: 52px;
    padding-bottom: 45px;
  }

  .page-intro {
    margin-bottom: 50px;
  }


  /* Team */

  .team-grid {
    grid-template-columns: 1fr;

    gap: 55px;

    margin-bottom: 65px;
  }

  .team-member-photo {
    width: 180px;
    height: 225px;
  }

  .pi-profile {
    display: block;

    margin-bottom: 65px;
  }

  .pi-photo,
  .pi-photo img {
    width: 180px;
    height: 225px;
  }

  .pi-photo {
    margin-bottom: 28px;
  }

  .team-recruiting {
    padding: 35px 28px;
  }


  /* Contact */

  .contact-hero-image {
    height: 250px;

    margin-bottom: 22px;
  }

  .contact-grid {
    grid-template-columns: 1fr;

    gap: 16px;
  }

  .contact-box:last-child {
    grid-column: auto;
  }

  .contact-box {
    min-height: 0;

    padding: 26px;
  }


  /* Footer */

  .footer-main-row {
    gap: 18px;
    padding-top: 30px;
  }

  .footer-social {
    gap: 18px;
  }

  .footer-social svg {
    width: 20px;
    height: 20px;
  }

  .footer-social .linkedin-icon {
    width: 18px;
    height: 18px;
  }

  .footer-info {
    max-width: 520px;
    font-size: 0.78rem;
    line-height: 1.7;
  }

  .footer-divider {
    margin: 0 5px;
  }

  .footer-content {
    padding-bottom: 5px;
    line-height: 1.8;
  }


  /* Mountains */

  .footer-mountains {
    width: 100%;

    margin-top: -200px;

    overflow: visible;
  }

  .footer-mountains img {
    display: block;

    width: 100%;
    height: auto;

    margin: 0;
  }

}
