/* ── The Lone Quiet Mind — Design System ── */

:root {
    --bg-deep: #0a0a0c;
    --bg-card: #131316;
    --bg-card-hover: #1a1a1f;
    --text-primary: #e8e4df;
    --text-muted: #8a8580;
    --text-dim: #5a5550;
    --accent-warm: #c4956a;
    --accent-glow: #d4a574;
    --accent-ember: rgba(196, 149, 106, 0.08);
    --accent-ember-strong: rgba(196, 149, 106, 0.12);
    --border-subtle: rgba(196, 149, 106, 0.12);
    --border-hover: rgba(196, 149, 106, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Atmospheric background */
body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(196, 149, 106, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(140, 100, 70, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(100, 80, 60, 0.015) 0%, transparent 70%);
    animation: drift 25s ease-in-out infinite alternate;
    pointer-events: none; z-index: 0;
}

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-30px, -20px) rotate(1deg); }
}

/* Grain overlay */
body::after {
    content: '';
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 1;
}

/* ── Layout ── */
.page-wrap {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    min-height: 100vh;
}

.content {
    width: 100%;
    max-width: 640px;
    padding: 2rem 1.5rem 3rem;
}

.content.narrow {
    max-width: 480px;
}

/* ── Navigation ── */
.nav {
    width: 100%;
    max-width: 640px;
    padding: 1.5rem 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}

.nav-brand {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: var(--accent-warm);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-warm);
}

/* Mobile nav */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 600px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 1.5rem;
        flex-direction: column;
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        border-radius: 10px;
        padding: 1rem 1.5rem;
        gap: 1rem;
        margin-top: 0.5rem;
    }
    .nav-links.open { display: flex; }
}

/* ── Typography ── */
.page-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 2rem;
    letter-spacing: 0.04em;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.page-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.section-label {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-warm);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-subtle);
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
}

/* Body text for long-form pages */
.prose p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose em {
    color: var(--text-primary);
    font-style: italic;
}

.prose strong {
    color: var(--text-primary);
    font-weight: 400;
}

.prose blockquote {
    border-left: 2px solid var(--border-subtle);
    padding-left: 1.2rem;
    margin: 1.5rem 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.7;
}

.prose hr {
    border: none;
    height: 1px;
    background: var(--border-subtle);
    margin: 2.5rem 0;
}

/* Premise blocks */
.premise-block {
    margin-bottom: 2.5rem;
}

.premise-block h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.premise-block p {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.premise-block p:last-child {
    margin-bottom: 0;
}

/* ── Cards ── */
.link-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.05rem 1.3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(196, 149, 106, 0.06);
}

.link-card.primary {
    background: var(--accent-ember);
    border-color: var(--border-hover);
}

.link-card.primary:hover {
    background: var(--accent-ember-strong);
    border-color: var(--accent-warm);
    box-shadow: 0 8px 40px rgba(196, 149, 106, 0.1);
}

.link-card.primary .link-icon {
    background: rgba(196, 149, 106, 0.15);
}

.link-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--accent-ember);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.4s ease;
}

.link-card:hover .link-icon {
    background: rgba(196, 149, 106, 0.14);
}

.link-icon svg {
    width: 17px; height: 17px;
    fill: var(--accent-warm);
    transition: fill 0.3s ease;
}

.link-card:hover .link-icon svg {
    fill: var(--accent-glow);
}

.link-text {
    display: flex; flex-direction: column; gap: 0.1rem;
}

.link-title {
    font-weight: 400; font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.link-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.link-arrow {
    margin-left: auto;
    color: var(--text-dim);
    font-size: 0.85rem;
    transition: all 0.4s ease;
    opacity: 0;
}

.link-card:hover .link-arrow {
    opacity: 1; color: var(--accent-warm);
    transform: translateX(3px);
}

/* ── CTA Buttons ── */
.cta {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-warm);
    border: 1px solid var(--border-hover);
    border-radius: 8px;
    background: var(--accent-ember);
    text-decoration: none;
    transition: all 0.4s ease;
}

.cta:hover {
    background: var(--accent-ember-strong);
    border-color: var(--accent-warm);
    box-shadow: 0 4px 20px rgba(196, 149, 106, 0.1);
}

/* ── Tags ── */
.method-tag {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-warm);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: var(--accent-ember);
}

/* ── Framework list ── */
.framework-list {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    margin-top: 1.5rem;
}

.framework-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.framework-name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.framework-desc {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-muted);
}

/* ── Footer ── */
.footer {
    width: 100%; max-width: 640px;
    padding: 2rem 1.5rem 3rem;
    text-align: center;
}

.footer-email {
    display: inline-block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.footer-email:hover {
    color: var(--accent-warm);
    border-color: var(--accent-warm);
}

.footer-line {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: 1rem;
}

/* ── Dividers ── */
.divider {
    width: 24px;
    height: 1px;
    background: var(--text-dim);
    margin: 2.5rem 0;
}

.divider-wide {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-warm), transparent);
    margin: 2.5rem auto;
}

/* ── Page transitions ── */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.2s forwards;
}

.fade-up {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.8s ease-out 0.3s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Application form ── */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent-warm);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.form-submit {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bg-deep);
    background: var(--accent-warm);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit:hover {
    background: var(--accent-glow);
    box-shadow: 0 4px 20px rgba(196, 149, 106, 0.2);
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .content { padding: 1.5rem 1.25rem 2.5rem; }
    .page-title { font-size: 1.7rem; }
    .section-heading { font-size: 1.3rem; }
    .premise-block h3 { font-size: 1.1rem; }
}
