/* ==========================================================================
   base.css — Global Resets, Typography & Element Styles
   Herba Sparsh Child Theme
   Author: Pratik Patil
   ========================================================================== */

/* ---- Font Import (fallback — also loaded via wp_enqueue) ---- */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Playfair+Display:wght@600;700;800&family=Raleway:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   1. RESETS & GLOBALS
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* No sidebar is ever rendered (see hst_remove_sidebar_globally() in
   functions.php), so #primary should always take the full content width —
   defensive backstop alongside stripping Storefront's sidebar body classes. */
#primary,
.content-area {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

body,
.storefront-full-width-content .content-area,
#content {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.65;
    letter-spacing: 0.01em;
}

::selection {
    background-color: var(--color-accent);
    color: var(--color-on-accent);
}

/* ==========================================================================
   1B. SKIP TO CONTENT LINK
   ========================================================================== */

.hst-skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-md);
    z-index: 9999;
    background: var(--color-primary);
    color: var(--color-on-primary);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none !important;
    transition: top 200ms ease;
}

.hst-skip-link:focus {
    top: var(--space-md);
    outline: none;
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   2. TYPOGRAPHY — HEADINGS
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.woocommerce-loop-product__title,
.product_title {
    font-family: var(--font-heading);
    color: var(--color-foreground);
    font-weight: 600;
    line-height: 1.3;
}

/* Hero H1 gets the logo's own display serif — Lora is the workhorse
   heading font everywhere else, Playfair is reserved for the one or two
   moments per page meant to echo the wordmark's dramatic contrast. */
h1, .entry-title {
    font-family: var(--font-display);
    font-size: 3.75rem;    /* 60px */
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h2, .page-title {
    font-size: 2.5rem;     /* 40px */
    line-height: 1.3;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.75rem;    /* 28px */
    line-height: 1.35;
}

h4 {
    font-family: var(--font-body);
    font-size: 1.375rem;   /* 22px */
    font-weight: 600;
    line-height: 1.4;
}

h5 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
}

h6 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ==========================================================================
   3. TYPOGRAPHY — BODY & INLINE ELEMENTS
   ========================================================================== */

p {
    margin-bottom: var(--space-md);
    color: var(--color-foreground);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 200ms ease;
}

a:hover,
a:focus {
    color: var(--color-primary);
}

a:focus-visible {
    outline: 2px solid var(--color-ring);
    outline-offset: 2px;
    border-radius: 2px;
}

small,
.text-small {
    font-size: 0.9375rem;  /* 15px */
    line-height: 1.5;
}

.text-caption {
    font-size: 0.8125rem;  /* 13px */
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: var(--color-foreground-muted);
}

strong, b {
    font-weight: 600;
}

/* ==========================================================================
   4. IMAGES
   ========================================================================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   5. RESPONSIVE TYPE SCALE
   ========================================================================== */

@media (max-width: 768px) {
    h1, .entry-title  { font-size: 2.25rem;  }  /* 36px */
    h2, .page-title   { font-size: 1.75rem;  }  /* 28px */
    h3                { font-size: 1.375rem; }  /* 22px */
    h4                { font-size: 1.1875rem;}  /* 19px */

    body,
    .storefront-full-width-content .content-area {
        font-size: 16px;
    }
}
