/* Connections Team — mobile-first */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --header: #000000;
    --header-text: #ffffff;
    --background: #f2f2f7;
    --surface: #ffffff;
    --text: #1c1c1e;
    --text-muted: #8e8e93;
    --accent: #007aff;
    --nav-background: #ffffff;
    --nav-active: #000000;
    --nav-inactive: #8e8e93;
    --button-dark: #000000;
    --button-text: #ffffff;
    --header-height: 120px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --nav-height: 72px;
    --radius: 16px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* ── Header ── */

.app-header {
    background: var(--header);
    color: var(--header-text);
}

.app-header .brand-mark {
    color: var(--header-text);
}

.app-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 12px 16px;
}

.app-header__bar--tall {
    min-height: var(--header-height);
    justify-content: center;
    position: relative;
}

.app-header__spacer {
    width: 40px;
    flex-shrink: 0;
}

.app-header__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--header-text);
    text-decoration: none;
    border: none;
    background: none;
    -webkit-tap-highlight-color: transparent;
}

.app-header__btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.app-header__btn--icon svg {
    fill: none;
    stroke: currentColor;
}

.app-header__title {
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    flex: 1;
}

.app-header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.app-header__logo img {
    max-height: 44px;
    max-width: 200px;
    object-fit: contain;
}

.app-header__logo .brand-mark {
    width: 36px;
    height: auto;
    color: var(--header-text);
}

.app-header__wordmark {
    font-size: 1.35rem;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: -0.02em;
}

.app-header__wordmark strong {
    font-weight: 700;
}

/* ── Quick actions ── */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 20px 16px 8px;
    background: var(--surface);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.quick-action__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s;
}

.quick-action__icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.quick-action:active .quick-action__icon {
    transform: scale(0.95);
}

.quick-action__label {
    font-size: 0.62rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    color: var(--text);
}

/* ── Main content ── */

.page-main {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Feed posts ── */

.feed-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.feed-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 10px;
}

.feed-card__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e5ea;
    object-fit: cover;
    flex-shrink: 0;
}

.feed-card__avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.feed-card__avatar--placeholder svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.feed-card__meta {
    flex: 1;
    min-width: 0;
}

.feed-card__author {
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.feed-card__author svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}

.feed-card__team {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.feed-card__time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.feed-card--no-media .feed-card__header {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.feed-card--no-media .feed-card__body {
    padding-top: 16px;
}

.feed-card--no-media .feed-card__title {
    font-size: 1.05rem;
}

.feed-card__media {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #1a1a1a;
    overflow: hidden;
}

.feed-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-card__body {
    padding: 14px;
}

.feed-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.feed-card__subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.4;
}

.feed-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--button-dark);
    color: var(--button-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.feed-card__btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ── Banners ── */

.banner-row {
    display: flex;
    gap: 12px;
}

.banner-row--single .banner-card {
    flex: 1;
}

.banner-row--double .banner-card {
    flex: 1;
    min-width: 0;
}

.banner-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.banner-row--double .banner-card {
    min-height: 180px;
}

.banner-card--text-only {
    justify-content: center;
    align-items: stretch;
}

.banner-card--text-only .banner-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-height: 140px;
}

.banner-row--double .banner-card--text-only .banner-card__content {
    min-height: 180px;
}

.banner-card--text-only .banner-card__title {
    margin-bottom: 12px;
}

.banner-card--has-image .banner-card__overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.15) 100%);
}

.banner-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.banner-card__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.banner-card__content {
    position: relative;
    z-index: 1;
    padding: 16px;
}

.banner-card__title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.banner-row--double .banner-card__title {
    font-size: 0.85rem;
}

.banner-card__btn {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--button-dark);
    color: var(--button-text);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
}

/* ── Page headers (inner pages) ── */

.page-intro {
    padding: 20px 16px 8px;
    background: var(--surface);
}

.page-intro__icon-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.page-intro__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-intro__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.page-intro__title {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.2;
}

.page-intro__subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-top: 6px;
}

.page-content {
    padding: 12px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 16px;
    font-size: 0.95rem;
}

/* ── Bottom nav ── */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    background: var(--nav-background);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 200;
}

.bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--nav-inactive);
    font-size: 0.62rem;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav__item svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.bottom-nav__item.is-active {
    color: var(--nav-active);
    font-weight: 700;
}

.bottom-nav__item.is-active svg {
    fill: var(--nav-active);
    stroke: none;
}

.bottom-nav__item.is-active svg path[fill="none"] {
    fill: none;
    stroke: var(--nav-active);
}

/* Home icon filled when active */
.bottom-nav__item[data-nav="home"].is-active svg {
    fill: var(--nav-active);
    stroke: var(--nav-active);
}

@media (min-width: 481px) {
    body {
        border-left: 1px solid #ddd;
        border-right: 1px solid #ddd;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
    }
}
