/* ===========================================================
   AMG Financial Consulting — shared styles
   Palette: deep navy + muted gold on light backgrounds
   =========================================================== */

:root {
    --primary: #0F172A;      /* deep navy */
    --primary-soft: #16213b; /* lifted navy for gradients */
    --accent: #C5A059;       /* muted gold */
    --accent-hover: #D4AF37;
    --light-bg: #F8FAFC;
    --text-main: #334155;
    --text-light: #64748B;
    --border: #E2E8F0;
    --white: #FFFFFF;
    --maxw: 1200px;
    --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--text-main);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary);
    line-height: 1.2;
}

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

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; }

/* Accessibility: visible focus + reduced motion */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Header / Navigation ---------- */
header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.nav-container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
}
.logo span { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}
.nav-links a {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); }

.btn-nav {
    background: var(--accent);
    color: var(--primary) !important;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 600 !important;
}
.btn-nav:hover { background: var(--accent-hover); }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.nav-toggle span {
    display: block;
    width: 26px; height: 2px;
    background: var(--white);
    transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: var(--primary);
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(197, 160, 89, 0.3);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-block { width: 100%; }

.btn-outline {
    display: inline-block;
    padding: 0.85rem 1.9rem;
    border: 1px solid rgba(197, 160, 89, 0.6);
    border-radius: 4px;
    color: var(--white);
    font-weight: 600;
    transition: var(--transition);
}
.btn-outline:hover { background: var(--accent); color: var(--primary); border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background:
        radial-gradient(1200px 500px at 70% -10%, rgba(197,160,89,0.18), transparent 60%),
        linear-gradient(160deg, var(--primary) 0%, var(--primary-soft) 100%);
    color: var(--white);
    padding: 12rem 2rem 8rem;
    text-align: center;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(197,160,89,0.5), transparent);
}
.hero-content { max-width: 820px; margin: 0 auto; position: relative; z-index: 1; }
.hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.25rem;
}
.hero h1 { font-size: 3.4rem; color: var(--white); margin-bottom: 1.5rem; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.2rem; color: #CBD5E1; margin-bottom: 2.5rem; }
.hero .btn-primary + .btn-outline { margin-left: 0.75rem; }

/* Compact page header (interior pages) */
.page-head {
    background:
        radial-gradient(900px 400px at 80% -20%, rgba(197,160,89,0.14), transparent 60%),
        linear-gradient(160deg, var(--primary) 0%, var(--primary-soft) 100%);
    color: var(--white);
    padding: 10rem 2rem 4rem;
    text-align: center;
}
.page-head h1 { color: var(--white); font-size: 2.8rem; margin-bottom: 0.75rem; }
.page-head p { color: #CBD5E1; font-size: 1.1rem; max-width: 640px; margin: 0 auto; }

/* ---------- Generic section ---------- */
.section { padding: 6rem 2rem; }
.section.alt { background: var(--light-bg); }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { font-size: 2.4rem; margin-bottom: 0.75rem; }
.section-header p { color: var(--text-light); font-size: 1.05rem; }

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}
.about-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 4px solid var(--accent);
}
.about-card h3 { font-size: 1.8rem; margin-bottom: 0.4rem; }
.about-card .title { color: var(--accent); font-weight: 600; margin-bottom: 1.25rem; display: block; }
.about-card p, .about-text p { color: var(--text-light); margin-bottom: 1.25rem; }
.about-text h3 { font-size: 1.8rem; margin-bottom: 1.25rem; }

/* ---------- Media strip ---------- */
.media-logos { text-align: center; padding-top: 4rem; margin-top: 4rem; border-top: 1px solid var(--border); }
.media-logos .label {
    font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-light); margin-bottom: 1.5rem; font-weight: 600;
}
.media-list {
    display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap;
    color: #94A3B8; font-weight: 700; font-size: 1.05rem;
}

/* ---------- Cards grid (services + articles) ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.25rem;
}
.card {
    background: var(--light-bg);
    padding: 2.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(15,23,42,0.08); border-color: var(--accent); }
.card h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.card p { color: var(--text-light); font-size: 0.95rem; }

/* Article cards */
.article-card { background: var(--white); display: flex; flex-direction: column; }
.article-card .meta {
    font-size: 0.8rem; color: #9A7B3A; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.6rem;
}
.article-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; line-height: 1.4; }
.article-card p { flex-grow: 1; margin-bottom: 1.25rem; }
.read-more { color: var(--primary); font-weight: 600; font-size: 0.95rem; }
.read-more:hover { color: var(--accent); }

