/* The Dog House Hub - main.css
   Cozy Kennel design system. Warm brown wood + orange collar + cream fur
   on deep cocoa backdrop. Rounded humanist heading (Fredoka) + Manrope body.
   Soft medium radii (14-24px), fur-soft shadows, paw-print accents.
   Mobile-first без max-width на текстах. */

/* ==========================================================
   CSS CUSTOM PROPERTIES - Cozy Kennel palette
   ========================================================== */
:root {
    /* Background - warm cocoa / nighttime backyard */
    --bg-base: #1A120B;            /* deep cocoa earth */
    --bg-surface: #2C1E14;         /* wooden plank */
    --bg-elevated: #3A2818;        /* lifted wood */
    --bg-pressed: #14100A;
    --bg-glass: rgba(44, 30, 20, 0.78);
    --bg-cream: #F5E6D0;           /* fur of a golden retriever */

    /* Text - cream fur on dark cocoa */
    --text: #EFEBE9;               /* soft bone-cream */
    --text-muted: #C4B8A8;         /* aged parchment */
    --text-dim: #8A7D6E;
    --text-on-accent: #1A0F08;     /* dark on orange */
    --text-on-light-accent: #1A0F08;

    /* Accents - collar orange / autumn leaves / grass */
    --accent: #E68935;             /* main orange (collar) */
    --accent-light: #FF9F4D;       /* bright orange */
    --accent-dark: #B45F1A;        /* deep sunset */
    --accent-bg: rgba(230, 137, 53, 0.08);

    --accent-wood: #8C5A35;        /* warm wood */
    --accent-cream: #F5E6D0;       /* retriever cream */
    --accent-grass: #7A9460;       /* backyard lawn */
    --accent-bone: #F5E6C8;        /* dog bone white */
    --accent-cherry: #B85A3F;      /* leather collar red */

    --success: #7A9460;            /* grass green */
    --success-light: #A3C082;
    --danger: #B85A3F;
    --danger-light: #D48A72;

    /* Borders - subtle warm wood */
    --border: rgba(230, 137, 53, 0.16);
    --border-hover: rgba(230, 137, 53, 0.40);

    /* Typography - rounded humanist heading + modern sans body */
    --font-heading: 'Fredoka', 'Nunito', system-ui, -apple-system, sans-serif;
    --font-body: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;

    /* Radii - мягкие средние как подушки в будке */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-2xl: 42px;

    /* Layout */
    --header-h: 72px;
    --container-max: 1320px;
    --container-pad: 20px;

    /* Transitions */
    --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 480ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Generic shadow alias */
    --shadow:
        0 1px 0 rgba(230, 137, 53, 0.14) inset,
        0 10px 30px rgba(0, 0, 0, 0.42),
        0 2px 4px rgba(0, 0, 0, 0.45);

    /* Shadow system - fur-soft drops with warm glow */
    --shadow-clay-sm:
        0 1px 0 rgba(230, 137, 53, 0.10) inset,
        0 4px 12px rgba(0, 0, 0, 0.42),
        0 1px 2px rgba(0, 0, 0, 0.45);

    --shadow-clay-card:
        0 1px 0 rgba(230, 137, 53, 0.14) inset,
        0 14px 32px rgba(0, 0, 0, 0.48),
        0 4px 8px rgba(0, 0, 0, 0.38);

    --shadow-clay-card-hover:
        0 1px 0 rgba(230, 137, 53, 0.24) inset,
        0 0 0 1px rgba(230, 137, 53, 0.22),
        0 20px 40px rgba(0, 0, 0, 0.55),
        0 6px 14px rgba(0, 0, 0, 0.42),
        0 0 30px rgba(230, 137, 53, 0.12);

    --shadow-clay-button:
        0 1px 0 rgba(255, 200, 140, 0.48) inset,
        0 -1px 0 rgba(140, 60, 20, 0.30) inset,
        0 8px 20px rgba(180, 95, 26, 0.50),
        0 2px 4px rgba(0, 0, 0, 0.38);

    --shadow-clay-button-hover:
        0 1px 0 rgba(255, 210, 150, 0.58) inset,
        0 -1px 0 rgba(140, 60, 20, 0.30) inset,
        0 12px 28px rgba(230, 137, 53, 0.56),
        0 4px 10px rgba(0, 0, 0, 0.40),
        0 0 36px rgba(255, 159, 77, 0.30);

    --shadow-clay-pressed:
        0 2px 6px rgba(0, 0, 0, 0.52) inset,
        0 -1px 0 rgba(255, 210, 150, 0.16) inset;

    --shadow-clay-deep:
        0 1px 0 rgba(230, 137, 53, 0.16) inset,
        0 28px 56px rgba(0, 0, 0, 0.58),
        0 10px 20px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(230, 137, 53, 0.10);

    --shadow-collar-glow: 0 0 38px rgba(255, 159, 77, 0.32);
}

/* ==========================================================
   RESET & BASE
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(230, 137, 53, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 25%, rgba(122, 148, 96, 0.08) 0%, transparent 58%),
        linear-gradient(180deg, #1A120B 0%, #14100A 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding-top: var(--header-h);
    position: relative;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

button { font-family: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font-family: inherit; color: var(--text); }

ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* Typography - Fredoka (rounded warm humanist) для заголовков */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 600; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 500; }

p { margin-bottom: 14px; }
strong { font-weight: 700; color: var(--text); }
em { color: var(--accent-light); font-style: italic; font-weight: 500; }

