/*
   ASAP v2 - the home hero.

   The structure and the copy are v1's hero: the three-line headline, the
   tatreez bands and column, the kufiyah stripe. It is set in ASAP's
   Graphic Design Style Guide rather than in v1's type
   and colours: Anton where it was Fraunces, a Maroon ground where it was
   near-black, Cream and Bright Red where it was cream, olive and red.

   The headline carries the guide's Drop effect, which the guide asks
   for on any text laid over an image: a hard shadow, blur 0, fully
   opaque, falling down and to the right. The primary button carries
   the same shadow, so the hero has one device, not two.

   Everything is scoped to .hero--tatreez so none of it reaches the
   inner pages' heroes, which are all .hero--sub. The band is dark in
   both themes, so it carries fixed colours rather than the theme
   tokens. Bright Red is the only red that can carry small text here:
   4.91:1 on Maroon, where Vivid Red is 3.01:1.
*/

.hero--tatreez {
    --tz-ground: #380000;       /* Maroon */
    --tz-cream: #fff5e1;
    --tz-red: #ca0013;          /* Vivid Red */
    --tz-red-bright: #ff3131;   /* Bright Red */
    --tz-drop: 0.042em 0.036em 0;
    --tz-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

    position: relative;
    display: flex;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    background: var(--tz-ground);
    color: var(--tz-cream);
}

/* The kufiyah stripe: a drawn band (border bars, two olive-leaf columns, the
   fishnet between them) laid across the hero on the diagonal like a draped
   scarf. Vector, so it stays sharp at any width. */
.hero--tatreez .hero__kufiyah {
    position: absolute;
    top: -20vh;
    right: clamp(13%, 17vw, 26%);
    width: clamp(150px, 17vw, 236px);
    height: 155vh;
    background-image: url("../assets/kufiyah-band.svg");
    background-repeat: repeat-y;
    background-size: 100% auto;
    transform: rotate(-27deg);
    transform-origin: top right;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 4%, #000 97%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 4%, #000 97%, transparent 100%);
}
.hero--tatreez .hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(56, 0, 0, 0.94) 0%,
        rgba(56, 0, 0, 0.82) 32%,
        rgba(56, 0, 0, 0.62) 50%,
        rgba(56, 0, 0, 0.88) 100%
    );
    pointer-events: none;
    z-index: 1;
}
/* The watermelon, low in the corner. */
.hero--tatreez::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../assets/watermelon-watermark.svg");
    background-repeat: no-repeat;
    background-position: 82% 108%;
    background-size: min(58vw, 440px) auto;
    opacity: 0.32;
    pointer-events: none;
    z-index: 2;
}

/* Tatreez border, stitched along the top and bottom edges of the band. */
.hero--tatreez .hero__band {
    position: absolute;
    inset: auto 0 0 0;
    height: 22px;
    background-image: url("../assets/tatreez-band.svg");
    background-repeat: repeat-x;
    background-size: auto 22px;
    background-position: center;
    opacity: 0.95;
    z-index: 5;
}
.hero--tatreez .hero__band--top { inset: 0 0 auto 0; }

.hero--tatreez .hero__inner {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
    width: 100%;
    padding-block: clamp(56px, 6.4vw, 88px) clamp(72px, 7.6vw, 104px);
}

.hero--tatreez .hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--tz-red-bright);
}
.hero--tatreez .hero__eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
}

.hero--tatreez .hero__title {
    margin: 18px 0 32px;
    font-size: clamp(2.6rem, 10vw, 7.5rem);
    line-height: 0.96;
    letter-spacing: 0.004em;
    color: var(--tz-cream);
    text-shadow: var(--tz-drop) var(--tz-red);
}
/* Anton has no italic. v1 set this line in one; here it reads as the
   second of three by position alone. */
.hero--tatreez .hero__title em { font-style: normal; }
.hero--tatreez .hero__cause {
    display: inline-block;
    color: var(--tz-red-bright);
    text-shadow: var(--tz-drop) var(--tz-cream);
}

.hero--tatreez .hero__lede {
    max-width: 54ch;
    margin: 0 0 36px;
    font-size: clamp(1.02rem, 1.4vw, 1.2rem);
    line-height: 1.6;
    color: #e3d3c2;
}

.hero--tatreez .hero__actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 0; }

/* The Print Room's buttons, inked for the dark band. The solid one is
   Cream with a Maroon label, the strongest pairing the guide has, and it
   keeps its hard shadow at rest. */
.hero--tatreez .btn {
    border-color: var(--tz-cream);
    color: var(--tz-cream);
    font-weight: 500;
}
.hero--tatreez .btn:hover { box-shadow: 6px 6px 0 var(--tz-red); }
.hero--tatreez .btn--solid {
    background: var(--tz-cream);
    color: var(--tz-ground);
    box-shadow: 5px 5px 0 var(--tz-red);
}
.hero--tatreez .btn--solid:hover { box-shadow: 9px 9px 0 var(--tz-red-bright); }
.hero--tatreez .btn__arrow { transition: transform 0.25s var(--tz-ease); }
.hero--tatreez .btn:hover .btn__arrow { transform: translateX(4px); }

/* The site's focus ring is Vivid Red, 3.01:1 on this band, which is the
   floor with nothing to spare. Bright Red clears it. */
.hero--tatreez :focus-visible { outline-color: var(--tz-red-bright); }

/* The tatreez column, standing beside the headline. */
.hero--tatreez .hero__panel {
    position: relative;
    z-index: 1;
    min-height: 480px;
    padding: 30px 0;
    background-image: url("../assets/tatreez-panel.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-origin: content-box;
    opacity: 0.95;
}

/* v1 reveals the copy and the panel on scroll. Here they are above the fold
   on every load, so a CSS entrance does the same job without an observer. */
@keyframes tz-rise {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
}
.hero--tatreez .hero__copy,
.hero--tatreez .hero__panel { animation: tz-rise 0.9s var(--tz-ease) both; }
.hero--tatreez .hero__panel { animation-delay: 0.15s; }

@media (max-width: 880px) {
    .hero--tatreez .hero__kufiyah {
        width: clamp(104px, 26vw, 160px);
        height: 135vh;
        top: -14vh;
        right: 14%;
        transform: rotate(-21deg);
        background-size: 100% auto;
        background-position: 5% 0;
        opacity: 0.37;
    }
    .hero--tatreez .hero__scrim {
        background: linear-gradient(
            to bottom,
            rgba(56, 0, 0, 0.92) 0%,
            rgba(56, 0, 0, 0.72) 42%,
            rgba(56, 0, 0, 0.88) 100%
        );
    }
    .hero--tatreez::after {
        background-position: 65% 112%;
        background-size: min(72vw, 320px) auto;
        opacity: 0.28;
    }
    .hero--tatreez .hero__inner { grid-template-columns: 1fr; gap: 32px; padding-block: 70px; }
    .hero--tatreez .hero__title { font-size: clamp(2.6rem, 14.4vw, 6.4rem); }
    .hero--tatreez .hero__panel { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero--tatreez .hero__copy,
    .hero--tatreez .hero__panel { animation: none; }
    .hero--tatreez .btn__arrow { transition: none; }
    .hero--tatreez .btn:hover .btn__arrow { transform: none; }
}

@media (forced-colors: active) {
    .hero--tatreez .btn { border-color: ButtonText; }
    .hero--tatreez .hero__title,
    .hero--tatreez .hero__cause { text-shadow: none; }
}
