/* CyberMark Agency 2.0 — front page only (front-page.php) */

/* ---------- Hero ---------- */
.cm-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: radial-gradient(ellipse at 72% 38%, #0E1622 0%, var(--black) 62%);
}

.cm-globe {
    position: absolute;
    top: 50%;
    right: -4vw;
    width: min(62vw, 860px);
    aspect-ratio: 1;
    transform: translateY(-54%);
    z-index: 0;
}

.cm-frame { position: absolute; inset: 96px var(--gutter) 0; pointer-events: none; z-index: 1; }
.cm-frame i { position: absolute; width: 14px; height: 14px; border-color: var(--line-d-strong); border-style: solid; }
.cm-frame i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.cm-frame i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.cm-h-axis { position: absolute; left: 0; right: 0; top: 46%; height: 1px; background: linear-gradient(90deg, transparent, var(--line-d) 20%, var(--line-d) 80%, transparent); }
.cm-v-axis { position: absolute; top: 0; bottom: 0; left: 58%; width: 1px; background: linear-gradient(180deg, transparent, var(--line-d) 20%, var(--line-d) 80%, transparent); }

.cm-hero-body {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 140px;
    padding-bottom: clamp(3rem, 7vh, 5rem);
}

.cm-hero h1 {
    margin: 0 0 clamp(2rem, 5vh, 3.5rem);
    font-size: clamp(2.6rem, 6.2vw, 6.4rem);
    font-weight: 300;
    line-height: 0.96;
    letter-spacing: -0.045em;
    max-width: 13ch;
}

.cm-hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 6rem);
    align-items: end;
    border-top: 1px solid var(--line-d);
    padding-top: 2rem;
}

.cm-hero-copy { color: var(--mute-d); font-size: clamp(1rem, 1.25vw, 1.15rem); max-width: 58ch; }

.cm-hero-actions { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 0.9rem; }

.cm-hero-micro { color: var(--dim-d); margin: 0; }

/* Capability ticker */
.cm-ticker { position: relative; z-index: 2; border-top: 1px solid var(--line-d); overflow: hidden; white-space: nowrap; color: var(--mute-d); }
.cm-ticker-track { display: inline-flex; animation: cm-ticker 40s linear infinite; }
.cm-ticker-track span { padding: 1.15rem 2.5rem; border-right: 1px solid var(--line-d); }
.cm-ticker-track span::before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--accent); margin-right: 14px; vertical-align: 1px; }

@keyframes cm-ticker { to { transform: translateX(-50%); } }

/* ---------- Credentials and partners ---------- */
.cm-creds { background: var(--ink); border-top: 1px solid var(--line-d); border-bottom: 1px solid var(--line-d); }
.cm-partners { border-top: 0; }

.cm-creds-grid {
    display: grid;
    /* 6 sub-columns: credentials span 2 each (3 across), partners span 3 each (2 across) */
    grid-template-columns: 200px repeat(6, 1fr);
    align-items: stretch;
}

.cm-creds-label { color: var(--dim-d); padding: 2.5rem 0; align-self: center; }

.cm-cred {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    border-left: 1px solid var(--line-d);
    transition: background 0.25s ease;
}

.cm-cred:last-child { border-right: 1px solid var(--line-d); }
.cm-cred:hover { background: rgba(76, 144, 240, 0.05); }

.cm-cred-logo,
.cm-partner-logo {
    width: 100%;
    background: var(--white);
    display: grid;
    place-items: center;
    position: relative;
}

.cm-cred-logo { height: 104px; padding: 12px 20px; }
.cm-partner-logo { max-width: 300px; height: 96px; padding: 18px 28px; }

.cm-cred-logo::after,
.cm-partner-logo::after { content: ''; position: absolute; inset: -6px; border: 1px solid var(--line-d-strong); pointer-events: none; }

/* Pixel caps: percentage heights don't constrain images inside auto-height grid rows */
.cm-cred-logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 80px; object-fit: contain; }
.cm-partner-logo img { display: block; width: 100%; max-width: 200px; height: auto; max-height: 60px; object-fit: contain; }

.cm-cred .cm-mono { color: var(--dim-d); display: block; margin-bottom: 0.5rem; }
.cm-cred h3 { margin: 0; font-size: clamp(1.2rem, 1.6vw, 1.5rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; }

.cm-partners .cm-cred { grid-column: span 3; justify-content: center; align-items: center; }

/* ---------- Steps timeline (light) ---------- */
.cm-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--cm-steps, 3), 1fr);
    border-top: 1px solid var(--line-l-strong);
}