/* ---------- Article (single post) ---------- */
.post { max-width: 760px; margin: 0 auto; padding: 5rem 2rem; }
.post .meta { color: #9A7B3A; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.8rem; margin-bottom: 0.75rem; }
.post h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
.post p { margin-bottom: 1.25rem; font-size: 1.05rem; color: var(--text-main); }
.post .back { display: inline-block; margin-top: 1.5rem; color: var(--accent); font-weight: 600; }
.post .disclaimer { font-size: 0.9rem; color: var(--text-light); font-style: italic; border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 2rem; }

/* ---------- Contact ---------- */
.contact { background: var(--primary); color: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.contact-info h2 { color: var(--white); font-size: 2.4rem; margin-bottom: 1rem; }
.contact-info p { color: #CBD5E1; margin-bottom: 2rem; }
.contact-details { list-style: none; }
.contact-details li { margin-bottom: 1rem; color: #CBD5E1; }
.contact-details a { color: #CBD5E1; }
.contact-details a:hover { color: var(--accent); }

.contact-form {
    background: rgba(255,255,255,0.03);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid rgba(197,160,89,0.2);
}
.form-group { margin-bottom: 1.4rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: #CBD5E1; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.9rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid #334155;
    border-radius: 4px;
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #64748B; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); outline: none; }
.hidden-field { display: none; }

/* ---------- CTA band ---------- */
.cta-band {
    background:
        radial-gradient(700px 300px at 20% 120%, rgba(197,160,89,0.16), transparent 60%),
        linear-gradient(160deg, var(--primary) 0%, var(--primary-soft) 100%);
    color: var(--white);
    text-align: center;
    padding: 5rem 2rem;
}
.cta-band h2 { color: var(--white); font-size: 2.2rem; margin-bottom: 1.5rem; }

/* ---------- Thank-you ---------- */
.thanks-wrap {
    min-height: 70vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 8rem 2rem 4rem;
}
.thanks-wrap .check { font-size: 3rem; color: var(--accent); margin-bottom: 1rem; }
.thanks-wrap h1 { font-size: 2.4rem; margin-bottom: 1rem; }
.thanks-wrap p { color: var(--text-light); margin-bottom: 2rem; max-width: 480px; }

/* ---------- Footer ---------- */
footer {
    background: #090D16;
    color: #64748B;
    text-align: center;
    padding: 2.25rem;
    font-size: 0.9rem;
    border-top: 1px solid #1E293B;
}
footer a { color: #94A3B8; }
footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero h1 { font-size: 2.4rem; }
    .page-head h1 { font-size: 2.1rem; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .about-grid { gap: 2rem; }

    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 100%; left: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: rgba(15,23,42,0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(197,160,89,0.2);
        padding: 0 2rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
    }
    .nav-links.open { max-height: 420px; padding-top: 0.5rem; padding-bottom: 1.5rem; }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; padding: 0.85rem 0; width: 100%; }
    .nav-links .btn-nav { display: inline-block; width: auto; margin-top: 0.5rem; }
    .hero .btn-primary + .btn-outline { margin-left: 0; margin-top: 1rem; display: inline-block; }
}

/* ---------- Footer navigation (added) ---------- */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.5rem;
    margin-bottom: 1.25rem;
}
.footer-nav a { color: #94A3B8; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--accent); }

/* ---------- Testimonials + article subheads (added) ---------- */
.testimonial { display: flex; flex-direction: column; }
.testimonial p { font-style: italic; color: var(--text-main); margin-bottom: 1rem; font-size: 1.05rem; }
.testimonial .who { color: var(--text-light); font-size: 0.9rem; font-style: normal; margin-top: auto; }
.post h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }

/* ---------- Media logos (added) ---------- */
.media-list img {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}
.media-list img:hover { filter: grayscale(0); opacity: 1; }
.logo-slot { height: 52px; margin-bottom: 1.1rem; display: flex; align-items: center; }
.logo-slot img { max-height: 48px; max-width: 190px; width: auto; object-fit: contain; }

/* ---------- Coverage cards (added) ---------- */
.coverage-card .read-more { margin-top: auto; padding-top: 0.75rem; }
.coverage-card h3 { font-size: 1.15rem; }

/* ---------- Buttons: light-bg secondary (added) ---------- */
.btn-secondary {
    display: inline-block;
    padding: 0.85rem 1.9rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}
.btn-secondary:hover { background: var(--primary); color: var(--white); }

/* ---------- Algorithm download panels (added) ---------- */
.algo {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-top: 4px solid var(--accent);
}
.algo .tag {
    display: inline-block;
    background: var(--primary);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
}
.algo .demo-badge {
    display: inline-block;
    border: 1px solid var(--accent);
    color: #9A7B3A;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.26rem 0.7rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}
.algo h3 { font-size: 1.55rem; margin: 1rem 0 0.6rem; }
.algo > p { color: var(--text-light); }
.algo .specs { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.algo .specs li { padding: 0.55rem 0; border-bottom: 1px solid var(--border); color: var(--text-light); font-size: 0.95rem; }
.algo .specs li strong { color: var(--primary); display: inline-block; min-width: 160px; }
.algo .downloads { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; align-items: center; }
.algo .dl-note { font-size: 0.85rem; color: var(--text-light); width: 100%; }
.disclaimer-box {
    background: #FEF9EE;
    border: 1px solid rgba(197,160,89,0.4);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    padding: 1.5rem 1.75rem;
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}
.disclaimer-box strong { color: var(--primary); }
