/* Evde Türk Kahvesi Ustası - Ana stiller */
:root {
    --color-bg: #f5f0e8;
    --color-bg-alt: #e8dfd0;
    --color-text: #2c2419;
    --color-accent: #6b4423;
    --color-accent-light: #8b5a2b;
    --color-header: #3d3025;
    --color-footer: #2c2419;
    --font-main: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    --font-heading: 'Lora', Georgia, serif;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
    --transition: 0.3s ease;
    --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-main);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.01em;
}

/* Links - site design */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-header);
    color: #fff;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: color var(--transition);
}

.logo:hover {
    color: var(--color-bg-alt);
}

.nav-list {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.site-header .nav-list a:hover {
    color: var(--color-bg-alt);
    background: rgba(255, 255, 255, 0.08);
}

.nav-list a.is-active {
    font-weight: 600;
    color: #fff;
    background: var(--color-accent-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-list a.is-active:hover {
    color: #fff;
    background: var(--color-accent);
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #fff;
    width: 36px;
    height: 36px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
    opacity: 0;
}

.burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-header);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition);
    }

    .nav.is-open {
        max-height: 320px;
    }

    .nav-list {
        flex-direction: column;
        padding: 1rem 1.25rem;
        gap: 0.5rem;
    }
}

/* Hero */
.hero {
    background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
    padding: 2.5rem 0 3rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 0.75rem;
    color: var(--color-accent);
    line-height: 1.25;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-content {
    flex: 1;
}

.hero-lead {
    font-size: 1.125rem;
    line-height: 1.7;
    margin: 0 0 0;
    max-width: 42ch;
    font-weight: 500;
    color: var(--color-header);
}

.hero-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: block;
}

/* Sections */
.section {
    padding: 2.5rem 0;
    background: var(--color-bg);
}

.section-alt {
    background: var(--color-bg-alt);
}

.section h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-accent);
    margin: 0 0 1rem;
    padding-top: 0.25rem;
    line-height: 1.3;
}

.section h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: var(--color-header);
    line-height: 1.35;
}

.section p {
    margin: 0 0 1rem;
    line-height: 1.75;
    max-width: 65ch;
}

.section-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: var(--radius);
    margin-top: 1.5rem;
    display: block;
    box-shadow: var(--shadow);
}

/* Content + image blocks */
.content-with-img {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    margin: 1.25rem 0;
}

.content-with-img-reverse .content-block {
    order: 2;
}

.content-with-img-reverse .content-img {
    order: 1;
}

.content-block {
    min-width: 0;
}

.content-block p:first-child {
    margin-top: 0;
}

.content-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    object-fit: cover;
}

@media (max-width: 700px) {
    .content-with-img,
    .content-with-img-reverse {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .content-with-img-reverse .content-block,
    .content-with-img-reverse .content-img {
        order: unset;
    }
}

/* Contact + form */
.contact-and-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 1.5rem;
}

.contact-block {
    background: #fff;
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-block h3 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    color: var(--color-accent);
}

