/*
=========================
components.css
Reusable building blocks used on several pages: buttons and links, lists and cards,
the product mock-ups (chat & semantic model store), forms and the cookie banner.
Styles for one specific section live in sections.css.
=========================
*/

/*
=========================
Buttons & links
.btn + one variant: -primary and -outline on light backgrounds,
-ochre and -ghost on photos and dark bands
=========================
*/

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 22px;

    font-family: inherit;
    font-size: var(--text-md);
    font-weight: 700;
    text-decoration: none;

    border: 2px solid transparent;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.btn:disabled {
    opacity: .6;
    cursor: progress;
}

.btn-primary {
    background: var(--c-nav-active-bg);
    color: var(--c-nav-active-fg);
}

.btn-primary:hover {
    background: var(--c-accent);
    color: var(--c-on-accent);
}

.btn-outline {
    background: transparent;
    border-color: var(--c-text);
    color: var(--c-text);
}

.btn-outline:hover {
    background: var(--c-nav-active-bg);
    border-color: var(--c-nav-active-bg);
    color: var(--c-nav-active-fg);
}

/* on photos and dark bands */
.btn-ochre {
    background: var(--brand-ochre);
    color: var(--brand-forest);
}

.btn-ochre:hover {
    background: color-mix(in srgb, var(--brand-ochre) 80%, var(--brand-white));
    color: var(--brand-forest);
}

.btn-ghost {
    background: transparent;
    border-color: color-mix(in srgb, var(--band-fg) 70%, transparent);
    color: var(--band-fg);
}

.btn-ghost:hover {
    background: color-mix(in srgb, var(--band-fg) 14%, transparent);
    color: var(--band-fg);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    font-weight: 700;
    text-decoration: none;
    color: var(--c-accent);
}

.link-arrow span {
    transition: transform var(--t-fast);
}

.link-arrow:hover span {
    transform: translateX(3px);
}

.band-dark .link-arrow,
.photo-band .link-arrow {
    color: var(--band-accent);
}

.band-dark .link-arrow:hover {
    color: color-mix(in srgb, var(--band-accent) 75%, var(--brand-white));
}

/*
=========================
Lists & cards
=========================
*/

.checks {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 36px;
}

.checks li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checks svg {
    flex: none;
    color: var(--c-accent);
}

.hero .checks svg,
.band-dark .checks svg {
    color: var(--band-accent);
}

.card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;

    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
}

.card__number {
    font-size: var(--text-xxxl);
    font-weight: 700;
    color: var(--c-accent);
}

.card__meta {
    font-size: var(--text-sm);
    color: var(--c-text-muted);
}

.card h3 {
    font-size: var(--text-xl);
    line-height: 1.35;
}

.card p {
    line-height: 1.6;
}

.card .grow {
    flex: 1;
}

.part-tag {
    align-self: flex-start;
    padding: 6px 12px;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: var(--c-nav-active-bg);
    color: var(--c-nav-active-fg);
    border-radius: var(--r-full);
}

.features {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.features li {
    display: flex;
    gap: 16px;
}

.features__icon {
    flex: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-nav-active-bg);
    color: var(--feature-icon-fg);
    border-radius: var(--r-md);
}

.features h3,
.features h4 {
    margin-bottom: 6px;
    font-size: var(--text-lg);
}

.features p {
    line-height: 1.6;
    color: var(--c-text-muted);
}

.numbered {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: point;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.numbered li {
    counter-increment: point;
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 1.6;
}

.numbered li strong::before {
    content: counter(point) ". ";
    color: var(--c-accent);
}

.media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--r-lg);
}

.social {
    display: flex;
    gap: 12px;
}

.social a {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--r-md);
    transition: color var(--t-fast), border-color var(--t-fast);
}

.social a:hover {
    color: var(--c-accent);
    border-color: var(--c-accent);
}

.logo-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 28px 48px;
    padding-top: 40px;
    border-top: 1px solid var(--c-border);
}

.logo-strip img {
    height: 44px;
    width: auto;
    filter: grayscale(100%);
    opacity: .75;
    transition: filter var(--t-med), opacity var(--t-med);
}

.logo-strip img:hover {
    filter: none;
    opacity: 1;
}

/*
=========================
Product mock-ups (chat & semantic model store)
Sample illustrations until real screenshots are added.
=========================
*/

/* next to text (.split--match) the window takes the height of the text column,
   so both share their top and bottom edges */
.split--match {
    align-items: stretch;
}

.split--match > * {
    display: flex;
    flex-direction: column;
}

.split--match .mock {
    flex: 1;
}

.mock {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.mock__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-size: var(--text-sm);
    background: var(--band-bg);
    color: var(--band-fg);
}

.mock__bar img {
    width: 26px;
    height: 26px;
    background: var(--logo-bg);
    border-radius: 6px;
}

.mock__bar-meta {
    margin-left: auto;
    opacity: .7;
}

