/* ============================================================
   PUBLIC TOOL PAGES — /ai-humanizer/, /ai-detector/,
   /plagiarism-checker/. Shared by all three; nothing here is
   tool-specific.
   ============================================================ */

/* ---- HERO: copy left, working box right ---- */
.tool-hero {
    padding: calc(var(--sp-20) + 24px) var(--gutter) var(--sp-16);
    border-bottom: var(--border-3);
    position: relative;
    overflow: hidden;
}

.tool-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(255, 61, 0, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

.tool-hero__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-16);
    align-items: start;
    position: relative;
    z-index: 1;
}

.tool-hero__eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.15em;
    padding: 6px 14px;
    border: var(--border-2);
    margin-bottom: var(--sp-6);
}

.tool-hero__title {
    font-size: clamp(28px, 5.4vw, 64px);
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin-bottom: var(--sp-5);
}

.tool-hero__title-accent {
    color: var(--accent);
}

.tool-hero__subtitle {
    font-size: 17px;
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: var(--sp-8);
    max-width: 460px;
}

.tool-hero__facts {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.tool-hero__facts li {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gray-700);
}

.tool-hero__fact-mark {
    color: var(--accent);
    font-size: 10px;
}

/* ---- THE BOX: input / processing / gate ---- */
.tool-box {
    background: var(--white);
    border: var(--border-3);
    box-shadow: 10px 10px 0 var(--black);
    padding: var(--sp-6);
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.tool-box__head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-3);
}

.tool-box__dot {
    width: 9px;
    height: 9px;
    background: var(--accent);
    flex-shrink: 0;
}

.tool-box__label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--gray-600);
}

.tool-box__count {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
}

.tool-box__count--over {
    color: var(--accent);
}

.tool-box__form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tool-box__input {
    width: 100%;
    flex: 1;
    min-height: 230px;
    padding: var(--sp-4);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--black);
    background: var(--gray-50);
    border: var(--border-2);
    outline: none;
    resize: vertical;
    margin-bottom: var(--sp-4);
    transition: border-color var(--transition), background var(--transition);
}

.tool-box__input::placeholder {
    color: var(--gray-400);
}

.tool-box__input:focus {
    background: var(--white);
    border-color: var(--accent);
}

.tool-box__error {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    margin-bottom: var(--sp-3);
}

.tool-box__note {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    text-align: center;
    margin-top: var(--sp-3);
}

/* ---- Processing state ---- */
.tool-box__processing {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-5);
    padding: var(--sp-8) 0;
}

.tool-box__spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--accent);
    animation: toolSpin 800ms linear infinite;
}

@keyframes toolSpin {
    to { transform: rotate(360deg); }
}

.tool-box__processing-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.tool-box__steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    min-width: 240px;
}

.tool-box__step {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--gray-400);
    transition: color 200ms ease;
}

.tool-box__step-mark {
    width: 12px;
    height: 12px;
    border: 2px solid var(--gray-300);
    flex-shrink: 0;
    transition: background 200ms ease, border-color 200ms ease;
}

.tool-box__step--done {
    color: var(--black);
}

.tool-box__step--done .tool-box__step-mark {
    background: var(--accent);
    border-color: var(--accent);
}

/* ---- Account gate ---- */
.tool-box__gate {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: var(--sp-4);
    padding: var(--sp-6) 0;
}

.tool-box__gate-check {
    color: var(--accent);
    font-size: 26px;
}

.tool-box__gate-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.tool-box__gate-line {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-600);
    max-width: 340px;
    margin-bottom: var(--sp-2);
}

.tool-box__gate .btn {
    width: 100%;
}

.tool-box__back {
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-500);
    cursor: pointer;
    padding: var(--sp-2);
    text-decoration: underline;
}

.tool-box__back:hover {
    color: var(--black);
}

/* ---- WHAT YOU GET ---- */
.tool-points {
    padding: var(--sp-20) var(--gutter);
    border-bottom: var(--border-3);
    background: var(--gray-50);
}

.tool-points__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
}

.tool-point {
    background: var(--white);
    border: var(--border-2);
    padding: var(--sp-6);
}

.tool-point__icon {
    font-size: 22px;
    color: var(--accent);
    margin-bottom: var(--sp-4);
}

.tool-point__title {
    font-size: 16px;
    letter-spacing: 0.04em;
    margin-bottom: var(--sp-3);
}

.tool-point__desc {
    font-size: 14px;
    line-height: 1.65;
    color: var(--gray-600);
}

/* ---- FAQ (reuses .faq__* from landing.css) ---- */
.tool-faq {
    padding: var(--sp-20) var(--gutter);
    border-bottom: var(--border-3);
}

.tool-faq__inner {
    max-width: 800px;
    margin: 0 auto;
}

.tool-faq__pricing {
    margin-top: var(--sp-8);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gray-600);
    text-align: center;
}

.tool-faq__pricing a {
    color: var(--accent);
    font-weight: 600;
    border-bottom: 1px solid var(--accent);
}

