/* ============================================
   WILD CARE — Design System
   Verein für Soziale Praxis, Graz
   ============================================ */

:root {
    /* Color Palette */
    --moss: #5C6B4F;
    --moss-light: #7A8C6A;
    --moss-dark: #3D4A35;
    --sand: #E8DFD0;
    --sand-light: #F0EBE2;
    --terracotta: #C4775A;
    --terracotta-light: #D4927A;
    --terracotta-dark: #A85E42;
    --bark: #2C2418;
    --bark-light: #4A3D2E;
    --warmwhite: #FAF7F2;
    --cream: #F5EFE6;

    /* Spacing (8px grid) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 48px;
    --space-2xl: 80px;
    --space-3xl: 120px;

    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;

    /* Layout */
    --max-width: 1200px;
    --border-subtle: 1px solid rgba(44, 36, 24, 0.08);
    --border-medium: 1px solid rgba(44, 36, 24, 0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-organic: 40% 60% 55% 45% / 55% 45% 60% 40%;

    /* Transitions */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --duration-fast: 0.2s;
    --duration-normal: 0.4s;
    --duration-slow: 0.8s;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--warmwhite);
    color: var(--bark);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
}

::selection {
    background: var(--terracotta);
    color: var(--warmwhite);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracotta); text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
a:hover { color: var(--terracotta-dark); }

/* Typography Scale */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
    color: var(--bark);
    font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); }
h4 { font-size: 1.125rem; font-weight: 500; }

p { max-width: 65ch; }

.label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--moss);
}

.quote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.75rem);
    line-height: 1.5;
    color: var(--bark-light);
    font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

section {
    padding: var(--space-3xl) 0;
}

/* ============================================
   NAVIGATION
   ============================================ */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 72px;
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--border-subtle);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--bark);
    text-decoration: none;
    font-variation-settings: 'SOFT' 100, 'WONK' 1;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.nav-logo .breadcrumb {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--moss);
    opacity: 0.6;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--bark);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity var(--duration-fast) var(--ease-out);
    letter-spacing: 0.03em;
}

.nav-links a:hover,
.nav-links a.active { opacity: 1; color: var(--moss); }

.nav-cta {
    background: var(--moss);
    color: var(--warmwhite) !important;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    transition: background var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out) !important;
}

.nav-cta:hover {
    background: var(--moss-dark) !important;
    transform: translateY(-1px);
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    gap: 0;
    border: 1px solid rgba(44, 36, 24, 0.15);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.lang-toggle-btn {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--bark);
    opacity: 0.4;
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.lang-toggle-btn:hover {
    opacity: 0.8;
}

.lang-toggle-btn.active {
    opacity: 1;
    color: var(--moss);
    background: rgba(92, 107, 79, 0.08);
}

/* Mobile Nav */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    position: relative;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--bark);
    position: absolute;
    left: 4px;
    transition: all var(--duration-fast) var(--ease-out);
}

.nav-toggle span:nth-child(1) { top: 8px; }
.nav-toggle span:nth-child(2) { top: 15px; }
.nav-toggle span:nth-child(3) { top: 22px; }

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    text-decoration: none;
}

.btn-primary {
    background: var(--moss);
    color: var(--warmwhite);
}
.btn-primary:hover {
    background: var(--moss-dark);
    color: var(--warmwhite);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(92, 107, 79, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--bark);
    border: var(--border-medium);
}
.btn-secondary:hover {
    background: var(--sand-light);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--terracotta);
    padding: 8px 0;
}
.btn-ghost::after {
    content: '\2192';
    transition: transform var(--duration-fast) var(--ease-out);
}
.btn-ghost:hover { color: var(--terracotta-dark); }
.btn-ghost:hover::after { transform: translateX(4px); }

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--warmwhite);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
    border-color: rgba(44, 36, 24, 0.15);
    box-shadow: 0 12px 40px rgba(44, 36, 24, 0.06);
    transform: translateY(-4px);
}

.card-sand {
    background: var(--sand-light);
    border-color: transparent;
}

.card-sand:hover {
    background: var(--sand);
}

/* ============================================
   BRAND PAGE SPECIFIC
   ============================================ */

/* Color Swatches */
.color-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
}

.swatch {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-md);
    position: relative;
    overflow: hidden;
    transition: transform var(--duration-fast) var(--ease-out);
}

.swatch:hover { transform: scale(1.03); }

