/* --- RESET & VARIABLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
    --text-color: #1a1a1a;
    --bg-white: #ffffff;
    --width-text: 35%; 
    --width-image: 65%;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- TELEPHONE NUMBER FIX (Prevents Blue Links on iOS) --- */
a[href^="tel"] {
    color: inherit;
    text-decoration: none;
}

/* --- TYPOGRAPHY --- */
h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #000;
}

h4 {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
    margin-top: 1.5rem;
}

p {
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 1.2rem;
    color: #222;
    line-height: 1.7;
}

.small-title {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: #666;
    border-bottom: 1px solid #000;
    display: inline-block;
    padding-bottom: 5px;
}

.quote-block {
    margin: 2rem 0;
    padding-left: 1.2rem;
    border-left: 1px solid #000;
}
.quote-block p {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    color: #444;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.quote-block cite {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

.expertise-list { list-style: none; margin-bottom: 2rem; }
.expertise-list li {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    padding-left: 1rem;
    position: relative;
    font-weight: 300;
}
.expertise-list li::before { content: "•"; position: absolute; left: 0; color: #999; }


/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}
.hero-center-logo {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 80%;
}
.main-logo-img {
    max-width: 400px;
    width: 100%;
    height: auto;
    /* Black logo with white shadow for legibility */
    filter: drop-shadow(0px 0px 8px rgba(255,255,255,0.8));
}

/* SCROLL INDICATOR */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.4); /* Off-white semi-transparent */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    animation: bounce 2s infinite;
}
.scroll-indicator svg {
    color: #000; /* Arrow color */
    opacity: 0.7;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}


/* --- SPLIT LAYOUT --- */
.split-section {
    display: flex;
    /* min-height ensures desktop text doesn't overlap if window is short */
    min-height: 800px; 
    height: 100vh;
    width: 100%;
    border-bottom: 1px solid #f9f9f9;
}

.text-panel {
    width: var(--width-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: #fff;
    height: 100%;
    /* Handle scrolling if text is very long on short screens */
    overflow-y: auto; 
}
.text-panel::-webkit-scrollbar { display: none; }
.content-wrapper { max-width: 400px; }

.image-panel {
    width: var(--width-image);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.reverse-layout { flex-direction: row-reverse; }


/* --- FADE BAND --- */
.fade-band {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    z-index: 10;
    pointer-events: none;
}
.band-logo {
    position: absolute;
    top: 30px;
    height: 25px;
    width: auto;
    opacity: 0.9;
}
.left-align { left: 40px; }
.right-align { right: 40px; }


/* --- PRINCIPALS (Portraits) --- */
.principal-portraits {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 70px 0;
}

.portrait-card {
    margin: 0;
    text-align: center;
}

.portrait-wrap {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
}

.portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transform: scale(1.02);
}

/* Soft fade to white at the edge */
.portrait-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
        rgba(255,255,255,0) 55%,
        rgba(255,255,255,0.55) 75%,
        rgba(255,255,255,0.95) 100%);
    pointer-events: none;
}

.portrait-caption {
    margin-top: 14px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}


/* --- CONTACT DETAILS (Bottom of Text) --- */
.contact-line {
    margin-top: 3rem;
}
.contact-line .divider {
    width: 40px;
    height: 1px;
    background: #000;
    margin-bottom: 0.5rem;
}
.contact-line p {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000;
    margin: 0;
}


/* --- ACCESS SECTION (Buttons) --- */
.access-section {
    padding: 6rem 2rem;
    background: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quote-container { max-width: 600px; margin: 0 auto 3rem auto; }
.access-quote {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    color: #000;
}

.circles-container {
    display: flex;
    gap: 4rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.circle-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #000;
}

.circle-text {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.4;
}
.circle-text span { font-weight: 400; color: #666; font-size: 0.7rem; }

.circle-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden; /* Clips the square image to a circle */
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

.circle-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills circle without stretch */
}

.circle-link:hover .circle-wrapper { transform: scale(1.05); }

.access-contact {
    margin-top: 4rem;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 700;
}


/* --- FINAL FOOTER --- */
.final-section {
    background: #fff;
    padding-bottom: 4rem;
}
.portrait-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    margin-bottom: 4rem;
}
.portrait-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.final-footer-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}
.back-to-top {
    display: inline-block;
    text-decoration: none;
    color: #000;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 3rem;
    font-weight: 700;
}

