/* Cut-corner, glow and glitch layer, after django_apps.neon_ui (same author, MIT).
   Loaded after style.css by base.html. Works with the light and dark themes. */

:root {
    --cy-cut: 10px;
    --cy-shape: polygon(0 0, calc(100% - var(--cy-cut)) 0, 100% var(--cy-cut), 100% 100%, var(--cy-cut) 100%, 0 calc(100% - var(--cy-cut)));
    --cy-mono: "JetBrains Mono", "Fira Code", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --cy-alt: var(--accent);  /* light mode: one color, the site green */
    --link: var(--accent);
    --cy-pink: #81c784;      /* glitch: a lighter green next to the accent */
    --cy-glow: color-mix(in srgb, var(--accent) 35%, transparent);
}
[data-theme="dark"] {
    --cy-alt: var(--accent);  /* dark mode too: one color, the site green */
    --link: var(--accent);
    --cy-pink: #1b5e20;      /* glitch: a darker green next to the accent */
    --cy-glow: color-mix(in srgb, var(--accent) 55%, transparent);
}
[data-theme="dark"] body {
    background:
        repeating-linear-gradient(0deg, rgba(34, 242, 255, .018) 0 1px, transparent 1px 3px),
        var(--bg);
}

/* ---------- buttons: lime slab, cut corners, glitch on hover ---------- */
.cta-button, .contact-form button[type="submit"], .search-page-form button {
    position: relative;
    border-radius: 0;
    clip-path: var(--cy-shape);
    font-family: var(--cy-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.85rem 1.8rem 0.85rem 1.4rem;
    border: 0;
    cursor: pointer;
    box-shadow: 0 0 14px var(--cy-glow);
    transition: box-shadow .15s, transform .1s;
}
.cta-button::after, .contact-form button[type="submit"]::after {
    content: ""; position: absolute; right: 7px; bottom: 7px; width: 6px; height: 6px;
    background: var(--accent-fg); clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.cta-button:hover, .contact-form button[type="submit"]:hover:not(:disabled) {
    opacity: 1;
    box-shadow: 0 0 24px var(--cy-glow);
    animation: cy-glitch .35s steps(2) 1;
}
.cta-button:active { transform: translate(1px, 1px); }

/* secondary link-buttons: outline */
.home-more {
    font-family: var(--cy-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--cy-alt); text-decoration: none; margin-left: 0.75rem;
}
.home-more::after { content: " ▸"; }
.home-more:hover { text-shadow: 0 0 8px var(--cy-alt); }

/* ---------- labels and kickers: mono caps ---------- */
.home-kicker, .breadcrumb, .contact-form label, .offer-box dt, .search-tabs a, .home-tags li, .svc-price {
    font-family: var(--cy-mono);
    letter-spacing: 0.08em;
}
.home-kicker, .contact-form .form-field > label, .offer-box dt {
    text-transform: uppercase; font-size: 0.75rem; color: var(--cy-alt);
}
h1 { letter-spacing: -0.01em; }
[data-theme="dark"] h1 { text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- cards: HUD corner brackets that grow into a frame, glitch title on hover ---------- */
.cat-card, .svc-card, .offer-box, .home-card, .offer-card, .page-card {
    position: relative;
    border-color: transparent;
    border-radius: 0;
    background-color: color-mix(in srgb, var(--fg) 3%, transparent);
    transition: background-color .15s;
}
.cat-card::before, .cat-card::after, .svc-card::before, .svc-card::after,
.offer-box::before, .offer-box::after, .home-card::before, .home-card::after,
.offer-card::before, .offer-card::after, .page-card::before, .page-card::after {
    content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none;
    border: 2px solid var(--accent); transition: width .2s, height .2s, box-shadow .2s;
}
.cat-card::before, .svc-card::before, .offer-box::before, .home-card::before, .offer-card::before, .page-card::before {
    top: 0; left: 0; border-right: 0; border-bottom: 0;
}
.cat-card::after, .svc-card::after, .offer-box::after, .home-card::after, .offer-card::after, .page-card::after {
    bottom: 0; right: 0; border-left: 0; border-top: 0;
}
a.cat-card:hover::before, a.cat-card:hover::after, a.svc-card--link:hover::before, a.svc-card--link:hover::after,
.home-card:hover::before, .home-card:hover::after, .offer-card:hover::before, .offer-card:hover::after,
.page-card:hover::before, .page-card:hover::after {
    width: 100%; height: 100%; box-shadow: 0 0 12px var(--cy-glow);
}
a.cat-card:hover, a.svc-card--link:hover, .home-card:hover, .offer-card:hover, .page-card:hover {
    border-color: transparent;
    background-color: color-mix(in srgb, var(--accent) 6%, transparent);
    box-shadow: none;
}
a.cat-card:hover h2, a.cat-card:hover h3, a.svc-card--link:hover h3,
.home-card:hover h3, .offer-card:hover h3, .page-card:hover h3 {
    color: var(--fg);
    animation: cy-glitch .35s steps(2) 1;
}
.home-tags li {
    border-radius: 0; clip-path: var(--cy-shape); --cy-cut: 6px;
    text-transform: uppercase; font-size: 0.72rem; color: var(--cy-alt); border-color: currentColor;
}
.search-tabs a { border-radius: 0; clip-path: var(--cy-shape); --cy-cut: 6px; font-size: 0.8rem; }
.search-tabs a[aria-current] { box-shadow: 0 0 10px var(--cy-glow) inset; }

/* ---------- form fields: square, glow on focus ---------- */
.contact-form input:not([type="checkbox"]), .contact-form textarea, .search-page-form input {
    border-radius: 0;
    transition: border-color .15s, box-shadow .15s;
}
.contact-form input:focus, .contact-form textarea:focus, .search-page-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--cy-glow);
}
.contact-form input[type="checkbox"] { accent-color: var(--accent); }
.form-status--ok { font-family: var(--cy-mono); border-left: 2px solid var(--accent); padding-left: 0.75rem; }

/* ---------- motion ---------- */
@keyframes cy-glitch {
    0% { transform: translate(0); text-shadow: 2px 0 var(--cy-pink), -2px 0 var(--cy-alt); }
    33% { transform: translate(-2px, 1px); }
    66% { transform: translate(2px, -1px); text-shadow: -2px 0 var(--cy-pink), 2px 0 var(--cy-alt); }
    100% { transform: translate(0); }
}
@media (prefers-reduced-motion: reduce) {
    .cta-button, .contact-form button[type="submit"], .cat-card *, .svc-card *, .home-card *, .page-card *, .offer-card * { animation: none !important; transition: none !important; }
}

/* ---------- whole card clickable: the title link covers the card ---------- */
.page-card, .home-card, .offer-card { position: relative; }
.page-card h3 a::after, .home-card h3 a::after, .offer-card h3 a::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
}
.page-card a:not(h3 a), .home-card a:not(h3 a) { position: relative; z-index: 2; }

