/**
 * Section 2: Hero — Deepak Sales.
 *
 * Mobile-first. Depends on tokens.css + base.css. All colours and type come
 * from the theme tokens so the palette can be corrected in one place.
 *
 * ACCURACY NOTE
 * -------------
 * The DOM order and content of this hero are confirmed from the reference.
 * Section padding, title size, panel height, panel-year size, watermark
 * size, and the stacking breakpoint were reviewed as part of the sitewide
 * typography/spacing pass and are now deliberate design-system values (no
 * longer guesses) — see the tokens they reference for the source of truth.
 * Any remaining `~APPROX` marker below is still an unverified guess.
 */

/* ==========================================================================
   1. Section shell + decorative backdrop
   ========================================================================== */
.ds-hero {
    position: relative;
    overflow: clip;
    /* Shared section rhythm (tokens.css) instead of a hero-only clamp, so
       Hero scales at the same proportional steps as every other section. */
    padding-block: var(--ds-section-y);
    background-color: var(--ds-bg);
    isolation: isolate;
}

.ds-hero__backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: clip;
}

/* Soft radial glows — decorative only. ~APPROX: positions, size, opacity */
.ds-hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
}

.ds-hero__glow--one {
    top: -12%;
    right: -6%;
    width: 34rem;
    height: 34rem;
    background: radial-gradient(circle, color-mix(in srgb, var(--ds-gold) 40%, transparent), transparent 68%);
}

.ds-hero__glow--two {
    bottom: -20%;
    left: -12%;
    width: 30rem;
    height: 30rem;
    background: radial-gradient(circle, color-mix(in srgb, var(--ds-oxblood) 26%, transparent), transparent 66%);
}

/* Faint monogram watermark (decorative, 4% tint) — trimmed from a 224-544px
   range down to 160-352px as part of the sitewide oversizing pass. */
.ds-hero__watermark {
    position: absolute;
    right: -0.08em;
    bottom: -0.28em;
    font-family: var(--ds-font-display);
    font-weight: 600;
    font-size: clamp(10rem, 6rem + 18vw, 22rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: color-mix(in srgb, var(--ds-ink) 4%, transparent);
    user-select: none;
}

/* ==========================================================================
   2. Layout grid
   ========================================================================== */
.ds-hero__inner {
    display: grid;
    grid-template-columns: 1fr; /* mobile: single column */
    gap: clamp(1.75rem, 1rem + 4vw, 3rem); /* column/row gap: 28-48px */
    align-items: center;
}

/* ==========================================================================
   3. Content column
   ========================================================================== */
.ds-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-sm);
    margin-bottom: var(--ds-space-lg); /* ~APPROX */
    font-family: var(--ds-font-mono);
    font-size: var(--ds-fs-eyebrow);
    font-weight: var(--ds-fw-label);
    letter-spacing: var(--ds-ls-wide);
    text-transform: uppercase;
    color: var(--ds-muted);
}

.ds-hero__seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    flex: 0 0 auto;
    border: 1.5px solid var(--ds-gold);
    border-radius: 50%;
    background: var(--ds-oxblood);
    color: var(--ds-gold-soft);
    font-family: var(--ds-font-display);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--ds-oxblood) 60%, transparent);
}

/* Heading. Uses --ds-fs-display, the dedicated Hero-only token — the
   largest text on the site. --ds-fs-h1 now sizes page titles instead
   (Shop/Category/Single-Product), one tier down, per the design system.
   ~APPROX: accent treatment (italic + gold) is an assumption — the
   reference may style it differently. */
.ds-hero__title {
    margin-bottom: var(--ds-space-lg);
    font-family: var(--ds-font-display);
    font-size: var(--ds-fs-display);
    font-weight: var(--ds-fw-heading);
    line-height: var(--ds-lh-tight);
    letter-spacing: -0.02em;
    color: var(--ds-heading);
    text-wrap: balance;
}

.ds-hero__title-accent {
    font-style: italic;
    font-weight: 500;
    color: var(--ds-oxblood);
}

.ds-hero__title-rest {
    display: inline;
}

.ds-hero__lead {
    max-width: 46ch; /* ~APPROX: measure of the description column */
    margin-bottom: var(--ds-space-lg);
    font-size: var(--ds-fs-lead);
    line-height: var(--ds-lh-body);
    color: var(--ds-body);
}

