/* ============================================================
   Manus home — Manus.im-inspired redesign
   ============================================================ */

:root {
    --mh-bg: #0e0e0f;
    --mh-surface: #161618;
    --mh-surface-2: #1c1c1f;
    --mh-border: rgba(255,255,255,0.08);
    --mh-border-strong: rgba(255,255,255,0.14);
    --mh-text: #f3f1ec;
    --mh-text-dim: rgba(243,241,236,0.62);
    --mh-text-faint: rgba(243,241,236,0.4);
    --mh-accent: #d8c4a4;
    --mh-accent-2: #c9b18b;
    --mh-accent-glow: rgba(216,196,164,0.18);
}

/* hide legacy sections if any leak through */
.hero, .what-section, .how-section, .features-section, .faq-section, .cta { display: none !important; }

body {
    background: var(--mh-bg);
    color: var(--mh-text);
}

/* Header adjustments for dark theme */
.header.scrolled {
    background: rgba(14, 14, 15, 0.78) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--mh-border) !important;
}

.header.scrolled .logo { color: var(--mh-text); }
.header.scrolled .nav-link { color: var(--mh-text-dim); }
.header.scrolled .nav-link:hover {
    color: var(--mh-text);
    background: rgba(255,255,255,0.06);
}
.header.scrolled .logo-icon {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--mh-border);
}
.header.scrolled .btn-primary {
    background: var(--mh-accent);
    color: #1a1510;
}
.header.scrolled .btn-primary:hover {
    background: #e5d3b4;
}
.header.scrolled .mobile-menu-btn { color: var(--mh-text); }

.footer {
    background: #0a0a0b !important;
    border-top: 1px solid var(--mh-border);
}

/* ---------- Hero ---------- */
.mh-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 24px 80px;
    overflow: hidden;
    background: var(--mh-bg);
}

.mh-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(700px 420px at 50% 20%, var(--mh-accent-glow) 0%, transparent 60%),
        radial-gradient(500px 300px at 20% 80%, rgba(200,160,110,0.08) 0%, transparent 70%),
        radial-gradient(500px 300px at 80% 80%, rgba(160,180,220,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.mh-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%);
    pointer-events: none;
}

.mh-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
    width: 100%;
    text-align: center;
}

.mh-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--mh-text-dim);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--mh-border);
    border-radius: 100px;
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
}

.mh-dot {
    width: 6px;
    height: 6px;
    background: var(--mh-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--mh-accent-glow);
    animation: mh-pulse 2.2s ease-in-out infinite;
}

@keyframes mh-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.mh-hero-title {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: clamp(40px, 7.2vw, 76px);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.02;
    margin: 0 0 20px;
    color: var(--mh-text);
}

.mh-grad {
    background: linear-gradient(180deg, #fff 0%, var(--mh-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mh-hero-sub {
    font-size: 17px;
    color: var(--mh-text-dim);
    max-width: 620px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

/* Prompt box */
.mh-prompt {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    background: var(--mh-surface);
    border: 1px solid var(--mh-border-strong);
    border-radius: 20px;
    padding: 16px 18px 12px;
    text-align: left;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}

.mh-prompt:focus-within {
    border-color: rgba(216,196,164,0.4);
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6), 0 0 0 4px var(--mh-accent-glow);
}

.mh-prompt textarea {
    width: 100%;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--mh-text);
    font-size: 16px;
    font-family: inherit;
    line-height: 1.55;
    resize: none;
    min-height: 48px;
    max-height: 220px;
    padding: 0;
    overflow-y: auto;
}

.mh-prompt textarea::placeholder {
    color: var(--mh-text-faint);
}

.mh-prompt-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.mh-prompt-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--mh-text-faint);
}

.mh-prompt-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--mh-accent);
    color: #1a1510;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .15s, background .15s, opacity .15s;
}

.mh-prompt-send:hover:not(:disabled) {
    background: #e5d3b4;
    transform: translateY(-1px);
}

.mh-prompt-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Suggestion chips */
.mh-suggest {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.mh-chip {
    font-size: 13px;
    color: var(--mh-text-dim);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--mh-border);
    border-radius: 100px;
    padding: 7px 14px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.mh-chip:hover {
    color: var(--mh-text);
    background: rgba(255,255,255,0.08);
    border-color: var(--mh-border-strong);
}

/* ---------- Capabilities ---------- */
.mh-caps {
    padding: 60px 24px;
    border-top: 1px solid var(--mh-border);
    background: var(--mh-bg);
}

.mh-caps-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.mh-cap {
    padding: 28px 24px;
    background: var(--mh-surface);
    border: 1px solid var(--mh-border);
    border-radius: 16px;
    transition: border-color .2s, transform .2s;
}

.mh-cap:hover {
    border-color: var(--mh-border-strong);
    transform: translateY(-2px);
}

.mh-cap-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mh-accent);
    background: rgba(216,196,164,0.1);
    border-radius: 10px;
    margin-bottom: 16px;
}

.mh-cap-icon svg { width: 20px; height: 20px; }

.mh-cap-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--mh-text);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.mh-cap-desc {
    font-size: 13.5px;
    color: var(--mh-text-dim);
    line-height: 1.55;
}

/* ---------- Section heads ---------- */
.mh-section-head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 48px;
}

.mh-section-eyebrow {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mh-accent);
    margin-bottom: 14px;
}

.mh-section-head h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0 0 14px;
    color: var(--mh-text);
}

