/* ECS Flyer Landing — Summer Blow Out Sale edition.
 * Editorial-heritage aesthetic: cream background, deep navy text, ocean & dune
 * accents, Fraunces variable serif + Public Sans body. Self-contained, scoped
 * under .ecs-flyer-landing — does not leak into the host theme.
 *
 * Spec: docs/superpowers/specs/2026-05-07-flyer-qr-landing-design.md
 */

/* Hide the host theme's page-title block when this stylesheet is loaded. The
 * stylesheet is conditionally enqueued ONLY on pages containing the
 * [ecs_flyer_landing] shortcode (see ECS_Flyer_Landing::enqueue_assets), so
 * these rules don't affect any other page on the site. Our shortcode renders
 * its own hero — the theme's redundant title would be visual noise above it.
 *
 * Targeting common selectors across magnitude-theme, default WP, and
 * Elementor. Safe to extend if a future theme adds a new title selector. */
.entry-title,
.page-title,
.entry-header,
header.entry-header,
.elementor-heading-title,
.wp-block-post-title,
.tdb-title-text,
.tdb_module_title { display: none !important; }

.ecs-flyer-landing {
    /* Palette */
    --ecs-cream:    #F4ECDD;
    --ecs-cream-2:  #EDE3D0;
    --ecs-sand:     #E5D8BC;
    --ecs-navy:     #1B2735;
    --ecs-ocean:    #2C5985;
    --ecs-ocean-d:  #1F4467;
    --ecs-dune:     #C26F3D;
    --ecs-dune-d:   #A05A2C;
    --ecs-char:     #5C5048;
    --ecs-mist:     #B5BFC9;
    --ecs-line:     rgba(27, 39, 53, 0.12);
    --ecs-line-2:   rgba(27, 39, 53, 0.06);

    /* Typography */
    --ecs-display: 'Fraunces', 'Times New Roman', Georgia, serif;
    --ecs-body:    'Public Sans', system-ui, -apple-system, sans-serif;

    position: relative;
    background: var(--ecs-cream);
    color: var(--ecs-navy);
    font-family: var(--ecs-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    isolation: isolate;
}

/* Reset host-theme leak: undo overzealous theme heading margins. */
.ecs-flyer-landing h1,
.ecs-flyer-landing h2,
.ecs-flyer-landing h3 {
    margin: 0;
    line-height: 1.05;
    color: var(--ecs-navy);
    font-weight: 400;
}
.ecs-flyer-landing p { margin: 0; }
.ecs-flyer-landing a { color: inherit; }
.ecs-flyer-landing button {
    font-family: inherit;
    cursor: pointer;
    border: 0;
    background: none;
}

/* Subtle film-grain overlay across the whole component. */
.ecs-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
    z-index: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.85'/></svg>");
    mix-blend-mode: multiply;
}

/* ============================================
   HERO
   ============================================ */
.ecs-hero {
    position: relative;
    z-index: 2;
    padding: clamp(72px, 12vw, 140px) 24px clamp(48px, 8vw, 88px);
    text-align: center;
    background:
        radial-gradient(circle at 18% 28%, rgba(44, 89, 133, 0.07), transparent 55%),
        radial-gradient(circle at 82% 72%, rgba(194, 111, 61, 0.07), transparent 55%);
}

.ecs-eyebrow {
    font-family: var(--ecs-body);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ecs-char);
    margin-bottom: clamp(28px, 4vw, 40px);
    opacity: 0;
    animation: ecsFadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s forwards;
}

.ecs-hero-title {
    font-family: var(--ecs-display);
    font-size: clamp(60px, 13.5vw, 156px);
    font-weight: 350;
    font-variation-settings: "opsz" 144, "SOFT" 0;
    line-height: 0.92;
    letter-spacing: -0.025em;
    color: var(--ecs-navy);
    margin-bottom: clamp(20px, 3vw, 32px);
    opacity: 0;
    animation: ecsFadeUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s forwards;
}

