/* medrozes.lv — reset + tokens */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* Colors */
    --c-bg: #faf6f0;
    --c-text: #2d2a26;
    --c-muted: #54493e;
    --c-accent: #8a3a3a;
    --c-accent-hover: #6f2e2e;
    --c-secondary: #9caf88;
    --c-border: #e6ddd0;

    /* Type */
    --f-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --f-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Sizing */
    --w-text: 40rem;      /* ~640px, читаемая колонка */
    --w-wide: 68rem;      /* ~1088px, основной контейнер */
    --gap: 1.5rem;

    /* Motion */
    --tr-fast: 120ms ease;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--f-sans);
    font-size: 1.0625rem;   /* ~17px */
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--c-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--tr-fast);
}

a:hover {
    color: var(--c-accent-hover);
}

h1, h2, h3, h4 {
    font-family: var(--f-serif);
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 0.5em;
    color: var(--c-text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }

p { margin: 0 0 1.2em; }

.container {
    max-width: var(--w-wide);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.container--narrow {
    max-width: var(--w-text);
}

/* ==== Fonts (self-hosted, no CDN) ==== */

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('/assets/fonts/cormorant-garamond-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('/assets/fonts/cormorant-garamond-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ==== Site header ==== */

.site-header {
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    padding: 1.25rem 0;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header__logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.site-header__logo img {
    height: 30px;
    width: auto;
}

.site-nav__list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.site-nav a {
    color: var(--c-text);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
    transition: border-color var(--tr-fast);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    border-bottom-color: var(--c-accent);
}

/* ==== Site main ==== */

.site-main {
    padding: 2.5rem 0 4rem;
    min-height: 60vh;
}

/* ==== Site footer ==== */

.site-footer {
    background: #f1eae0;
    border-top: 1px solid var(--c-border);
    padding: 2.5rem 0;
    font-size: 0.9375rem;
    color: var(--c-muted);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.site-footer__tagline {
    font-family: var(--f-serif);
    font-size: 1.125rem;
    color: var(--c-text);
    margin: 0;
}

.site-footer__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
}

.site-footer__nav a {
    color: var(--c-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.site-footer__nav a:hover {
    color: var(--c-accent);
    text-decoration: underline;
}

.site-footer__copy {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--c-muted);
}

/* ==== Mobile ==== */

@media (max-width: 640px) {
    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-nav__list {
        gap: 1rem;
    }
    .site-nav a {
        font-size: 0.875rem;
    }
}

/* ==== Hero ==== */

.hero {
    padding: 2rem 0 3rem;
}

.hero__image {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.hero__text {
    max-width: 42rem;
    margin: 0 auto;
    text-align: center;
}

.hero__lead {
    font-size: 1.1875rem;
    color: var(--c-muted);
    margin-bottom: 1.5rem;
}

/* ==== Buttons ==== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-family: var(--f-sans);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: background var(--tr-fast), color var(--tr-fast);
    cursor: pointer;
}

.btn--primary {
    background: var(--c-accent);
    color: var(--c-bg);
}

.btn--primary:hover {
    background: var(--c-accent-hover);
    color: var(--c-bg);
}

/* ==== Section ==== */

.section {
    padding: 3rem 0;
}

.section__title {
    text-align: center;
    margin-bottom: 2rem;
}

.section--about {
    background: #f5efe4;
    text-align: center;
}

.link-arrow {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
    text-decoration: none;
}

.link-arrow:hover {
    text-decoration: underline;
}

/* ==== Card grid ==== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 2rem;
}

.card {
    background: #ffffff;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    overflow: hidden;
    transition: transform var(--tr-fast), box-shadow var(--tr-fast);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card__media img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
    width: 100%;
}

.card__body {
    padding: 1.25rem 1.25rem 1.5rem;
}

.card__date {
    display: block;
    font-size: 0.8125rem;
    color: var(--c-muted);
    margin-bottom: 0.5rem;
}

.card__title {
    font-size: 1.375rem;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.card__excerpt {
    font-size: 0.9375rem;
    color: var(--c-muted);
    margin: 0;
    line-height: 1.55;
}

/* ==== Page (о нас, контакты, статьи) ==== */

.page-content {
    padding: 1rem 1.25rem 3rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--c-border);
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-lead {
    font-size: 1.125rem;
    color: var(--c-muted);
    margin: 0;
    font-style: italic;
    font-family: var(--f-serif);
}

.page-figure {
    margin: 0 -1.25rem 2rem;
}

.page-figure img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.page-content ul,
.page-content ol {
    margin: 0 0 1.5em;
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5em;
}

.page-updated {
    margin-top: 3rem;
    color: var(--c-muted);
    font-size: 0.875rem;
}

@media (min-width: 40rem) {
    .page-figure {
        margin-left: 0;
        margin-right: 0;
    }
}

/* ==== Article ==== */

.article {
    padding: 1rem 1.25rem 3rem;
}

.breadcrumbs {
    font-size: 0.8125rem;
    margin-bottom: 1.5rem;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    color: var(--c-muted);
}

.breadcrumbs li + li::before {
    content: '/';
    margin-right: 0.4rem;
    color: var(--c-border);
}

.breadcrumbs a {
    color: var(--c-muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--c-accent);
    text-decoration: underline;
}

.article__header {
    text-align: center;
    margin-bottom: 2rem;
}

.article__meta {
    font-size: 0.875rem;
    color: var(--c-muted);
    margin-top: 0.75rem;
}

.article__hero {
    margin: 0 -1.25rem 2rem;
}

.article__hero img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

@media (min-width: 40rem) {
    .article__hero {
        margin-left: 0;
        margin-right: 0;
    }
}

.article__lead {
    font-size: 1.1875rem;
    line-height: 1.6;
    color: var(--c-text);
    font-family: var(--f-serif);
    font-style: italic;
    margin-bottom: 2rem;
}

.article__body h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article__body h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article__body ul,
.article__body ol {
    padding-left: 1.5rem;
    margin: 0 0 1.5em;
}

.article__body li {
    margin-bottom: 0.5em;
}

.article__body blockquote {
    margin: 2rem 0;
    padding: 0.5rem 0 0.5rem 1.5rem;
    border-left: 3px solid var(--c-accent);
    font-style: italic;
    color: var(--c-muted);
}

.article__footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--c-border);
    color: var(--c-muted);
    font-size: 0.9375rem;
}