.gabriel-quote {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-style: italic;
    margin-bottom: 0.5rem;
    color: #000;
}
.gabriel-cite {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 3rem;
}

.final-details p {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* --- SWIPER ANIMATION --- */
.swiper { width: 100%; height: 100%; }
.swiper-slide { overflow: hidden; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform 10s ease; }
.swiper-slide-active img { transform: scale(1.1); }


/* --- RESPONSIVE / MOBILE --- */
/* Changed breakpoint from 900px to 1100px to prevent squashing */
@media (max-width: 1100px) {
    .split-section { 
        flex-direction: column-reverse; /* Stack: Image top, Text bottom */
        height: auto; 
        min-height: auto;
    }
    .reverse-layout {
        flex-direction: column-reverse; /* Same stack for reverse sections */
    }

    .image-panel { width: 100%; height: 50vh; }
    .text-panel { width: 100%; height: auto; padding: 3rem 1.5rem; }
    
    .portrait-grid { grid-template-columns: 1fr; }
    .circles-container { flex-direction: column; }
    
    .fade-band { height: 100px; }
    /* Force logo always left on mobile so it doesn't get lost */
    .band-logo { top: 20px; left: 20px; right: auto; } 

    .portrait-wrap {
        width: 220px;
        height: 220px;
    }
}

/* Safety: constrain principal portraits even if classnames shift */
.bio-section .image-panel img {
  max-width: 100%;
  height: auto;
}
.bio-section .image-panel {
  align-items: center;
}


/* PRINCIPALS SECTION SAFETY NET */
.principals-section .image-panel img {
  max-width: 100%;
  height: auto;
}

/* If an older stylesheet is accidentally used, these fallbacks prevent portrait images from spilling outside their containers. */
.principals-section .principal-portraits {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 80px 40px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.principals-section .portrait-wrap {
  width: 280px;
  height: 280px;
  border-radius: 9999px;
  overflow: hidden;
  background: #fff;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.principals-section .portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
}
.principals-section .principal-name {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


/* PRINCIPALS: two-column bios */
.principals-wrapper .principals-bios {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 28px;
}

.principals-wrapper .bio-name {
    margin: 0 0 14px 0;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .principals-wrapper .principals-bios {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* Keep portraits centred within the left panel */
.principals-image-panel {
    display: flex;
    flex-direction: column;
}

.principals-image-panel .principal-portraits {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 44px;
    padding: 30px 0;
}

/* PRINCIPALS section: prevent inner scrolling and give the bios room */
.principals-section {
  min-height: auto;
}

.principals-section .text-panel {
  overflow: visible;
  align-items: flex-start;
  width: 58%;
}

.principals-section .image-panel {
  width: 42%;
}

.principals-section .content-wrapper.principals-wrapper {
  max-width: 760px;
}


/* --- PRINCIPALS SECTION: 3-column layout (left copy / portraits / right copy) --- */
.principals-section {
  padding: 0;
}

.principals-grid {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 90px 90px;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 420px minmax(360px, 1fr);
  gap: 80px;
  align-items: start;
}

.principals-left,
.principals-right {
  min-width: 0;
}

.principals-left .small-title {
  display: inline-block;
}

/* keep bios readable and aligned */
.principals-wrapper .principals-bios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 26px;
}

.principals-wrapper .bio-name {
  margin-top: 26px;
}

.principals-portraits {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 42px;
}

.principals-portraits .portrait-img {
  width: 320px;
  height: 320px;
}

/* contact line aligns with editorial sections */
.principals-right .contact-line {
  margin-top: 60px;
}

/* Responsive: stack into a clean vertical flow */
@media (max-width: 1200px) {
  .principals-grid {
    grid-template-columns: 1fr;
    gap: 60px;
    padding: 70px 40px;
  }

  .principals-portraits {
    order: 1;
  }

  .principals-left {
    order: 0;
  }

  .principals-right {
    order: 2;
  }

  .principals-wrapper .principals-bios {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .principals-right .contact-line {
    margin-top: 40px;
  }
}

@media (max-width: 600px) {
  .principals-grid {
    padding: 60px 22px;
  }

  .principals-portraits .portrait-img {
    width: 260px;
    height: 260px;
  }
}