/* ---- Actions -------------------------------------------------------------
   margin-bottom matches .ds-hero__title/.ds-hero__lead above (same
   --ds-space-lg token) instead of three separate escalating clamp() values,
   so the title→lead→actions→badges rhythm is consistent, not compounding. */
.ds-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-space-sm);
    margin-bottom: var(--ds-space-lg);
}

.ds-hero__cta {
    /* base button styles come from .ds-btn; hero only adds arrow motion */
    overflow: hidden;
}

.ds-hero__cta-arrow {
    transition: transform var(--ds-dur) var(--ds-ease);
}

.ds-hero__cta:hover .ds-hero__cta-arrow {
    transform: translateX(3px);
}

/* ---- Trust badges -------------------------------------------------------- */
.ds-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.75rem, 0.4rem + 1.5vw, 1.75rem); /* ~APPROX */
    align-items: center;
}

.ds-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-xs);
    font-size: var(--ds-fs-small);
    font-weight: 600;
    color: var(--ds-body);
}

.ds-hero__badge-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: var(--ds-radius-sm);
    background: var(--ds-gold-tint);
    color: var(--ds-oxblood);
    transition:
        transform var(--ds-dur) var(--ds-ease),
        background-color var(--ds-dur) var(--ds-ease);
}

.ds-hero__badge:hover .ds-hero__badge-ic {
    transform: translateY(-2px);
    background: color-mix(in srgb, var(--ds-gold) 30%, var(--ds-gold-tint));
}

/* ==========================================================================
   4. Visual column — heritage panel + floating stat chips
   ========================================================================== */
.ds-hero__visual {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-space-sm);
}

.ds-hero__panel {
    position: relative;
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: clamp(16rem, 11rem + 16vw, 22rem); /* 256-352px, was 288-416px */
    margin: 0;
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); /* ~APPROX */
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius-lg); /* ~APPROX */
    overflow: hidden;
    color: var(--ds-on-accent);
    background:
        radial-gradient(120% 90% at 80% 0%, color-mix(in srgb, var(--ds-gold) 22%, transparent), transparent 55%),
        linear-gradient(160deg, var(--ds-oxblood), var(--ds-oxblood-deep));
    box-shadow: var(--ds-shadow-lg); /* ~APPROX */
    transition:
        transform var(--ds-dur) var(--ds-ease),
        box-shadow var(--ds-dur) var(--ds-ease);
}

.ds-hero__panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 60px rgba(74, 12, 23, 0.28); /* ~APPROX */
}

/* Optional real image sits behind the caption when set */
.ds-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ds-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ds-hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 22, 20, 0.15), rgba(74, 12, 23, 0.72));
}

.ds-hero__panel-badge {
    position: absolute;
    top: clamp(1rem, 0.5rem + 1.5vw, 1.5rem);
    left: clamp(1rem, 0.5rem + 1.5vw, 1.5rem);
    z-index: 1;
    padding: 0.4rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--ds-gold) 55%, transparent);
    border-radius: var(--ds-radius-pill);
    font-family: var(--ds-font-mono);
    font-size: var(--ds-fs-eyebrow);
    font-weight: var(--ds-fw-label);
    letter-spacing: var(--ds-ls-wide);
    text-transform: uppercase;
    color: var(--ds-gold-soft);
    background: color-mix(in srgb, var(--ds-oxblood-deep) 55%, transparent);
    backdrop-filter: blur(4px);
}

.ds-hero__panel-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
}

.ds-hero__panel-heading {
    font-family: var(--ds-font-mono);
    font-size: var(--ds-fs-small);
    letter-spacing: var(--ds-ls-wide);
    text-transform: uppercase;
    text-align: center;
    color: color-mix(in srgb, var(--ds-on-accent) 78%, transparent);
}

.ds-hero__panel-year {
    font-family: var(--ds-font-display);
    font-size: clamp(3rem, 2rem + 5vw, 4.5rem); /* 48-72px, was 56-96px */
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--ds-gold-soft);
}

.ds-hero__panel-note {
    margin-top: var(--ds-space-2xs);
    font-size: var(--ds-fs-body);
    text-align: center;
    color: color-mix(in srgb, var(--ds-on-accent) 82%, transparent);
}