.cm-track-fill { position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: var(--black); transition: width 1.8s cubic-bezier(0.6, 0, 0.2, 1); }
.cm-track.is-in .cm-track-fill { width: 100%; }

.cm-step { position: relative; padding: 2.5rem 2.5rem 0 0; }
.cm-step + .cm-step { padding-left: 2.5rem; border-left: 1px solid var(--line-l); }

.cm-step-node { position: absolute; top: -6px; left: 0; width: 11px; height: 11px; background: var(--paper); border: 1px solid var(--black); }
.cm-step + .cm-step .cm-step-node { left: -6px; }
.cm-track.is-in .cm-step-node { background: var(--black); transition: background 0.3s ease; }
.cm-track.is-in .cm-step:nth-child(3) .cm-step-node { transition-delay: 0.6s; }
.cm-track.is-in .cm-step:nth-child(4) .cm-step-node { transition-delay: 1.2s; }

.cm-step-n {
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: 300;
    line-height: 0.9;
    letter-spacing: -0.05em;
    margin-bottom: 2rem;
    color: transparent;
    -webkit-text-stroke: 1px var(--black);
}

.cm-step h3 { margin: 0 0 1rem; font-size: 1.45rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.cm-step .cm-prose { color: var(--mute-l); }

.cm-when { display: inline-block; margin-top: 2rem; padding: 0.45rem 0.7rem; border: 1px solid var(--line-l-strong); color: var(--black); }

/* Keep the onboarding timeline on the dark canvas. */
#services.cm-light { background: var(--black); color: var(--white); }
#services.cm-light .cm-sec-num,
#services.cm-light .cm-sec-intro,
#services.cm-light .cm-step .cm-prose { color: var(--mute-d); }
#services.cm-light .cm-track { border-top-color: var(--line-d-strong); }
#services.cm-light .cm-track-fill { background: var(--accent); }
#services.cm-light .cm-step + .cm-step { border-left-color: var(--line-d); }
#services.cm-light .cm-step-node { background: var(--black); border-color: var(--white); }
#services.cm-light .cm-track.is-in .cm-step-node { background: var(--accent); border-color: var(--accent); }
#services.cm-light .cm-step-n { -webkit-text-stroke-color: var(--line-d-strong); }
#services.cm-light .cm-when { border-color: var(--line-d-strong); color: var(--mute-d); }
#services.cm-light .cm-step a { color: var(--white); }
#services.cm-light .cm-step a:hover { color: var(--accent); }

/* ---------- Why choose (dark, sticky split) ---------- */
.cm-why-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 7rem); }

.cm-why-aside { position: sticky; top: 120px; align-self: start; }
.cm-why-aside .cm-sec-title { margin-bottom: 2rem; }
.cm-why-aside .cm-prose { color: var(--mute-d); font-size: 1.02rem; }

.cm-why-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-d-strong); counter-reset: cm-why; }

.cm-why-item {
    counter-increment: cm-why;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 1rem;
    padding: 2.4rem 0;
    border-bottom: 1px solid var(--line-d);
    position: relative;
}

.cm-why-item::before {
    content: counter(cm-why, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--dim-d);
    padding-top: 0.45rem;
    transition: color 0.3s ease;
}

.cm-why-item::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--accent); transition: width 0.5s ease; }
.cm-why-item:hover::after { width: 100%; }
.cm-why-item:hover::before { color: var(--accent); }

.cm-why-item h3 { margin: 0 0 0.9rem; font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; }
.cm-why-item .cm-prose { color: var(--mute-d); max-width: 62ch; }

/* ---------- FAQ (light) ---------- */
.cm-faq-cta { margin-top: 2rem; }

.cm-faq { border-top: 1px solid var(--line-l-strong); margin-left: calc(50% + clamp(1rem, 2.5vw, 3rem)); }

.cm-faq-item { border-bottom: 1px solid var(--line-l); }

.cm-faq-item summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: 56px 1fr 24px;
    align-items: baseline;
    gap: 1rem;
    padding: 1.4rem 0;
    font-size: 1.12rem;
    transition: color 0.2s ease;
}

.cm-faq-item summary::-webkit-details-marker { display: none; }
.cm-faq-item summary .cm-mono { color: var(--mute-l); }
.cm-faq-item summary:hover { color: var(--accent); }

.cm-plus { font-family: var(--font-mono); text-align: right; color: var(--mute-l); transition: transform 0.25s ease; }
.cm-faq-item[open] .cm-plus { transform: rotate(45deg); color: var(--accent); }

.cm-faq-a { color: var(--mute-l); padding: 0 40px 1.5rem calc(56px + 1rem); }

