/**
 * Kindred Web Studio - Unified Components
 * Consistent design tokens for tags, links, and reusable UI elements
 * Following UX consistency principles (NN Group Heuristic #4)
 */

/* ============================================
   UNIFIED TAG COMPONENT
   Single source of truth for all tag styles
   ============================================ */

/**
 * Base Tag Styles
 * Usage: <span class="tag tag--lime">Case Study</span>
 * Sizes: Default (medium), --sm (small), --lg (large)
 */
.tag {
    display: inline-block;
    width: fit-content;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(0, 0, 0, 0.8);
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);

    /* Default size (medium) - used on work page bento featured, case study hero */
    font-size: 0.6875rem;         /* 11px */
    padding: 0.375rem 0.75rem;    /* 6px 12px */
    border-radius: 6px;           /* rounded rectangle */
}

/* Small size - used on homepage work items, related stories, bento small cards */
.tag--sm {
    font-size: 0.5625rem;         /* 9px */
    padding: 0.3125rem 0.5rem;    /* 5px 8px */
    border-radius: 4px;
}

/* Large size - for prominent displays */
.tag--lg {
    font-size: 0.75rem;           /* 12px */
    padding: 0.5rem 0.875rem;     /* 8px 14px */
    border-radius: 6px;
}

/* Hover effect for interactive tags (links) */
a.tag:hover,
button.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   TAG COLOR VARIANTS - Soft Pastel Shades
   ============================================ */

.tag--lime {
    background-color: #E8F5D0;    /* Soft pastel lime */
}

.tag--lime-light {
    background-color: #F2FADE;    /* Even lighter lime */
}

.tag--pink {
    background-color: #FFE4F1;    /* Soft pastel pink */
}

.tag--pink-light {
    background-color: #FFF0F7;    /* Even lighter pink */
}

.tag--yellow {
    background-color: #FFF4DC;    /* Soft pastel yellow */
}

.tag--yellow-dark {
    background-color: #FFEDC2;    /* Slightly darker yellow */
}

.tag--blue {
    background-color: #E0F4FF;    /* Soft pastel blue */
}

.tag--blue-light {
    background-color: #EBF8FF;    /* Even lighter blue */
}

.tag--purple {
    background-color: #EDE4FF;    /* Soft pastel purple */
}

.tag--purple-light {
    background-color: #F5F0FF;    /* Even lighter purple */
}

/* ============================================
   WORK ITEM LINKS COMPONENT
   "Visit Live Site" + "View Case Study" text links
   ============================================ */

.work-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.work-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;         /* 13px */
    font-weight: 500;
    color: var(--color-text-primary);
    text-decoration: none;
    position: relative;
    transition: color 0.3s var(--ease-smooth);
}

/* Underline effect */
.work-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-smooth);
}

.work-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.work-link:hover {
    color: var(--color-text-secondary);
}

/* Arrow icon for external links */
.work-link svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s var(--ease-smooth);
}

.work-link:hover svg {
    transform: translate(2px, -2px);
}

/* Link variants */
.work-link--external {
    /* External link styling - arrow icon */
}

.work-link--internal {
    /* Internal link - chevron or no icon */
}

/* Separator between links */
.work-links-separator {
    width: 1px;
    height: 12px;
    background: rgba(0, 0, 0, 0.15);
}

/* ============================================
   CASE STUDY HERO LINKS
   Links below title on case study pages
   ============================================ */

.case-study-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: -0.5rem;
}

.case-study-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-primary);
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s var(--ease-smooth);
}

.case-study-link::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-smooth);
}

.case-study-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.case-study-link:hover {
    color: var(--color-text-secondary);
}

.case-study-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s var(--ease-smooth);
}

.case-study-link:hover svg {
    transform: translate(2px, -2px);
}

/* ============================================
   BENTO CARD LINKS
   Links for work page bento grid items
   ============================================ */

.bento-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.bento-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-primary);
    text-decoration: none;
    padding: 0.375rem 0;
    position: relative;
    transition: color 0.3s var(--ease-smooth);
}

.bento-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-smooth);
}

.bento-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.bento-link:hover {
    color: var(--color-text-secondary);
}

.bento-link svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s var(--ease-smooth);
}

.bento-link:hover svg {
    transform: translate(2px, -2px);
}

/* Small bento card links - more compact */
.bento-links--sm {
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.bento-links--sm .bento-link {
    font-size: 0.6875rem;         /* 11px */
}

.bento-links--sm .bento-link svg {
    width: 10px;
    height: 10px;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .work-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .work-links-separator {
        display: none;
    }

    .case-study-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .bento-links {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }
}

/* ============================================
   LEGACY CLASS OVERRIDES
   Ensures all legacy tag classes use consistent styling
   ============================================ */

/* Override any remaining pill shapes to rounded rectangles */
.case-study-tag,
.bento-tag-small,
.related-tag {
    border-radius: 4px !important;
}

.bento-tag,
.cs-tag {
    border-radius: 6px !important;
}