.ecs-hero-title em {
    display: inline-block;
    font-style: italic;
    font-weight: 400;
    font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 400;
    color: var(--ecs-ocean);
    transform: translateY(0.05em);
}

.ecs-hero-sub {
    font-family: var(--ecs-body);
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.55;
    font-weight: 400;
    color: var(--ecs-char);
    max-width: 560px;
    margin: 0 auto clamp(28px, 4vw, 40px);
    opacity: 0;
    animation: ecsFadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s forwards;
}

.ecs-hero-scroll {
    display: inline-block;
    font-family: var(--ecs-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ecs-navy);
    border-bottom: 2px solid var(--ecs-dune);
    padding: 6px 2px;
    opacity: 0;
    animation: ecsFadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.55s forwards;
    transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.ecs-hero-scroll:hover {
    color: var(--ecs-dune);
    transform: translateY(2px);
}

@keyframes ecsFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SECTION HEADERS (shared)
   ============================================ */
.ecs-section-head {
    text-align: center;
    margin: 0 auto clamp(40px, 6vw, 64px);
    max-width: 720px;
}

.ecs-section-label {
    display: inline-block;
    font-family: var(--ecs-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ecs-char);
    padding: 6px 14px;
    border: 1px solid var(--ecs-line);
    border-radius: 100px;
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.4);
}

.ecs-section-title {
    font-family: var(--ecs-display);
    font-size: clamp(30px, 4.6vw, 52px);
    font-weight: 350;
    font-variation-settings: "opsz" 96, "SOFT" 30;
    line-height: 1.05;
    letter-spacing: -0.018em;
}
.ecs-section-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--ecs-ocean);
}

/* ============================================
   PRODUCTS
   ============================================ */
.ecs-products {
    position: relative;
    z-index: 2;
    padding: clamp(56px, 8vw, 96px) 24px clamp(72px, 9vw, 112px);
    background: var(--ecs-cream-2);
    border-top: 1px solid var(--ecs-line-2);
    border-bottom: 1px solid var(--ecs-line-2);
}

.ecs-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1080px;
    margin: 0 auto;
}

@media (min-width: 700px) {
    .ecs-product-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

.ecs-product-card {
    position: relative;
    background: var(--ecs-cream);
    border: 1px solid var(--ecs-line);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: ecsFadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
    animation-delay: var(--card-delay, 0ms);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

.ecs-product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(44, 89, 133, 0.35);
    box-shadow: 0 20px 50px -20px rgba(27, 39, 53, 0.25);
}

.ecs-product-img {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--ecs-sand) 0%, var(--ecs-cream) 75%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ecs-product-img img,
.ecs-product-photo {
    width: 88%;
    height: 88%;
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    mix-blend-mode: multiply;
}

.ecs-product-card:hover .ecs-product-photo {
    transform: scale(1.04);
}

.ecs-product-placeholder-art {
    font-family: var(--ecs-display);
    font-size: 64px;
    font-weight: 300;
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100;
    color: var(--ecs-mist);
    letter-spacing: -0.04em;
}

.ecs-product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    font-family: var(--ecs-body);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ecs-cream);
    background: var(--ecs-dune);
    padding: 5px 11px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(160, 90, 44, 0.25);
}

.ecs-product-body {
    padding: 24px 24px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ecs-product-weight {
    font-family: var(--ecs-body);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ecs-char);
    margin-bottom: 8px;
}

.ecs-product-name {
    font-family: var(--ecs-display);
    font-size: clamp(22px, 2.4vw, 26px);
    font-weight: 400;
    font-variation-settings: "opsz" 36, "SOFT" 30;
    line-height: 1.1;
    margin-bottom: 10px;
    color: var(--ecs-navy);
    letter-spacing: -0.01em;
}
.ecs-product-name em {
    font-style: italic;
    font-weight: 350;
    color: var(--ecs-dune);
}