.swatch-name {
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.swatch-hex {
    font-size: 0.65rem;
    opacity: 0.7;
    font-family: var(--font-body);
    letter-spacing: 0.05em;
}

.swatch-light { color: var(--bark); }
.swatch-dark { color: var(--warmwhite); }

/* Type Specimens */
.type-specimen {
    padding: var(--space-xl) 0;
    border-bottom: var(--border-subtle);
}

.type-specimen:last-child { border-bottom: none; }

.type-sample {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.type-meta {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.type-meta-item {
    font-size: 0.8rem;
    opacity: 0.5;
}

.type-meta-item strong {
    color: var(--moss);
    opacity: 1;
    font-weight: 500;
}

/* Principle Cards */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.principle-card {
    padding: var(--space-xl);
    border-left: 3px solid var(--terracotta);
    background: linear-gradient(135deg, var(--sand-light) 0%, transparent 100%);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.principle-card .label {
    color: var(--terracotta);
    margin-bottom: var(--space-sm);
}

.principle-card h3 {
    margin-bottom: var(--space-md);
}

.principle-card p {
    font-size: 0.9375rem;
    opacity: 0.75;
}

/* Spacing Showcase */
.spacing-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md) 0;
    border-bottom: var(--border-subtle);
}

.spacing-visual {
    width: 48px;
    background: var(--moss);
    opacity: 0.3;
    border-radius: 2px;
    flex-shrink: 0;
}

.spacing-label {
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 80px;
}

.spacing-value {
    font-size: 0.75rem;
    opacity: 0.5;
}

/* Component Preview */
.component-preview {
    background: var(--cream);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: var(--border-subtle);
}

.button-row {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    align-items: center;
}

/* Divider */
.divider {
    width: 48px;
    height: 3px;
    background: var(--terracotta);
    border-radius: 2px;
    margin: var(--space-xl) 0;
}

/* Section Headers */
.section-header {
    margin-bottom: var(--space-xl);
}

.section-header .label {
    margin-bottom: var(--space-sm);
}

.section-header p {
    margin-top: var(--space-md);
    opacity: 0.65;
    font-size: 0.9375rem;
}

/* Tone Spectrum */
.tone-bar {
    display: flex;
    height: 56px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: var(--border-subtle);
}

.tone-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: flex var(--duration-normal) var(--ease-out);
}

.tone-segment:hover { flex: 2; }

.tone-active {
    background: var(--moss);
    color: var(--warmwhite);
}

.tone-inactive {
    background: var(--sand-light);
    color: var(--bark);
    opacity: 0.4;
    text-decoration: line-through;
}

/* Voice Examples */
.voice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.voice-card {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
}

.voice-do {
    background: rgba(92, 107, 79, 0.08);
    border: 1px solid rgba(92, 107, 79, 0.15);
}

.voice-dont {
    background: rgba(196, 119, 90, 0.06);
    border: 1px solid rgba(196, 119, 90, 0.12);
}

.voice-card .label {
    margin-bottom: var(--space-md);
}

.voice-do .label { color: var(--moss); }
.voice-dont .label { color: var(--terracotta); }

.voice-card blockquote {
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.6;
    font-style: italic;
    font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

/* ============================================
   CTA SECTION (shared across pages)
   ============================================ */

.cta-section {
    background: var(--moss);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-section .container {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    color: var(--warmwhite);
    margin-bottom: var(--space-md);
}

.cta-section p {
    color: var(--warmwhite);
    opacity: 0.7;
    font-size: 1.0625rem;
    max-width: 500px;
    margin: 0 auto var(--space-xl);
}

.cta-section .btn-primary {
    background: var(--warmwhite);
    color: var(--moss);
}

.cta-section .btn-primary:hover {
    background: var(--sand);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ============================================
   PAGE HERO (shared across inner pages)
   ============================================ */

.page-hero,
.brand-hero {
    padding-top: calc(72px + var(--space-3xl));
    padding-bottom: var(--space-2xl);
    position: relative;
    overflow: hidden;
}

.page-hero::before,
.brand-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(196, 119, 90, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-hero::after,
.brand-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(92, 107, 79, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-hero .label,
.brand-hero .label {
    margin-bottom: var(--space-md);
}

.page-hero h1,
.brand-hero h1 {
    margin-bottom: var(--space-lg);
}

.page-hero p,
.brand-hero p {
    font-size: 1.125rem;
    opacity: 0.75;
    line-height: 1.7;
}

.page-hero p {
    max-width: 580px;
}

/* ============================================
   PAGE FOOTER (shared across pages)
   ============================================ */

.page-footer {
    padding: var(--space-2xl) 0 var(--space-xl);
    border-top: var(--border-subtle);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-brand h4 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: var(--space-md);
    font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

.footer-brand p {
    font-size: 0.875rem;
    opacity: 0.5;
    max-width: 320px;
}

.footer-links h4 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--moss);
    margin-bottom: var(--space-md);
}

.footer-links a {
    display: block;
    font-size: 0.875rem;
    color: var(--bark);
    opacity: 0.6;
    padding: 4px 0;
    transition: opacity var(--duration-fast);
}

.footer-links a:hover { opacity: 1; }

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.4;
}

.footer-bottom a { color: var(--bark); }

/* ============================================
   LEGAL PAGES (shared for impressum/datenschutz)
   ============================================ */

.legal-prose {
    max-width: 680px;
}

.legal-prose h3 {
    font-size: 1.15rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.legal-prose h3:first-child {
    margin-top: 0;
}

.legal-prose p {
    font-size: 0.9375rem;
    line-height: 1.8;
    opacity: 0.75;
    margin-bottom: var(--space-md);
}

.legal-prose a {
    color: var(--terracotta);
    font-weight: 500;
    word-break: break-word;
}

/* Simple footer (brand.html) */
footer {
    padding: var(--space-xl) 0;
    border-top: var(--border-subtle);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.4;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 968px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(250, 247, 242, 0.98);
        backdrop-filter: blur(20px);
        padding: var(--space-lg);
        border-bottom: var(--border-medium);
        gap: var(--space-md);
    }

    .color-grid { grid-template-columns: repeat(3, 1fr); }
    .principles-grid { grid-template-columns: 1fr; }
    .voice-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }

    section { padding: var(--space-2xl) 0; }
}

@media (max-width: 600px) {
    .color-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom { flex-direction: column; gap: 8px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-up { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
