/* =========================================================
   Salvage Solutions / Insurance Salvage Australia
   Unified stylesheet
   ========================================================= */

:root {
    --primary-navy: #0B192C;
    --secondary-blue: #1E3E62;
    --accent-gold: #D4AF37;
    --accent-gold-dark: #B89628;
    --text-dark: #1F2937;
    --text-muted: #4B5563;
    --text-light: #F9FAFB;
    --bg-light: #F3F4F6;
    --white: #FFFFFF;
    --border-color: #E5E7EB;
    --radius: 6px;
    --shadow-sm: 0 1px 2px rgba(11, 25, 44, 0.06);
    --shadow-md: 0 6px 20px rgba(11, 25, 44, 0.10);
    --max-width: 1200px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.65;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p + p { margin-top: 12px; }

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

.text-center { text-align: center; }
.max-800 { max-width: 800px; }
.margin-auto { margin-left: auto; margin-right: auto; }
.gold-text { color: var(--accent-gold); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent-gold);
    color: var(--primary-navy);
    padding: 10px 16px;
    font-weight: 600;
    z-index: 2000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header and navigation ---------- */
.top-bar {
    background-color: var(--primary-navy);
    color: var(--white);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark { height: 42px; width: auto; flex-shrink: 0; }

.logo-words { display: flex; flex-direction: column; line-height: 1.25; }

.logo-words strong {
    font-size: 1.05rem;
    letter-spacing: 0.06em;
}

.logo .subtext {
    font-size: 0.66rem;
    color: var(--accent-gold);
    letter-spacing: 0.14em;
}

.logo-isa .logo-words strong { font-size: 0.95rem; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 22px;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:not(.btn):hover { color: var(--accent-gold); }

.nav-links .highlight-link { color: var(--accent-gold); font-weight: 600; }

/* ---------- "Go To" dropdown ----------
   The nav stretches to the header's content height so the panel's `top: 100%`
   lands on the bar's bottom padding edge; without it the panel's gold rule
   would float inside the navy bar. */
#primary-nav { align-self: stretch; display: flex; }

.nav-dropdown { position: relative; align-self: stretch; }

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 6px;
    padding: 0;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--white);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible,
.nav-dropdown:hover > .nav-dropdown-toggle,
.nav-dropdown.is-open > .nav-dropdown-toggle { color: var(--accent-gold); }

.nav-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s;
}

.nav-dropdown:hover .nav-caret,
.nav-dropdown.is-open .nav-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 14px;
    min-width: 232px;
    padding: 6px 0;
    list-style: none;
    background: var(--primary-navy);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 2px solid var(--accent-gold);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

/* Bridges the gap between the toggle and the panel so the pointer can
   travel down without the menu closing underneath it. */
.nav-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}

/* Reveal is hover (mouse) or .is-open (click / Enter / tap). Deliberately not
   :focus-within — a menu opened purely by focus cannot be dismissed with
   Escape, since returning focus to the toggle would keep it open. */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links .nav-dropdown-menu a {
    display: block;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 400;
    white-space: nowrap;
    color: var(--white);
}

.nav-links .nav-dropdown-menu a:hover,
.nav-links .nav-dropdown-menu a:focus {
    color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.05);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 22px;
    margin: 0 auto;
    background: var(--white);
    transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.92rem;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background-color: var(--secondary-blue); color: var(--white); }
.btn-primary:hover { background-color: #16304d; }

.btn-secondary { background-color: var(--primary-navy); color: var(--white); }
.btn-secondary:hover { background-color: var(--secondary-blue); }

.btn-gold { background-color: var(--accent-gold); color: var(--primary-navy); }
.btn-gold:hover { background-color: var(--accent-gold-dark); }

.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background-color: var(--white); color: var(--primary-navy); }

.btn-outline-dark { border-color: var(--primary-navy); color: var(--primary-navy); }
.btn-outline-dark:hover { background-color: var(--primary-navy); color: var(--white); }

.btn-lg { padding: 15px 30px; font-size: 1rem; }
.full-width { width: 100%; }