.ecs-product-tag {
    font-family: var(--ecs-body);
    font-size: 13px;
    line-height: 1.5;
    color: var(--ecs-char);
    margin-bottom: 18px;
}

.ecs-product-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 12px;
    padding-top: 14px;
    border-top: 1px dashed var(--ecs-line);
}

.ecs-price-now {
    font-family: var(--ecs-display);
    font-size: clamp(28px, 3vw, 32px);
    font-weight: 500;
    font-variation-settings: "opsz" 60, "SOFT" 0;
    color: var(--ecs-navy);
    letter-spacing: -0.015em;
    line-height: 1;
}

.ecs-price-was {
    font-family: var(--ecs-body);
    font-size: 14px;
    color: var(--ecs-char);
    text-decoration: line-through;
    text-decoration-color: var(--ecs-dune);
    text-decoration-thickness: 1.5px;
}

.ecs-price-unit {
    font-family: var(--ecs-body);
    font-size: 13px;
    color: var(--ecs-char);
    margin-left: -6px;
}

.ecs-product-min {
    font-family: var(--ecs-body);
    font-size: 12px;
    line-height: 1.4;
    color: var(--ecs-char);
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(194, 111, 61, 0.08);
    border-left: 2px solid var(--ecs-dune);
    border-radius: 3px;
}
.ecs-product-min strong {
    color: var(--ecs-navy);
    font-weight: 600;
}

.ecs-product-cta {
    margin-top: auto;
    width: 100%;
}

.ecs-product-link {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--ecs-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ecs-char);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    align-self: flex-start;
    transition: color 0.2s, border-color 0.2s;
    padding: 4px 0;
}
.ecs-product-link:hover {
    color: var(--ecs-ocean);
    border-bottom-color: var(--ecs-ocean);
}

/* ============================================
   BUTTONS
   ============================================ */
.ecs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ecs-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 14px 22px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    border: 1.5px solid transparent;
    transition: background 0.2s ease,
                color 0.2s ease,
                border-color 0.2s ease,
                transform 0.15s ease,
                box-shadow 0.2s ease;
    line-height: 1.2;
    cursor: pointer;
}

.ecs-btn--primary {
    background: var(--ecs-navy);
    color: var(--ecs-cream);
}
.ecs-btn--primary:hover {
    background: var(--ecs-ocean);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -8px rgba(44, 89, 133, 0.45);
}

.ecs-btn--secondary {
    background: transparent;
    color: var(--ecs-navy);
    border-color: var(--ecs-navy);
}
.ecs-btn--secondary:hover {
    background: var(--ecs-navy);
    color: var(--ecs-cream);
}

.ecs-btn--ghost {
    background: rgba(255, 255, 255, 0.4);
    color: var(--ecs-navy);
    border-color: var(--ecs-line);
}
.ecs-btn--ghost:hover {
    border-color: var(--ecs-navy);
    background: rgba(255, 255, 255, 0.7);
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.ecs-how {
    position: relative;
    z-index: 2;
    padding: clamp(80px, 10vw, 120px) 24px;
    background: var(--ecs-cream);
}

.ecs-steps {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

@media (min-width: 700px) {
    .ecs-steps { grid-template-columns: repeat(2, 1fr); gap: 0; }
}
@media (min-width: 1000px) {
    .ecs-steps { grid-template-columns: repeat(4, 1fr); }
}

.ecs-steps li {
    padding: 36px 24px 28px;
    border-top: 2px solid var(--ecs-line);
    transition: border-top-color 0.3s ease, background 0.3s ease;
}
@media (min-width: 1000px) {
    .ecs-steps li {
        border-right: 1px solid var(--ecs-line-2);
        padding: 36px 28px 28px;
    }
    .ecs-steps li:last-child { border-right: none; }
}
.ecs-steps li:hover {
    border-top-color: var(--ecs-ocean);
    background: rgba(255, 255, 255, 0.4);
}

.ecs-step-num {
    font-family: var(--ecs-display);
    font-size: 14px;
    font-weight: 500;
    font-variation-settings: "opsz" 36, "SOFT" 0;
    color: var(--ecs-dune);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 14px;
}

.ecs-steps h3 {
    font-family: var(--ecs-display);
    font-size: 22px;
    font-weight: 400;
    font-variation-settings: "opsz" 36, "SOFT" 30;
    line-height: 1.15;
    margin-bottom: 10px;
    color: var(--ecs-navy);
    letter-spacing: -0.01em;
}

.ecs-steps p {
    font-family: var(--ecs-body);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ecs-char);
}

/* ============================================
   OTHER WAYS TO ORDER
   ============================================ */
.ecs-other {
    position: relative;
    z-index: 2;
    padding: clamp(72px, 9vw, 104px) 24px clamp(80px, 10vw, 112px);
    background: var(--ecs-cream-2);
    border-top: 1px solid var(--ecs-line-2);
}

.ecs-cta-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 480px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .ecs-cta-row { flex-direction: row; justify-content: center; }
    .ecs-cta-row .ecs-btn { flex: 1 1 0; }
}

