/* ============================================================
   COMPONENTS.CSS — Reusable Building Blocks
   ============================================================
   This file contains every reusable UI pattern on the site.
   Import it AFTER base.css, BEFORE any section files.

   QUICK REFERENCE
   ─────────────────────────────────────────────────────────
   LAYOUT        .section-wrap  .split-layout  .stack  .cluster
   SURFACES      .card  .card--glass  .card--gradient  
                 .card--mini  .card--stat  .glass-surface
   TYPOGRAPHY    .text-eyebrow  .text-display  .text-heading
                 .text-subheading  .text-body  .text-muted
   BUTTONS       .btn  .btn--primary  .btn--ghost
   BADGES        .pill  .badge  .badge--accent
   MEDIA         .media-box
   LISTS         .check-list
   ─────────────────────────────────────────────────────────

   HOW TO USE:
   Add class names to your HTML elements.
   You can stack multiple classes: class="card card--glass"
   Section-specific layout (padding, grid columns) still lives
   in each section's own CSS file.
   ============================================================ */


/* ============================================================
   1. LAYOUT HELPERS
   ============================================================ */

/* Standard section padding apply to every <section> */
.section-wrap {
    padding: var(--section-pad-y) var(--section-pad-x);
}

/* Two-column grid — left content, right content.
   Collapses to single column at 980px. */
.split-layout {
    display: grid;
    grid-template-columns: minmax(300px, 1.05fr) minmax(300px, 1fr);
    gap: var(--space-6);
    align-items: start;
}

@media (max-width: 980px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

/* Vertical stack — flex column with consistent gap.
   Default gap is --space-4. Override with inline style if needed. */
.stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Horizontal cluster — flex row, wraps, consistent gap */
.cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

/* Centered section header block — eyebrow + heading + description */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-12);
}

.section-header h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
    color: #fff;
}

.section-header p {
    font-size: var(--text-base);
    color: var(--text-3);
    line-height: var(--leading-relaxed);
    max-width: 560px;
    margin: 0 auto;
}


/* ============================================================
   2. SURFACE COMPONENTS
   ============================================================ */

/* 
   BASE CARD — minimal reset, use alone or combine with a modifier.
   On its own: just sets border-radius and overflow.
   Always pair with a modifier like --glass or --gradient.
*/
.card {
    border-radius: var(--radius-2xl);
    overflow: hidden;
    position: relative;
}


/* 
   CARD--GLASS
   Frosted glass panel. Works well for small info cards,
   service cards, and any card sitting over a dark background.
   
   USAGE: <article class="card card--glass">
*/
.card--glass {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 10px 30px rgba(0, 0, 0, 0.25);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.card--glass:hover {
    transform: translateY(-5px);
    border-color: rgba(41, 199, 250, 0.15);
    background: rgba(255, 255, 255, 0.07);
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}


/*
   CARD--GRADIENT
   The large dark gradient container — used for section feature
   boxes like the services section. Includes subtle radial
   lighting effect via ::before pseudo-element.
   
   USAGE: <div class="card card--gradient">
*/
.card--gradient {
    background: var(--gradient-dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    box-shadow:
        var(--shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.card--gradient::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px 500px at 20% 10%, rgba(22, 22, 22, 0.15), transparent 60%),
        radial-gradient(700px 500px at 80% 90%, rgba(41, 199, 250, 0.04), transparent 60%);
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.card--gradient:hover::before {
    opacity: 0.85;
}


/*
   CARD--MINI
   Small info card — used for feature callouts, stat breakdowns
   and icon + text pairs inside panels.
   
   USAGE: <div class="card card--mini">
*/
.card--mini {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        border-color 0.25s ease,
        background 0.25s ease;
}

.card--mini:hover {
    border-color: var(--border-accent);
    background: rgba(41, 199, 250, 0.04);
}


/*
   CARD--STAT
   A single metric display — big number + label.
   Use in a 2-col grid for side-by-side stat pairs.
   
   USAGE:
   <div class="card card--stat">
     <span class="stat-number">↓35%</span>
     <span class="stat-label">Avg. shrinkage reduction</span>
   </div>
*/
.card--stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-5);
    text-align: center;
    transition: border-color 0.25s ease;
}

.card--stat:hover {
    border-color: var(--border-accent);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--g-top);
    line-height: 1;
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--text-3);
}


/*
   GLASS-SURFACE
   A floating glass panel — used for the nav and any overlay
   UI that needs the frosted-glass look. Heavier blur than card--glass.
   
   USAGE: <div class="glass-surface">
*/
.glass-surface {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-glass);
    transition: var(--transition-base);
}


/*
   CARD--ICON-ROW
   Icon on the left, heading + body text on the right.
   Used inside .card--glass or .card--mini.
   
   USAGE:
   <div class="card card--glass">
     <div class="card-icon-row">
       <div class="card-icon"> ... svg ... </div>
       <div>
         <h4>Title</h4>
         <p>Description</p>
       </div>
     </div>
   </div>
*/
.card-icon-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