/* Keep the FAQ section on the site's dark canvas. */
#resources.cm-light { background: var(--black); color: var(--white); }
#resources.cm-light .cm-sec-num,
#resources.cm-light .cm-sec-intro { color: var(--mute-d); }
#resources.cm-light .cm-faq { border-top-color: var(--line-d-strong); }
#resources.cm-light .cm-faq-item { border-bottom-color: var(--line-d); }
#resources.cm-light .cm-faq-item summary .cm-mono,
#resources.cm-light .cm-faq-a { color: var(--mute-d); }
#resources.cm-light .cm-faq-item summary:hover { color: var(--white); }
#resources.cm-light .cm-plus { color: var(--dim-d); }
#resources.cm-light .cm-faq-item[open] .cm-plus { color: var(--accent); }
#resources.cm-light .cm-faq-a a { color: var(--white); }
#resources.cm-light .cm-faq-a a:hover { color: var(--accent); }

/* ---------- Final CTA ---------- */
.cm-cta { background: var(--black); overflow: hidden; }

.cm-cta-grid-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--line-d) 1px, transparent 1px), linear-gradient(90deg, var(--line-d) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 100%, #000 10%, transparent 70%);
    mask-image: radial-gradient(ellipse at 50% 100%, #000 10%, transparent 70%);
    opacity: 0.7;
}

.cm-cta .cm-wrap { position: relative; }

.cm-cta h2 {
    margin: 0 0 clamp(2.5rem, 5vw, 4rem);
    font-size: clamp(2.6rem, 8vw, 8rem);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.05em;
    max-width: 12ch;
}

.cm-cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 6rem); border-top: 1px solid var(--line-d-strong); padding-top: 2rem; }

.cm-cta-text { color: var(--mute-d); font-size: 1.1rem; margin-bottom: 2rem; max-width: 52ch; }

.cm-contact { display: grid; border-left: 1px solid var(--line-d); align-content: start; }
.cm-contact > div { padding: 1.2rem 0 1.2rem 2rem; border-bottom: 1px solid var(--line-d); }
.cm-contact > div:last-child { border-bottom: 0; color: var(--mute-d); }
.cm-contact .cm-mono { display: block; color: var(--dim-d); margin-bottom: 0.35rem; }
.cm-contact a { color: var(--white); text-decoration: none; font-size: 1.2rem; transition: color 0.2s ease; word-break: break-word; }
.cm-contact a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .cm-why-grid { grid-template-columns: 1fr; }
    .cm-why-aside { position: static; }
    .cm-faq { margin-left: 0; }
}

@media (max-width: 900px) {
    .cm-globe { width: 130vw; right: -45vw; top: 34%; opacity: 0.55; }
    .cm-v-axis { display: none; }

    .cm-hero-row, .cm-cta-row { grid-template-columns: 1fr; }
    .cm-hero-actions { justify-self: start; align-items: flex-start; }

    .cm-creds-grid { grid-template-columns: 1fr; }
    .cm-creds-label { padding: 2rem 0 1rem; }
    .cm-cred, .cm-cred:last-child, .cm-partners .cm-cred { grid-column: auto; border: 0; border-top: 1px solid var(--line-d); padding: 1.5rem 0; }
    .cm-cred-logo { height: 96px; }
    .cm-cred-logo img { max-height: 68px; }
    .cm-partners .cm-cred { align-items: stretch; }
    .cm-partner-logo { max-width: none; }

    .cm-track { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line-l-strong); }
    .cm-track-fill { top: 0; left: -1px; width: 2px !important; height: 0; transition: height 1.8s cubic-bezier(0.6, 0, 0.2, 1); }
    .cm-track.is-in .cm-track-fill { height: 100%; }
    .cm-step, .cm-step + .cm-step { padding: 0 0 3rem 2rem; border-left: 0; }
    .cm-step-node, .cm-step + .cm-step .cm-step-node { top: 0.5rem; left: -6px; }
    .cm-step-n { margin-bottom: 1.25rem; }

    .cm-contact { border-left: 0; border-top: 1px solid var(--line-d); }
    .cm-contact > div { padding-left: 0; }
}

@media (max-width: 768px) {
    .cm-hero { min-height: auto; }
}

@media (max-width: 560px) {
    .cm-why-item { grid-template-columns: 1fr; gap: 0.75rem; }
    .cm-faq-item summary { grid-template-columns: 1fr 24px; font-size: 1.05rem; }
    .cm-faq-item summary .cm-mono { display: none; }
    .cm-faq-a { padding: 0 0 1.5rem; }
}
