/* Punch Collective — calm layer (November 2026).
   Loaded after every other stylesheet. One rounded family (Nunito), surfaces
   separated by fill instead of outlines, one family of tinted buttons, and
   inner pages that open with a real hero instead of a bare heading.
   The pre-change theme is kept in .local/pre-calm-redesign/. */

/* ---------- Tokens ---------- */
.punch-site {
    --punch-font-display: var(--punch-font-body);

    /* A solid graphite surface keeps labels readable over photography. */
    --punch-action: color-mix(in srgb, var(--punch-accent) 16%, var(--punch-surface-raised));
    --punch-action-hover: color-mix(in srgb, var(--punch-accent) 28%, var(--punch-surface-raised));
    --punch-action-ink: #f1f4fb;
    --punch-action-edge: transparent;
    --punch-action-shadow: none;
    --punch-quiet-fill: #ffffff0d;
    --punch-quiet-fill-hover: #ffffff17;
    --punch-field-fill: color-mix(in srgb, var(--punch-surface-raised) 85%, #ffffff05);

    /* Bootstrap blue becomes the theme accent everywhere. */
    --bs-primary: var(--punch-accent);
    --bs-primary-rgb: 143, 170, 240;
    --bs-link-color-rgb: 143, 170, 240;
    --bs-border-color: #ffffff0f;
    --bs-border-color-translucent: #ffffff0f;
}

/* ---------- Type ---------- */
.punch-site :is(h1, h2, h3, .h1, .h2, .h3) { font-family: var(--punch-font-display); font-weight: 600; letter-spacing: -.02em; }
.punch-site .punch-brand > span { font-family: var(--punch-font-display); font-weight: 700; letter-spacing: -.01em; }
.punch-site .punch-brand > span > span { font-family: var(--punch-font-body); font-weight: 400; letter-spacing: .06em; }

/* ---------- Buttons ---------- */
.punch-site :is(.punch-button, .btn:where(:not(.btn-link)), .btn-theme, .btn-theme-second, .btn-theme-simple) {
    border: 0 !important;
    background: var(--button-bg, var(--punch-quiet-fill)) !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-weight: 500;
    transition: background-color var(--punch-motion-ui) var(--punch-ease), color var(--punch-motion-fast) linear;
}
/* No satin sweep and no lift: the fill change is the whole hover. */
.punch-site :is(.punch-button, .btn, .btn-theme, .btn-theme-second, .btn-theme-simple)::before { content: none !important; }
.punch-site :is(.punch-button, .btn, .btn-theme, .btn-theme-second, .btn-theme-simple):is(:hover, :focus-visible) { transform: none !important; }
.punch-site :is(.punch-button, .btn, .btn-theme, .btn-theme-second, .btn-theme-simple):active:not(:disabled) { transform: translateY(1px) !important; }

.punch-site :is(.punch-button-secondary, .punch-button-light, .punch-button-glass, .btn-secondary, .btn-outline-primary, .btn-outline-secondary, .btn-theme-second) {
    --button-bg: var(--punch-quiet-fill);
    --button-fg: var(--punch-text);
}
.punch-site :is(.punch-button-secondary, .punch-button-light, .punch-button-glass, .btn-secondary, .btn-outline-primary, .btn-outline-secondary, .btn-theme-second):is(:hover, :focus-visible) {
    --button-bg: var(--punch-quiet-fill-hover);
}
.punch-site :is(.punch-button-primary, .punch-button-blue, .btn-primary, .btn-theme, .btn-theme-simple):is(:hover, :focus-visible) {
    --button-bg: var(--punch-action-hover);
}
.punch-site :is(.punch-button-quiet, .btn-outline-light):is(:hover, :focus-visible) { background: var(--punch-quiet-fill) !important; }

/* Header: sign-up shares the graphite surface; login stays a text link. */
.punch-site .punch-header .punch-login { --button-bg: transparent; }
.punch-site .punch-header .punch-login:hover { --button-bg: var(--punch-quiet-fill); }

/* Square icon controls share one quiet fill. */
.punch-site :is(.punch-icon-button, .punch-menu-toggle, .crew-arrow, .artists-motion, .artist-viewer button, .punch-footer-socials a) {
    border: 0 !important;
    background: var(--punch-quiet-fill);
    box-shadow: none;
}
.punch-site :is(.punch-icon-button, .punch-menu-toggle, .crew-arrow, .artists-motion, .artist-viewer button, .punch-footer-socials a):hover {
    background: var(--punch-quiet-fill-hover);
}

/* ---------- Surfaces without outlines ---------- */
.punch-site :is(.punch-panel, .card, .auth-card, .modal-content, .punch-auth-panel, .punch-payments-empty,
    .crew-stage, .crew-record, .crew-pick-record, .punch-nav, .punch-dropdown-panel, .dropdown-menu,
    .punch-navigation, .punch-user-panel, .punch-auth-symbol,
    .list-group, .list-group-item, .alert, .toast, .popover, .accordion-item) {
    border-color: transparent !important;
    box-shadow: none;
}
.punch-site :is(.card-header, .card-footer, .modal-header, .modal-footer) { border-color: #ffffff0d !important; }
.punch-site .crew-panel + .crew-panel { border-top-color: transparent; }
/* "О нас": the crossfade layer behind the stage draws its own 1px frame. */
.punch-site .home-stage-fade { border-color: transparent !important; }
.punch-site .punch-auth-symbol { background: var(--punch-quiet-fill); }

/* Fields: a slightly raised fill marks the field; the focus ring does the rest. */
.punch-site :is(.punch-input, .form-control, .form-select) {
    border-color: transparent !important;
    background-color: var(--punch-field-fill) !important;
}
.punch-site :is(.punch-input, .form-control, .form-select):focus { box-shadow: 0 0 0 2px var(--punch-focus); }
.punch-site :is(.punch-input, .form-control, .form-select):is(.is-invalid, [aria-invalid=true]) { box-shadow: inset 3px 0 0 var(--punch-danger); }
.punch-site .input-group > :is(.btn, .form-control) { border-radius: var(--punch-radius-control) !important; }
.punch-site .input-group { gap: 6px; flex-wrap: nowrap; }

/* ---------- Bootstrap leftovers in plugin pages ---------- */
.punch-site .text-primary { color: var(--punch-accent) !important; }
.punch-site :is(.bg-primary, .badge.bg-primary, .progress-bar) { background-color: var(--punch-action) !important; color: var(--punch-action-ink) !important; }
.punch-site .list-group { gap: 4px; }
.punch-site .list-group-item {
    border-radius: var(--punch-radius-control) !important;
    background: transparent;
    color: var(--punch-muted);
    transition: background-color var(--punch-motion-fast) linear, color var(--punch-motion-fast) linear;
}
.punch-site .list-group-item:is(:hover, :focus-visible) { background: var(--punch-quiet-fill); color: var(--punch-text); }
.punch-site .list-group-item.active { background: var(--punch-action); color: var(--punch-action-ink); }
.punch-site :is(.nav-pills .nav-link.active, .nav-pills .show > .nav-link) { background: var(--punch-action); color: var(--punch-action-ink); }
.punch-site .page-link { border-color: transparent; background: var(--punch-quiet-fill); color: var(--punch-text); }
.punch-site .page-item.active .page-link { background: var(--punch-action); color: var(--punch-action-ink); }

/* ---------- Inner pages: a real hero, and the footer starts below the first screen ---------- */
.punch-site:not(.punch-home) #punch-main {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
}
.punch-site:not(.punch-home) #punch-main::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    height: min(560px, 70svh);
    background:
        radial-gradient(ellipse 70% 90% at 50% 0%, color-mix(in srgb, var(--punch-accent) 16%, transparent), transparent 70%),
        radial-gradient(ellipse 40% 60% at 85% 10%, #b9a3d01c, transparent 70%);
    pointer-events: none;
}
.punch-site .punch-page-content { padding-top: calc(var(--navbar-height, 96px) + clamp(72px, 11svh, 128px)); padding-bottom: 120px; }
.punch-site .punch-page-content > h1,
.punch-site .punch-page-content > :is(.row, .d-flex) > [class*="col"] > h1,
.punch-site .punch-page-content > .d-flex > h1 {
    font: 600 clamp(34px, 4.6vw, 60px)/1.15 var(--punch-font-display);
    letter-spacing: -.025em;
    margin-bottom: clamp(32px, 5svh, 56px);
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
    .punch-site .punch-page-content { padding-top: calc(var(--navbar-height, 72px) + 48px); padding-bottom: 72px; }
    .punch-site:not(.punch-home) #punch-main::before { height: 380px; }
}

/* High-contrast mode keeps real edges. */
@media (forced-colors: active) {
    .punch-site :is(.punch-button, .btn, .punch-input, .form-control, .form-select, .card, .punch-panel, .punch-icon-button, .crew-stage, .punch-footer-socials a) {
        border: 1px solid ButtonText !important;
    }
}
