:root {
    --bg: #f4f1ea;
    --surface: #ebe7de;
    --text: #171717;
    --muted: #6e6b64;
    --line: rgba(23, 23, 23, 0.14);
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: inherit;
}

.site-header {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 32px;
}

.site-nav a {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 160ms ease;
}

.site-nav a:hover {
    color: var(--text);
}

.hero {
    width: min(calc(100% - 48px), var(--max-width));
    min-height: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.hero-content {
    padding: 90px 0;
    max-width: 900px;
}

.eyebrow,
.section-label {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(4rem, 9vw, 8.4rem);
    font-weight: 600;
    letter-spacing: -0.065em;
    line-height: 0.86;
}

.hero-copy {
    max-width: 540px;
    margin: 48px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.65;
}

.hero-link,
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 36px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.project-card-link {
    cursor: pointer;
}

.project-card-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.project-card-link:hover .project-link span {
    transform: translateX(4px);
}

.project-card-link:focus-within {
    outline: 2px solid var(--text);
    outline-offset: 4px;
}

.hero-link span,
.project-link span {
    transition: transform 160ms ease;
}

.hero-link:hover span {
    transform: translateY(3px);
}

.project-link:hover span {
    transform: translate(3px, -3px);
}

.projects {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    padding: 120px 0;
    border-bottom: 1px solid var(--line);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 64px;
}

.section-heading .section-label {
    margin: 0;
}

.section-heading h2 {
    width: 55%;
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 1;
}

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

.project-card {
    min-height: 420px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--surface);
    border-radius: 4px;
    position: relative;
}

