/* Shared global styles and header */

:root {
    --ink: #F5F5F5;
    --body: #C9C9C9;
    --blue: #D97706;
    --blue-dark: #B65F00;
    --line: #484848;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: #262626;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #262626;
    color: var(--body);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.wrapper {
    min-height: 100vh;
}

/* Shared sticky header */

#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 65px;
    padding: 0 clamp(28px, 4.9vw, 78px);
    background: #262626;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    width: max-content;
    color: var(--ink);
    text-decoration: none;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 9px;
    background: var(--blue);
    box-shadow: 0 3px 8px rgb(217 119 6 / 0.28);
    color: #fff;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: -0.04em;
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-name {
    color: var(--ink);
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.045em;
    line-height: 1;
}

.brand-tagline {
    color: #B5B5B5;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 9px;
    line-height: 1.2;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: #D6D6D6;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: color 160ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
}

.contact-button {
    justify-self: end;
    min-width: 90px;
    padding: 10px 15px;
    border-radius: 7px;
    background: var(--blue);
    box-shadow: 0 3px 7px rgb(217 119 6 / 0.25);
    color: #fff;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease;
}

.contact-button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

/* Homepage */

#main-content {
    width: 100%;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: min(752px, calc(100% - 48px));
    min-height: calc(100vh - 65px);
    margin: 0 auto;
    padding: 88px 0 112px;
}

.portrait-img {
    display: block;
    flex: 0 0 auto;
    width: 292px;
    height: 390px;
    border-radius: 20px;
    object-fit: cover;
    object-position: center;
    animation: hero-fade-in 0.7s ease-out both;
}

.hero-text {
    max-width: 380px;
    color: var(--body);
    animation: hero-fade-in 0.7s ease-out 0.1s both;
}

.hero-text h1 {
    margin: 0 0 17px;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 29px;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.hero-text p {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.78;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 23px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: gap 160ms ease, color 160ms ease;
}

.hero-link:hover {
    gap: 12px;
    color: var(--blue-dark);
}


/* Homepage hero */

.home-hero {
    width: min(1040px, calc(100% - 48px));
    min-height: 510px;
    margin: 0 auto;
    padding: 100px 0;

    display: flex;
    align-items: center;
}

.home-hero-content {
    max-width: 720px;
    animation: home-enter 0.6s ease-out both;
}

.home-eyebrow {
    margin: 0 0 20px;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.08em;
}

.home-hero h1 {
    max-width: 720px;
    margin: 0 0 24px;
    color: var(--ink);
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.home-hero h1 span {
    display: block;
    color: var(--blue);
}

.home-hero-description {
    max-width: 590px;
    margin: 0 0 30px;
    color: var(--body);
    font-size: 1.05rem;
    line-height: 1.85;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Buttons */

.home-button {
    min-height: 46px;
    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;

    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.home-button:hover {
    transform: translateY(-2px);
}

.home-button.primary {
    color: #FFFFFF;
    background: var(--blue);
}

.home-button.primary:hover {
    background: var(--blue-dark);
}

.home-button.secondary {
    color: var(--ink);
    background: #303030;
    border-color: var(--line);
}

.home-button.secondary:hover {
    background: #383838;
    border-color: #595959;
}

/* Technology strip */

.home-tech {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px 48px;

    padding: 26px 24px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #202020;
}

.home-tech > p {
    margin: 0;
    color: #B5B5B5;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.07em;
}

.home-tech-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px 30px;
}

.home-tech-list span {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Shared homepage section layout */

.home-services,
.home-contact {
    width: min(1040px, calc(100% - 48px));
    margin: 0 auto;
}

.home-services {
    padding: 88px 0;
}

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

.home-section-heading .home-eyebrow,
.home-contact .home-eyebrow {
    margin-bottom: 12px;
}

.home-section-heading h2,
.home-contact h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.home-text-link {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.home-text-link:hover {
    color: var(--blue-dark);
}

/* Services list */

.home-service-list {
    border-top: 1px solid var(--line);
}

.home-service {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 24px;

    padding: 25px 8px;
    border-bottom: 1px solid var(--line);

    color: inherit;
    text-decoration: none;

    transition: background-color 160ms ease;
}

.home-service:hover {
    background: #303030;
}

.home-service-number {
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 650;
}

.home-service-content {
    display: grid;
    gap: 7px;
}

.home-service-content strong {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 650;
}

.home-service-content > span {
    color: #C2C2C2;
    font-size: 0.9rem;
    line-height: 1.6;
}

.home-service-arrow {
    color: var(--blue);
    font-size: 1.1rem;
    transition: transform 160ms ease;
}

.home-service:hover .home-service-arrow {
    transform: translate(2px, -2px);
}

.home-contact > div > p:last-child {
    margin: 16px 0 0;
    color: #C2C2C2;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Contact section */

.home-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;

    margin-bottom: 72px;
    padding: 36px;
    border: 1px solid #4D4D4D;
    border-radius: 10px;
    background: #303030;
}

.home-contact > div {
    max-width: 600px;
}

/* Entrance animation */

@keyframes home-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section content entrance */

main > section > *,
#services-page > section > * {
    animation: home-enter 0.6s ease-out both;
}

/* Responsive */

@media (max-width: 680px) {
    .home-hero {
        width: calc(100% - 40px);
        min-height: auto;
        padding: 88px 0;
    }

    .home-hero h1 {
        font-size: clamp(2.5rem, 9vw, 3.5rem);
    }

    .home-hero-description {
        font-size: 1rem;
    }

    .home-tech {
        justify-content: flex-start;
        gap: 16px;
    }

    .home-tech-list {
        justify-content: flex-start;
        gap: 12px 20px;
    }

    .home-services,
    .home-contact {
        width: calc(100% - 40px);
    }

    .home-services {
        padding: 64px 0;
    }

    .home-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .home-service {
        grid-template-columns: 32px minmax(0, 1fr) 20px;
        gap: 14px;
        padding: 22px 4px;
    }

    .home-contact {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-contact {
        margin-bottom: 48px;
        padding: 26px;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    main > section > *,
    #services-page > section > * {
        animation: none;
    }

    .home-button,
    .home-service,
    .home-service-arrow {
        transition: none;
    }

    .home-button:hover {
        transform: none;
    }
}


@keyframes hero-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile layout */

@media (max-width: 680px) {
    #header {
        grid-template-columns: 1fr auto;
        row-gap: 14px;
        height: auto;
        min-height: 64px;
        padding-block: 14px;
    }

    .navigation {
        grid-row: 2;
        grid-column: 1 / -1;
        justify-content: center;
        gap: 24px;
    }

    .brand-tagline {
        display: none;
    }

    .contact-button {
        min-width: auto;
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 31px;
        width: min(430px, calc(100% - 48px));
        min-height: auto;
        padding: 62px 0 76px;
    }

    .portrait-img {
        width: min(292px, 100%);
        height: auto;
        aspect-ratio: 292 / 390;
    }

    .hero-text {
        max-width: 100%;
    }

    /* Retains the original smaller heading on the narrowest screens. */
    .hero-text h1 {
        font-size: clamp(1.6rem, calc(400vw - 2374.4px), 29px);
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .portrait-img,
    .hero-text {
        animation: none;
    }

    .contact-button,
    .hero-link {
        transition: none;
    }
}