/* The icon wrapper box */
.card-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(41, 199, 250, 0.15), rgba(30, 152, 199, 0.10));
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--g-top);
}

.card-icon svg {
    width: 18px;
    height: 18px;
}


/* ============================================================
   3. TYPOGRAPHY COMPONENTS
   ============================================================ */

/*
   EYEBROW — small uppercase label above a heading.
   USAGE: <span class="text-eyebrow">Core Services</span>
*/
.text-eyebrow {
    display: block;
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--g-top);
    margin-bottom: var(--space-4);
}

/* Muted variant — less prominent, for secondary eyebrows */
.text-eyebrow--muted {
    color: var(--text-3);
}


/*
   DISPLAY — hero-scale heading (BebasNeue / Ethnocentric feel).
   USAGE: <h1 class="text-display">Insight Security Group</h1>
*/
.text-display {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-wide);
    color: #fff;
}


/*
   HEADING — standard section heading.
   USAGE: <h2 class="text-heading">Enterprise Security Systems</h2>
*/
.text-heading {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: #fff;
    margin-bottom: var(--space-4);
}


/*
   SUBHEADING — card or panel heading.
   USAGE: <h3 class="text-subheading">Enterprise CCTV</h3>
*/
.text-subheading {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-1);
    margin-bottom: var(--space-2);
}


/*
   BODY — standard paragraph text.
   USAGE: <p class="text-body"> ... </p>
*/
.text-body {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-2);
}


/*
   MUTED — de-emphasised text.
   USAGE: <p class="text-muted">Posted 3 days ago</p>
*/
.text-muted {
    color: var(--text-3);
    font-size: var(--text-sm);
}


/*
   CHECK-LIST — bullet point list with cyan dot markers.
   USAGE:
   <ul class="check-list">
     <li>Scalable across sites</li>
   </ul>
*/
.check-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.check-list li {
    position: relative;
    padding-left: 18px;
    color: var(--text-2);
    font-size: var(--text-base);
    line-height: var(--leading-snug);
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--g-top);
}


/* ============================================================
   4. BUTTONS
   ============================================================ */

/*
   BASE BUTTON RESET — always apply .btn, then add a modifier.
   USAGE: <button class="btn btn--primary">Click Me</button>
*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 13px 26px;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-base);
    white-space: nowrap;
    width: fit-content;
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn:hover {
    text-decoration: none;
}


/*
   BTN--PRIMARY — the main gradient CTA. Blue → cyan.
   USAGE: <a class="btn btn--primary" href="#contact">Get in Touch</a>
*/
.btn--primary {
    background: var(--gradient-cta);
    color: #fff;
    box-shadow: var(--shadow-cta);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-cta-hover);
    color: #fff;
}


/*
   BTN--GHOST — outline button, transparent background.
   USAGE: <button class="btn btn--ghost">Learn More</button>
*/
.btn--ghost {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border-medium);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-1);
    border-color: var(--border-accent);
}


/* ============================================================
   5. BADGES & PILLS
   ============================================================ */

/*
   PILL — tag overlay on media/images (top-right of a card image).
   USAGE: <span class="pill">Access Control, CCTV</span>
*/
.pill {
    display: inline-block;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


/*
   BADGE — small inline label/tag.
   USAGE: <span class="badge">New</span>
*/
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    font-weight: 500;
}

/*
   BADGE--ACCENT — cyan-tinted badge for SLA / feature highlights.
   USAGE: <span class="badge badge--accent">24/7 Monitoring</span>
*/
.badge--accent {
    background: rgba(41, 199, 250, 0.08);
    border: 1px solid var(--border-accent);
    color: var(--g-top);
}

/*
   BADGE--NEUTRAL — subtle grey badge.
   USAGE: <span class="badge badge--neutral">Optional</span>
*/
.badge--neutral {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-default);
    color: var(--text-3);
}


/* ============================================================
   6. MEDIA BOX
   ============================================================ */

/*
   MEDIA-BOX — image container with aspect ratio, hover zoom,
   and dark overlay. Used in portfolio / case study cards.
   
   USAGE:
   <a class="media-box" href="#case-1">
     <img src="..." alt="..." />
     <span class="pill">AI Driven CCTV</span>
   </a>
*/
.media-box {
    position: relative;
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
    aspect-ratio: 16 / 9;
    transform: translateZ(0);
    text-decoration: none;
}

.media-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.95) contrast(1.05);
    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

/* Dark vignette overlay */
.media-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(900px 500px at 50% 40%, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.55));
    opacity: 0.85;
    pointer-events: none;
}

.media-box:hover img {
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.1);
}

