/* Harbor & Helm — editorial theme (promoted from the index2.php preview).
   Loaded AFTER site.css: base styles here override the old look, and the
   component overrides at the bottom pull existing pages into the theme. */

:root {
    --navy: #2F3D4C;
    --navy-deep: #24303C;
    --cream: #FAF9F4;
    --paper: #FFFFFF;
    --rust: #924D3D;
    --lightblue: #B7D4D4;
    --teal: #5E8B8B;
    --ink: #33393f;
    --line: #DCD7CB;
    --muted: #6B7280;
}

html { scroll-behavior: smooth; }

body {
    background: var(--cream);
    color: var(--ink);
    font-family: 'sourcesanspro', 'Segoe UI', 'Helvetica Neue', sans-serif;
    font-size: 1.06em;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: normal;
    text-transform: none;
    color: var(--navy);
    line-height: 1.2;
}

a { color: var(--navy); }
a:hover, a:focus, a:active { color: var(--rust); }

.kicker {
    display: block;
    text-transform: uppercase;
    letter-spacing: .22em;
    font-size: .7em;
    color: var(--rust);
    margin-bottom: 8px;
}

/* ---------- masthead ---------- */
.topline { background: var(--navy); height: 4px; }
.mast-wrap { background: var(--paper); }

.masthead {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1160px;
    margin: 0 auto;
    padding: 14px 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.masthead img { width: 190px; }

.mast-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }

.site-tag {
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: .68em;
    color: var(--rust);
    border-left: 1px solid var(--line);
    padding-left: 14px;
}

.masthead nav { display: flex; gap: 4px; flex-wrap: wrap; }

.masthead nav a {
    text-decoration: none;
    padding: 8px 12px;
    font-size: .88em;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--navy);
    border-bottom: 2px solid transparent;
}

.masthead nav a:hover { border-bottom-color: var(--rust); color: var(--navy); }
.masthead nav a.quote { color: var(--rust); font-weight: bold; }

/* Mobile nav toggle — identical to harborandhelm.group */
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 2px; padding: 7px 10px; cursor: pointer; margin-left: auto; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--navy); margin: 4px 0; transition: transform .2s ease, opacity .2s ease; }
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .masthead nav { display: none; flex-direction: column; width: 100%; padding-top: 6px; }
    .masthead.open nav { display: flex; }
    .masthead nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
    .masthead.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .masthead.open .nav-toggle span:nth-child(2) { opacity: 0; }
    .masthead.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .masthead nav a.nav-dash { margin: 8px 0 4px; text-align: center; border-bottom: 2px solid var(--rust); }
}

