/*
 * Meridian Theme — Pages CSS
 * Styles for page templates: page-services, page-about, page-contact, and shared page components.
 *
 * Table of Contents:
 *   1. Page Hero (shared)
 *   2. Services Page
 *   3. About Page — Mission & Values
 *   4. About Page — Team
 *   5. About Page — Culture Gallery
 *   6. Contact Page
 *   7. Shared: CTA Strip
 *   8. Shared: Map
 *   9. Responsive
 */

/* ============================================================
   1. PAGE HERO  (shared across all page templates)
   ============================================================ */

.page-hero {
    position: relative;
    padding-top: calc(72px + var(--sp-20));
    padding-bottom: var(--sp-20);
    overflow: hidden;
    background: var(--surface-0);
}

.page-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(0,212,126,.06) 0%, transparent 70%);
    pointer-events: none;
}

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

/* Centred single-column hero (Services, Contact) */
.page-hero__content {
    max-width: 760px;
}

.page-hero__content .eyebrow {
    margin-bottom: var(--sp-4);
}

.page-hero__content h1 {
    font-size: var(--text-5xl);
    margin-bottom: var(--sp-5);
}

.page-hero__content > p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 56ch;
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* About hero copy column */

.page-hero__copy {
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
}

.page-hero__copy h1 {
    font-size: var(--text-5xl);
    margin: 0;
}

.about-hero-body p {
    color: var(--text-secondary);
    max-width: none;
}

.page-hero__image {
    position: relative;
}

.page-hero__image img {
    width: 100%;
    height: auto;
    border-radius: var(--r-2xl);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
}

/* Decorative neon accent line on about hero */
.page-hero--about .page-hero__image::after {
    content: '';
    position: absolute;
    bottom: -var(--sp-4);
    left: -var(--sp-4);
    right: var(--sp-4);
    top: var(--sp-4);
    border: 1px solid var(--border);
    border-radius: calc(var(--r-2xl) + 4px);
    z-index: -1;
    pointer-events: none;
}

/* Bottom border separator */
.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ============================================================
   2. SERVICES PAGE
   ============================================================ */

/* Full-width service cards (one per row, horizontal layout) */
.services-full-grid {
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
}

.service-full-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: var(--sp-8);
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: var(--sp-8);
    align-items: start;
    transition:
        border-color var(--dur-slow) var(--ease-out),
        transform var(--dur-slow) var(--ease-out),
        box-shadow var(--dur-slow) var(--ease-out);
    --card-accent: var(--c-neon);
}

.service-full-card:hover {
    border-color: var(--card-accent);
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}

.service-full-card__header {
    display: flex;
    gap: var(--sp-5);
    align-items: flex-start;
}

.service-full-card__title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--sp-2);
}

.service-full-card__title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--dur-base) var(--ease-out);
}

.service-full-card:hover .service-full-card__title a {
    color: var(--card-accent);
}

.service-full-card__tagline {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    max-width: none;
    margin: 0;
    line-height: var(--leading-relaxed);
}

.service-full-card__features {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-2) var(--sp-4);
    align-content: start;
}

.service-full-card__features li {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-snug);
}

.service-full-card__features li svg {
    color: var(--card-accent);
    flex-shrink: 0;
}

.service-full-card__cta {
    align-self: center;
    white-space: nowrap;
    font-size: var(--text-sm);
}

/* ============================================================
   3. ABOUT PAGE — MISSION & VALUES
   ============================================================ */

.mission-section {
    background: var(--surface-1);
}

.mission-statement {
    max-width: 800px;
    margin-inline: auto;
    margin-bottom: var(--sp-16);
    text-align: center;
}

.mission-statement blockquote {
    border: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.mission-statement blockquote p {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
    max-width: none;
    margin: 0;
    position: relative;
}

.mission-statement blockquote p::before {
    content: '\201C';
    font-size: 5rem;
    line-height: 0;
    color: var(--accent);
    opacity: 0.3;
    position: absolute;
    top: 0.6em;
    left: -0.35em;
    font-family: Georgia, serif;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-5);
}

.value-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: var(--sp-8);
    transition:
        border-color var(--dur-slow) var(--ease-out),
        transform var(--dur-slow) var(--ease-out);
    position: relative;
    /* overflow:hidden removed — was clipping text at rounded corners */
    overflow: visible;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease-out);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.value-card:hover {
    border-color: rgba(0, 212, 126, 0.2);
    transform: translateY(-2px);
}

.value-card:hover::before {
    opacity: 1;
}

.value-card__title {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--sp-3);
}

.value-card__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    max-width: none;
    margin: 0;
}

/* ============================================================
   4. ABOUT PAGE — TEAM
   ============================================================ */

.team-section {
    background: var(--surface-0);
}

.section-header--between {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-6);
}

.section-header--between h2 {
    max-width: 480px;
    margin: 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-6);
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition:
        border-color var(--dur-slow) var(--ease-out),
        transform var(--dur-slow) var(--ease-out);
}

.team-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.team-card__image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 6 / 7;
}

.team-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform var(--dur-slower) var(--ease-out);
}

.team-card:hover .team-card__photo {
    transform: scale(1.04);
}

.team-card__body {
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.team-card__name {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--text-primary);
}

.team-card__role {
    font-size: var(--text-xs);
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

.team-card__bio {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-snug);
    max-width: none;
    margin: var(--sp-1) 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.team-card__linkedin {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    margin-top: var(--sp-2);
    transition: color var(--dur-base) var(--ease-out);
}

.team-card__linkedin:hover {
    color: #0a66c2;
}

/* ============================================================
   5. ABOUT PAGE — CULTURE GALLERY
   ============================================================ */

.culture-gallery-section {
    background: var(--surface-1);
}

.culture-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: var(--sp-4);
    margin-top: var(--sp-8);
}