.ds-hero__panel-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: var(--ds-space-md);
    align-self: center;
    color: var(--ds-gold-soft);
    font-weight: 600;
    font-size: var(--ds-fs-small);
}

.ds-hero__panel-link svg {
    transition: transform var(--ds-dur) var(--ds-ease);
}

.ds-hero__panel-link:hover {
    color: var(--ds-on-accent);
}

.ds-hero__panel-link:hover svg {
    transform: translateX(3px);
}

/* ---- Floating stat chips ------------------------------------------------- */
.ds-hero__stat {
    flex: 1 1 calc(50% - var(--ds-space-sm)); /* mobile: two across, in-flow */
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: var(--ds-space-md);
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius-md); /* ~APPROX */
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-md); /* ~APPROX */
    transition:
        transform var(--ds-dur) var(--ds-ease),
        box-shadow var(--ds-dur) var(--ds-ease);
}

.ds-hero__stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--ds-shadow-lg);
}

.ds-hero__stat-value {
    font-family: var(--ds-font-display);
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); /* ~APPROX */
    font-weight: 600;
    line-height: 1;
    color: var(--ds-oxblood);
}

.ds-hero__stat-label {
    font-size: var(--ds-fs-small);
    color: var(--ds-muted);
}

/* ==========================================================================
   5. Entrance animations (staggered). Hidden state lives INSIDE the keyframes
   so content stays visible if animations are disabled (no invisible content).
   ========================================================================== */
@keyframes ds-hero-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

@keyframes ds-hero-panel-in {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

@keyframes ds-hero-chip-in {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: none; }
}

.ds-hero__eyebrow,
.ds-hero__title,
.ds-hero__lead,
.ds-hero__actions,
.ds-hero__badges {
    animation: ds-hero-rise 0.6s var(--ds-ease) both;
}

.ds-hero__title   { animation-delay: 0.12s; }
.ds-hero__lead    { animation-delay: 0.24s; }
.ds-hero__actions { animation-delay: 0.36s; }
.ds-hero__badges  { animation-delay: 0.48s; }

.ds-hero__panel {
    animation: ds-hero-panel-in 0.7s var(--ds-ease) both;
    animation-delay: 0.28s;
}

.ds-hero__stat {
    animation: ds-hero-chip-in 0.5s var(--ds-ease) both;
}

.ds-hero__stat--1 { animation-delay: 0.8s; }
.ds-hero__stat--2 { animation-delay: 0.94s; }

/* ==========================================================================
   6. Responsive — two-column layout on larger screens
   62em (992px) — aligned to the theme's formal desktop tier (see
   header.css, tokens.css), the same breakpoint the header switches to its
   desktop nav at, replacing the previous 64em guess.
   ========================================================================== */
@media (min-width: 62em) {
    .ds-hero__inner {
        /* ~APPROX: content-to-visual ratio */
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        align-items: center;
    }

    .ds-hero__content {
        max-width: 40rem;
    }

    /* Float the stat chips over the panel corners on desktop */
    .ds-hero__visual {
        display: block;
        padding-block: clamp(1rem, 0.5rem + 2vw, 2.5rem);
        padding-inline: clamp(1rem, 0.5rem + 2vw, 2rem);
    }

    .ds-hero__stat {
        position: absolute;
        z-index: 2;
        width: max-content;
        min-width: 9.5rem;
    }

    .ds-hero__stat--1 { top: clamp(1rem, 0.5rem + 1vw, 2rem); right: 0; }
    .ds-hero__stat--2 { bottom: clamp(1rem, 0.5rem + 1vw, 2rem); left: 0; }
}

/* ==========================================================================
   7. Reduced motion — settle everything to the final, visible state.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .ds-hero__eyebrow,
    .ds-hero__title,
    .ds-hero__lead,
    .ds-hero__actions,
    .ds-hero__badges,
    .ds-hero__panel,
    .ds-hero__stat {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .ds-hero__cta:hover .ds-hero__cta-arrow,
    .ds-hero__panel:hover,
    .ds-hero__panel-link:hover svg,
    .ds-hero__stat:hover,
    .ds-hero__badge:hover .ds-hero__badge-ic {
        transform: none;
    }
}