/* ---------- Hero ---------- */
.hero {
    background:
        linear-gradient(160deg, rgba(30, 62, 98, 0.55) 0%, rgba(11, 25, 44, 0) 60%),
        var(--primary-navy);
    color: var(--white);
    padding: 96px 0;
    text-align: center;
    border-bottom: 4px solid var(--accent-gold);
}

.hero h1 {
    font-size: clamp(1.9rem, 4.4vw, 3rem);
    max-width: 900px;
    margin: 0 auto 20px;
}

.hero p {
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    max-width: 760px;
    margin: 0 auto 32px;
    color: rgba(249, 250, 251, 0.9);
}

.hero-badge {
    color: var(--accent-gold);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 18px;
    font-weight: 700;
}

/* A single-column grid rather than a flex column: the implicit `max-content`
   track is sized by the widest child, so every stacked button comes out the
   same width instead of hugging its own label. */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Cross-site route out of the hero. Plain underlined text so it reads as a
   secondary link rather than a third button competing with the CTA above. */
.hero-textlink {
    display: inline-block;
    margin-top: 18px;
    color: var(--white);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 2px;
    transition: color 0.2s;
}

.hero-textlink:hover { color: var(--accent-gold); }

/* ---------- Metrics bar ---------- */
.metrics-bar {
    background-color: var(--secondary-blue);
    color: var(--white);
    padding: 26px 0;
}

.metric-item { text-align: center; padding: 8px; }

.metric-val {
    display: block;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1.3;
}

.metric-label {
    font-size: 0.78rem;
    color: rgba(249, 250, 251, 0.85);
}

/* ---------- Sections and grids ---------- */
.section { padding: 72px 0; }
.bg-light { background-color: var(--bg-light); }

.dark-section {
    background-color: var(--primary-navy);
    color: var(--white);
}
.dark-section .section-title p { color: rgba(249, 250, 251, 0.85); }

.section-title { text-align: center; margin-bottom: 44px; }

.section-title h2 {
    text-transform: none;
}

.section-title h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    background: var(--accent-gold);
    margin: 14px auto 0;
}

.section-title p {
    max-width: 760px;
    margin: 12px auto 0;
    color: var(--text-muted);
}

.section-title .subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}
.dark-section .section-title .subtitle { color: var(--accent-gold); }

.grid { display: grid; gap: 22px; }

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-6 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.card {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card p { color: var(--text-muted); }

.featured-card {
    border-top: 4px solid var(--accent-gold);
}

.badge {
    display: inline-block;
    background: var(--primary-navy);
    color: var(--accent-gold);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
    margin-bottom: 12px;
}

.featured-card .btn, .card .btn { margin-top: 16px; }

.role-card { border-left: 3px solid var(--secondary-blue); }

.category-card .tag {
    display: inline-block;
    background-color: var(--primary-navy);
    color: var(--accent-gold);
    padding: 3px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 10px;
}

/* ---------- Timeline ---------- */
.timeline {
    max-width: 820px;
    margin: 0 auto;
    list-style: none;
}

.step {
    display: flex;
    gap: 22px;
    padding-bottom: 28px;
    align-items: flex-start;
    position: relative;
}

.step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 25px;
    top: 54px;
    bottom: 4px;
    width: 2px;
    background: var(--border-color);
}

.step-num {
    background-color: var(--primary-navy);
    color: var(--accent-gold);
    font-size: 1.05rem;
    font-weight: 700;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.step-body p { color: var(--text-muted); }

/* ---------- Check list ---------- */
.check-list {
    list-style: none;
    max-width: 720px;
    margin: 32px auto 0;
}

.check-list li {
    padding: 12px 0 12px 34px;
    position: relative;
    font-size: 1.02rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.check-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--accent-gold);
    font-weight: 700;
}

/* ---------- Stats ---------- */
.stat-grid { margin-top: 44px; }

.stat-box {
    background: var(--bg-light);
    border-bottom: 3px solid var(--accent-gold);
    border-radius: var(--radius);
    padding: 26px 16px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-navy);
    line-height: 1.2;
}