/* ============================================
   LEAD FORM (slides down from "Just send me info")
   ============================================ */
.ecs-flyer-form {
    display: none;
    max-width: 580px;
    margin: 36px auto 0;
    background: var(--ecs-cream);
    border: 1px solid var(--ecs-line);
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: 0 14px 40px -22px rgba(27, 39, 53, 0.2);
}
.ecs-flyer-form.open {
    display: block;
    animation: ecsFadeUp 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.ecs-form-intro {
    font-family: var(--ecs-body);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ecs-char);
    margin-bottom: 22px;
}

.ecs-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.ecs-flyer-form label {
    display: block;
    font-family: var(--ecs-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ecs-char);
}

.ecs-form-full { grid-column: 1 / -1; }

.ecs-flyer-form .ecs-opt {
    text-transform: none;
    letter-spacing: normal;
    color: var(--ecs-mist);
    font-weight: 400;
}

.ecs-flyer-form input[type=text],
.ecs-flyer-form input[type=email],
.ecs-flyer-form input[type=tel],
.ecs-flyer-form input:not([type]) {
    width: 100%;
    padding: 12px 14px;
    margin-top: 6px;
    background: var(--ecs-cream);
    border: 1px solid var(--ecs-line);
    border-radius: 8px;
    font-family: var(--ecs-body);
    font-size: 16px;
    color: var(--ecs-navy);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.ecs-flyer-form input:focus {
    outline: none;
    border-color: var(--ecs-ocean);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(44, 89, 133, 0.14);
}

.ecs-form-submit {
    width: 100%;
    margin-top: 4px;
}

.ecs-flyer-status {
    margin-top: 14px;
    min-height: 1.4em;
    font-family: var(--ecs-body);
    font-size: 13px;
    text-align: center;
}
.ecs-flyer-status.is-success { color: #1e6b41; font-weight: 500; }
.ecs-flyer-status.is-error   { color: #9a2424; font-weight: 500; }

/* ============================================
   FOOTER
   ============================================ */
.ecs-footer {
    position: relative;
    z-index: 2;
    padding: 32px 24px 40px;
    text-align: center;
    background: var(--ecs-cream);
    border-top: 1px solid var(--ecs-line);
}
.ecs-footer p {
    font-family: var(--ecs-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ecs-char);
}

/* ============================================
   ACCESSIBILITY: reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .ecs-flyer-landing *,
    .ecs-flyer-landing *::before,
    .ecs-flyer-landing *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }
    .ecs-flyer-landing .ecs-eyebrow,
    .ecs-flyer-landing .ecs-hero-title,
    .ecs-flyer-landing .ecs-hero-sub,
    .ecs-flyer-landing .ecs-hero-scroll,
    .ecs-flyer-landing .ecs-product-card {
        opacity: 1;
        transform: none;
    }
}
