/* ==========================================================================
   Earnest Security - page-level components.
   Loaded after style.css and depends on its custom properties.
   ========================================================================== */

/* ---- Two-path chooser on the home page ---- */
.path-grid { display: grid; gap: 22px; }
@media (min-width: 860px) { .path-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }

.path-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.path-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.path-card-top {
    background: var(--blue-deep); color: #fff; padding: 30px 26px 26px;
}
.path-card-alt .path-card-top { background: var(--black); }
.path-card-top .icon-chip { background: rgba(255,255,255,.14); color: #fff; }
.path-card-top h2 { color: #fff; font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: .35rem; }
.path-card-top p { color: #c6d5e5; margin: 0; }
.path-card-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.path-card-body .list-check { margin-bottom: 1.3rem; }
.path-card-body .btn-row { margin-top: auto; }

/* ---- Service cards ---- */
.service-card { display: flex; flex-direction: column; height: 100%; }
.service-card h3 { font-size: 1.2rem; }
.service-card p { color: var(--ink-soft); }
.service-card .btn { align-self: flex-start; margin-top: auto; }

/* ---- Stat strip ---- */
.stat-strip { display: grid; gap: 18px; }
@media (min-width: 700px) { .stat-strip { grid-template-columns: repeat(4, 1fr); } }
.stat-strip .stat { text-align: center; }
.stat-strip .num { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1; color: var(--blue); }
.bg-ink .stat-strip .num { color: #fff; }
.stat-strip .lbl { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--ink-soft); }
.bg-ink .stat-strip .lbl { color: rgba(255,255,255,.72); }

/* ---- Calendar ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cal-title { font-family: var(--font-display); text-transform: uppercase; font-size: 1.4rem; margin: 0; }
.cal-nav { display: flex; gap: 8px; }
.cal-nav a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--panel); color: var(--ink); font-weight: 700;
}
.cal-nav a:hover { background: var(--blue); color: #fff; }

.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calendar th {
    background: var(--panel-dark); color: #fff; font-size: .72rem; letter-spacing: .1em;
    text-transform: uppercase; padding: 10px 4px; font-weight: 700;
}
.calendar td { border-top: 1px solid var(--line); vertical-align: top; height: 92px; padding: 0; }
.calendar td + td { border-left: 1px solid var(--line); }
.cal-cell { display: block; height: 100%; padding: 6px; }
.cal-daynum { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.cal-cell.is-out .cal-daynum { color: #b8c3ce; }
.cal-cell.is-today .cal-daynum { background: var(--ink); color: #fff; border-radius: 6px; padding: 0 5px; }
.cal-cell.in-class { background: var(--panel); }

.cal-chip {
    display: block; margin-top: 4px; padding: 4px 6px; border-radius: 6px;
    background: var(--blue); color: #fff; font-size: .7rem; font-weight: 700;
    line-height: 1.25; overflow: hidden; text-overflow: ellipsis;
}
.cal-chip:hover { background: var(--blue-dark); color: #fff; }
.cal-chip.is-full { background: var(--ink-soft); }
.cal-chip small { display: block; font-weight: 600; opacity: .9; }

@media (max-width: 760px) {
    .calendar { display: none; }
}
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: .86rem; color: var(--ink-soft); }
.cal-legend span { display: inline-flex; align-items: center; gap: .5em; }
.cal-swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--blue); display: inline-block; }
.cal-swatch.full { background: var(--ink-soft); }

/* ---- Class session list: the mobile view and the list under the calendar ---- */
.class-list { display: grid; gap: 16px; }
.class-item {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; display: grid; gap: 14px;
}
@media (min-width: 780px) { .class-item { grid-template-columns: 150px 1fr auto; align-items: center; } }
.class-date {
    background: var(--panel-dark); color: #fff; border-radius: var(--radius-sm);
    padding: 14px 12px; text-align: center; min-width: 92px;
    display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.class-date .mon { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.class-date .day { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; }
.class-date .yr  { font-size: .74rem; color: rgba(255,255,255,.72); }
.class-body h3 { margin-bottom: .3rem; font-size: 1.22rem; }
.class-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; color: var(--ink-soft); }
.class-meta span { display: inline-flex; align-items: center; gap: .45em; }
.class-meta i { color: var(--blue); }
.class-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.class-actions .price { font-family: var(--font-display); font-size: 1.5rem; text-align: center; }
.class-item.is-full { opacity: .82; }

/* ---- Class detail ---- */
.detail-grid { display: grid; gap: 26px; }
@media (min-width: 940px) { .detail-grid { grid-template-columns: 1.35fr .65fr; gap: 38px; align-items: start; } }
.detail-side .panel { position: sticky; top: 90px; }
.detail-facts { list-style: none; }
.detail-facts li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.detail-facts li:first-child { border-top: none; }
.detail-facts i { color: var(--blue); width: 18px; text-align: center; margin-top: .25rem; }
.detail-facts strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.rules-body h4 { margin-top: 1.4rem; }
.rules-body ul { margin: 0 0 1rem 1.2rem; padding-left: 1rem; list-style: disc; }
.rules-body li { margin-bottom: .35rem; }

/* ---- Seat meter ---- */
.seats { margin: 4px 0 12px; }
.seats-track { height: 8px; border-radius: 999px; background: var(--panel); overflow: hidden; }
.seats-fill { height: 100%; background: var(--blue); }
.seats-fill.is-tight { background: var(--warn); }
.seats-fill.is-full { background: var(--bad); }
.seats-label { font-size: .84rem; color: var(--ink-soft); margin-top: 6px; }

/* ---- Registration and checkout ---- */
.checkout-grid { display: grid; gap: 26px; }
@media (min-width: 940px) { .checkout-grid { grid-template-columns: 1.25fr .75fr; gap: 38px; align-items: start; } }
.order-summary { background: var(--panel-dark); color: #fff; border-radius: var(--radius); padding: 24px; }
.order-summary h3 { color: #fff; }
.order-summary dl { margin: 0; }
.order-summary .line { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line-dark); }
.order-summary .line:first-of-type { border-top: none; }
.order-summary .line-total { font-weight: 800; font-size: 1.15rem; }
.order-summary .muted { color: rgba(255,255,255,.72); }
.pay-note { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: rgba(255,255,255,.72); margin-top: 14px; }
.pay-note i { margin-top: .2rem; color: #fff; }

.result-panel { max-width: 720px; margin: 0 auto; text-align: center; }
.result-icon {
    width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem; background: var(--blue); color: #fff;
}
.result-icon.is-wait { background: var(--warn); }
.result-icon.is-bad { background: var(--bad); }

/* ---- Careers ---- */
.job-list { display: grid; gap: 16px; }
.job-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.job-item h3 { margin-bottom: .3rem; }
.job-item .job-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--ink-soft); margin-bottom: .8rem; }
.job-item .job-meta i { color: var(--blue); }
.job-call { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 1rem; }

/* ---- Campaign landing page ---- */
.lp-body { background: var(--panel-dark); }
.lp-card {
    max-width: 620px; margin: 0 auto; background: var(--paper); border-radius: var(--radius);
    padding: clamp(24px, 5vw, 40px); box-shadow: var(--shadow);
}
.lp-brand { text-align: center; margin-bottom: 20px; }
.lp-brand img { height: 74px; width: auto; margin: 0 auto 12px; }
.lp-actions { display: grid; gap: 12px; margin-top: 22px; }
.lp-actions .btn { width: 100%; }
.lp-foot { text-align: center; color: var(--ink-soft); font-size: .86rem; padding: 22px 0 36px; }
.lp-foot a { color: #cbd6e2; }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th { background: var(--panel-dark); color: #fff; text-align: left; padding: 11px 12px; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
table.data td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: var(--bg); }

/* ---- Modal ---- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200; display: none;
    background: rgba(6, 20, 40, .72); padding: 20px; overflow-y: auto;
}
.modal-overlay.open { display: flex; align-items: flex-start; justify-content: center; }
.modal-panel {
    background: var(--paper); border-radius: var(--radius); max-width: 720px; width: 100%;
    margin: 40px auto; padding: 28px; box-shadow: var(--shadow); position: relative;
}
.modal-close {
    position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; font-size: 1rem;
}
.modal-close:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.modal-title { margin-right: 44px; }

/* ---- Core standards ---- */
.standards { display: grid; gap: 18px; }
@media (min-width: 640px) { .standards { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
.standards .standard {
    text-align: center; background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 26px 18px;
}
.standards .standard i { font-size: 1.55rem; color: var(--blue); display: block; margin-bottom: 10px; }
.standards .standard span {
    display: block; font-family: var(--font-display); text-transform: uppercase;
    letter-spacing: .1em; font-weight: 600; font-size: 1.05rem; color: var(--ink);
}

/* ---- HOA program pricing ---- */
.tier-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .tier-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.tier {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column;
}
.tier-head { background: var(--panel-dark); color: #fff; padding: 20px 22px; }
.tier-head h3 { color: #fff; margin-bottom: .25rem; font-size: 1.25rem; }
.tier-head .tier-cadence {
    display: block; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.72);
}
.tier-figures { display: flex; flex-wrap: wrap; gap: 4px 26px; padding: 16px 22px; background: var(--panel); }
.tier-figures div { font-size: .86rem; color: var(--ink-soft); }
.tier-figures strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.price-table { width: 100%; border-collapse: collapse; }
.price-table caption { text-align: left; padding: 16px 22px 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); }
.price-table th, .price-table td { padding: 11px 22px; text-align: left; font-size: .95rem; }
.price-table thead th {
    font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
    font-weight: 700; border-bottom: 1px solid var(--line);
}
.price-table tbody tr + tr td { border-top: 1px solid var(--line); }
.price-table td.homes { font-family: var(--font-display); font-size: 1.1rem; }
.price-table td.monthly { font-weight: 700; color: var(--blue); white-space: nowrap; }
.price-table td.yearly { color: var(--ink-soft); white-space: nowrap; }
.tier-note { padding: 14px 22px 20px; margin: 0; font-size: .85rem; color: var(--ink-soft); }
.table-scroll { overflow-x: auto; }
