:root {
    /* Brand palette — see xcetra-brand-kit/brand-notes.md */
    --color-navy: #14213d;       /* Ink Navy — primary mark/text color */
    --color-blue: #2451ff;       /* accent blue — links, focus states */
    --color-blue-dark: #1a3ecf;
    --color-blue-tint: #e8ecfb;  /* light blue — subtle badges/backgrounds */
    --color-orange: #ff6b35;     /* Signal Coral — primary CTA buttons */
    --color-orange-dark: #e2531f;
    --color-green: #1f9d55;      /* secondary CTA — admin save/create actions */
    --color-green-dark: #177c43;
    --color-grey-dark: #515356;

    --color-bg: #ffffff;
    --color-bg-subtle: #f3f4f6;  /* light grey — card backgrounds */
    --color-border: #e5e7eb;
    --color-text: var(--color-navy);
    --color-text-muted: #6b7280; /* Neutral Grey */

    --color-primary: var(--color-blue);
    --color-primary-dark: var(--color-blue-dark);

    --color-success-bg: #e6f6ec;
    --color-success-text: #12703a;
    --color-error-bg: #fdecec;
    --color-error-text: #a3241f;
    --color-status-active: #12703a;
    --color-status-active-bg: rgba(18, 112, 58, 0.1);
    --color-status-raising: var(--color-orange-dark);
    --color-status-raising-bg: rgba(226, 83, 31, 0.1);
    --color-status-paused: #6b7280;
    --color-status-paused-bg: rgba(107, 114, 128, 0.1);
    --color-status-retired: #a3241f;
    --color-status-retired-bg: rgba(163, 36, 31, 0.1);

    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius: 10px;
    --radius-lg: 16px;
    --container-width: 1100px;

    --shadow-sm: 0 1px 2px rgba(20, 33, 61, 0.06), 0 1px 1px rgba(20, 33, 61, 0.04);
    --shadow-md: 0 6px 16px rgba(20, 33, 61, 0.09), 0 2px 4px rgba(20, 33, 61, 0.04);
    --shadow-lg: 0 16px 40px rgba(20, 33, 61, 0.14), 0 4px 10px rgba(20, 33, 61, 0.05);
    --transition: 180ms ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--color-blue-tint); color: var(--color-navy); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

.section { padding-top: 56px; padding-bottom: 56px; }