.contact-block p {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.contact-block a {
    color: var(--color-accent);
    text-decoration: none;
}

.contact-block a:hover {
    color: var(--color-accent-light);
    text-decoration: underline;
}

.contact-note {
    margin-top: 0.75rem !important;
    font-size: 0.9rem !important;
    color: var(--color-text);
    opacity: 0.9;
}

@media (max-width: 700px) {
    .contact-and-form {
        grid-template-columns: 1fr;
    }
}

/* Lists */
.list-malzemeler {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.list-malzemeler li {
    margin-bottom: 0.5rem;
}

.list-steps {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.list-steps li {
    margin-bottom: 1rem;
}

/* Tables */
.table-responsive {
    width: 100%;
    margin: 1.25rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #fff;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: var(--color-bg-alt);
    border-radius: 0 0 var(--radius) var(--radius);
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--color-accent-light);
    border-radius: 3px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: #fff;
    min-width: 320px;
}

.table-proportions {
    min-width: 380px;
}

.table-errors {
    min-width: 340px;
}

caption {
    text-align: left;
    padding: 0.75rem 1rem 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text);
    caption-side: top;
}

thead {
    background: var(--color-accent);
    color: #fff;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.table-errors td {
    white-space: normal;
}

.table-errors th:nth-child(1),
.table-errors td:nth-child(1) { min-width: 100px; }
.table-errors th:nth-child(2),
.table-errors td:nth-child(2) { min-width: 120px; }
.table-errors th:nth-child(3),
.table-errors td:nth-child(3) { min-width: 120px; }

tbody tr:hover {
    background: #faf8f5;
}

/* Grid tips (2x5) */
.grid-tips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.tip-card {
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    padding-left: 2.5rem;
}

.tip-num {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    background: var(--color-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 600px) {
    .grid-tips {
        grid-template-columns: 1fr;
    }
}

/* Servis grid */
.grid-servis {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.servis-card {
    background: #fff;
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.servis-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.servis-card p {
    margin: 0;
    font-size: 0.95rem;
}

@media (max-width: 600px) {
    .grid-servis {
        grid-template-columns: 1fr;
    }
}

/* FAQ */
.faq-list {
    margin: 1rem 0;
}

.faq-list dt {
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.35rem;
    color: var(--color-header);
}

.faq-list dt:first-child {
    margin-top: 0;
}

.faq-list dd {
    margin: 0 0 0 1rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--color-accent-light);
}

/* Contact form: отдельный блок-карточка */
.form-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(107, 68, 35, 0.12);
}

.form-card-title {
    margin: 0 0 1rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-accent);
}

.contact-form {
    max-width: 100%;
    margin-top: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    background: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.form-group-checkbox input {
    width: auto;
    margin-top: 0.25rem;
}

.form-group-checkbox label {
    margin-bottom: 0;
}

.form-group-checkbox a {
    color: var(--color-accent);
    text-decoration: none;
}

.form-group-checkbox a:hover {
    color: var(--color-accent-light);
    text-decoration: underline;
}

.btn-submit {
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}

.btn-submit:hover {
    background: var(--color-accent-light);
}

.form-feedback {
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.form-feedback.success { color: #2d6a2d; }
.form-feedback.error { color: #b32d2d; }

/* Footer */
.site-footer {
    background: var(--color-footer);
    color: #ccc;
    padding: 2rem 0;
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--color-bg-alt);
    text-decoration: none;
    transition: color var(--transition);
}

.site-footer a:hover {
    color: #f5f0e8;
}

.site-footer p {
    margin: 0 0 0.75rem;
}

.footer-copy {
    margin-top: 1rem;
    font-size: 0.85rem;
    opacity: 0.85;
    text-align: center;
}

/* Policy pages */
.policy-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    color: var(--color-accent);
    margin: 0 0 0.5rem;
}

.policy-content h2 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--color-header);
}

.policy-content h3 {
    font-size: 1.05rem;
    margin: 1rem 0 0.35rem;
    color: var(--color-header);
}

.policy-content ul {
    margin: 0.5rem 0 1rem;
    padding-left: 1.5rem;
}

.policy-content li {
    margin-bottom: 0.35rem;
}

.policy-content a {
    color: var(--color-accent);
    text-decoration: none;
}

.policy-content a:hover {
    color: var(--color-accent-light);
    text-decoration: underline;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--color-header);
    color: #fff;
    padding: 1rem 1.25rem;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-inner {
    max-width: 900px;
    margin: 0 auto;
}

.cookie-banner p {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--color-accent-light);
    color: #fff;
}

.cookie-btn-secondary {
    background: transparent;
    border: 1px solid #fff;
}

.cookie-btn:hover {
    opacity: 0.9;
}

.cookie-settings-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.cookie-settings-panel[hidden] {
    display: none;
}

.cookie-settings-panel label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}


/* Reveal animations: красочное плавное появление (mobile-safe, без cookie banner) */
@media (prefers-reduced-motion: no-preference) {
    body.reveal-ready .hero .hero-inner,
    body.reveal-ready .section .container {
        transition: opacity 0.65s var(--ease-out-soft), transform 0.65s var(--ease-out-soft), box-shadow 0.65s var(--ease-out-soft);
    }

    body.reveal-ready .hero:not(.revealed) .hero-inner,
    body.reveal-ready .section:not(.revealed) .container {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
        box-shadow: 0 24px 48px -12px rgba(107, 68, 35, 0.25);
    }

    body.reveal-ready .hero.revealed .hero-inner,
    body.reveal-ready .section.revealed .container {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: none;
    }

    body.reveal-ready .section-alt:not(.revealed) .container {
        box-shadow: 0 24px 48px -12px rgba(139, 90, 43, 0.2);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero .hero-inner,
    .section .container {
        opacity: 1;
        transform: none;
        transition: none;
        box-shadow: none;
    }
}

/* Toast: адаптивное уведомление сверху справа после отправки формы */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 300;
    max-width: min(360px, calc(100vw - 2rem));
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.35s var(--ease-out-soft), transform 0.35s var(--ease-out-soft);
    pointer-events: none;
}

.toast[hidden] {
    display: block !important;
    visibility: hidden;
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.toast.is-success {
    background: linear-gradient(135deg, #2d5a2d 0%, #3d6b3d 100%);
    color: #fff;
    border-left: 4px solid #4a9c4a;
}

.toast.is-error {
    background: linear-gradient(135deg, #8b2d2d 0%, #a03d3d 100%);
    color: #fff;
    border-left: 4px solid #c94a4a;
}

@media (max-width: 480px) {
    .toast {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
        max-width: none;
        transform: translateY(-100%);
    }
    .toast.is-visible {
        transform: translateY(0);
    }
}
