/* ============================================================
   EMPHASIS SYSTEM
   ------------------------------------------------------------
   Inline typographic devices to break the flow of a paragraph
   and add voice/intention. All are designed to layer cleanly
   on either black or cream backgrounds.
   ============================================================ */


/* === .hl — single keyword highlight in fire-red ============ */
.hl {
    color: var(--fire-red);
    font-weight: 500;
}

.hl--bold {
    color: var(--fire-red);
    font-weight: 700;
}


/* === .strike + .replace — crossed out + handscript correction ABOVE
   Usage:
     <span class="strike-block">
         <span class="strike">nadie nota</span>
         <span class="replace">Pocos perciben</span>
     </span>
   The handscript replacement floats above the struck word, like a
   teacher's correction in red pen.
   ============================================================ */
.strike-block {
    position: relative;
    display: inline-block;
    padding-top: 0.7em;        /* breathing room for the replace word above */
    margin: 0.3em 0.05em 0;
    line-height: inherit;
}

.strike {
    position: relative;
    color: inherit;
    opacity: 0.42;
    display: inline-block;
}

.strike::after {
    content: '';
    position: absolute;
    left: -0.08em;
    right: -0.08em;
    top: 56%;
    height: 2px;
    background: var(--fire-red);
    transform: rotate(-1.5deg);
    border-radius: 2px;
}

.replace {
    position: absolute;
    bottom: calc(100% - 0.35em);
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    font-family: var(--font-hand);
    font-weight: 600;
    color: var(--fire-red);
    font-size: 1.1em;
    line-height: 0.95;
    letter-spacing: 0.005em;
    white-space: nowrap;
    pointer-events: none;
}


/* === .aside — sotto-voce italic serif phrase =============== */
.aside {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.55vw, 1.4rem);
    line-height: 1.45;
    color: inherit;
    opacity: 0.7;
    display: block;
    margin: 22px 0;
    letter-spacing: 0.005em;
}

/* Inline aside — small italic phrase tucked into the running copy */
.aside--inline {
    display: inline;
    font-size: 0.92em;
    line-height: inherit;
    margin: 0 0.1em;
    opacity: 0.62;
}


/* === .shout — single big italic-serif word breaking flow === */
.shout {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--fire-red);
    display: inline-block;
    transform: translateY(0.08em);
    margin: 0 0.05em;
}


/* === Handscript note — pure marker phrase ================== */
.hand {
    font-family: var(--font-hand);
    font-weight: 600;
    color: var(--fire-red);
    font-size: 1.4em;
    line-height: 0.95;
    letter-spacing: 0.005em;
    display: inline-block;
    transform: rotate(-1.5deg);
}

.hand--big {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    transform: rotate(-3deg);
}

.hand--inline {
    font-size: 1.2em;
    transform: rotate(-1deg);
}


/* === .underline-hand — sketchy SVG underline =============== */
.underline-hand {
    position: relative;
    display: inline-block;
    color: inherit;
    z-index: 0;
}

.underline-hand::after {
    content: '';
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: -0.18em;
    height: 0.32em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 6 Q 30 1 60 5 T 120 6 T 198 4' stroke='%23EF2828' stroke-width='2.5' stroke-linecap='round' fill='none'/%3E%3Cpath d='M3 9 Q 40 5 80 8 T 160 9 T 197 7' stroke='%23EF2828' stroke-width='1.5' stroke-linecap='round' fill='none' opacity='0.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
}

.underline-hand--v2::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 8 C 40 2 80 12 120 6 S 180 4 197 9' stroke='%23EF2828' stroke-width='2.8' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
}

.underline-hand--v3::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 5 L 198 5' stroke='%23EF2828' stroke-width='2' stroke-linecap='round' fill='none' stroke-dasharray='1.5 3'/%3E%3C/svg%3E");
}


/* === .circle-hand — sketchy oval around a word ============= */
.circle-hand {
    position: relative;
    display: inline-block;
    padding: 0.05em 0.4em;
    color: inherit;
    z-index: 0;
}

.circle-hand::before {
    content: '';
    position: absolute;
    inset: -0.18em -0.05em -0.18em -0.05em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cellipse cx='100' cy='30' rx='95' ry='24' stroke='%23EF2828' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-dasharray='1 0'/%3E%3Cpath d='M 8 32 Q 100 56 195 28' stroke='%23EF2828' stroke-width='1.4' fill='none' opacity='0.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transform: rotate(-1deg);
    pointer-events: none;
    z-index: -1;
}


/* === .arrow-hand — curved marker arrow =====================
   Usage:
     <div class="arrow-hand arrow-hand--down-right">
         <!-- absolute-positioned, points DOWN-RIGHT -->
     </div>
   ============================================================ */
.arrow-hand {
    position: absolute;
    width: 110px;
    height: 110px;
    pointer-events: none;
    z-index: 5;
    background-repeat: no-repeat;
    background-size: contain;
}

.arrow-hand--down-right {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M 18 14 Q 28 50 50 70 T 96 92' stroke='%23EF2828' stroke-width='3.2' fill='none' stroke-linecap='round'/%3E%3Cpath d='M 96 92 L 78 86 M 96 92 L 86 76' stroke='%23EF2828' stroke-width='3.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.arrow-hand--down-left {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M 102 14 Q 92 50 70 70 T 24 92' stroke='%23EF2828' stroke-width='3.2' fill='none' stroke-linecap='round'/%3E%3Cpath d='M 24 92 L 42 86 M 24 92 L 34 76' stroke='%23EF2828' stroke-width='3.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.arrow-hand--up {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M 60 102 Q 56 60 72 30 T 96 12' stroke='%23EF2828' stroke-width='3.2' fill='none' stroke-linecap='round'/%3E%3Cpath d='M 96 12 L 80 18 M 96 12 L 86 28' stroke='%23EF2828' stroke-width='3.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}


/* === .frame-hand — handdrawn rectangle wrapping a module ===
   Apply to a wrapper around image + heading + body. The frame
   sits behind the content as a pseudo-element.
   ============================================================ */
.frame-hand {
    position: relative;
    padding: 32px 28px 36px;
}

.frame-hand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500' preserveAspectRatio='none'%3E%3Cpath d='M 14 10 Q 100 6 200 12 T 388 8 Q 392 100 386 200 T 392 488 Q 200 494 100 490 T 8 492 Q 4 280 10 200 T 14 10 Z' stroke='%23EF2828' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 0;
}

.frame-hand > * { position: relative; z-index: 1; }


/* === Mobile tuning ========================================= */
@media (max-width: 768px) {
    .replace { font-size: 1.15em; }
    .hand { font-size: 1.3em; }
    .arrow-hand { width: 72px; height: 72px; }
    .frame-hand { padding: 24px 20px 28px; }
}
