/* North "Quiet Confidence" Branding */

/* Design Tokens */
:root {
    --bg-warm: #F6F3EE;
    --primary: #2E6B5F;
    --accent: #C9744E;
    --text-dark: #1A1A1A;
    --text-muted: #5A5A5A;
    --border-subtle: rgba(46, 107, 95, 0.15);
    --shadow-subtle: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-warm);
    font-size: 16px;
    min-height: 100vh;
    /* Soft radial gradient background */
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(201, 116, 78, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(46, 107, 95, 0.06) 0%, transparent 50%);
    background-attachment: fixed;
}

.wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
}

/* Header with North mark */
header {
    margin-bottom: 32px;
    padding: 20px 0;
}

.north-mark {
    display: inline-block;
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: -0.5px;
    text-decoration: none;
}

.north-mark:hover {
    color: var(--accent);
    transition: color 0.2s ease;
}

/* Navigation */
nav {
    margin-bottom: 32px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

nav a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 18px;
    transition: all 0.2s ease;
    position: relative;
}

nav a:hover {
    background-color: rgba(46, 107, 95, 0.08);
    color: var(--accent);
}

nav a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    background-color: rgba(46, 107, 95, 0.1);
}

nav a:active {
    background-color: rgba(46, 107, 95, 0.12);
}

nav a.current {
    background-color: rgba(46, 107, 95, 0.12);
    color: var(--primary);
    font-weight: 600;
}

/* Main panel card surface */
main {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 4px 24px var(--shadow-subtle),
        0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
}

/* Typography */
h1 {
    font-size: 2.25em;
    margin-bottom: 24px;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.625em;
    margin-top: 36px;
    margin-bottom: 16px;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: 1.25em;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.4;
}

p {
    margin-bottom: 16px;
    color: var(--text-dark);
    line-height: 1.7;
}

ul, ol {
    margin-left: 24px;
    margin-bottom: 16px;
    color: var(--text-dark);
}

li {
    margin-bottom: 10px;
    line-height: 1.7;
}

strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent);
    text-decoration-thickness: 2px;
}

a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
    background-color: rgba(46, 107, 95, 0.1);
    text-decoration: none;
}

a:active {
    color: #1e4a3f;
}

/* Prominent button links */
.link-button {
    display: inline-block;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--primary);
    border-radius: 18px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow-subtle);
    text-align: center;
    min-width: 200px;
}

.link-button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(46, 107, 95, 0.2);
    transform: translateY(-2px);
}

.link-button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    background: rgba(46, 107, 95, 0.1);
}

.link-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--shadow-subtle);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

@media (min-width: 600px) {
    .button-group {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .link-button {
        flex: 1;
        min-width: 180px;
        max-width: 280px;
    }
}

/* Callout box for important notes */
.callout,
.support-email {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 116, 78, 0.2);
    border-left: 4px solid var(--accent);
    border-radius: 18px;
    padding: 20px 24px;
    margin: 24px 0;
    box-shadow: 0 2px 12px var(--shadow-subtle);
}

.callout p,
.support-email p {
    margin-bottom: 8px;
}

.callout p:last-child,
.support-email p:last-child {
    margin-bottom: 0;
}

.callout a,
.support-email a {
    font-weight: 500;
    font-size: 1.05em;
}

.callout a:focus-visible,
.support-email a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    background-color: rgba(201, 116, 78, 0.1);
    display: inline-block;
    padding: 2px 4px;
    border-radius: 4px;
}

/* Footer */
footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 100;
    font-weight: 500;
}

.skip-link:focus {
    top: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .wrap {
        padding: 16px;
    }
    
    main {
        padding: 24px;
        border-radius: 18px;
    }
    
    h1 {
        font-size: 1.875em;
    }
    
    h2 {
        font-size: 1.5em;
        margin-top: 28px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    nav a {
        display: block;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 20px;
        border-radius: 16px;
    }
    
    h1 {
        font-size: 1.625em;
    }
    
    h2 {
        font-size: 1.375em;
    }
    
    .callout,
    .support-email {
        padding: 16px 20px;
        border-radius: 16px;
    }
}

/* Print styles */
@media print {
    body {
        background: #fff;
        background-image: none;
    }
    
    main {
        background: #fff;
        backdrop-filter: none;
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    nav {
        display: none;
    }
    
    footer {
        border-top: 1px solid #ddd;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
        color: #666;
    }
    
    .callout,
    .support-email {
        background: #f9f9f9;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
    main {
        background: rgba(255, 255, 255, 0.95);
    }
    
    .callout,
    .support-email {
        background: rgba(255, 255, 255, 0.95);
    }
}