.mock__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: color-mix(in srgb, var(--site-bg) 30%, var(--c-surface));
}

.bubble {
    max-width: 85%;
    padding: 12px 16px;
    font-size: var(--text-md);
    line-height: 1.5;
}

.bubble--user {
    align-self: flex-end;
    background: var(--c-msg-user-bg);
    color: var(--c-msg-user-fg);
    border-radius: 14px 14px 4px 14px;
}

.bubble--bot {
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--c-msg-bot-bg);
    color: var(--c-msg-bot-fg);
    border: 1px solid var(--c-msg-bot-border);
    border-radius: 14px 14px 14px 4px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    padding: 3px 10px;
    font-size: var(--text-xs);
    border-radius: var(--r-full);
}

.chip--concept  { background: var(--label-concept-bg);  color: var(--label-concept-color); }
.chip--dataset  { background: var(--label-dataset-bg);  color: var(--label-dataset-color); }
.chip--metric   { background: var(--label-metric-bg);   color: var(--label-metric-color); }
.chip--relation { background: var(--label-relation-bg); color: var(--label-relation-color); }

.mock__input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;  /* sits at the bottom of the window, like a chat app */
    padding: 10px 10px 10px 16px;
    font-size: var(--text-base);
    color: var(--c-text-muted);
    background: var(--c-surface);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--r-lg);
}

.mock__input span:first-child {
    flex: 1;
}

.mock__send {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-accent);
    color: var(--c-on-accent);
    border-radius: 9px;
}

.store-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.store-search {
    flex: 1 1 180px;
    padding: 10px 14px;
    font-size: var(--text-base);
    color: var(--c-text-muted);
    background: var(--c-surface);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--r-md);
}

.store-filters {
    display: flex;
    gap: 6px;
    font-size: var(--text-sm);
}

.store-filters span {
    padding: 6px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-full);
}

.store-filters .is-active {
    background: var(--c-nav-active-bg);
    color: var(--c-nav-active-fg);
    border-color: transparent;
}

/* the cards grow to fill the window; their status stays at the bottom */
.models {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.model {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}

.model__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.model__desc {
    font-size: var(--text-sm);
    line-height: 1.45;
    color: var(--c-text-muted);
}

.tag {
    padding: 3px 8px;
    font-size: var(--text-xs);
    white-space: nowrap;
    border-radius: var(--r-full);
}

.tag--shelf {
    background: var(--avatar-bg);
    color: var(--avatar-fg);
}

.tag--own {
    background: var(--c-surface-sunk);
    color: var(--c-text);
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-xs);
}

.model .status {
    margin-top: auto;
}

.status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: var(--r-full);
}

.status--valid           { color: var(--status-valid); }
.status--valid::before   { background: var(--status-valid-dot); }
.status--review          { color: var(--status-review); }
.status--review::before  { background: var(--status-review-dot); }
.status--draft           { color: var(--status-draft); }
.status--draft::before   { background: var(--status-draft); }

/*
=========================
Forms
=========================
*/

.form-card {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 36px;
    background: var(--c-surface);
    color: var(--c-text);
    border: 1px solid var(--c-border);
    border-radius: 16px;
}

/* a light card inside a dark band keeps light-theme text colours */
.form-card :focus-visible {
    outline-color: var(--c-accent);
}

.form-card .muted {
    color: var(--c-text-muted);
}

.form-card h2,
.form-card h3 {
    font-size: var(--text-xxl);
}

.divider-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--text-sm);
    color: var(--c-text-muted);
}

.divider-label::before,
.divider-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--c-border);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form .btn {
    align-self: flex-end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: var(--text-base);
    font-weight: 700;
}

.field input,
.field textarea {
    padding: 12px 14px;
    font-family: inherit;
    font-size: var(--text-lg);
    background: var(--c-surface);
    color: var(--c-text);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--r-md);
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.form-status {
    min-height: 1.5em;
    font-size: var(--text-md);
}

/* a button that looks like a text link (e.g. "Cookie settings" in the footer) */
.link-button {
    padding: 0;
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

/*
=========================
Cookie banner
Built by js/script.js until the visitor accepts or declines.
=========================
*/

/* a small card in the bottom-right corner; a slim strip on phones */
.cookie-banner {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 200;
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    font-size: var(--text-sm);
    line-height: 1.45;
    background: var(--c-surface);
    color: var(--c-text);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
}

/* text on the left, buttons always on the right of it */
.cookie-banner p {
    flex: 1 1 auto;
    min-width: 0;
}

.cookie-banner .btn-row {
    flex: none;
    flex-wrap: nowrap;
    gap: 8px;
}

.cookie-banner .btn {
    min-height: 36px;
    padding: 6px 14px;
    font-size: var(--text-sm);
}

/*
=========================
Responsive
=========================
*/

@media (max-width: 640px) {

    .mock__body {
        padding: 16px;
    }

    .form-card {
        padding: 24px;
    }

    .logo-strip img {
        height: 32px;
    }

    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}
