/* ============================================
   Portmanteau — Software Engineering & Consulting
   Refined editorial theme · Inter + Instrument Serif
   ============================================ */

:root {
    --bg: #FAFAF7;
    --bg-alt: #F2F1EC;
    --bg-dark: #171717;
    --text: #1A1A1A;
    --text-secondary: #5C5C5C;
    --text-dim: #9A9A9A;
    --accent: #3D6B5E;
    --accent-hover: #2E5347;
    --accent-subtle: #E9EFEC;
    --border: #E5E4E0;
    --border-hover: #CDCCC7;
    --radius: 6px;
    --radius-lg: 10px;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --serif: 'Instrument Serif', Georgia, serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.05);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.07);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    font-size: 16px;
}

/* Subtle film grain — adds tactile depth */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--ease);
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* --- Container --- */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px;
}

.container--narrow {
    max-width: 680px;
}

/* --- Sections --- */
.section {
    padding: 128px 0;
}

.section--alt {
    background: var(--bg-alt);
}

.section--dark {
    background: var(--bg-dark);
    color: #ffffff;
}

.section__eyebrow {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.section__eyebrow::before {
    content: '';
    display: block;
    width: 28px;
    height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

.section__eyebrow--light {
    color: rgba(255,255,255,0.4);
}

.section__eyebrow--light::before {
    background: rgba(255,255,255,0.2);
}

.section__title {
    font-family: var(--serif);
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.12;
    margin-bottom: 24px;
    color: var(--text);
}

.section__title--light {
    color: #ffffff;
}

.section__intro {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.85;
    max-width: 540px;
    margin-bottom: 60px;
}

.section__intro--light {
    color: rgba(255,255,255,0.5);
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.4s var(--ease);
    background: transparent;
}

.nav--scrolled {
    background: rgba(250, 250, 247, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav__logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.logo-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav__links a {
    font-size: 0.85rem;
    font-weight: 450;
    color: var(--text-secondary);
    transition: color 0.3s var(--ease);
    letter-spacing: 0.01em;
}

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

.nav__mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav__mobile-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.nav__mobile-toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

.nav__mobile-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.nav__mobile-toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav__mobile {
    display: none;
    flex-direction: column;
    padding: 8px 32px 24px;
    background: rgba(250, 250, 247, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav__mobile.is-open {
    display: flex;
}

.nav__mobile a {
    padding: 16px 0;
    font-size: 0.92rem;
    font-weight: 450;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.nav__mobile a:last-child {
    border-bottom: none;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s var(--ease);
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.btn--primary {
    background: var(--accent);
    color: #ffffff;
}

.btn--primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn--outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn--outline:hover {
    border-color: var(--border-hover);
    background: rgba(0,0,0,0.02);
}

.btn--nav {
    padding: 0;
    font-size: 0.85rem;
    font-weight: 500;
    background: none;
    color: var(--accent);
    border: none;
    border-radius: 0;
    letter-spacing: 0.01em;
}

.btn--nav:hover {
    color: var(--accent-hover);
}

.btn--white {
    background: #ffffff;
    color: var(--bg-dark);
}

.btn--white:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--white-outline {
    background: transparent;
    color: #ffffff;
    border: 1.5px solid rgba(255,255,255,0.2);
}

.btn--white-outline:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
}

/* --- Hero --- */
.hero {
    padding: 180px 0 120px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(61, 107, 94, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero__eyebrow {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero__eyebrow::before {
    content: '';
    display: block;
    width: 28px;
    height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

.hero__title {
    font-family: var(--serif);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 0;
    max-width: 720px;
    color: var(--text);
}

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

.hero__rule {
    width: 48px;
    height: 1px;
    background: var(--border-hover);
    margin: 36px 0;
}

.hero__sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.85;
    max-width: 500px;
    margin-bottom: 40px;
}

.hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Hero entrance animation */
.hero__eyebrow,
.hero__title,
.hero__rule,
.hero__sub,
.hero__actions {
    opacity: 0;
    animation: heroIn 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.hero__eyebrow  { animation-delay: 0.1s; }
.hero__title    { animation-delay: 0.22s; }
.hero__rule     { animation-delay: 0.38s; }
.hero__sub      { animation-delay: 0.44s; }
.hero__actions  { animation-delay: 0.56s; }

@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Value Strip --- */
.strip {
    padding: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.strip__inner {
    display: flex;
    align-items: stretch;
}

.strip__item {
    flex: 1;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.strip__item strong {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.strip__item span {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.55;
}

.strip__divider {
    width: 1px;
    background: var(--border);
    align-self: stretch;
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.service-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.service-card__icon {
    color: var(--accent);
    margin-bottom: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    border-radius: 8px;
}

.service-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* --- Capabilities Grid --- */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.capability {
    padding: 36px;
    background: var(--bg);
    transition: background 0.3s var(--ease);
}

.capability:hover {
    background: #FFFFFF;
}

.capability h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.capability h3::before {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    margin-bottom: 16px;
}

.capability p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* --- Approach — Vertical Timeline --- */
.approach-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 56px;
    position: relative;
    padding-left: 52px;
    max-width: 600px;
}

.approach-grid::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 18px;
    bottom: 18px;
    width: 1px;
    background: var(--border);
}

.approach-item {
    display: block;
    padding: 0 0 48px 0;
    position: relative;
}

.approach-item:last-child {
    padding-bottom: 0;
}

.approach-item__marker {
    position: absolute;
    left: -52px;
    top: 0;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s var(--ease);
}

.approach-item:hover .approach-item__marker {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.approach-item__content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.3;
    padding-top: 6px;
}

.approach-item__content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* --- Contact --- */
.contact-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
}

.footer__copy {
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 0.01em;
}

/* --- Animations --- */
[data-animate] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 88px 0;
    }

    .nav__links {
        display: none;
    }

    .nav__mobile-toggle {
        display: flex;
    }

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

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

    .hero {
        padding: 140px 0 88px;
    }

    .hero__title {
        font-size: clamp(2.2rem, 8vw, 3.2rem);
    }

    .hero__actions {
        flex-direction: column;
    }

    .hero__actions .btn {
        text-align: center;
    }

    .strip__inner {
        flex-direction: column;
    }

    .strip__divider {
        width: 100%;
        height: 1px;
    }

    .approach-grid {
        padding-left: 46px;
    }

    .approach-grid::before {
        left: 15px;
    }

    .approach-item__marker {
        left: -46px;
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .contact-actions {
        flex-direction: column;
    }

    .footer__inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .service-card,
    .capability {
        padding: 28px;
    }

    .approach-grid {
        padding-left: 40px;
    }

    .approach-grid::before {
        left: 12px;
    }

    .approach-item__marker {
        left: -40px;
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
}