/* Header / nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--color-border);
}
.site-header__inner { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.brand { display: inline-flex; align-items: center; }
.logo { height: 42px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
    color: var(--color-text);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color var(--transition), background var(--transition);
}
.site-nav a:hover { color: var(--color-primary); background: var(--color-bg-subtle); text-decoration: none; }

.lang-switcher { display: flex; align-items: center; gap: 2px; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--color-border); }
.lang-switcher a { padding: 6px 8px; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; border-radius: 6px; opacity: 0.55; transition: opacity var(--transition), background var(--transition); }
.lang-switcher a:hover { opacity: 1; background: var(--color-bg-subtle); text-decoration: none; }
.lang-switcher a[aria-current] { opacity: 1; background: var(--color-bg-subtle); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    border-radius: 8px;
}
.nav-toggle:hover { background: var(--color-bg-subtle); }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--color-navy); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-footer { margin-top: 64px; background: linear-gradient(160deg, var(--color-navy) 0%, #1c2c52 100%); color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; padding: 28px 24px; flex-wrap: wrap; gap: 12px; }
.site-footer__links a { margin-left: 16px; color: rgba(255, 255, 255, 0.72); }
.site-footer__links a:hover { color: #fff; }

/* Hero */
.hero {
    position: relative;
    background: linear-gradient(160deg, var(--color-navy) 0%, #1c2c52 100%);
    color: #fff;
    overflow: hidden;
}
.hero__inner { position: relative; padding: 96px 24px 72px; max-width: 780px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; color: var(--color-blue-tint); font-weight: 700; margin-bottom: 12px; }
.hero h1 { font-size: clamp(2.1rem, 4vw, 2.85rem); color: #fff; }
.hero__lede { color: rgba(255, 255, 255, 0.72); font-size: 1.15rem; max-width: 640px; }

/* Buttons — orange is the primary CTA color (brand-notes.md: "doubles as
   CTA/highlight color across the site"); admin.css overrides to green for
   internal save/create actions. */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-orange);
    color: #fff;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.button:hover { background: var(--color-orange-dark); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.button:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.link-button { background: none; border: none; color: var(--color-primary); cursor: pointer; padding: 0; font: inherit; }
.link-button:hover { text-decoration: underline; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 28px; }
.venture-card {
    display: block;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    color: var(--color-text);
    background: var(--color-bg-subtle);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.venture-card:hover { border-color: var(--color-grey-dark); text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.venture-card h3 { margin: 10px 0 4px; }
.venture-card__domain { color: var(--color-text-muted); font-size: 0.9rem; }
.venture-card__takeup { color: var(--color-text-muted); font-size: 0.82rem; margin-top: 8px; }

.venture-card__status {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--color-bg);
    border: 1px solid currentColor;
}
.venture-card__status--active { color: var(--color-status-active); background: var(--color-status-active-bg); }
.venture-card__status--raising { color: var(--color-status-raising); background: var(--color-status-raising-bg); }
.venture-card__status--paused { color: var(--color-status-paused); background: var(--color-status-paused-bg); }
.venture-card__status--retired { color: var(--color-status-retired); background: var(--color-status-retired-bg); }
.venture-card__status--achieved { color: var(--color-success-text); background: var(--color-success-bg); }
.venture-card__status--on-track { color: var(--color-primary); background: var(--color-blue-tint); }
.venture-card__status--behind { color: var(--color-error-text); background: var(--color-error-bg); }

/* Investor dashboard — per-venture monthly performance cards (reuses .venture-card) */
.venture-card__terms { color: var(--color-text-muted); font-size: 0.85rem; margin: 10px 0 10px; }
.venture-card__metrics { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; display: grid; gap: 4px; }
.venture-card__metrics li { display: flex; justify-content: space-between; gap: 8px; }
.venture-card__note { color: var(--color-text-muted); font-size: 0.8rem; margin: 10px 0 0; }

/* Posts */
.post-list { display: grid; gap: 16px; margin-top: 24px; }
.post-list--wide { grid-template-columns: 1fr; }
.post-list__item {
    display: block;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px 22px;
    color: var(--color-text);
    background: var(--color-bg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.post-list__item:hover { border-color: var(--color-grey-dark); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.post-list__item h3 { margin-bottom: 4px; }
.post-list__item time { color: var(--color-text-muted); font-size: 0.85rem; }

.post__meta { color: var(--color-text-muted); margin-bottom: 28px; font-size: 0.95rem; }
.post__body { font-size: 1.05rem; }
.post__body img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 8px 0; }

/* Venture detail */
.venture-header h1 { margin-top: 14px; }
.venture-header__meta { color: var(--color-text-muted); }
.venture-header__description { font-size: 1.05rem; margin-top: 12px; max-width: 720px; }

.investor-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
}
.investor-cta h2 { margin: 0 0 6px; font-size: 1.2rem; }
.investor-cta p { margin: 0; color: var(--color-text-muted); max-width: 520px; }
.investor-cta .button { flex-shrink: 0; }

/* Analytics */
.analytics-chart-wrap { position: relative; margin: 20px 0 8px; }
.analytics-chart-wrap svg { width: 100%; height: auto; display: block; }
.analytics-chart__legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 10px 0 32px; font-size: 0.85rem; color: var(--color-text-muted); }
.analytics-chart__legend-item { display: flex; align-items: center; gap: 6px; }
.analytics-chart__legend-swatch { display: inline-block; width: 14px; height: 2px; border-radius: 1px; }
.analytics-tooltip {
    position: absolute;
    pointer-events: none;
    background: var(--color-navy);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity 120ms ease;
    z-index: 5;
    white-space: nowrap;
    top: 0;
    left: 0;
}
.analytics-tooltip.is-visible { opacity: 1; }
.analytics-tooltip__date { font-weight: 600; margin-bottom: 4px; }
.analytics-tooltip__row { display: flex; align-items: center; gap: 6px; }
.analytics-tooltip__swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.analytics-tooltip__value { font-weight: 600; margin-left: 14px; }

.analytics-trend { display: grid; gap: 4px; margin: 20px 0 32px; max-width: 640px; }
.analytics-trend__row { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 10px; font-size: 0.85rem; }
.analytics-trend__date { color: var(--color-text-muted); }
.analytics-trend__bar-track { background: var(--color-bg-subtle); border-radius: 4px; height: 14px; overflow: hidden; }
.analytics-trend__bar { display: block; height: 100%; background: var(--color-primary); border-radius: 4px; }
.analytics-trend__count { text-align: right; color: var(--color-text-muted); }

/* Media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-top: 18px; }
.media-grid img { width: 100%; border-radius: var(--radius); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }

/* Forms */
.form { display: grid; gap: 18px; max-width: 560px; margin-top: 24px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.9rem; }
.form input, .form select, .form textarea {
    font: inherit;
    padding: 11px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form input:focus, .form select:focus, .form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-blue-tint);
}
.form textarea { resize: vertical; }

.filter-bar { display: flex; gap: 12px; margin: 24px 0; flex-wrap: wrap; }
.filter-bar select { padding: 9px 14px; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-bg); font: inherit; }

/* Flash messages */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.95rem; border-left: 3px solid transparent; }
.flash--success { background: var(--color-success-bg); color: var(--color-success-text); border-left-color: var(--color-success-text); }
.flash--error { background: var(--color-error-bg); color: var(--color-error-text); border-left-color: var(--color-error-text); }

.notice { background: var(--color-bg-subtle); border-left: 3px solid var(--color-status-raising); border-radius: 0 8px 8px 0; padding: 12px 18px; color: var(--color-text-muted); font-size: 0.9rem; }

.admin-hint { color: var(--color-text-muted); font-size: 0.9rem; margin: 1px 0 20px; }

/* Long-form content (about, terms, privacy, investor rules) */
.prose { max-width: 720px; }
.prose h2 { margin-top: 2.2em; font-size: 1.4rem; }
.prose h2:first-of-type { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.92rem;
}
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.prose th { color: var(--color-text-muted); font-weight: 600; }
.prose pre {
    background: var(--color-bg-subtle);
    padding: 16px 18px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Mobile nav */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--color-bg);
        padding: 8px 16px 20px;
        box-shadow: var(--shadow-md);
        display: none;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 12px 8px; }
    .hero__inner { padding-top: 56px; }
}
