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

/* ── Tokens ── */
:root {
    --bg: #0c0c10;
    --surface: #141419;
    --border: #2a2a35;
    --text: #e8e4de;
    --text-dim: #8a8680;
    --accent: #e0a840;
    --accent-hover: #c89230;
    --accent-glow: rgba(224, 168, 64, 0.12);
    --green: #5fba7d;
    --mono: 'IBM Plex Mono', monospace;
    --sans: 'IBM Plex Sans', sans-serif;
    --container: 1100px;
    --radius: 12px;
    --gap: 16px;
}

/* ── Grain overlay ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ── Header ── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 12, 16, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.logo {
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}

.cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

nav a {
    font-family: var(--mono);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

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

/* ── Bento Grid ── */
main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 24px 0;
}

.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: var(--gap);
    width: 100%;
}

/* ── Shared cell style ── */
.bento-cell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.bento-cell:hover {
    border-color: #3a3a48;
}

/* ── Hero cell: spans 2 cols, 1 row ── */
.hero {
    grid-column: 1 / 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 40px 36px;
    min-height: 320px;
}

.tag {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--green);
    letter-spacing: 0.02em;
    display: inline-block;
    margin-bottom: 20px;
}

.hero h1 {
    font-family: var(--mono);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1rem;
    color: var(--text-dim);
    max-width: 440px;
    line-height: 1.7;
}

.hero-footer {
    margin-top: 32px;
}

/* ── Button ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: background 0.2s, transform 0.15s;
}

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

.btn-arrow {
    transition: transform 0.2s;
}

.btn:hover .btn-arrow {
    transform: translateX(3px);
}

/* ── Service cards ── */
.service {
    display: flex;
    flex-direction: column;
}

.service:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(0, 0, 0, 0.25);
}

.service-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    color: var(--text-dim);
}

.service-num {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 500;
}

.service h2 {
    font-family: var(--mono);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.service p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.service-list {
    list-style: none;
    margin-top: 16px;
    padding: 0;
}

.service-list li {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    padding: 6px 0;
    border-top: 1px solid var(--border);
}

.service-list li:last-child {
    padding-bottom: 0;
}

/* ── Service: top-right ── */
.service-dev {
    grid-column: 3;
    grid-row: 1;
}

/* ── Service: bottom-left, bottom-middle ── */
.service-it {
    grid-column: 1;
    grid-row: 2;
}

.service-sec {
    grid-column: 2;
    grid-row: 2;
}

/* ── CTA cell: bottom-right ── */
.cta {
    grid-column: 3;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--accent-glow);
    border-color: var(--accent);
}

.cta:hover {
    background: rgba(224, 168, 64, 0.18);
    border-color: var(--accent);
}

.cta-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.cta-link {
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    margin-top: 24px;
}

.footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.footer-dot {
    opacity: 0.4;
}

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

    .hero {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .service-dev {
        grid-column: 1;
        grid-row: 2;
    }

    .service-it {
        grid-column: 2;
        grid-row: 2;
    }

    .service-sec {
        grid-column: 1;
        grid-row: 3;
    }

    .cta {
        grid-column: 2;
        grid-row: 3;
    }
}

@media (max-width: 600px) {
    main {
        align-items: flex-start;
        padding: 16px 0;
    }

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

    .hero {
        grid-column: 1;
        min-height: auto;
        padding: 32px;
    }

    .service-dev,
    .service-it,
    .service-sec,
    .cta {
        grid-column: 1;
        grid-row: auto;
    }

    .bento-cell {
        padding: 24px;
    }
}