.culture-gallery__item {
    border-radius: var(--r-xl);
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

/* First item spans 2 cols */
.culture-gallery__item:first-child {
    grid-column: span 2;
    aspect-ratio: 16 / 7;
}

.culture-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-slower) var(--ease-out);
}

.culture-gallery__item:hover img {
    transform: scale(1.04);
}

/* ============================================================
   6. CONTACT PAGE
   ============================================================ */


.contact-page-inner {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: var(--sp-16);
    align-items: start;
}

/* ── Info column ── */

.contact-info-col {
    position: sticky;
    top: calc(72px + var(--sp-8));
    display: flex;
    flex-direction: column;
    gap: var(--sp-10);
}

.contact-info-blocks {
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
}

.contact-info-block {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.contact-info-block__label {
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--text-muted);
}

.contact-info-block__value {
    font-size: var(--text-base);
    color: var(--text-primary);
    line-height: var(--leading-snug);
}

.contact-info-block__value--link {
    text-decoration: none;
    color: var(--text-primary);
    transition: color var(--dur-base) var(--ease-out);
}

.contact-info-block__value--link:hover {
    color: var(--accent);
}

.contact-socials {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.contact-socials__label {
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--text-muted);
}

.contact-socials__links {
    display: flex;
    gap: var(--sp-3);
}

.contact-social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition:
        color var(--dur-base) var(--ease-out),
        border-color var(--dur-base) var(--ease-out),
        background var(--dur-base) var(--ease-out);
}

.contact-social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--c-neon-dim);
}

/* ── Form column ── */

.contact-form-col {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-2xl);
    padding: var(--sp-10);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.form-field label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: var(--sp-3) var(--sp-4);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition:
        border-color var(--dur-base) var(--ease-out),
        box-shadow var(--dur-base) var(--ease-out);
    -webkit-appearance: none;
    appearance: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--c-neon-dim);
}

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

.form-privacy-note {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
    max-width: none;
    margin: 0;
}

.contact-form-msg {
    margin-top: var(--sp-2);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-md);
    font-size: var(--text-sm);
    text-align: center;
}
.contact-form-msg--ok {
    background: rgba(0, 200, 100, .12);
    color: #4ade80;
    border: 1px solid rgba(0, 200, 100, .25);
}
.contact-form-msg--err {
    background: rgba(255, 80, 80, .12);
    color: #f87171;
    border: 1px solid rgba(255, 80, 80, .25);
}

/* ============================================================
   7. SHARED: CTA STRIP
   ============================================================ */

.cta-strip {
    background: var(--surface-1);
    border-top: 1px solid var(--border);
}

.cta-strip__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-10);
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
    border: 1px solid var(--border);
    border-radius: var(--r-2xl);
    padding: var(--sp-10) var(--sp-12);
    position: relative;
    overflow: hidden;
}

/* Neon shimmer on hover */
.cta-strip__inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 60% 80% at 80% 50%,
        rgba(0, 212, 126, 0.07) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.cta-strip__heading {
    font-size: var(--text-3xl);
    margin-bottom: var(--sp-2);
}

.cta-strip__inner > div > p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    max-width: 48ch;
    margin: 0;
}

.cta-strip__inner .btn {
    flex-shrink: 0;
}

/* ============================================================
   8. MAP SECTION
   ============================================================ */

.map-section {
    background: var(--surface-0);
    padding-top: 0;
}

.map-embed {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(1) invert(0.9) hue-rotate(180deg);
    /* Gives maps a dark look matching the theme */
}

.theme-light .map-embed iframe {
    filter: none;
}

/* ============================================================
   9. RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
    .service-full-card {
        grid-template-columns: 1fr 1fr;
    }

    .service-full-card__cta {
        grid-column: span 2;
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .page-hero__content h1 {
        font-size: var(--text-4xl);
    }

    .page-hero__content--split {
        grid-template-columns: 1fr;
        max-width: 680px;
    }

    .page-hero__image {
        max-width: 400px;
        margin-inline: auto;
        order: -1;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-page-inner {
        grid-template-columns: 1fr;
        gap: var(--sp-12);
    }

    .contact-info-col {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-8);
    }

    .service-full-card {
        grid-template-columns: 1fr;
        gap: var(--sp-5);
    }

    .service-full-card__cta {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .page-hero__content {
        text-align: center;
    }

    .page-hero__content > p {
        margin-inline: auto;
    }

    .page-hero__content .btn {
        margin-inline: auto;
    }

    .page-hero__content h1 {
        font-size: var(--text-4xl);
    }

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

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .culture-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .culture-gallery__item:first-child {
        grid-column: span 2;
    }

    .cta-strip__inner {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--sp-8);
    }

    .cta-strip__inner .btn {
        width: 100%;
        justify-content: center;
    }

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

    .contact-form-col {
        padding: var(--sp-6);
    }

    .section-header--between {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr 1fr;
    }

    .culture-gallery {
        grid-template-columns: 1fr;
    }

    .culture-gallery__item:first-child {
        grid-column: span 1;
        aspect-ratio: 16 / 10;
    }

    .service-full-card__features {
        grid-template-columns: 1fr;
    }

    .mission-statement blockquote p {
        font-size: var(--text-xl);
    }
}
