/* Global pencil-art layer. Contact remains the most detailed expression. */
body {
    background-color: var(--cream);
    background-image:
        radial-gradient(rgba(37, 32, 42, 0.055) 0.65px, transparent 0.8px),
        radial-gradient(rgba(75, 23, 109, 0.035) 0.65px, transparent 0.8px);
    background-position: 0 0, 7px 9px;
    background-size: 13px 13px, 17px 17px;
}

main,
.site-footer {
    position: relative;
}

/* Graphite hatching over coloured areas. */
.hero::before,
.page-hero::before,
.statement::before,
.site-footer::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: repeating-linear-gradient(
        112deg,
        transparent 0,
        transparent 13px,
        rgba(255, 255, 255, 0.025) 14px,
        transparent 15px
    );
    content: "";
    pointer-events: none;
}

.hero > .container,
.page-hero > .container,
.statement > .container,
.site-footer > .container {
    position: relative;
    z-index: 1;
}

/* Handwritten labels and pencil underlines. */
.eyebrow,
.scribble-note {
    font-family: "Segoe Print", "Bradley Hand", cursive;
    letter-spacing: 0.11em;
}

.eyebrow::after {
    display: block;
    width: 3.6rem;
    height: 0.35rem;
    margin-top: 0.25rem;
    background: linear-gradient(
        -3deg,
        transparent 30%,
        currentColor 34%,
        currentColor 48%,
        transparent 53%,
        transparent 62%,
        currentColor 66%,
        currentColor 74%,
        transparent 78%
    );
    content: "";
    opacity: 0.52;
    transform: rotate(-2deg);
}

.text-center > .eyebrow::after {
    margin-right: auto;
    margin-left: auto;
}

.hero h1,
.page-hero h1,
.statement h2 {
    text-shadow:
        0.5px 0.5px 0 rgba(255, 255, 255, 0.22),
        -0.6px 0.3px 0 rgba(0, 0, 0, 0.14);
}

.section h2:not(.h3) {
    text-decoration-line: underline;
    text-decoration-color: rgba(75, 23, 109, 0.2);
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.16em;
    text-decoration-skip-ink: none;
}

/* Cards feel pinned and drawn instead of mechanically boxed. */
.service-card,
.value-box,
.form-card {
    position: relative;
    border: 1.5px solid rgba(37, 32, 42, 0.32);
    border-radius: 0.8rem 1.35rem 0.75rem 1.15rem;
    background-color: rgba(255, 254, 250, 0.96);
    background-image: repeating-linear-gradient(
        0deg,
        transparent 0,
        transparent 2.15rem,
        rgba(71, 111, 148, 0.045) 2.2rem
    );
    box-shadow: 0.45rem 0.55rem 0 rgba(75, 23, 109, 0.07);
}

.service-card::after,
.value-box::after,
.form-card::after {
    position: absolute;
    inset: -0.28rem 0.2rem 0.18rem -0.22rem;
    border: 1px solid rgba(37, 32, 42, 0.2);
    border-radius: 1.1rem 0.65rem 1.25rem 0.7rem;
    content: "";
    pointer-events: none;
    transform: rotate(0.3deg);
}

.service-card:nth-child(even),
.row > div:nth-child(even) .service-card {
    transform: rotate(0.25deg);
}

.row > div:nth-child(odd) .service-card {
    transform: rotate(-0.2deg);
}

.row > div .service-card:hover {
    transform: translateY(-5px) rotate(0);
}

.number {
    font-family: "Segoe Print", "Bradley Hand", cursive;
    transform: rotate(3deg);
}

.service-icon {
    border-style: dashed;
    box-shadow: 2px 2px 0 rgba(75, 23, 109, 0.12);
}

/* Notebook fields on all non-contact forms. */
.form-card .form-label {
    color: #4a454d;
    font-family: "Segoe Print", "Bradley Hand", cursive;
    font-size: 0.86rem;
    font-weight: 700;
}

.form-card .form-control,
.form-card .form-select {
    padding-right: 0.2rem;
    padding-left: 0.2rem;
    border: 0;
    border-bottom: 1.5px solid rgba(37, 32, 42, 0.58);
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
}

.form-card .form-control:focus,
.form-card .form-select:focus {
    border-bottom-color: var(--purple);
    background-color: rgba(238, 228, 242, 0.22);
    box-shadow: 0 3px 0 -1px var(--gold);
}

.form-card textarea.form-control {
    min-height: 8rem;
    padding: 0.75rem;
    border: 1.5px dashed rgba(37, 32, 42, 0.52);
    border-radius: 0.45rem 0.9rem 0.55rem 0.75rem;
}

