/* ===== Hero ===== */
.hero {
    padding: var(--space-6) 0 var(--space-5);
    background: var(--color-bg);
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: var(--space-5);
}

.hero__content {
    text-align: left;
}

/* Masthead line — sets the editorial register for the page */
.hero__masthead {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-2);
    flex-wrap: wrap;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.hero__masthead-loc {
    font-size: 0.72rem;
    color: var(--color-primary-ink);
}

.hero__title {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.6rem, 7vw, 4.6rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-3);
}

.hero__title-line {
    display: inline-block;
    position: relative;
    padding-bottom: 0.28em;
}

.hero__title-line::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    animation: underline-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.75s forwards;
}

@keyframes underline-in {
    to { transform: scaleX(1); }
}

/* ===== Entrance — staggered rise, one pass ===== */
.hero__masthead,
.hero__title,
.hero__subtitle,
.hero__services,
.hero__cta,
.hero__cta-note {
    opacity: 0;
    animation: rise-in 0.6s ease-out forwards;
}

.hero__masthead { animation-delay: 0.05s; }
.hero__title { animation-delay: 0.15s; }
.hero__subtitle { animation-delay: 0.28s; }
.hero__services { animation-delay: 0.38s; }
.hero__cta { animation-delay: 0.5s; }
.hero__cta-note { animation-delay: 0.58s; }

@keyframes rise-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.hero__subtitle {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    color: var(--color-text-muted);
    max-width: 480px;
    margin-bottom: var(--space-3);
}

/* ===== Service index — clickable rows, the offer as navigation ===== */
.hero__services {
    max-width: 520px;
    margin-bottom: var(--space-4);
}

.hero__service {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    padding: 12px 0;
    border-top: 1px solid var(--color-border);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    transition: padding-left 0.18s ease;
}

.hero__service:last-child {
    border-bottom: 1px solid var(--color-border);
}

.hero__service-num {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-primary-ink);
}

.hero__service-name {
    flex: 1;
}

.hero__service-tag {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color 0.18s ease;
}

.hero__service-arrow {
    font-family: "IBM Plex Mono", monospace;
    color: var(--color-primary-ink);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.hero__service:hover,
.hero__service:focus-visible {
    padding-left: 6px;
}

.hero__service:hover .hero__service-tag,
.hero__service:focus-visible .hero__service-tag {
    color: var(--color-primary-ink);
}

.hero__service:hover .hero__service-arrow,
.hero__service:focus-visible .hero__service-arrow {
    opacity: 1;
    transform: translateX(0);
}

.hero__service:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===== CTA — solid ink block, red on hover ===== */
.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 34px;
    background: var(--color-text);
    border: 1.5px solid var(--color-text);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hero__cta-arrow {
    font-family: "IBM Plex Mono", monospace;
    transition: transform 0.15s ease;
}

.hero__cta:hover,
.hero__cta:focus-visible {
    background: var(--color-primary-ink);
    border-color: var(--color-primary-ink);
    color: #fff;
}

.hero__cta-note {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: 12px;
}

.hero__cta:hover .hero__cta-arrow,
.hero__cta:focus-visible .hero__cta-arrow {
    transform: translateX(4px);
}

.hero__cta:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

/* ===== Graphic — live particle network, ink + red signals ===== */
.hero__graphic {
    position: relative;
    justify-self: center;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 1 / 1;
    opacity: 0;
    animation: graphic-in 0.9s ease-out 0.15s forwards;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

.hero__graphic.is-dragging {
    cursor: grabbing;
}

.hero__canvas {
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes graphic-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__graphic,
    .hero__masthead,
    .hero__title,
    .hero__subtitle,
    .hero__services,
    .hero__cta,
    .hero__cta-note {
        animation: none;
        opacity: 1;
    }

    .hero__title-line::after {
        animation: none;
        transform: scaleX(1);
    }

    .hero__service,
    .hero__service-arrow,
    .hero__service-tag,
    .hero__cta-arrow {
        transition: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__graphic { margin-top: var(--space-4); max-width: 320px; }
}

@media (max-width: 768px) {
    .hero { padding: var(--space-5) 0 var(--space-4); }
    .hero__title { line-height: 1.02; }
}

@media (max-width: 640px) {
    .hero__service-tag { display: none; }
}

@media (max-width: 480px) {
    .hero__masthead { font-size: 0.7rem; }
    .hero__cta { width: 100%; justify-content: center; }
}
