/**
 * Inner pages: hero headers, About, Contact, Projects grid & modal
 */

/* ——— Page hero (About, Contact) ——— */
.page-header {
    position: relative;
    padding: clamp(4rem, 12vw, 6.5rem) 0;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(15, 20, 25, 0.88) 0%, rgba(28, 36, 48, 0.72) 50%, rgba(15, 20, 25, 0.88) 100%),
        var(--page-hero-image, url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?w=1920&q=80'));
    background-size: cover;
    background-position: center;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.page-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(2.25rem, 5.5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 36rem;
    margin: 0 auto;
    font-weight: 400;
}

/* About page */
.about-page-header {
    --page-hero-image: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1920&q=80');
}

.contact-page-header {
    --page-hero-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?w=1920&q=80');
}

.projects-page-header {
    --page-hero-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1920&q=80');
}

.content-section {
    padding: clamp(3.5rem, 8vw, 5rem) 0;
}

.content-section.alt-bg {
    background: var(--surface);
}

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

.section-head h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 400;
    color: var(--primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-head .lead {
    color: var(--muted);
    max-width: 40rem;
    margin: 0;
    font-size: 1.05rem;
}

.prose {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--muted);
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

.mv-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.mv-card .icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.2), rgba(201, 162, 39, 0.05));
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}

.mv-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.mv-card p {
    color: var(--muted);
    margin: 0;
    line-height: 1.7;
}

.team-card {
    text-align: center;
    padding: 1.5rem;
}

.team-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.25rem;
    border: 3px solid var(--accent);
    box-shadow: var(--shadow);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.35rem;
}

.team-card .role {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.team-card .bio {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 0;
}

.value-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.value-card .value-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(145deg, #0f1419, #1c2430);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.value-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.value-card p {
    color: var(--muted);
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.65;
}

/* Contact page */
.contact-section {
    padding: clamp(3rem, 8vw, 4.5rem) 0;
}

.contact-form-wrapper {
    background: var(--surface);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.contact-form-wrapper h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.contact-form .form-group {
    margin-bottom: 1.15rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.contact-form .form-control {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
}

.contact-form textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.map-frame {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    height: 100%;
    min-height: 380px;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 380px;
    border: 0;
    display: block;
}

.contact-side-card {
    background: linear-gradient(155deg, #0f1419 0%, #1c2430 100%);
    color: #fff;
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-side-card h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.contact-side-card p,
.contact-side-card a {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.contact-side-card a {
    color: var(--accent);
    text-decoration: none;
}

.contact-side-card a:hover {
    text-decoration: underline;
}

.contact-side-card i {
    color: var(--accent);
    width: 1.25rem;
    margin-right: 0.5rem;
}

/* Projects listing */
.projects-section {
    padding: clamp(3rem, 8vw, 5rem) 0 clamp(4rem, 10vw, 6rem);
}

.section-intro {
    max-width: 36rem;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-intro h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.section-intro p {
    color: var(--muted);
    margin: 0;
    font-size: 1rem;
}

.project-card {
    background: var(--surface);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 1.75rem;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 20, 25, 0.35), transparent 45%);
    pointer-events: none;
}

.project-content {
    padding: 1.35rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.project-description {
    color: var(--muted);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    flex: 1;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.project-location {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.8125rem;
}

.project-location i {
    color: var(--accent);
}

.project-cta {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.project-card:hover .project-cta {
    color: var(--primary-soft);
}

/* Project modal */
.project-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 25, 0.72);
    backdrop-filter: blur(6px);
    z-index: 1050;
    overflow-y: auto;
    padding: 2rem 1rem;
    align-items: flex-start;
    justify-content: center;
}

.project-modal.is-open {
    display: flex;
}

.modal-panel {
    background: var(--surface);
    max-width: 920px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(15, 20, 25, 0.25);
    border: 1px solid var(--border);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--surface);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.2s, transform 0.2s;
}

.modal-close:hover {
    background: var(--page-bg);
    transform: scale(1.05);
}

.modal-carousel {
    position: relative;
}

.modal-carousel .carousel-item img {
    width: 100%;
    height: clamp(220px, 42vw, 420px);
    object-fit: cover;
}

.modal-carousel .carousel-control-prev,
.modal-carousel .carousel-control-next {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    box-shadow: var(--shadow);
}

.modal-carousel .carousel-control-prev {
    left: 1rem;
}

.modal-carousel .carousel-control-next {
    right: 1rem;
}

.modal-carousel .carousel-control-prev-icon,
.modal-carousel .carousel-control-next-icon {
    filter: invert(1) grayscale(100%);
    width: 1.25rem;
    height: 1.25rem;
}

.modal-carousel .carousel-indicators {
    margin-bottom: 0.75rem;
}

.modal-carousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent);
    opacity: 0.35;
    border: none;
}

.modal-carousel .carousel-indicators .active {
    opacity: 1;
}

.modal-body {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.modal-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem 1.5rem;
    margin-bottom: 1.75rem;
}

.info-tile {
    padding: 1rem 1.1rem;
    background: var(--page-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.info-tile label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.info-tile p {
    margin: 0;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--primary);
}

.modal-description h3 {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.65rem;
}

.modal-description p {
    color: var(--muted);
    line-height: 1.75;
    margin: 0;
    font-size: 0.98rem;
}

@media (max-width: 575px) {
    .modal-carousel .carousel-control-prev,
    .modal-carousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
}

/* Dark mode refinements (tokens set on body.dark-mode in bsg-theme.css) */
body.dark-mode .map-frame {
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .project-modal {
    background: rgba(0, 0, 0, 0.82);
}

body.dark-mode .modal-close {
    background: var(--surface);
    color: var(--primary);
}

body.dark-mode .info-tile {
    background: rgba(0, 0, 0, 0.25);
}
