/* ==========================================================================
   Dyad Quotient — Shared Styles
   Used by: index.html, patterns.html, pairings.html, pairing pages,
            privacy.html, terms.html
   ========================================================================== */

/* --- CSS Variables --- */
:root {
    /* Primary naming */
    --dq-midnight: #1A2A3A;
    --dq-sage: #8A9A86;
    --dq-rose: #C48074;
    --dq-white: #F7F7F7;
    --dq-off-white: #F5F3EF;
    --dq-muted: #6c757d;
    --dq-midnight-deep: #111C27;
    --dq-sage-light: rgba(138, 154, 134, 0.12);
    --dq-rose-light: rgba(196, 128, 116, 0.12);
    --dq-midnight-mid: rgba(26, 42, 58, 0.08);
    --dq-gradient: linear-gradient(135deg, #1A2A3A 0%, #2A3A4A 50%, #8A9A86 100%);

    /* Legacy aliases — kept for backward compatibility with existing JS inline styles */
    --midnight-blue: var(--dq-midnight);
    --sage-green: var(--dq-sage);
    --dusty-rose: var(--dq-rose);
    --alabaster-white: var(--dq-white);
    --text-dark: var(--dq-midnight);
    --text-light: var(--dq-white);
    --text-muted: var(--dq-muted);
    --bg-light: #ffffff;
    --bg-off-white: var(--dq-off-white);
    --bg-gradient: var(--dq-gradient);
}

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

/* --- Body --- */
body {
    font-family: 'Lato', sans-serif;
    color: var(--dq-midnight);
    line-height: 1.6;
    background-color: #ffffff;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    color: var(--dq-midnight);
}

/* --- Skip Navigation --- */
.dq-skip-nav {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
}

.dq-skip-nav:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: 1rem 2rem;
    background: var(--dq-midnight);
    color: var(--dq-white);
    font-weight: 600;
    text-decoration: none;
    z-index: 10000;
}

/* --- Navigation --- */
.dq-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.dq-nav-inner {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dq-nav-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.dq-nav-logo img {
    height: 5.5rem;
    width: auto;
}

.dq-nav-links {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
    list-style: none;
}

.dq-logo {
    height: 3rem;
    width: auto;
    margin-bottom: 1rem;
}

.dq-nav-links a {
    text-decoration: none;
    color: var(--dq-midnight);
    font-weight: 500;
    transition: color 0.3s;
}

.dq-nav-links a:hover,
.dq-nav-links a.dq-active {
    color: var(--dq-sage);
}

.dq-nav-cta {
    background: var(--dq-rose);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.dq-nav-cta:hover {
    background: #a86a5f;
    transform: translateY(-2px);
}

/* --- Buttons --- */
.dq-btn-primary {
    background: var(--dq-rose);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.dq-btn-primary:hover {
    background: #a86a5f;
    transform: translateY(-2px);
}

.dq-btn-secondary {
    background: transparent;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid #fff;
    transition: all 0.3s;
    display: inline-block;
}

.dq-btn-secondary:hover {
    background: #fff;
    color: var(--dq-midnight);
}

/* Legacy button class aliases */
.primary-button { background: var(--dq-rose); color: #fff; padding: 1rem 2rem; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 1.1rem; border: none; cursor: pointer; transition: all 0.3s; display: inline-block; }
.primary-button:hover { background: #a86a5f; transform: translateY(-2px); }
.secondary-button { background: transparent; color: #fff; padding: 1rem 2rem; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 1.1rem; border: 2px solid #fff; transition: all 0.3s; display: inline-block; }
.secondary-button:hover { background: #fff; color: var(--dq-midnight); }
.cta-button { background: var(--dq-rose); color: #fff; padding: 0.75rem 1.5rem; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s; }
.cta-button:hover { background: #a86a5f; transform: translateY(-2px); }

/* --- Footer --- */
.dq-footer {
    background: var(--dq-midnight);
    color: #fff;
    padding: 3rem 2rem 2rem;
}

.dq-footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.dq-footer-heading {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    color: #fff;
}

.dq-footer-text {
    color: rgba(255, 255, 255, 0.7);
}

.dq-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dq-footer-links li {
    margin-bottom: 0.5rem;
}

.dq-footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.dq-footer-links a:hover {
    color: #fff;
}

.dq-footer-muted {
    color: rgba(255, 255, 255, 0.4);
}

.dq-footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.dq-footer-crisis {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Utility: Container --- */
.dq-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.dq-container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Legacy aliases */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-title { text-align: center; margin-bottom: 4rem; }
.section-title h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.section-title p { color: var(--dq-muted); font-size: 1.1rem; }
.breadcrumbs { font-size: 0.85rem; color: rgba(247, 247, 247, 0.6); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--dq-rose); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.eyebrow { font-family: 'DM Mono', monospace; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dq-sage); margin-bottom: 0.5rem; }

/* --- Utility: Eyebrow --- */
.dq-eyebrow {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dq-sage);
    margin-bottom: 0.5rem;
}

/* --- Utility: Breadcrumbs --- */
.dq-breadcrumbs {
    font-size: 0.85rem;
    color: rgba(247, 247, 247, 0.6);
    margin-bottom: 1rem;
}

.dq-breadcrumbs a {
    color: var(--dq-rose);
    text-decoration: none;
}

.dq-breadcrumbs a:hover {
    text-decoration: underline;
}

/* --- Utility: Section Title --- */
.dq-section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.dq-section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.dq-section-title p {
    color: var(--dq-muted);
    font-size: 1.1rem;
}

/* --- Utility: Card --- */
.dq-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* --- Utility: Text Muted --- */
.dq-text-muted {
    color: var(--dq-muted);
}

/* --- Hamburger Button --- */
.dq-nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.dq-nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dq-midnight);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.dq-nav-hamburger--open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.dq-nav-hamburger--open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.dq-nav-hamburger--open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile Nav Drawer --- */
.dq-nav-mobile-menu {
    display: none !important;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    padding: 0.5rem 1.5rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.dq-nav-mobile-menu.dq-nav-open {
    display: flex;
}

.dq-nav-mobile-menu a {
    display: block;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: var(--dq-midnight);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.dq-nav-mobile-menu a:hover {
    color: var(--dq-sage);
}

.dq-nav-mobile-menu a:last-child {
    border-bottom: none;
}

.dq-nav-mobile-menu .dq-nav-cta {
    margin-top: 0.75rem;
    text-align: center;
    color: #fff !important;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .dq-nav-inner {
        padding: 0.75rem 1.25rem;
    }

    .dq-nav-logo img {
        height: 3rem;
    }

    .dq-nav-links {
        display: none !important;
    }

    .dq-nav-cta {
        display: none !important;
    }

    .dq-nav-hamburger {
        display: flex !important;
    }

    .dq-nav-mobile-menu.dq-nav-open {
        display: flex !important;
    }

    .dq-section-title h2,
    .section-title h2 {
        font-size: 2rem;
    }
}

@media (min-width: 769px) {
    .dq-nav-hamburger {
        display: none !important;
    }

    .dq-nav-mobile-menu {
        display: none !important;
    }
}