/* ---------- accessibility ---------- */
.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 100;
    padding: 0.6rem 1rem; background: var(--accent); color: var(--accent-fg);
    font-family: var(--cy-mono); text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }
/* keyboard focus: clearly visible everywhere, same look as hover on cards */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 3px;
}
a.cat-card:focus-visible::before, a.cat-card:focus-visible::after,
a.svc-card--link:focus-visible::before, a.svc-card--link:focus-visible::after,
.page-card:focus-within::before, .page-card:focus-within::after,
.home-card:focus-within::before, .home-card:focus-within::after {
    width: 100%; height: 100%; box-shadow: 0 0 12px var(--cy-glow);
}
.home-tags li, .home-kicker, .contact-form .form-field > label, .offer-box dt { font-size: 0.78rem; }
.form-error { font-weight: 600; }

/* ---------- mobile ---------- */
@media (max-width: 600px) {
    .cta-button { display: block; text-align: center; width: 100%; }
    .home-more { display: inline-block; margin: 0.9rem 0 0; padding: 0.4rem 0; }
    .cat-grid, .svc-grid, .page-grid { grid-template-columns: 1fr; }
    .offer-box dl { grid-template-columns: 1fr; gap: 0.1rem; }
    .offer-box dd { margin-bottom: 0.5rem; }
    .search-tabs a { padding: 0.55rem 0.9rem; }
    .search-page-form button { width: 100%; }
    .contact-form input:not([type="checkbox"]), .contact-form textarea { font-size: 16px; } /* no zoom on iOS */
    .breadcrumb { font-size: 0.8rem; overflow-wrap: anywhere; }
    .cat-card li, .search-results li { overflow-wrap: anywhere; }
}
