/* ===================================================================
   TuxCorp — components: cards, detail pages, stats, forms, buttons
   =================================================================== */

/* ===================================================================
   Products overview grid + cards
   =================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem; padding: 3rem 6%;
    background: var(--white);
}
.card {
    background: var(--white); padding: 1.75rem;
    border-radius: 14px; text-align: left;
    cursor: pointer; transition: var(--transition);
    border: 1px solid var(--border);
    color: var(--ink); text-decoration: none;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
}
.card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--gold);
    transform: scaleX(0); transform-origin: left;
    transition: transform .3s;
}
.card:hover, .card:focus-visible {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: var(--shadow-lg);
}
.card:hover::before, .card:focus-visible::before { transform: scaleX(1); }
.card .card-icon {
    width: 48px; height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface); color: var(--navy);
    border-radius: 12px; font-size: 1.5rem; font-weight: 900;
    margin-bottom: 1rem;
}
.card h3 { margin-bottom: .5rem; font-size: 1.25rem; color: var(--navy); }
.card p { color: var(--ink-soft); font-size: .95rem; flex: 1; }

/* ===================================================================
   Detail content area (light)
   =================================================================== */
.detail-content {
    padding: 3rem 6%;
    max-width: 1100px; margin: 0 auto;
    color: var(--ink);
    background: var(--white);
}
.detail-content h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin: 2rem 0 1rem; color: var(--navy);
}
.detail-content h3 { margin: 1.25rem 0 .5rem; color: var(--navy); }
.detail-content p { margin-bottom: 1rem; color: var(--ink-soft); }
.detail-content ul { padding-left: 1.5rem; color: var(--ink-soft); margin-bottom: 1rem; }
.detail-content ul li { margin-bottom: .35rem; }
.detail-content a { color: var(--navy); font-weight: 600; }
.detail-content strong { color: var(--ink); }

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem; margin: 2rem 0; text-align: center;
}
.stat {
    background: var(--surface);
    padding: 1.25rem; border-radius: 12px;
    border: 1px solid var(--border);
}
.stat .num {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 900;
    color: var(--navy);
}
.stat .label { color: var(--ink-soft); font-size: .9rem; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem; margin: 2rem 0;
}
.feature {
    background: var(--surface);
    padding: 1.5rem; border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.feature:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.feature .icon {
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gold); color: var(--navy);
    border-radius: 10px; margin-bottom: .75rem;
    font-size: 1.4rem; font-weight: 900;
}
.feature h4 { margin-bottom: .5rem; font-size: 1.1rem; color: var(--navy); }
.feature p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

.price-box {
    background: var(--surface);
    padding: 1.5rem;
    border-left: 4px solid var(--gold);
    margin: 1.25rem 0;
    border-radius: 6px;
}
.price-box .price {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem); font-weight: 700;
    color: var(--navy);
}

.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem; margin: 1.5rem 0;
}
.split > div {
    background: var(--surface);
    padding: 1.5rem; border-radius: 12px;
    border: 1px solid var(--border);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    counter-reset: step;
    margin: 1.5rem 0;
}
.steps > li {
    list-style: none;
    background: var(--surface);
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    position: relative;
    counter-increment: step;
    color: var(--ink-soft);
}
.steps > li::before {
    content: counter(step);
    position: absolute;
    top: -12px; left: 12px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--gold); color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}
.steps > li strong { color: var(--navy); }

details.faq {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem; margin: .75rem 0;
}
details.faq summary {
    cursor: pointer; font-weight: 700;
    color: var(--navy);
    list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
    content: "+"; float: right;
    color: var(--gold-dark); font-weight: 900;
    transition: transform .25s;
}
details.faq[open] summary::after { content: "−"; }
details.faq p { margin-top: .75rem; color: var(--ink-soft); }

.cta-banner {
    background: linear-gradient(135deg, var(--navy), var(--navy-soft));
    color: var(--white);
    padding: 2.5rem 1.5rem; border-radius: 14px;
    margin: 2rem 0; text-align: center;
    box-shadow: var(--shadow);
}
.cta-banner h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin-bottom: .5rem; color: var(--white); }
.cta-banner p { color: rgba(255,255,255,.92); margin-bottom: 1rem; }

/* Contact form */
.contact-form {
    display: flex; flex-direction: column;
    gap: 1rem; margin-top: 1.5rem;
}
.contact-form label {
    font-weight: 700; margin-bottom: .25rem;
    display: block; color: var(--navy);
}
.contact-form input,
.contact-form textarea {
    padding: 1rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--ink); border-radius: 8px;
    font: inherit; width: 100%;
    transition: var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(228,180,80,.18);
    outline: none;
}
.form-status {
    margin-top: .5rem; min-height: 1.5em;
    font-weight: 700;
}
.form-status.ok    { color: var(--ok); }
.form-status.err   { color: var(--error); }
.form-status.busy  { color: var(--ink-mute); }
.fallback {
    color: var(--ink-mute); font-size: .9rem;
    margin-top: .5rem;
}
.fallback a { color: var(--navy); }
.contact-meta {
    display: flex; gap: 1rem; flex-wrap: wrap;
    margin: .75rem 0 1.5rem;
    color: var(--ink-soft);
}
.contact-meta a { color: var(--navy); text-decoration: none; font-weight: 600; }
.contact-meta a:hover { color: var(--gold-dark); }

/* Buttons */
.btn {
    padding: .9rem 1.8rem;
    background: var(--gold);
    border: 0; color: var(--navy);
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}
.btn:hover, .btn:focus-visible {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.btn[disabled] { opacity: .55; cursor: progress; }
.btn-light {
    background: var(--white); color: var(--navy);
}
.btn-light:hover { background: var(--gold); }
.btn-outline {
    background: transparent; border: 2px solid var(--gold); color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--navy); }

/* Animations — opacity only, so the hero (LCP) is never pushed around */
.fade-in { animation: fadeIn .35s ease-out both; }
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .hero-video { display: none; }
}


/* ---- Contact form additions: per-field errors, honeypot ---- */
.contact-form .field { display: block; }
.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(192,57,43,.12);
}
.contact-form .field-error {
    color: var(--error);
    font-size: .9rem;
    font-weight: 600;
    min-height: 0;
    margin: .35rem 0 0 !important;
}
.contact-form .field-error:empty { display: none; }
.hp {
    position: absolute !important;
    left: -10000px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
}
.contact-section { border-top: 1px solid var(--border); margin-top: 2rem; }

/* ===================================================================
   Components — responsive
   =================================================================== */
@media (max-width: 960px) {
    .product-grid { padding: 2rem 4%; gap: 1.25rem; }
    .detail-content { padding: 2.5rem 4%; }
}
@media (max-width: 640px) {
    .product-grid { grid-template-columns: 1fr; padding: 1.5rem 5%; }
    .detail-content { padding: 2rem 5%; }
    .stat-row { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .feature-grid,
    .split,
    .steps { grid-template-columns: 1fr; }
    .cta-banner { padding: 1.75rem 1rem; }
    .btn { padding: .8rem 1.3rem; font-size: .9rem; }
}