/* ---- CROSS-LINKS ---- */
.tool-related {
    padding: var(--sp-20) var(--gutter);
    background: var(--black);
    color: var(--white);
}

.tool-related__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.tool-related .section-title {
    color: var(--white);
}

.tool-related__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-6);
    margin-top: var(--sp-10);
}

.tool-card {
    display: block;
    border: 2px solid var(--gray-700);
    padding: var(--sp-6);
    color: var(--white);
    transition: border-color var(--transition), transform var(--transition);
}

.tool-card:hover {
    border-color: var(--accent);
    transform: translate(-4px, -4px);
}

.tool-card__icon {
    font-size: 22px;
    color: var(--accent);
    margin-bottom: var(--sp-4);
}

.tool-card__name {
    font-size: 20px;
    margin-bottom: var(--sp-3);
}

.tool-card__blurb {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-400);
    margin-bottom: var(--sp-5);
}

.tool-card__go {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
}

/* ---- SECOND-CHANCE CTA ---- */
/* Once the hero box scrolls away there's nothing to act on until the
   footer, so this puts the ask back in front of anyone still reading. */
.tool-cta {
    padding: var(--sp-16) var(--gutter);
    border-bottom: var(--border-3);
    background: var(--white);
    text-align: center;
}

.tool-cta__inner {
    max-width: 720px;
    margin: 0 auto;
}

.tool-cta__title {
    font-size: clamp(24px, 3.4vw, 38px);
    line-height: 1.05;
    margin-bottom: var(--sp-4);
}

.tool-cta__line {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    margin-bottom: var(--sp-8);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .tool-hero__inner {
        gap: var(--sp-10);
    }
}

@media (max-width: 900px) {
    /* Copy over box: the box is the conversion, but on one column the
       headline has to say what the box is for before it appears. */
    .tool-hero__inner {
        grid-template-columns: 1fr;
        gap: var(--sp-10);
    }

    .tool-hero__subtitle {
        max-width: none;
    }

    .tool-points__inner,
    .tool-related__cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .tool-hero {
        padding: var(--sp-16) var(--gutter) var(--sp-12);
    }

    /* Sized for a desktop hero; at phone width it reaches past the
       section edge and adds a horizontal scrollbar. */
    .tool-hero::before {
        width: 380px;
        height: 380px;
        right: -30%;
    }

    .tool-hero__eyebrow {
        font-size: 11px;
        letter-spacing: 0.1em;
        padding: 5px 10px;
        margin-bottom: var(--sp-5);
    }

    .tool-hero__subtitle {
        font-size: 15px;
        margin-bottom: var(--sp-6);
    }

    .tool-box {
        padding: var(--sp-4);
        box-shadow: 6px 6px 0 var(--black);
        min-height: 0;
    }

    .tool-box__input {
        min-height: 180px;
        /* Under 16px, iOS Safari zooms in on focus — on the one
           textarea the whole funnel depends on. */
        font-size: 16px;
    }

    .tool-points,
    .tool-faq,
    .tool-related {
        padding: var(--sp-16) var(--gutter);
    }

    .tool-cta {
        padding: var(--sp-12) var(--gutter);
    }

    .tool-cta .btn {
        width: 100%;
    }

    .tool-faq__pricing {
        font-size: 12px;
        line-height: 1.7;
    }

    /* Touch has no hover to leave, so the lift sticks after a tap. */
    .tool-card:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .tool-hero {
        padding: var(--sp-12) var(--gutter) var(--sp-10);
    }

    .tool-hero__facts li {
        font-size: 12px;
        align-items: flex-start;
    }

    .tool-hero__fact-mark {
        margin-top: 5px;
    }

    .tool-box {
        padding: var(--sp-4) var(--sp-3);
        box-shadow: 4px 4px 0 var(--black);
    }

    .tool-box__label {
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    .tool-box__count {
        font-size: 10px;
    }

    .tool-box__processing {
        padding: var(--sp-6) 0;
        gap: var(--sp-4);
    }

    .tool-box__processing-title {
        font-size: 17px;
        letter-spacing: 0.12em;
    }

    /* The step list's 240px floor plus the box padding overflows a
       320px screen; let it take the width it actually has. */
    .tool-box__steps {
        min-width: 0;
        width: 100%;
    }

    .tool-box__step {
        font-size: 11px;
        align-items: flex-start;
    }

    .tool-box__step-mark {
        margin-top: 3px;
    }

    .tool-box__gate {
        padding: var(--sp-4) 0;
        gap: var(--sp-3);
    }

    .tool-box__gate-title {
        font-size: 21px;
    }

    .tool-box__gate-line {
        font-size: 13px;
    }

    .tool-points,
    .tool-faq,
    .tool-related {
        padding: var(--sp-12) var(--gutter);
    }

    .tool-point {
        padding: var(--sp-5);
    }

    .tool-card {
        padding: var(--sp-5);
    }

    .tool-related__cards {
        margin-top: var(--sp-6);
    }
}
