/* ============================================
   BuiltHub — Swiss Precision Theme
   Aesthetic: Editorial minimalism + typographic confidence + restrained warmth
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Neutrals */
    --c-black: #1a1a1a;
    --c-dark: #2d2d2d;
    --c-body: #555555;
    --c-muted: #888888;
    --c-rule: #d4d4d4;
    --c-light: #f0f0f0;
    --c-bg: #fafafa;
    --c-white: #ffffff;

    /* Single accent — warm terracotta */
    --c-accent: #c4501a;
    --c-accent-hover: #a8420f;

    /* Typography */
    --f-display: 'Instrument Serif', Georgia, serif;
    --f-body: 'Instrument Sans', system-ui, sans-serif;

    /* Spacing */
    --s-section: clamp(5rem, 10vw, 9rem);
    --s-container: min(88%, 1100px);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--f-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--c-body);
    background-color: var(--c-bg);
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

/* --- Reusable --- */
.section-eyebrow {
    font-family: var(--f-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--f-display);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--c-black);
    letter-spacing: -0.01em;
}

.section-title em {
    font-style: italic;
    color: var(--c-accent);
}

/* --- Reveal animation --- */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }


/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    transition: background-color 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

.nav--scrolled {
    background-color: rgba(250, 250, 250, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--c-rule);
}

.nav__container {
    width: var(--s-container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 1001;
}

.nav__logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--c-accent);
    border-radius: 4px;
    font-family: var(--f-display);
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--c-white);
}

.nav__logo-text {
    font-family: var(--f-body);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--c-black);
    letter-spacing: -0.01em;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav__link {
    font-family: var(--f-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-body);
    transition: color 0.3s ease;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--c-black);
    transition: width 0.3s var(--ease-out);
}

.nav__link:hover {
    color: var(--c-black);
}

.nav__link:hover::after {
    width: 100%;
}

.nav__link--cta {
    color: var(--c-black);
    font-weight: 600;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--c-accent);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.nav__link--cta::after {
    display: none;
}

.nav__link--cta:hover {
    color: var(--c-accent);
}

/* Hamburger */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
}

.nav__toggle-bar {
    width: 24px;
    height: 2px;
    background: var(--c-black);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__toggle.is-active .nav__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__toggle.is-active .nav__toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav__toggle.is-active .nav__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-bg);
    padding: 10rem 0 6rem;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 1.5rem;
    max-width: 800px;
}

.hero__eyebrow {
    font-family: var(--f-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 1.5rem;
}

.hero__title {
    font-family: var(--f-display);
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--c-black);
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}

.hero__title em {
    font-style: italic;
    color: var(--c-accent);
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--c-body);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero__cta {
    display: inline-block;
    font-family: var(--f-body);
    font-weight: 600;
    font-size: 1rem;
    color: var(--c-black);
    border-bottom: 2px solid var(--c-accent);
    padding-bottom: 4px;
    transition: opacity 0.3s ease;
}

.hero__cta:hover {
    opacity: 0.65;
}


/* ============================================
   Services
   ============================================ */
.services {
    padding: var(--s-section) 0;
    background: var(--c-white);
    border-top: 1px solid var(--c-rule);
}

.services__container {
    width: var(--s-container);
    margin: 0 auto;
}

.services__header {
    text-align: center;
    margin-bottom: 4rem;
}

.services__grid {
    display: flex;
    flex-direction: column;
}

.service-card {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--c-rule);
    transition: opacity 0.3s ease;
}

.service-card:first-child {
    border-top: 1px solid var(--c-rule);
}

.service-card:hover {
    opacity: 0.75;
}

.service-card__icon {
    width: 32px;
    height: 32px;
    color: var(--c-muted);
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.service-card__body {
    flex: 1;
}

.service-card__title {
    font-family: var(--f-body);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--c-black);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.service-card__desc {
    font-size: 0.95rem;
    color: var(--c-body);
    line-height: 1.7;
}


/* ============================================
   About
   ============================================ */
.about {
    padding: var(--s-section) 0;
    background: var(--c-white);
    border-top: 1px solid var(--c-rule);
}

.about__container {
    width: var(--s-container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about__text {
    font-size: 1.05rem;
    color: var(--c-body);
    line-height: 1.8;
    margin-top: 1.5rem;
}

.about__differentiators {
    display: flex;
    flex-direction: column;
}

.diff-card {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--c-rule);
}

.diff-card:first-child {
    border-top: 1px solid var(--c-rule);
}

.diff-card__title {
    font-family: var(--f-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-black);
    margin-bottom: 0.35rem;
}

.diff-card__desc {
    font-size: 0.85rem;
    color: var(--c-body);
    line-height: 1.65;
}


/* ============================================
   Contact
   ============================================ */
.contact {
    padding: var(--s-section) 0;
    background: var(--c-light);
    border-top: 1px solid var(--c-rule);
}

.contact__container {
    width: var(--s-container);
    margin: 0 auto;
    text-align: center;
}

.contact__text {
    font-size: 1.05rem;
    color: var(--c-body);
    max-width: 480px;
    margin: 1.5rem auto 2.5rem;
    line-height: 1.7;
}

.contact__email-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid var(--c-black);
    border-radius: 2px;
    color: var(--c-black);
    font-family: var(--f-body);
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.contact__email-btn:hover {
    background: var(--c-black);
    color: var(--c-white);
}


/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 2rem 0;
    background: var(--c-bg);
    border-top: 1px solid var(--c-rule);
}

.footer__container {
    width: var(--s-container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer__logo .nav__logo-mark {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    border-radius: 3px;
}

.footer__logo .nav__logo-text {
    font-size: 1rem;
}

.footer__copy {
    font-size: 0.8rem;
    color: var(--c-muted);
}


/* ============================================
   Responsive
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .about__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: rgba(250, 250, 250, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out);
    }

    .nav__menu.is-open {
        transform: translateX(0);
    }

    .nav__link {
        font-size: 1.4rem;
        font-weight: 600;
        color: var(--c-black);
    }

    .nav__link--cta {
        font-size: 1.1rem;
        border-bottom-width: 2px;
    }

    .nav__link::after {
        display: none;
    }

    .service-card {
        flex-direction: column;
        gap: 1rem;
    }

    .service-card__icon {
        margin-top: 0;
    }

    .footer__container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}