.stat-text {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ---------- Contact ---------- */
.contact-info h4 { margin-top: 26px; }
.contact-info p { margin-top: 14px; }
.contact-info a { color: var(--secondary-blue); text-decoration: underline; }

.contact-card-box {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-gold);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.contact-card-box hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 22px 0;
}

.contact-person .role {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.contact-person a { color: var(--secondary-blue); text-decoration: underline; }

/* ---------- Forms ---------- */
.contact-form, .file-form {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.88rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #C9CDD4;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--white);
}

.form-group textarea { resize: vertical; }

.form-group input:focus,
.form-group textarea:focus { border-color: var(--secondary-blue); }

.form-group.has-error input,
.form-group.has-error textarea { border-color: #B3261E; background: #FEF4F3; }

.field-error {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #B3261E;
    font-weight: 600;
}

.form-status {
    margin-top: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-blue);
    min-height: 1.2em;
}

/* ---------- Footer ---------- */
footer {
    background-color: #050B14;
    color: #9CA3AF;
    padding: 34px 0;
    font-size: 0.85rem;
}

.footer-content p + p { margin-top: 8px; }
.footer-content strong { color: var(--text-light); }
.sub-footer { font-size: 0.78rem; color: #6B7280; }

.footer-links a {
    color: #9CA3AF;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

.footer-links-sep {
    margin: 0 8px;
    color: #6B7280;
}

/* ---------- Responsive ---------- */
/* Two header buttons plus the link list run out of room before the nav
   collapses, so tighten spacing across the last stretch of desktop widths. */
@media (min-width: 901px) and (max-width: 1120px) {
    .nav-links { gap: 14px; }
    .nav-links a:not(.btn),
    .nav-dropdown-toggle { font-size: 0.84rem; }
}

@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    #primary-nav {
        position: absolute;
        display: block;
        align-self: auto;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-navy);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease;
    }

    /* Tall enough for the nav items, both header buttons and the expanded
       "Go To" sub-list. */
    #primary-nav.is-open { max-height: 760px; }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 24px 20px;
    }

    .nav-links li { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
    .nav-links li:last-child { border-bottom: none; padding-top: 14px; }
    .nav-links a:not(.btn) { display: block; padding: 14px 0; font-size: 1rem; }
    .nav-links .btn { display: block; width: 100%; }

    /* The dropdown becomes an inline sub-list inside the accordion — no
       overlay, and opened only by tap (never by a lingering :hover). */
    .nav-dropdown { align-self: auto; }

    .nav-dropdown-toggle {
        width: 100%;
        height: auto;
        justify-content: space-between;
        padding: 14px 0;
        font-size: 1rem;
    }

    .nav-dropdown-menu {
        position: static;
        display: none;
        margin: 0 0 10px;
        min-width: 0;
        padding: 0 0 0 16px;
        background: transparent;
        border: 0;
        border-left: 2px solid var(--accent-gold);
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-dropdown.is-open .nav-dropdown-menu { display: block; }

    .nav-dropdown-menu::before { display: none; }

    .nav-links .nav-dropdown-menu li { border-bottom: 0; }
    .nav-links .nav-dropdown-menu a { padding: 11px 0; font-size: 0.95rem; }

    .top-bar { position: relative; }
    html { scroll-padding-top: 20px; }
}

@media (max-width: 700px) {
    .section { padding: 52px 0; }
    .hero { padding: 64px 0; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-buttons .btn { width: 100%; }
    .step { gap: 16px; }
    .step-num { width: 44px; height: 44px; font-size: 0.95rem; }
    .step:not(:last-child)::before { left: 21px; top: 46px; }
    .contact-form, .file-form, .contact-card-box, .card { padding: 22px; }
    .logo-words strong { font-size: 0.9rem; }
    .logo-isa .logo-words strong { font-size: 0.8rem; }
}

@media print {
    .top-bar, .nav-toggle, .hero-buttons, form { display: none; }
    body { color: #000; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