/* Prose links - warm orange underline */
p a, li a {
    color: var(--accent-light);
    border-bottom: 1px solid rgba(230, 137, 53, 0.36);
    transition: color var(--transition), border-color var(--transition);
}
p a:hover, li a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ==========================================================
   LAYOUT UTILITIES
   Правило: no max-width на параграфах и заголовках.
   ========================================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    width: 100%;
}

.section { padding: 64px 0; position: relative; }
.section--tight { padding: 28px 0; }

.section-head { margin-bottom: 36px; }
.section-head__title { margin-bottom: 12px; }
.section-head__subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.section-head__prose {
    margin: 20px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
}
.section-head__prose p { margin-bottom: 16px; }
.section-head__prose a { color: var(--accent-light); font-weight: 500; }

.section-foot { margin-top: 36px; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 999;
    background: var(--accent);
    color: var(--text-on-accent);
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 700;
}
.skip-link:focus { left: 8px; }

.text-accent { color: var(--accent-light); }
.text-muted { color: var(--text-muted); }

/* ==========================================================
   KENNEL BLOBS (ambient background - warm autumn haze)
   ========================================================== */
.kennel-blobs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}
.kennel-blob {
    position: absolute;
    width: 60vh;
    height: 60vh;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.22;
}
.kennel-blob--1 { background: rgba(230, 137, 53, 0.60); top: -12%; left: -8%; animation: kennel-drift 22s ease-in-out infinite; }
.kennel-blob--2 { background: rgba(122, 148, 96, 0.52); top: 28%; right: -14%; animation: kennel-drift 28s ease-in-out infinite reverse; }
.kennel-blob--3 { background: rgba(255, 159, 77, 0.38); bottom: -12%; left: 32%; animation: kennel-drift 34s ease-in-out infinite; }

@keyframes kennel-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(18px, -24px) scale(1.06); }
    66% { transform: translate(-14px, 18px) scale(0.96); }
}

/* Legacy aliases (для шаблонов использующих .clay-blob) */
.clay-blobs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.clay-blob { position: absolute; width: 60vh; height: 60vh; border-radius: 50%; filter: blur(90px); opacity: 0.22; }
.clay-blob--1 { background: rgba(230, 137, 53, 0.60); top: -12%; left: -8%; animation: kennel-drift 22s ease-in-out infinite; }
.clay-blob--2 { background: rgba(122, 148, 96, 0.52); top: 28%; right: -14%; animation: kennel-drift 28s ease-in-out infinite reverse; }
.clay-blob--3 { background: rgba(255, 159, 77, 0.38); bottom: -12%; left: 32%; animation: kennel-drift 34s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .kennel-blob, .clay-blob { animation: none; }
}

/* ==========================================================
   BUTTONS - warm rounded
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    min-height: 48px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
}

.btn--sm { padding: 9px 18px; min-height: 40px; font-size: 0.88rem; }
.btn--lg { padding: 16px 32px; min-height: 56px; font-size: 1.02rem; }
.btn--block { width: 100%; }

.btn--primary {
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 55%, var(--accent-dark) 100%);
    color: var(--text-on-accent);
    box-shadow: var(--shadow-clay-button);
    border-color: rgba(140, 60, 20, 0.55);
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-clay-button-hover);
    color: var(--text-on-accent);
}
.btn--primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-clay-pressed);
}

.btn--ghost {
    background: var(--bg-surface);
    color: var(--accent-light);
    box-shadow: var(--shadow-clay-sm);
    border-color: var(--border);
}
.btn--ghost:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-clay-card);
    color: var(--accent);
    border-color: var(--border-hover);
}

.btn--secondary {
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: var(--shadow-clay-sm);
    border-color: var(--border);
}
.btn--secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-clay-card);
    color: var(--accent-light);
    border-color: var(--border-hover);
}

/* Focus */
*:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
    border-radius: var(--radius-xs);
}

::selection { background: var(--accent); color: var(--text-on-accent); }

/* ==========================================================
   BREADCRUMBS
   ========================================================== */
.crumbs {
    padding: 18px 0 4px;
    font-size: 0.9rem;
}
.crumbs__link { color: var(--text-muted); border-bottom: 0; }
.crumbs__link:hover { color: var(--accent-light); }
.crumbs__sep { color: var(--text-dim); margin: 0 8px; }
.crumbs__current { color: var(--text); font-weight: 500; }

/* ==========================================================
   SCROLLBARS
   ========================================================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-pressed); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ==========================================================
   DOG HOUSE ACCENTS: paw-divider + cozy frame
   ========================================================== */
.paw-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 18px 0 24px;
    opacity: 0.78;
}
.paw-divider::before,
.paw-divider::after {
    content: '';
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
}
.paw-divider svg { color: var(--accent); }

/* Cozy frame — универсальная тёплая карточка */
.cozy-frame {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-clay-card);
}
.cozy-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(230, 137, 53, 0.10) 0%, transparent 40%);
    pointer-events: none;
}

/* Paw-print list marker */
.paw-list {
    list-style: none;
    padding-left: 0;
}
.paw-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
}
.paw-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><circle cx='7' cy='8' r='2.2' fill='%23E68935'/><circle cx='4.5' cy='5' r='1.2' fill='%23E68935'/><circle cx='9.5' cy='5' r='1.2' fill='%23E68935'/><circle cx='2.5' cy='7.5' r='1' fill='%23E68935'/><circle cx='11.5' cy='7.5' r='1' fill='%23E68935'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.86;
}