/* Pill positioned inside media-box */
.media-box .pill {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}


/* ============================================================
   7. SECTION BACKGROUND HELPERS
   ============================================================ */

/* Circuit-board decorative background (right-side lines) */
.bg-lines-right {
    background-image: url("../Assets/Images/tplines.png");
    background-position: top right;
    background-repeat: no-repeat;
}

/* Circuit-board decorative background (left-side lines) */
.bg-lines-left {
    background-image: url("../Assets/Images/tplinesleft.png");
    background-position: top left;
    background-repeat: no-repeat;
}


/* ============================================================
   8. FORM COMPONENTS
   ============================================================ */

/*
   FORM-FIELD — label stacked above input, textarea or select.
   USAGE:
   <div class="form-field">
     <label for="name">Your Name</label>
     <input type="text" id="name" placeholder="Jane Smith">
   </div>
*/
.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-field label {
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--text-3);
    font-family: var(--font-heading);
}

.form-field input,
.form-field textarea,
.form-field select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-1);
    outline: none;
    width: 100%;
    transition:
        border-color var(--transition-fast),
        background var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-3);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--border-accent-strong);
    background: rgba(41, 199, 250, 0.04);
}

.form-field textarea {
    resize: vertical;
    min-height: 130px;
    line-height: var(--leading-relaxed);
}

/* Select dropdown arrow */
.form-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
    color: var(--text-2);
}

.form-field select option {
    background: #1a1e24;
    color: var(--text-1);
}


/*
   FORM-ROW — two fields side by side.
   USAGE:
   <div class="form-row">
     <div class="form-field">...</div>
     <div class="form-field">...</div>
   </div>
*/
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}


/*
   FORM-LABEL — standalone section label above a group
   (e.g. above a checkbox group).
   USAGE: <span class="form-label">Services Required</span>
*/
.form-label {
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--text-3);
    font-family: var(--font-heading);
    display: block;
    margin-bottom: var(--space-3);
}


/*
   CHECKBOX-GROUP — row of styled checkbox cards.
   USAGE:
   <div class="checkbox-group">
     <label class="checkbox-card">
       <input type="checkbox" name="service" value="cctv">
       <span class="checkbox-card-box">
         ... svg icon ...
         CCTV
       </span>
     </label>
   </div>
*/
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

/* Hide the native checkbox — we style the card instead */
.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-card {
    cursor: pointer;
    flex: 1;
    min-width: 120px;
}

.checkbox-card-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-3);
    font-size: var(--text-sm);
    font-family: var(--font-heading);
    letter-spacing: 0.04em;
    text-align: center;
    transition:
        border-color var(--transition-fast),
        background var(--transition-fast),
        color var(--transition-fast);
    user-select: none;
}

.checkbox-card-box svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: stroke var(--transition-fast);
}

/* Hover state */
.checkbox-card:hover .checkbox-card-box {
    border-color: var(--border-accent);
    color: var(--text-2);
}

/* Checked state */
.checkbox-card input[type="checkbox"]:checked + .checkbox-card-box {
    background: rgba(41, 199, 250, 0.1);
    border-color: var(--border-accent-strong);
    color: var(--g-top);
    box-shadow: 0 0 0 1px var(--border-accent);
}


/*
   FORM-FEEDBACK — success or error message shown after submit.
   USAGE:
   <div class="form-feedback success">Message sent!</div>
   <div class="form-feedback error">Something went wrong.</div>
*/
.form-feedback {
    display: none;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.form-feedback.success {
    display: block;
    background: rgba(41, 199, 250, 0.08);
    border: 1px solid var(--border-accent);
    color: var(--g-top);
}

.form-feedback.error {
    display: block;
    background: rgba(255, 80, 80, 0.08);
    border: 1px solid rgba(255, 80, 80, 0.25);
    color: rgba(255, 120, 120, 0.9);
}


/* ============================================================
   9. CONTACT DETAIL ROW
   ============================================================ */

/*
   CONTACT-DETAIL — icon box left, label + value right.
   USAGE:
   <div class="contact-detail">
     <div class="contact-detail-icon"> ... svg ... </div>
     <div class="contact-detail-text">
       <span>Email</span>
       <a href="mailto:...">matt@insight.com.au</a>
     </div>
   </div>
*/
.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.contact-detail-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(41, 199, 250, 0.15), rgba(30, 152, 199, 0.10));
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--g-top);
}

.contact-detail-icon svg {
    width: 18px;
    height: 18px;
}

.contact-detail-text span {
    display: block;
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: var(--space-1);
}

.contact-detail-text a,
.contact-detail-text p {
    font-size: var(--text-base);
    color: var(--text-2);
    text-decoration: none;
    margin: 0;
    transition: color var(--transition-fast);
}

.contact-detail-text a:hover {
    color: var(--g-top);
    text-decoration: none;
}