.mh-section-head p {
    font-size: 16px;
    color: var(--mh-text-dim);
    line-height: 1.6;
    margin: 0;
}

/* ---------- Tasks / use cases ---------- */
.mh-tasks {
    padding: 100px 24px;
    background: var(--mh-bg);
}

.mh-tasks-inner {
    max-width: 1140px;
    margin: 0 auto;
}

.mh-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.mh-cat {
    font-size: 13px;
    font-weight: 500;
    color: var(--mh-text-dim);
    background: transparent;
    border: 1px solid var(--mh-border);
    border-radius: 100px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.mh-cat:hover {
    color: var(--mh-text);
    border-color: var(--mh-border-strong);
}

.mh-cat.is-active {
    color: #1a1510;
    background: var(--mh-accent);
    border-color: var(--mh-accent);
}

.mh-task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.mh-task-card {
    text-align: left;
    background: var(--mh-surface);
    border: 1px solid var(--mh-border);
    border-radius: 16px;
    padding: 22px 22px 18px;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    position: relative;
    transition: border-color .2s, transform .2s, background .2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 170px;
}

.mh-task-card:hover {
    border-color: var(--mh-border-strong);
    background: var(--mh-surface-2);
    transform: translateY(-2px);
}

.mh-task-tag {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mh-accent);
    background: rgba(216,196,164,0.08);
    border: 1px solid rgba(216,196,164,0.18);
    padding: 3px 10px;
    border-radius: 100px;
}

.mh-task-title {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--mh-text);
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.mh-task-desc {
    font-size: 13.5px;
    color: var(--mh-text-dim);
    line-height: 1.55;
    flex-grow: 1;
}

.mh-task-arrow {
    align-self: flex-end;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mh-text-faint);
    border: 1px solid var(--mh-border);
    border-radius: 10px;
    transition: color .15s, border-color .15s, transform .15s;
}

.mh-task-arrow svg { width: 14px; height: 14px; }

.mh-task-card:hover .mh-task-arrow {
    color: var(--mh-accent);
    border-color: var(--mh-accent);
    transform: translateX(3px);
}

/* ---------- How it works ---------- */
.mh-how {
    padding: 100px 24px;
    background: var(--mh-surface);
    border-top: 1px solid var(--mh-border);
    border-bottom: 1px solid var(--mh-border);
}

.mh-how-inner {
    max-width: 1140px;
    margin: 0 auto;
}

.mh-how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.mh-how-step {
    padding: 28px 24px;
}

.mh-how-num {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--mh-accent);
    margin-bottom: 14px;
}

.mh-how-step h3 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0 0 8px;
    color: var(--mh-text);
}

.mh-how-step p {
    font-size: 14.5px;
    color: var(--mh-text-dim);
    line-height: 1.6;
    margin: 0;
}

/* ---------- FAQ ---------- */
.mh-faq {
    padding: 100px 24px;
    background: var(--mh-bg);
}

.mh-faq-inner {
    max-width: 760px;
    margin: 0 auto;
}

.mh-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mh-faq-item {
    background: var(--mh-surface);
    border: 1px solid var(--mh-border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .2s;
}

.mh-faq-item[open] {
    border-color: var(--mh-border-strong);
}

.mh-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
    font-size: 15.5px;
    font-weight: 500;
    color: var(--mh-text);
}

.mh-faq-item summary::-webkit-details-marker { display: none; }

.mh-faq-item summary svg {
    flex-shrink: 0;
    color: var(--mh-text-faint);
    transition: transform .2s;
}

.mh-faq-item[open] summary svg {
    transform: rotate(180deg);
    color: var(--mh-accent);
}

.mh-faq-body {
    padding: 0 22px 20px;
    font-size: 14.5px;
    color: var(--mh-text-dim);
    line-height: 1.65;
}

/* ---------- CTA ---------- */
.mh-cta {
    padding: 100px 24px;
    background: var(--mh-bg);
    text-align: center;
    border-top: 1px solid var(--mh-border);
    position: relative;
    overflow: hidden;
}

.mh-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 300px at 50% 100%, var(--mh-accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.mh-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 auto;
}

.mh-cta h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0 0 14px;
    color: var(--mh-text);
}

.mh-cta p {
    font-size: 16px;
    color: var(--mh-text-dim);
    margin: 0 0 28px;
}

.mh-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1510;
    background: var(--mh-accent);
    border-radius: 12px;
    text-decoration: none;
    transition: transform .15s, background .15s;
}

.mh-cta-btn:hover {
    background: #e5d3b4;
    transform: translateY(-1px);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .mh-caps-inner { grid-template-columns: repeat(2, 1fr); }
    .mh-how-steps { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 640px) {
    .mh-hero { padding: 110px 18px 60px; min-height: auto; }
    .mh-hero-title { font-size: clamp(34px, 10vw, 48px); }
    .mh-hero-sub { font-size: 15px; }
    .mh-prompt { padding: 14px 14px 10px; border-radius: 16px; }
    .mh-caps { padding: 48px 18px; }
    .mh-caps-inner { grid-template-columns: 1fr; gap: 12px; }
    .mh-tasks, .mh-how, .mh-faq, .mh-cta { padding: 72px 18px; }
    .mh-task-grid { grid-template-columns: 1fr; }
    .mh-cats { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 4px; }
    .mh-cat { flex-shrink: 0; }
    .mh-section-head { margin-bottom: 32px; }
}