/* Dashboard: filled tab so logged-in agents always spot their way back */
.masthead nav a.nav-dash {
    background: var(--navy);
    color: #fff;
    font-weight: bold;
    border-radius: 2px;
    border-bottom: 2px solid var(--rust);
}
.masthead nav a.nav-dash:hover { background: var(--navy-deep); color: #fff; }

/* ---------- main container + full-bleed breakout ---------- */
.site-main {
    max-width: 1160px;
    margin: 0 auto;
    padding: 32px 24px;
}

.bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* ---------- hero (home) ---------- */
.hero {
    text-align: left; /* site.css centers all <header> elements */
    background:
        linear-gradient(to right, var(--cream) 38%, rgba(250, 249, 244, 0.82) 62%, rgba(250, 249, 244, 0.45)),
        url('/images/harbor.jpg') right center / cover no-repeat;
    border-bottom: 1px solid var(--line);
    margin-top: -32px; /* cancel .site-main top padding */
}

.hero-inner { max-width: 1160px; margin: 0 auto; padding: 72px 24px 78px; }
.hero h1 { color: var(--navy); font-size: clamp(2em, 4.6vw, 3.4em); max-width: 700px; margin: 0; }
.hero .rule { width: 72px; height: 3px; background: var(--rust); margin: 22px 0; }
.hero p { max-width: 560px; color: var(--ink); margin: 0 0 30px; font-size: 1.05em; }

/* ---------- buttons ---------- */
.btn {
    display: inline-block;
    padding: 13px 30px;
    margin: 0 12px 10px 0;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .85em;
    font-weight: bold;
    border-radius: 2px;
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.btn-rust { background: var(--rust); color: #fff !important; }
.btn-rust:hover { background: #7d4034; }
.btn-outline-light { border-color: var(--lightblue); color: var(--cream) !important; }
.btn-outline-light:hover { background: rgba(183, 212, 212, .15); }
.btn-navy { background: var(--navy); color: #fff !important; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-outline { border-color: var(--navy); color: var(--navy) !important; }
.btn-outline:hover { background: var(--navy); color: #fff !important; }

/* ---------- sections ---------- */
section.block { padding: 48px 0 8px; }
.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(1.5em, 3vw, 2.1em); margin: 0; }
.section-head p { color: var(--muted); margin: 10px 0 0; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 28px; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- who we are ---------- */
.crew-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: stretch; }
@media (max-width: 880px) { .crew-grid { grid-template-columns: 1fr; } }

.dm-card { display: flex; gap: 26px; align-items: flex-start; }
/* Portrait column: photo with the booking button tucked directly beneath it,
   so the pairing survives the stack at 560px. Width is the .dm-photo box
   (140 content + 4 padding + 1 border, doubled) so their edges line up
   instead of the button stretching to its own text width. */
.dm-portrait { flex: none; display: flex; flex-direction: column; gap: 10px; width: 150px; }
.dm-photo { width: 140px; height: 140px; object-fit: cover; border: 1px solid var(--line); padding: 4px; background: #fff; flex: none; border-radius: 0; }
.dm-card h3 { font-size: 1.4em; margin: 0; }
.dm-title { color: var(--rust); text-transform: uppercase; letter-spacing: .1em; font-size: .78em; margin: 4px 0 14px; }
.dm-contact { font-size: .95em; color: var(--muted); margin: 0 0 18px; }
.dm-contact a { text-decoration: none; }
@media (max-width: 560px) { .dm-card { flex-direction: column; } }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 2px; }
.stat { padding: 26px 20px; border: 0 solid var(--line); }
.stat:nth-child(1) { border-right-width: 1px; border-bottom-width: 1px; }
.stat:nth-child(2) { border-bottom-width: 1px; }
.stat:nth-child(3) { border-right-width: 1px; }
.stat .num { display: block; font-family: Georgia, serif; font-size: 2.5em; color: var(--navy); line-height: 1.1; }
.stat .lbl { font-size: .74em; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

/* ---------- crew cards (staff + hours) ---------- */
.crew-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.crew-card { background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 24px; }
.crew-avatar {
    width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
    border: 1px solid var(--line); padding: 3px; background: #fff; margin-bottom: 14px;
}
.crew-initials {
    width: 76px; height: 76px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--cream); color: var(--navy);
    font-family: Georgia, serif; font-size: 1.5em;
    display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.crew-card h3 { font-size: 1.12em; margin: 0; }
.crew-role { color: var(--rust); text-transform: uppercase; letter-spacing: .1em; font-size: .72em; margin: 4px 0 10px; }
.crew-card p { margin: 0; font-size: .93em; color: var(--muted); }
.crew-card a { text-decoration: none; }
/* Booking buttons — only rendered when a scheduling link is set */
.crew-meeting,
.dm-meeting {
    display: inline-block; padding: 9px 18px;
    border: 1px solid var(--navy); border-radius: 2px;
    color: var(--navy) !important; text-decoration: none; text-transform: uppercase;
    letter-spacing: .1em; font-size: .68em; font-weight: bold;
    transition: background .15s ease, color .15s ease;
}
.crew-meeting:hover,
.dm-meeting:hover { background: var(--navy); color: #fff !important; }
.crew-meeting { margin-top: 14px; }
/* Fills the portrait column, so it reads as one block with the photo */
.dm-meeting { text-align: center; padding: 9px 6px; font-size: .62em; letter-spacing: .07em; line-height: 1.3; }

.hours-list { list-style: none; margin: 10px 0 0; padding: 0; font-size: .9em; }
.hours-list li { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dotted var(--line); color: var(--muted); }
.hours-list li:last-child { border-bottom: 0; }
.hours-list .day { color: var(--navy); }
.hours-list .closed { color: var(--rust); }

/* ---------- agents directory ---------- */
.sort-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.sort-row .lbl { text-transform: uppercase; letter-spacing: .16em; font-size: .68em; color: var(--muted); margin-right: 4px; }

/* Chips (sort buttons; also restyles the booking day toggles) */
.chip {
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: .8em;
    font-weight: normal;
    background: var(--cream);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-family: inherit;
    transition: background .15s ease, color .15s ease;
}
.chip.on,
.chip:has(input:checked) { background: var(--navy); color: #fff; border-color: transparent; }

.agents-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 2px; }
.agent-cell {
    padding: 24px 26px; border: 0 solid var(--line); border-right-width: 1px; border-bottom-width: 1px;
    transition: background .18s ease, box-shadow .18s ease;
}
.agent-cell:hover { background: #F2F6F6; box-shadow: inset 4px 0 0 var(--rust); }
.cell-tag { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dotted var(--line); }
.cell-tag .city { text-transform: uppercase; letter-spacing: .16em; font-size: .66em; color: var(--teal); }
.agent-cell h3 { font-size: 1.08em; margin: 0 0 6px; }
.agent-cell h3 a { text-decoration: none; }
.agent-cell h3 a:hover { color: var(--rust); }
.agent-cell p { margin: 0; font-size: .89em; color: var(--muted); }
.agent-cell .phone a { text-decoration: none; color: var(--navy); }
/* Pointer to an agent's other offices, which have cells of their own */
.agent-cell .agent-also { margin-top: 8px; font-size: .8em; font-style: italic; color: var(--teal); }
.visit {
    display: inline-block; margin-top: 10px; font-size: .74em; font-weight: bold;
    text-transform: uppercase; letter-spacing: .1em; color: var(--rust); text-decoration: none;
    opacity: 0; transform: translateX(-4px); transition: opacity .18s ease, transform .18s ease;
}
.visit::after { content: ' \2192'; }
.agent-cell:hover .visit { opacity: 1; transform: none; }
.agents-cta { margin-top: 26px; }

/* ---------- join band ---------- */
.join { background: var(--navy); color: var(--cream); margin-top: 48px; }
.join-inner { max-width: 1160px; margin: 0 auto; padding: 56px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.join h2 { color: #fff; font-size: 1.7em; margin: 0; }
.join p { color: var(--lightblue); margin: 8px 0 0; max-width: 480px; }

/* ---------- footer ---------- */
.site-footer {
    background: var(--paper);
    border-top: 1px solid var(--line);
    text-align: center;
    padding: 30px 16px;
    font-size: .85em;
    color: var(--muted);
}
.site-footer img { width: 110px; opacity: .75; margin-bottom: 10px; }
.site-footer .fam { margin-top: 10px; }
.site-footer .fam a,
.site-footer .legal a { text-decoration: none; color: var(--muted); }
.site-footer .fam a:hover,
.site-footer .legal a:hover { color: var(--rust); }
.site-footer .fam strong { color: var(--navy); }
.site-footer .legal { margin-top: 4px; }

/* =====================================================================
   Overrides that pull EXISTING components into the theme
   ===================================================================== */

/* Cards become paper panels */
.profile-card,
.integration-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 2px;
}

.integration-card { border-left: 3px solid var(--lightblue); }

.profile-heading h1 { text-transform: none; }

.profile-title,
.agents-subtitle {
    color: var(--rust);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .8em;
    font-weight: bold;
}

/* Buttons */
.btn-primary {
    background: var(--navy);
    border: none;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .85em;
    font-weight: bold;
}
.btn-primary:hover { background: var(--navy-deep); }

.btn-danger {
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .78em;
}

/* Pills (admin sections, report tabs) become squared chips */
.pill {
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--paper);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .8em;
    padding: 6px 14px;
    text-decoration: none;
}
.pill:hover { color: var(--navy); border-color: var(--navy); }
.pill-active, .pill.pill-active { background: var(--navy); color: #fff; border-color: transparent; }
.report-tabs .pill-active { background: var(--navy); }

/* Dashboard link-cards */
.dashboard-menu a {
    background: var(--paper);
    border: 1px solid var(--line);
    border-bottom: 3px solid var(--rust);
    border-radius: 2px;
    font-family: Georgia, serif;
    text-transform: none;
    letter-spacing: 0;
    color: var(--navy);
    font-size: 1.15em;
}
.dashboard-menu a:hover { background: #F2F6F6; border-bottom-color: var(--navy); color: var(--navy); }

/* Modals */
.modal-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 4px solid var(--navy);
    border-bottom: 3px solid var(--rust);
    border-radius: 2px;
    box-shadow: 0 18px 50px rgba(36, 48, 60, 0.35);
}
.modal-card h2 { text-transform: none; }

/* Old banding stripes, retired */
.banding, .banding-blue { display: none; }

/* Tables pick up hairlines */
.users-table th { border-bottom: 2px solid var(--line); color: var(--muted); text-transform: uppercase; font-size: .78em; letter-spacing: .08em; }
.users-table td { border-bottom: 1px solid var(--line); }
.report-table th { background: var(--navy); }
.page-list-head { border-bottom: 2px solid var(--line); }

/* Form fields */
.login-form input,
.login-form select,
.login-form textarea,
.rf input {
    border: 1px solid var(--line);
    border-radius: 2px;
}
.login-form input:focus,
.login-form textarea:focus { outline: 2px solid var(--lightblue); }

/* Misc accents that referenced old brand vars */
.back-link a { text-decoration: none; letter-spacing: .06em; text-transform: uppercase; font-size: .85em; }
.status-ok { color: var(--teal); }
