:root {
    --cah-bg: #f5f6f8;
    --cah-panel: #ffffff;
    --cah-text: #141619;
    --cah-muted: #666b73;
    --cah-line: #e3e6ea;
    --cah-dark: #101214;
    --cah-dark-2: #171a1f;
    --cah-accent: #6d5dfc;
    --cah-accent-soft: #efedff;
    --cah-success: #4ed087;
    --cah-max: 1180px;
    --cah-radius: 22px;
    --cah-shadow: 0 24px 70px rgba(18, 20, 23, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.code-anything-landing-active {
    margin: 0;
    background: var(--cah-bg);
    color: var(--cah-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
body.code-anything-landing-active.admin-bar .cah-site-header { top: 32px; }
.code-anything-landing-active a { text-decoration: none; }
.code-anything-landing-active img { max-width: 100%; }
.cah-container { width: min(calc(100% - 40px), var(--cah-max)); margin: 0 auto; }
.cah-skip-link { position: fixed; left: 16px; top: -60px; z-index: 100000; background: #fff; color: #000; padding: 10px 14px; border-radius: 8px; }
.cah-skip-link:focus { top: 16px; }

.cah-site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    background: rgba(245,246,248,.78);
    border-bottom: 1px solid rgba(227,230,234,.85);
}
.cah-header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cah-brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; color: var(--cah-text); letter-spacing: -.02em; }
.cah-brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--cah-dark); color: #fff; font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.cah-header-actions { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.cah-header-actions a { color: #525760; font-weight: 600; }
.cah-header-actions a:hover { color: var(--cah-text); }
.cah-mini-button { padding: 9px 14px; border: 1px solid var(--cah-line); border-radius: 999px; background: rgba(255,255,255,.7); }

.cah-hero { padding: 92px 0 76px; overflow: hidden; }
.cah-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); gap: 72px; align-items: center; }
.cah-eyebrow, .cah-section-kicker { text-transform: uppercase; font-size: 12px; letter-spacing: .15em; font-weight: 800; color: #5b6068; }
.cah-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.cah-eyebrow span { width: 8px; height: 8px; border-radius: 999px; background: var(--cah-accent); box-shadow: 0 0 0 6px var(--cah-accent-soft); }
.cah-hero h1 { max-width: 790px; margin: 0; font-size: clamp(48px, 6vw, 84px); line-height: .98; letter-spacing: -.06em; font-weight: 820; }
.cah-hero-intro { max-width: 710px; margin: 28px 0 0; color: var(--cah-muted); font-size: 19px; line-height: 1.7; }
.cah-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cah-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 19px; border-radius: 13px; font-weight: 750; font-size: 15px; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.cah-button:hover { transform: translateY(-2px); }
.cah-button-primary { background: var(--cah-dark); color: #fff; box-shadow: 0 12px 30px rgba(16,18,20,.16); }
.cah-button-primary:hover { background: #20242a; color: #fff; }
.cah-button-secondary { border: 1px solid var(--cah-line); background: rgba(255,255,255,.7); color: var(--cah-text); }
.cah-status-card { margin-top: 30px; display: inline-flex; align-items: center; gap: 13px; padding: 12px 15px; background: rgba(255,255,255,.72); border: 1px solid var(--cah-line); border-radius: 14px; }
.cah-status-card strong, .cah-status-card span { display: block; }
.cah-status-card strong { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.cah-status-card span { color: var(--cah-muted); font-size: 13px; margin-top: 2px; }
.cah-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cah-success); box-shadow: 0 0 0 6px rgba(78,208,135,.15); }

.cah-terminal-wrap { position: relative; min-height: 470px; display: grid; place-items: center; }
.cah-terminal-wrap::before { content: ""; position: absolute; inset: 5% -10% -5% 4%; background: radial-gradient(circle at 50% 50%, rgba(109,93,252,.18), rgba(109,93,252,0) 66%); filter: blur(18px); }
.cah-terminal { position: relative; width: 100%; border-radius: 22px; background: #111317; border: 1px solid rgba(255,255,255,.09); box-shadow: 0 40px 90px rgba(16,18,20,.28); overflow: hidden; transform: rotate(1.2deg); }
.cah-terminal-top { height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.07); color: #858b95; font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.cah-terminal-dots { display: flex; gap: 7px; }
.cah-terminal-dots i { width: 9px; height: 9px; border-radius: 50%; background: #333842; }
.cah-terminal-body { min-height: 350px; padding: 30px; color: #d9dde5; font: 500 15px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.cah-terminal-body p { margin: 0 0 8px; }
.cah-prompt { color: #9388ff; }
.cah-muted { color: #69707c; }
.cah-success { color: var(--cah-success); }
.cah-terminal-cursor { margin-top: 20px !important; }
.cah-cursor { display: inline-block; width: 8px; height: 16px; background: #dfe3ea; vertical-align: -3px; animation: cah-blink 1s steps(2, start) infinite; }
@keyframes cah-blink { 50% { opacity: 0; } }
.cah-floating-chip { position: absolute; z-index: 3; padding: 9px 13px; border-radius: 11px; background: #fff; border: 1px solid var(--cah-line); box-shadow: 0 16px 38px rgba(18,20,23,.12); font-size: 12px; font-weight: 800; }
.cah-chip-one { left: -18px; top: 40px; transform: rotate(-5deg); }
.cah-chip-two { right: -12px; top: 88px; transform: rotate(5deg); }
.cah-chip-three { right: 16px; bottom: 20px; transform: rotate(-4deg); }

.cah-section { padding: 88px 0; }
.cah-intro-strip { padding: 46px 0; border-top: 1px solid var(--cah-line); border-bottom: 1px solid var(--cah-line); background: rgba(255,255,255,.62); }
.cah-intro-strip-grid { display: grid; grid-template-columns: 220px 1fr; gap: 34px; align-items: start; }
.cah-intro-strip p { margin: 0; max-width: 830px; font-size: 21px; line-height: 1.6; letter-spacing: -.02em; }
.cah-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.cah-section-heading h2 { margin: 9px 0 0; font-size: clamp(36px, 4.2vw, 58px); line-height: 1.02; letter-spacing: -.05em; }
.cah-section-heading > p { width: min(100%, 430px); margin: 0; color: var(--cah-muted); line-height: 1.65; }

.cah-project-grid { display: grid; grid-template-columns: 1.18fr 1fr 1fr; gap: 18px; }
.cah-project-card { min-height: 360px; padding: 28px; border-radius: var(--cah-radius); background: var(--cah-panel); border: 1px solid var(--cah-line); display: flex; flex-direction: column; box-shadow: 0 14px 40px rgba(18,20,23,.05); transition: transform .2s ease, box-shadow .2s ease; }
.cah-project-card:hover { transform: translateY(-5px); box-shadow: var(--cah-shadow); }
.cah-project-card-featured { background: var(--cah-dark); color: #fff; border-color: var(--cah-dark); }
.cah-project-card-top { display: flex; justify-content: space-between; align-items: center; }
.cah-card-tag { font-size: 11px; letter-spacing: .12em; font-weight: 800; }
.cah-card-number { font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; color: #9398a1; }
.cah-project-card h3 { margin: 54px 0 15px; font-size: 26px; line-height: 1.12; letter-spacing: -.035em; }
.cah-project-card p { margin: 0; color: var(--cah-muted); line-height: 1.7; }
.cah-project-card-featured p { color: #afb5bf; }
.cah-tech-row { margin-top: auto; padding-top: 28px; display: flex; flex-wrap: wrap; gap: 7px; }
.cah-tech-row span { border-radius: 999px; background: #f0f2f4; padding: 7px 10px; font-size: 11px; font-weight: 700; }
.cah-project-card-featured .cah-tech-row span { background: #22262d; color: #cbd0d8; }

.cah-principles-section { background: var(--cah-dark); color: #fff; }
.cah-section-heading-light .cah-section-kicker { color: #8b929e; }
.cah-principles-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #2b3038; border-left: 1px solid #2b3038; }
.cah-principles-grid > div { min-height: 250px; padding: 28px; border-right: 1px solid #2b3038; border-bottom: 1px solid #2b3038; }
.cah-principles-grid span { color: #747b87; font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.cah-principles-grid h3 { margin: 65px 0 12px; font-size: 23px; }
.cah-principles-grid p { margin: 0; color: #9ea4ae; line-height: 1.65; }

.cah-latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cah-post-card { min-height: 305px; padding: 27px; background: #fff; border: 1px solid var(--cah-line); border-radius: var(--cah-radius); display: flex; flex-direction: column; }
.cah-post-meta { color: #7b8088; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.cah-post-card h3 { margin: 44px 0 13px; font-size: 24px; line-height: 1.2; letter-spacing: -.03em; }
.cah-post-card h3 a { color: var(--cah-text); }
.cah-post-card p { margin: 0; color: var(--cah-muted); line-height: 1.65; }
.cah-text-link { margin-top: auto; padding-top: 24px; color: var(--cah-text); font-weight: 800; font-size: 13px; }
.cah-post-card-empty { background: transparent; border-style: dashed; }

.cah-final-cta { padding: 88px 0; background: var(--cah-accent); color: #fff; }
.cah-final-cta .cah-section-kicker { color: rgba(255,255,255,.68); }
.cah-final-cta-inner { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.cah-final-cta h2 { margin: 11px 0 0; font-size: clamp(46px, 6vw, 78px); line-height: .98; letter-spacing: -.055em; }
.cah-final-cta h2 em { font-style: normal; color: #d9d4ff; }
.cah-button-inverse { background: #fff; color: #17191c; white-space: nowrap; }
.cah-button-inverse:hover { color: #17191c; }

.cah-footer { padding: 28px 0; background: #0b0d0f; color: #c1c6cf; }
.cah-footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center; font-size: 12px; }
.cah-footer-inner strong, .cah-footer-inner span { display: block; }
.cah-footer-inner strong { color: #fff; font-size: 13px; }
.cah-footer-inner div span { margin-top: 3px; color: #707784; }
.cah-footer-inner p { margin: 0; color: #707784; }

@media (max-width: 1000px) {
    .cah-hero { padding-top: 72px; }
    .cah-hero-grid { grid-template-columns: 1fr; gap: 56px; }
    .cah-terminal-wrap { width: min(100%, 720px); min-height: auto; margin: 0 auto; }
    .cah-project-grid { grid-template-columns: 1fr 1fr; }
    .cah-project-card-featured { grid-column: 1 / -1; }
    .cah-principles-grid { grid-template-columns: 1fr 1fr; }
    .cah-latest-grid { grid-template-columns: 1fr 1fr; }
    .cah-latest-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 782px) {
    body.code-anything-landing-active.admin-bar .cah-site-header { top: 46px; }
}

@media (max-width: 720px) {
    .cah-container { width: min(calc(100% - 28px), var(--cah-max)); }
    .cah-header-inner { min-height: 64px; }
    .cah-header-actions a:not(.cah-mini-button) { display: none; }
    .cah-brand { font-size: 14px; }
    .cah-hero { padding: 60px 0 52px; }
    .cah-hero h1 { font-size: clamp(46px, 14vw, 68px); }
    .cah-hero-intro { font-size: 17px; }
    .cah-hero-actions { align-items: stretch; flex-direction: column; }
    .cah-button { width: 100%; }
    .cah-status-card { width: 100%; }
    .cah-terminal { transform: none; border-radius: 18px; }
    .cah-terminal-body { padding: 22px; min-height: 300px; font-size: 13px; }
    .cah-terminal-top { grid-template-columns: 1fr auto; }
    .cah-terminal-top > span { justify-self: end; }
    .cah-floating-chip { display: none; }
    .cah-section { padding: 64px 0; }
    .cah-intro-strip { padding: 34px 0; }
    .cah-intro-strip-grid { grid-template-columns: 1fr; gap: 16px; }
    .cah-intro-strip p { font-size: 18px; }
    .cah-section-heading { display: block; }
    .cah-section-heading > p { margin-top: 18px; }
    .cah-project-grid, .cah-latest-grid { grid-template-columns: 1fr; }
    .cah-project-card-featured, .cah-latest-grid > :last-child:nth-child(odd) { grid-column: auto; }
    .cah-project-card { min-height: 320px; }
    .cah-principles-grid { grid-template-columns: 1fr; }
    .cah-principles-grid > div { min-height: 200px; }
    .cah-principles-grid h3 { margin-top: 42px; }
    .cah-final-cta-inner { display: block; }
    .cah-final-cta .cah-button { margin-top: 34px; }
    .cah-footer-inner { grid-template-columns: 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .cah-cursor { animation: none; }
    .cah-button, .cah-project-card { transition: none; }
}
