/**
 * SGC Components — unified primitives shared across all surfaces.
 *
 * Loaded globally after sgc-tokens.css.
 * Add components here as we migrate them. Per-feature CSS files should
 * not redefine these — extend them with surface-specific layout only.
 *
 * Components in this file:
 *   - .sgc-btn (+ variants: --primary, --glass, --secondary, --ghost, --danger)
 *   - .sgc-btn--sm, --lg, --block, --pill, --on-dark, --on-light
 *   - .sgc-eyebrow
 *
 * Buttons follow the discipline: solid teal (--primary) does 95% of the
 * work. Liquid glass (--glass) is for hero surfaces with photo or rich
 * gradient behind it. Other variants are utility — forms, auth, errors.
 */


/* ============================================================
   Buttons
   ============================================================ */

.sgc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: var(--weight-medium);
    line-height: 1.2;
    letter-spacing: 0.01em;
    padding: 13px 24px;
    border-radius: var(--radius-pill);
    border: 1.5px solid transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.sgc-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.sgc-btn[disabled],
.sgc-btn--disabled,
.sgc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

.sgc-btn--loading {
    pointer-events: none;
    position: relative;
    color: transparent !important;
}
.sgc-btn--loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: sgc-btn-spin 0.6s linear infinite;
    color: #fff;
}
@keyframes sgc-btn-spin {
    to { transform: rotate(360deg); }
}


/* ============================================================
   Sizes
   ============================================================ */

.sgc-btn--sm { padding: 9px 16px;  font-size: 0.82rem; }
.sgc-btn--lg { padding: 16px 30px; font-size: 0.95rem; }


/* ============================================================
   Width modifiers
   ============================================================ */

.sgc-btn--block { width: 100%; }
.sgc-btn--pill  { border-radius: var(--radius-pill); }


/* ============================================================
   Variant: Primary (solid teal — the default for 95% of CTAs)
   ============================================================ */

.sgc-btn--primary {
    background: var(--sgc-teal);
    color: #fff;
    border-color: var(--sgc-teal);
    box-shadow: var(--shadow-btn);
}
.sgc-btn--primary:hover {
    background: var(--sgc-deep);
    border-color: var(--sgc-deep);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}
.sgc-btn--primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-btn);
}


/* ============================================================
   Variant: Glass (liquid glass — hero surfaces only)
   Use when there is a photo or rich gradient behind the button.

   STANDARD GLASS SPEC (apply to ANY frosted control on a dark/photo
   surface — pill buttons, square arrows, icon controls, etc.):
     background:          rgba(255, 255, 255, 0.15);
     border:              1px solid rgba(255, 255, 255, 0.25);
     color:               rgba(255, 255, 255, 0.95);
     backdrop-filter:     blur(4px);
   Hover:
     background:          rgba(255, 255, 255, 0.25);
     border-color:        rgba(255, 255, 255, 0.40);
     color:               #fff;
     transform:           translateY(-1px);

   If the control isn't a .sgc-btn (e.g. carousel arrows), copy these
   values verbatim — do not reintroduce gradients or 14px blur.
   ============================================================ */

.sgc-btn--glass {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: none;
}
.sgc-btn--glass:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.40);
    color: #fff;
    transform: translateY(-1px);
}
.sgc-btn--glass:active {
    transform: translateY(0);
}

/* Glass-on-teal — same liquid-glass look as .sgc-btn--glass, but the dark
   surface lives INSIDE the pill (a deep-teal base) so it can sit on a white
   page and still read like the home-hero frosted button. The standard glass
   wash (15% white) is layered on top of the teal via ::before. */
.sgc-btn--glass-teal {
    position: relative;
    overflow: hidden;
    background: var(--sgc-teal, #4693a5);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 22px rgba(70, 146, 166, 0.22);
}
.sgc-btn--glass-teal::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    pointer-events: none;
    border-radius: inherit;
    transition: background 0.2s ease;
}
.sgc-btn--glass-teal > * { position: relative; z-index: 1; }
.sgc-btn--glass-teal:hover {
    border-color: rgba(255, 255, 255, 0.40);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(6, 80, 102, 0.30);
}
.sgc-btn--glass-teal:hover::before {
    background: rgba(255, 255, 255, 0.25);
}
.sgc-btn--glass-teal:active {
    transform: translateY(0);
}

/* Glass on a light surface — flips the gradient to lean teal, keeps the blur */
.sgc-btn--glass.sgc-btn--on-light {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(70, 146, 166, 0.22) 100%);
    color: var(--sgc-deep);
    border: 1px solid rgba(6, 80, 102, 0.20);
    box-shadow: 0 6px 18px rgba(6, 80, 102, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.sgc-btn--glass.sgc-btn--on-light:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(70, 146, 166, 0.32) 100%);
    border-color: rgba(6, 80, 102, 0.35);
    box-shadow: 0 10px 24px rgba(6, 80, 102, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.70);
}


/* ============================================================
   Variant: Secondary (outlined — for forms, secondary actions)
   ============================================================ */

.sgc-btn--secondary {
    background: transparent;
    color: var(--sgc-deep);
    border-color: var(--sgc-deep);
}
.sgc-btn--secondary:hover {
    background: var(--accent-light);
    color: var(--sgc-deep);
    transform: translateY(-1px);
}


/* ============================================================
   Variant: Ghost (no border — for tertiary actions)
   ============================================================ */

.sgc-btn--ghost {
    background: transparent;
    color: var(--sgc-deep);
    border-color: transparent;
    padding: 12px 16px;
}
.sgc-btn--ghost:hover {
    background: var(--accent-light);
    color: var(--sgc-deep);
}


/* ============================================================
   Variant: Danger (destructive)
   ============================================================ */

.sgc-btn--danger {
    background: var(--color-error);
    color: #fff;
    border-color: var(--color-error);
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.18);
}
.sgc-btn--danger:hover {
    background: #991b1b;
    border-color: #991b1b;
    color: #fff;
}


/* ============================================================
   On-dark modifier — flips primary/secondary for dark backgrounds
   ============================================================ */

.sgc-btn--on-dark.sgc-btn--primary {
    background: #fff;
    color: var(--sgc-deep);
    border-color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.sgc-btn--on-dark.sgc-btn--primary:hover {
    background: var(--sgc-teal);
    border-color: var(--sgc-teal);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.sgc-btn--on-dark.sgc-btn--secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.40);
}
.sgc-btn--on-dark.sgc-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.70);
}

.sgc-btn--on-dark.sgc-btn--ghost {
    color: #fff;
}
.sgc-btn--on-dark.sgc-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}


/* ============================================================
   Eyebrow — small uppercase label used above section headings,
   on cards, in heroes. Reused everywhere; lives here so it's
   never re-implemented per feature.
   ============================================================ */

.sgc-eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--sgc-teal);
}

.sgc-eyebrow--with-line {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.sgc-eyebrow--with-line::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--sgc-teal);
}

.sgc-eyebrow--on-dark {
    color: var(--sgc-maya);
}
