/* ============================================================
   PUBLIC: hero, team-grid, profile
   ============================================================ */

/* ---------- HERO ---------- */
.hero {
    position: relative;
    padding: 110px 24px 130px;
    text-align: center;
    color: #fff;
    background-color: #2a2320;
    background-image:
        linear-gradient(180deg, rgba(43, 35, 32, 0.72) 0%, rgba(43, 35, 32, 0.55) 100%),
        url('/static/img/hero.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-red), transparent);
    opacity: 0.5;
}

.hero__inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
}

.hero__eyebrow {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--brand-red-soft);
    opacity: 0.85;
    margin-bottom: 16px;
}

.hero__title {
    font-family: var(--font-heading);
    font-weight: 300;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    letter-spacing: 2px;
    line-height: 1.15;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero__title strong {
    font-weight: 700;
    color: #fff;
}

.hero__title span {
    color: var(--brand-red-soft);
}

.hero__subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.78);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- TEAM SECTION ---------- */
.team-section {
    margin-top: -70px;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.team-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.team-section__title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.team-section__count {
    font-size: 13px;
    color: var(--text-light);
}

/* ---------- TEAM GRID ---------- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 26px;
}

/* ---------- TEAM CARD ---------- */
.team-card {
    display: flex;
    flex-direction: column;
    background: var(--card-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform var(--t-slow), box-shadow var(--t-slow);
    position: relative;
}

.team-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--brand-red);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform var(--t-base);
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.team-card:hover::before {
    transform: scaleY(1);
}

.team-card__photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--bg-warm);
    transition: transform var(--t-slow);
}

.team-card:hover .team-card__photo {
    transform: scale(1.03);
}

.team-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.team-card__position {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--brand-red);
    line-height: 1.4;
}

.team-card__name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
}

.team-card__department {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: auto;
}

.team-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
    margin-top: 12px;
}

.team-card__views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-light);
}

/* ---------- BACK NAV ---------- */
.back-nav {
    padding: 26px 0 0;
}

.back-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    transition: color var(--t-fast), gap var(--t-fast);
}

.back-nav__link:hover {
    color: var(--brand-red);
    gap: 12px;
}

/* ---------- PROFILE ---------- */
.profile {
    max-width: 1100px;
    margin: 40px auto 90px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
}

/* Сайдбар */
.profile__sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile__photo-wrap {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-warm);
    box-shadow: var(--shadow-md);
}

.profile__photo-wrap::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: var(--brand-red);
}

.profile__photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.profile__contact,
.profile__views-card {
    background: var(--card-white);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}

.profile__contact-title {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--brand-red);
    margin-bottom: 10px;
}

.profile__contact-text {
    font-size: 13.5px;
    color: var(--text-main);
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-line;
}

.profile__views-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.profile__views-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.profile__views-value {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Информация */
.profile__info {
    background: var(--card-white);
    border-radius: var(--radius);
    padding: 40px 44px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-soft);
}

.profile__department {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 12px;
}

.profile__position {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.profile__name {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-soft);
}

/* Секции внутри профиля */
.section {
    margin-bottom: 32px;
}

.section:last-child {
    margin-bottom: 0;
}

.section__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 18px;
}

.section__title::before {
    content: '';
    display: block;
    width: 4px;
    height: 20px;
    background: var(--brand-red);
    border-radius: 2px;
}

.section__title small {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--text-light);
    text-transform: none;
}

/* Список зон ответственности */
.resp-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resp-list li {
    padding: 12px 16px 12px 18px;
    background: var(--bg-cream);
    border-left: 3px solid var(--accent-gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    transition: all var(--t-fast);
}

.resp-list li:hover {
    background: var(--bg-warm);
    border-left-color: var(--brand-red);
    transform: translateX(3px);
}

/* ---------- FOOTER ---------- */
.footer {
    background: #2a2320;
    color: rgba(255, 255, 255, 0.55);
    padding: 32px 0;
    font-size: 13px;
    text-align: center;
    margin-top: auto;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer__brand {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.footer__dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand-red);
    margin: 0 8px;
    vertical-align: middle;
}

/* ---------- 404 ---------- */
.error-page {
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
}

.error-page__code {
    font-family: var(--font-heading);
    font-size: clamp(5rem, 14vw, 8rem);
    font-weight: 300;
    letter-spacing: 6px;
    line-height: 1;
    color: var(--brand-red);
    margin-bottom: 12px;
}

.error-page__title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: var(--text-main);
}

.error-page__text {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 420px;
    margin-bottom: 28px;
}