.project-number {
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.project-content h3 {
    margin: 0 0 20px;
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    font-weight: 500;
    letter-spacing: -0.045em;
}

.project-content p {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.project-status {
    display: inline-block;
    margin-top: 36px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.about {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    padding: 120px 0 150px;
}

.about-content {
    margin-left: auto;
    width: 72%;
}

.about-content h2 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 0.98;
}

.about-content p {
    max-width: 620px;
    margin: 48px 0 0;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.site-footer {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
}

@media (max-width: 720px) {
    .site-header,
    .hero,
    .projects,
    .about,
    .site-footer {
        width: min(calc(100% - 32px), var(--max-width));
    }

    .site-header {
        min-height: 78px;
    }

    .site-nav {
        gap: 18px;
    }

    .hero {
        min-height: 540px;
    }

    .hero-content {
        padding: 56px 0;
    }

    .hero h1 {
        font-size: clamp(3.6rem, 18vw, 6rem);
    }

    .hero-copy {
        margin-top: 36px;
    }

    .projects {
        padding: 88px 0;
    }

    .section-heading {
        display: block;
        margin-bottom: 40px;
    }

    .section-heading .section-label {
        margin-bottom: 24px;
    }

    .section-heading h2 {
        width: 100%;
    }

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

    .project-card {
        min-height: 360px;
        padding: 26px;
    }

    .about {
        padding: 88px 0 110px;
    }

    .about-content {
        width: 100%;
    }

    .about-content h2 {
        font-size: clamp(3rem, 14vw, 5rem);
    }


    .project-card:hover {
        transform: none;
    }

    .project-card:hover .project-visual {
        transform: none;
    }
    .about-content p {
        margin-top: 36px;
    }
}

.project-visual {
    height: 150px;
    margin: 20px 0 34px;
    padding: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 3px;
}

.visual-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.visual-mark {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: -0.08em;
    line-height: 0.75;
    opacity: 0.12;
}

.route-log-visual {
    background:
        linear-gradient(
            135deg,
            rgba(23, 23, 23, 0.04),
            rgba(23, 23, 23, 0)
        );
}

.route-preview {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.route-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.preview-status {
    width: 7px;
    height: 7px;
    background: #171717;
    border-radius: 50%;
    opacity: 0.7;
}

.route-preview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.route-preview-stats div {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.route-preview-stats span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.route-preview-stats strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.bullion-visual {
    background:
        linear-gradient(
            135deg,
            rgba(150, 116, 42, 0.12),
            rgba(150, 116, 42, 0.02)
        );
}

.bullion-preview {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
    gap: 12px;
}

.bullion-preview-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.bullion-preview-header span:last-child {
    color: #96742a;
}

.bullion-price {
    align-self: end;
}

.bullion-price span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.bullion-price strong {
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.bullion-chart {
    position: relative;
    width: 150px;
    height: 46px;
    align-self: end;
    overflow: hidden;
}

.bullion-chart::before,
.bullion-chart::after,
.bullion-chart span {
    content: "";
    position: absolute;
    height: 2px;
    background: rgba(150, 116, 42, 0.55);
    transform-origin: left center;
}

.bullion-chart::before {
    width: 58px;
    left: 4px;
    bottom: 13px;
    transform: rotate(-13deg);
}

.bullion-chart span {
    width: 48px;
    left: 59px;
    bottom: 26px;
    transform: rotate(8deg);
}

.bullion-chart::after {
    width: 48px;
    left: 105px;
    bottom: 20px;
    transform: rotate(-18deg);
}

.project-card {
    transition:
        transform 220ms ease,
        background-color 220ms ease;
}

.project-card:hover {
    transform: translateY(-4px);
    background: #e7e2d8;
}

.project-visual {
    transition:
        transform 220ms ease,
        border-color 220ms ease;
}

.project-card:hover .project-visual {
    transform: translateY(-2px);
    border-color: rgba(23, 23, 23, 0.22);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .project-card,
    .project-visual,
    .hero-link span,
    .project-link span {
        transition: none;
    }
}

/* Route Log project page */

.project-page {
    width: 100%;
}

.project-hero {
    width: min(calc(100% - 48px), var(--max-width));
    min-height: 720px;
    margin: 0 auto;
    padding: 48px 0 100px;
    border-bottom: 1px solid var(--line);
}

.project-hero-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.back-link {
    color: var(--muted);
    text-decoration: none;
    transition: color 160ms ease;
}

.back-link:hover {
    color: var(--text);
}

.project-hero-content {
    max-width: 950px;
    margin-top: 120px;
}

.project-hero-content .eyebrow {
    margin-bottom: 30px;
}

.project-hero h1 {
    margin: 0;
    font-size: clamp(4rem, 8vw, 7.5rem);
    font-weight: 600;
    letter-spacing: -0.065em;
    line-height: 0.9;
}

.project-hero-copy {
    max-width: 610px;
    margin: 48px 0 0;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.7;
}

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 36px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.project-cta span {
    transition: transform 160ms ease;
}

.project-cta:hover span {
    transform: translate(3px, -3px);
}

.project-feature {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    padding: 120px 0;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 48px;
    border-bottom: 1px solid var(--line);
}

.project-feature-content {
    max-width: 820px;
}

.project-feature-content h2 {
    margin: 0;
    font-size: clamp(2.8rem, 5vw, 5rem);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1;
}

.project-feature-content p {
    max-width: 620px;
    margin: 48px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.project-details {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    padding: 100px 0 120px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-bottom: 1px solid var(--line);
}

.detail-item {
    min-height: 300px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.detail-item > span {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
}

.detail-item h3 {
    margin: auto 0 18px;
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.detail-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.project-end {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    padding: 130px 0 150px;
}

.project-end h2 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(3.5rem, 7vw, 7rem);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 0.95;
}

/* Route Log product showcase */

.project-showcase {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    padding: 120px 0;
    border-bottom: 1px solid var(--line);
}

.showcase-heading {
    max-width: 850px;
    margin: 0 0 100px auto;
}

.showcase-heading h2 {
    margin: 0;
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 0.96;
}

.showcase-heading > p:last-child {
    max-width: 600px;
    margin: 40px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.phone-frame {
    overflow: hidden;
    background: #080a0d;
    border-radius: 20px;
}

.phone-frame img {
    display: block;
    width: 100%;
    height: auto;
}


.showcase-primary .phone-frame {
    height: 620px;
}

.showcase-primary .phone-frame img {
    height: 100%;
    object-fit: contain;
    object-position: top;
}

.showcase-secondary .phone-frame {
    height: 500px;
}

.showcase-secondary .phone-frame img {
    height: 100%;
    object-fit: contain;
    object-position: top;
}

.showcase-history .phone-frame {
    height: 480px;
}

.showcase-history .phone-frame img {
    height: 100%;
    object-fit: contain;
    object-position: top;
}

.showcase-grid {
    display: grid;
    grid-template-columns: 46% 1fr;
    gap: 5%;
    align-items: start;
}

.showcase-primary {
    width: 100%;
}

.showcase-primary .phone-frame {
    max-width: 430px;
}

.showcase-secondary {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-items: start;
}

.showcase-screen:nth-child(2) {
    margin-top: 80px;
}

.showcase-history {
    width: 44%;
    margin: 88px 0 0 28%;
}

.showcase-caption {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
}

.showcase-caption > span {
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

.showcase-caption strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
}

.showcase-caption p {
    max-width: 360px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

@media (max-width: 720px) {
    .project-hero,
    .project-feature,
    .project-details,
    .project-end {
        width: min(calc(100% - 32px), var(--max-width));
    }

    .showcase-primary .phone-frame,
    .showcase-secondary .phone-frame,
    .showcase-history .phone-frame {
        height: 520px;
    }

    .showcase-primary .phone-frame img,
    .showcase-secondary .phone-frame img,
    .showcase-history .phone-frame img {
        height: 100%;
        object-fit: contain;
        object-position: top;
    }

    .project-hero {
        min-height: 620px;
        padding: 32px 0 72px;
    }

    .project-hero-content {
        margin-top: 90px;
    }

    .project-hero h1 {
        font-size: clamp(3.6rem, 17vw, 5.5rem);
    }

    .project-hero-copy {
        margin-top: 36px;
        font-size: 1rem;
    }

    .project-feature {
        padding: 88px 0;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-feature-content h2 {
        font-size: clamp(2.8rem, 13vw, 4.5rem);
    }

    .project-feature-content p {
        margin-top: 36px;
    }

    .project-details {
        padding: 72px 0 88px;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .detail-item {
        min-height: 260px;
        padding: 26px;
    }

    .project-end {
        padding: 90px 0 110px;
    }

    .project-end h2 {
        font-size: clamp(3.2rem, 15vw, 5rem);
    }


    .project-showcase {
        width: min(calc(100% - 32px), var(--max-width));
        padding: 88px 0;
    }

    .showcase-heading {
        margin: 0 0 60px;
    }

    .showcase-heading h2 {
        font-size: clamp(3rem, 14vw, 5rem);
    }

    .showcase-heading > p:last-child {
        margin-top: 30px;
    }

    .showcase-primary,
    .showcase-history {
        width: 82%;
    }

    .showcase-primary {
        margin: 0 auto;
    }

    .showcase-secondary {
        width: 100%;
        margin: 72px 0 0;
        grid-template-columns: 1fr;
        gap: 64px;
    }

    .showcase-secondary .showcase-screen {
        width: 82%;
        margin: 0 auto;
    }

    .showcase-screen:nth-child(2) {
        margin-top: 0;
    }

    .showcase-history {
        margin: 72px auto 0;
    }

    .showcase-grid {
        display: block;
    }

    .phone-frame {
        border-radius: 16px;
    }

    .showcase-caption {
        grid-template-columns: 32px 1fr;
    }
}
