:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #101828;
    --muted: #667085;
    --border: #e4e7ec;
    --primary: #101828;
    --accent: #b78a44;
    --radius: 26px;
    --shadow: 0 20px 60px rgba(16, 24, 40, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

img {
    max-width: 100%;
}

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

.site-container {
    width: min(1180px, calc(100% - 36px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.site-brand strong,
.site-brand small {
    display: block;
}

.site-brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: white;
    background: var(--primary);
    font-weight: 900;
}

.header-cta {
    padding: 11px 16px;
    border-radius: 11px;
    color: white;
    background: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.public-hero {
    padding: 90px 0 70px;
    text-align: center;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(183, 138, 68, 0.16),
            transparent 45%
        ),
        var(--bg);
}

.hero-eyebrow,
.section-label {
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
}

.public-hero h1 {
    max-width: 800px;
    margin: 13px auto;
    font-size: clamp(42px, 7vw, 78px);
    letter-spacing: -3px;
    line-height: 1;
}

.public-hero p {
    max-width: 640px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.7;
}

.projects-wrapper {
    padding-bottom: 80px;
}

.horizontal-project {
    min-height: 470px;
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: minmax(320px, 46%) 1fr;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.horizontal-project--reverse .horizontal-project-media {
    order: 2;
}

.horizontal-project-media {
    position: relative;
    min-height: 470px;
    background: #e5e7eb;
}

.horizontal-project-media img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
}

.public-image-placeholder {
    height: 100%;
    min-height: 470px;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.project-status-label {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 12px;
    border-radius: 999px;
    color: white;
    background: rgba(16, 24, 40, 0.82);
    backdrop-filter: blur(10px);
    font-size: 11px;
    font-weight: 800;
}

.horizontal-project-content {
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-type {
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.horizontal-project-content h2 {
    margin: 10px 0 8px;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -1.5px;
    line-height: 1.05;
}

.project-location {
    margin: 0 0 22px;
    color: var(--muted);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.project-meta > div {
    min-width: 145px;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fafafa;
}

.project-meta small,
.project-meta strong {
    display: block;
}

.project-meta small {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
}

.project-meta strong {
    font-size: 14px;
}

.project-summary {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.public-project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.public-primary-button,
.public-secondary-button {
    min-height: 48px;
    padding: 12px 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
}

.public-primary-button {
    color: white;
    background: var(--primary);
}

.public-secondary-button {
    border: 1px solid var(--border);
    background: white;
}

.public-empty {
    padding: 70px 20px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
}

.public-empty p {
    color: var(--muted);
}

.site-footer {
    padding: 35px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

.detail-hero {
    min-height: 10px;
    position: relative;
    display: flex;
    align-items: flex-end;
    background: #1f2937;
    color: white;
}

.detail-hero > img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.82),
            rgba(0, 0, 0, 0.12)
        );
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 65px;
}

.detail-back {
    display: inline-block;
    margin-bottom: 30px;
    opacity: 0.85;
    font-size: 13px;
    font-weight: 700;
}

.detail-type {
    display: block;
    margin-bottom: 10px;
    color: #e7c27f;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.detail-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(45px, 8vw, 90px);
    line-height: 0.95;
    letter-spacing: -4px;
}

.detail-hero p {
    margin: 18px 0 0;
    font-size: 18px;
}

.detail-main {
    padding-top: 70px;
    padding-bottom: 90px;
}

.detail-overview {
    max-width: 850px;
}

.detail-overview h2,
.detail-section h2 {
    margin: 9px 0 20px;
    font-size: clamp(32px, 5vw, 52px);
    letter-spacing: -2px;
}

.detail-description {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.9;
}

.detail-facts {
    margin: 50px 0 80px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.detail-facts article {
    min-height: 120px;
    padding: 24px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: white;
}

.detail-facts small,
.detail-facts strong {
    display: block;
}

.detail-facts small {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-section {
    margin-top: 80px;
}

.public-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.public-gallery img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 18px;
}

.public-gallery img:first-child:nth-last-child(odd) {
    grid-column: 1 / -1;
}

.public-document-list {
    display: grid;
    gap: 10px;
}

.public-document {
    min-height: 90px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: white;
}

.document-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 900;
}

.public-document > div:nth-child(2) {
    flex: 1;
}

.public-document strong,
.public-document small {
    display: block;
}

.public-document small {
    margin-top: 4px;
    color: var(--muted);
}

.public-document a {
    padding: 10px 14px;
    border-radius: 10px;
    color: white;
    background: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.error-page {
    min-height: 100vh;
    padding: 30px;
    display: grid;
    place-items: center;
    text-align: center;
}

.error-page > div {
    max-width: 500px;
}

.error-page > div > span {
    color: var(--accent);
    font-size: 100px;
    font-weight: 900;
}

.error-page h1 {
    margin: 0;
    font-size: 45px;
}

.error-page p {
    margin-bottom: 25px;
    color: var(--muted);
    line-height: 1.7;
}

@media (max-width: 760px) {
    .site-container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        min-height: 66px;
    }

    .site-brand small {
        display: none;
    }

    .header-cta {
        padding: 9px 12px;
        font-size: 11px;
    }

    .public-hero {
        padding: 65px 0 45px;
    }

    .public-hero h1 {
        letter-spacing: -2px;
    }

    .horizontal-project {
        display: flex;
        flex-direction: column;
        min-height: 0;
        margin-bottom: 18px;
        border-radius: 20px;
    }

    .horizontal-project--reverse .horizontal-project-media {
        order: initial;
    }

    .horizontal-project-media {
        min-height: 260px;
    }

    .public-image-placeholder {
        min-height: 260px;
    }

    .horizontal-project-content {
        padding: 25px 20px;
    }

    .horizontal-project-content h2 {
        font-size: 32px;
    }

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

    .project-meta > div {
        min-width: 0;
    }

    .public-project-actions {
        display: grid;
    }

    .detail-hero {
        min-height: 520px;
    }

    .detail-hero-content {
        padding-bottom: 35px;
    }

    .detail-hero h1 {
        letter-spacing: -2.5px;
    }

    .detail-main {
        padding-top: 45px;
    }

    .detail-facts {
        grid-template-columns: repeat(2, 1fr);
        margin-bottom: 60px;
    }

    .detail-facts article {
        min-height: 105px;
        padding: 18px;
    }

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

    .public-gallery img,
    .public-gallery img:first-child:nth-last-child(odd) {
        grid-column: auto;
        height: 280px;
    }

    .public-document {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .public-document a {
        width: 100%;
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   Project Location Intelligence — Task 1
   -------------------------------------------------------------------------- */

.project-location-intelligence {
    margin-top: 42px;
}

.location-intelligence-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 12px 0 20px;
}

.location-intelligence-heading h2 {
    margin: 0 0 8px;
}

.location-intelligence-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.map-open-button {
    flex: 0 0 auto;
    padding: 12px 16px;
    border-radius: 12px;
    color: white;
    background: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.map-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.map-view-button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.map-view-button.is-active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

.project-map-shell {
    position: relative;
    overflow: hidden;
    min-height: 460px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #e9edf2;
}

.project-map-shell iframe {
    display: block;
    width: 100%;
    min-height: 460px;
    border: 0;
}

.map-overlay-label {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 9px 12px;
    border-radius: 999px;
    color: white;
    background: rgba(16, 24, 40, 0.86);
    backdrop-filter: blur(12px);
    font-size: 11px;
    font-weight: 800;
    pointer-events: none;
}

.map-overlay-label span {
    margin-right: 5px;
    color: #d9b16d;
}

.map-key-required {
    min-height: 460px;
    padding: 40px;
    display: grid;
    place-content: center;
    text-align: center;
}

.map-key-required strong {
    font-size: 18px;
}

.map-key-required p {
    max-width: 560px;
    margin: 10px auto 0;
    color: var(--muted);
    line-height: 1.7;
}

.map-key-required code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #eef1f5;
}

.map-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.map-meta-grid > div {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.map-meta-grid small,
.map-meta-grid strong {
    display: block;
}

.map-meta-grid small {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
}

.map-meta-grid strong {
    font-size: 13px;
}

.map-disclaimer {
    margin: 10px 2px 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

@media (max-width: 760px) {
    .location-intelligence-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .map-open-button {
        width: 100%;
        text-align: center;
    }

    .project-map-shell,
    .project-map-shell iframe,
    .map-key-required {
        min-height: 360px;
    }

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

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


/* --------------------------------------------------------------------------
   Construction Progress Engine — Task 2
   -------------------------------------------------------------------------- */

.project-progress-intelligence {
    padding-top: 8px;
}

.construction-progress-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin: 12px 0 22px;
}

.construction-progress-heading h2 {
    margin-bottom: 12px;
}

.construction-progress-heading p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.construction-progress-score {
    min-width: 170px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: white;
    text-align: center;
}

.construction-progress-score strong,
.construction-progress-score span {
    display: block;
}

.construction-progress-score strong {
    font-size: 38px;
    letter-spacing: -2px;
}

.construction-progress-score span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.construction-progress-overview {
    padding: 18px 20px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: white;
}

.construction-progress-overview-track {
    height: 12px;
    overflow: hidden;
    border-radius: 99px;
    background: #eaecf0;
}

.construction-progress-overview-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.construction-progress-overview-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.construction-stage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.construction-stage-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: white;
}

.construction-stage-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.construction-stage-card-top > div:first-child {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 9px;
}

.construction-stage-order {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f2f4f7;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
}

.construction-stage-card h3 {
    margin: 0;
    font-size: 16px;
}

.construction-stage-card > p {
    min-height: 40px;
    margin: 14px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.construction-stage-status {
    padding: 6px 9px;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}

.construction-stage-status--completed {
    color: #166534;
    background: #dcfce7;
}

.construction-stage-status--in_progress {
    color: #92400e;
    background: #fef3c7;
}

.construction-stage-status--not_started {
    color: #475467;
    background: #f2f4f7;
}

.construction-stage-status--on_hold {
    color: #991b1b;
    background: #fee2e2;
}

.construction-stage-progress {
    margin-top: 16px;
}

.construction-stage-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.construction-stage-progress-meta strong {
    color: var(--text);
}

.construction-stage-track {
    height: 9px;
    overflow: hidden;
    border-radius: 99px;
    background: #eaecf0;
}

.construction-stage-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.construction-stage-target {
    margin-top: 13px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.construction-stage-note {
    padding: 9px 11px;
    margin-top: 10px;
    border-left: 2px solid var(--accent);
    background: #fafafa;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.construction-progress-disclaimer {
    margin-top: 16px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}

@media (max-width: 760px) {
    .construction-progress-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .construction-progress-score {
        min-width: 0;
    }

    .construction-stage-grid {
        grid-template-columns: 1fr;
    }

    .construction-stage-card {
        padding: 17px;
    }
}
