/* ===================================================================
   NABILHUT — Typography & Visual Polish Layer (Phase 1)
   Additive only — overrides nothing in brand.css or storefront.css
   =================================================================== */

/* ---------------------------------------------------------------
   Font Family Tokens — Playfair Display added for editorial headings
--------------------------------------------------------------- */
:root {
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

    /* Refined spacing scale */
    --letter-spacing-tight:  -0.03em;
    --letter-spacing-normal:  0em;
    --letter-spacing-wide:    0.06em;
    --letter-spacing-wider:   0.12em;
    --letter-spacing-widest:  0.2em;

    /* Editorial line heights */
    --line-height-display: 1.08;
    --line-height-heading: 1.2;
    --line-height-body:    1.68;
    --line-height-ui:      1.4;

    /* Animated underline tokens */
    --underline-color:     var(--color-luxury-gold);
    --underline-thickness: 2px;
    --underline-offset:    6px;
}

/* ---------------------------------------------------------------
   Display / Editorial Heading Class
   Usage: add .display-heading to any h1–h3 that should use
   Playfair Display for an editorial, luxury-magazine aesthetic.
   Does not affect existing headings unless class is applied.
--------------------------------------------------------------- */
.display-heading,
.section-heading-display {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-height-display);
}

.display-heading em,
.section-heading-display em {
    font-style: italic;
    background: linear-gradient(135deg, var(--color-champagne-gold), var(--color-luxury-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------------------------------------------------------------
   Section Heading — Animated Gold Underline
   The .section-heading-animated class already exists in storefront.js
   (autoTagElements). This adds the visual underline decoration to it.
--------------------------------------------------------------- */
.section-heading-animated {
    position: relative;
    display: inline-block;
}

.section-heading-animated::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: var(--underline-thickness);
    background: linear-gradient(90deg, var(--color-luxury-gold), var(--color-champagne-gold));
    border-radius: 2px;
    transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Trigger when scroll-reveal makes the heading visible */
.ao--visible .section-heading-animated::after,
.section-heading-animated.ao--visible::after {
    width: 60px;
}

/* ---------------------------------------------------------------
   Refined Body Typography
   Improves readability of paragraph text across the storefront.
   Only targets content areas, not nav/header/footer which are
   already styled precisely.
--------------------------------------------------------------- */
.main-content-wrapper p:not([class]),
.main-content-wrapper .lead {
    line-height: var(--line-height-body);
    color: var(--color-text-secondary);
}

/* ---------------------------------------------------------------
   Uppercase Label / Overline Text Utility
   For "Curated Selections", "Signature Releases" type labels.
   brand.css already has .badge-gold — this adds a text-only variant.
--------------------------------------------------------------- */
.text-overline {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-widest);
    text-transform: uppercase;
    color: var(--color-luxury-gold);
    display: block;
    margin-bottom: 0.4rem;
}

/* ---------------------------------------------------------------
   Price Typography — Enhanced readability
   Complements existing .price-current in storefront.css
--------------------------------------------------------------- */
.price-display {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

/* ---------------------------------------------------------------
   Hero Title — Playfair Display variant
   Applied via .hero-title--display class on hero slides that
   want the editorial look. The default .hero-title is untouched.
--------------------------------------------------------------- */
.hero-title--display {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: var(--line-height-display);
}

/* ---------------------------------------------------------------
   Product Title Refinement
   Enhances readability of .product-title (defined in storefront.css)
   without changing its color, size, or layout.
--------------------------------------------------------------- */
.product-title {
    line-height: var(--line-height-ui);
    -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------
   Category Card Heading — Editorial Weight
--------------------------------------------------------------- */
.category-card-overlay h5 {
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* ---------------------------------------------------------------
   Footer Heading Refinement
   Adds Playfair Display to footer section titles for brand depth.
--------------------------------------------------------------- */
.store-footer h5 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------
   Announcement Bar — Tighter letter-spacing for elegance
--------------------------------------------------------------- */
.announcement-bar {
    letter-spacing: var(--letter-spacing-wide);
}

/* ---------------------------------------------------------------
   Nav Link — Refined letter-spacing (non-breaking, additive)
--------------------------------------------------------------- */
.nav-link-custom {
    letter-spacing: var(--letter-spacing-wider);
}

/* ---------------------------------------------------------------
   Badge Overline — Already uppercase in brand.css,
   this makes them slightly more refined.
--------------------------------------------------------------- */
.badge-gold,
.badge-luxury-black {
    letter-spacing: var(--letter-spacing-widest);
    font-size: 0.68rem;
}

/* ---------------------------------------------------------------
   Section Sub-headline (used beneath h2 in home sections)
   Targets the descriptive <p class="text-muted"> lines.
--------------------------------------------------------------- */
section .text-muted:not(.product-rating span) {
    font-size: 0.95rem;
    line-height: var(--line-height-body);
    letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------
   Smooth Font Rendering — Applied globally
   Complements existing antialiasing in brand.css body rule.
--------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------------------
   Utility: Gradient Text
   Reusable class for any element that needs the gold gradient text.
   Already used inline in hero-title em — this makes it a utility.
--------------------------------------------------------------- */
.text-gradient-gold {
    background: linear-gradient(135deg, var(--color-champagne-gold) 0%, var(--color-luxury-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------------------------------------------------------------
   Scroll-reveal: section heading underline fires when parent is visible
   Handles the case where heading has .ao but parent does not.
--------------------------------------------------------------- */
[class*="ao--delay-"].ao--visible .section-heading-animated::after {
    width: 60px;
}

/* ---------------------------------------------------------------
   prefers-reduced-motion — Disable underline animation if requested
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .section-heading-animated::after {
        transition: none;
        width: 60px; /* show immediately without animation */
    }
}