/* Images and long-form writing receive an editorial sketch frame. */
.article-content {
    padding-left: clamp(1rem, 3vw, 2rem);
    border-left: 2px solid rgba(75, 23, 109, 0.24);
    background: linear-gradient(90deg, rgba(238, 228, 242, 0.22), transparent 4rem);
}

.article-content p:first-child::first-letter {
    float: left;
    margin: 0.12em 0.12em 0 0;
    color: var(--purple);
    font-family: Georgia, serif;
    font-size: 3.4em;
    line-height: 0.8;
}

.rich-article-content h2,
.rich-article-content h3,
.rich-article-content h4 {
    margin: 2.2rem 0 0.8rem;
    font-family: Georgia, serif;
}

.rich-article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
}

.rich-article-content figure {
    margin: 2rem 0;
    text-align: center;
}

.rich-article-content figcaption {
    color: #6e6870;
    font-size: 0.82rem;
}

.rich-article-content blockquote {
    margin: 1.75rem 0;
    padding: 0.75rem 0 0.75rem 1.25rem;
    border-left: 3px solid var(--purple);
    color: #5e5661;
    font-family: Georgia, serif;
    font-size: 1.15rem;
}

.rich-article-content table {
    display: block;
    width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    border-collapse: collapse;
}

.rich-article-content th,
.rich-article-content td {
    padding: 0.65rem;
    border: 1px solid rgba(37, 32, 42, 0.25);
}

.rich-article-content pre {
    padding: 1rem;
    overflow-x: auto;
    border-radius: 0.5rem;
    background: var(--deep);
    color: #f7f2f8;
}

article img,
.team-member img {
    padding: 0.4rem;
    border: 1.5px solid rgba(37, 32, 42, 0.38);
    border-radius: 0.4rem 0.9rem 0.5rem 0.75rem !important;
    background: #fffefa;
    box-shadow: 0.45rem 0.5rem 0 rgba(75, 23, 109, 0.08);
    transform: rotate(-0.35deg);
}

/* Small pencil details in persistent chrome. */
.site-navbar {
    border-bottom: 1px dashed rgba(239, 185, 76, 0.38);
    box-shadow: 0 3px 0 rgba(255, 255, 255, 0.035);
}

.site-footer h4,
.site-footer h6 {
    font-family: "Segoe Print", "Bradley Hand", cursive;
}

.site-footer hr {
    border: 0;
    border-top: 2px dashed rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.site-footer a:not(.btn) {
    text-decoration: underline;
    text-decoration-color: rgba(239, 185, 76, 0.4);
    text-decoration-style: wavy;
    text-underline-offset: 0.2rem;
}

.dev-credit {
    opacity: 0.65;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    transition: opacity 0.3s ease;
}

.dev-credit:hover {
    opacity: 1;
}

.dev-credit-link {
    color: rgba(239, 185, 76, 0.85) !important;
    text-decoration: none !important;
    font-weight: 600;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.dev-credit-link:hover {
    color: #efb94c !important;
    text-shadow: 0 0 8px rgba(239, 185, 76, 0.5);
}

blockquote.service-card footer {
    padding: 0;
    background: transparent;
    color: inherit;
}

.testimonial-placeholder-note {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    border: 1.5px dashed rgba(75, 23, 109, 0.42);
    border-radius: 0.65rem 1rem 0.7rem 0.9rem;
    background: rgba(238, 228, 242, 0.42);
    transform: rotate(-0.15deg);
}

.testimonial-placeholder-note svg {
    width: 1.4rem;
    min-width: 1.4rem;
    color: var(--purple);
}

.testimonial-placeholder-note p {
    margin: 0.2rem 0 0;
}

.alert {
    border: 1.5px dashed currentColor;
    border-radius: 0.5rem 1rem 0.6rem 0.9rem;
    font-family: "Segoe Print", "Bradley Hand", cursive;
    transform: rotate(-0.3deg);
}

.message-counter {
    display: block;
    margin-top: 0.25rem;
    color: var(--body-quiet-color, #6e6870);
    font-size: 0.75rem;
    text-align: right;
}

.message-counter.is-near-limit,
.message-counter.is-below-minimum {
    color: #a1263a;
    font-weight: 700;
}

.testimonial-avatar {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 52% 48% 50% 45% / 45% 50% 48% 52%;
    border: 1.5px solid rgba(75, 23, 109, 0.45);
    box-shadow: 2px 3px 0 rgba(75, 23, 109, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.testimonial-avatar:hover {
    transform: scale(1.08) rotate(3deg);
    border-color: var(--gold);
}

.testimonial-content {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--ink);
    font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
    .service-card,
    .service-icon,
    article img {
        transform: none !important;
    }
}

@media (max-width: 576px) {
    .service-card,
    .row > div .service-card,
    article img {
        transform: none;
    }

    .section h2:not(.h3) {
        text-decoration-thickness: 0.08em;
    }
}
