/* 
  Design System for Ekaterina Oya Website
  Palette: Cream, Almond Green, Dark Grey
*/



:root {
    --color-bg: #F2EFE9;
    --color-accent: #7BA36B;
    --color-text: #3A3A3A;
    --color-white: #FFFFFF;
    --color-header: rgba(242, 239, 233, 0.8);
    --transition-medium: 0.5s ease;
    --spacing-lg: 8rem;
}

html, body {
    height: 100%;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and old Edge */
}

/* Баннер тестового режима сайта */
.test-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1500;
    background: var(--color-accent);
    color: #ffffff;
    text-align: center;
    padding: 6px 15px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02rem;
    font-family: 'Manrope', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: normal;
    line-height: 1.35;
    word-break: break-word;
}

body.has-test-banner header {
    top: 34px !important;
}

body.has-test-banner main {
    padding-top: 34px;
}

/* Chrome, Safari, and Edge */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

/* Улучшенный премиальный стиль для Сфер работы */
.area-card {
    opacity: 1 !important;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 2.2rem 1.8rem;
    border-radius: 16px;
    transition: var(--transition-medium);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

.area-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.area-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: var(--color-accent);
    font-weight: 500;
}

.area-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

.area-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-top: 0.4rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Manrope', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* body.loaded removed to prevent global fade */

/* Botanical Background Layers */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background-color: var(--color-bg);
    background-image: url('../img/texture.png');
    background-blend-mode: multiply;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.background-overlay.ready {
    opacity: 1;
}

.background-overlay.fade-out {
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.botanical-layer {
    position: absolute;
    opacity: 0;
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(0 0 10px rgba(163, 184, 153, 0.1));
}

.botanical-fern {
    width: 60vmax;
    height: 60vmax;
    bottom: -10vmax;
    left: -15vmax;
    background-image: url('../img/fern.png');
    transform: rotate(230deg);
}

.botanical-almond {
    width: 55vmax;
    height: 55vmax;
    top: -10vmax;
    right: -5vmax;
    background-image: url('../img/almond.png');
    transform: rotate(90deg);
}


/* Typography */
h1,
h2,
h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-medium);
}

/* Header & Navigation */
header {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 2000;
    background: var(--color-header);
    backdrop-filter: blur(10px);
    /* Header is always visible */
}

.logo {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    letter-spacing: 0.2rem;
    font-size: 1.5rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 3rem;
}

nav a {
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: var(--transition-medium);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Mobile Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.hamburger span {
    width: 30px;
    height: 1px;
    background-color: var(--color-text);
    transition: var(--transition-medium);
}

/* Page Sections */
section {
    padding: var(--spacing-lg) 5%;
}

main {
    flex: 1;
    transition: opacity 0.3s ease, transform 0.6s ease;
}

main.fade-out {
    opacity: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    gap: 2%;
    /* Reduced gap for a tighter look */
}

.hero-content {
    flex: 1;
    opacity: 0;
    transform: translateY(20px);
}

.hero.ready .hero-content {
    animation: fadeInSlideUp 1.2s forwards;
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    max-width: 500px;
    color: #666;
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background-color: var(--color-accent);
    color: var(--color-white);
    border-radius: 4px;
    font-size: 1rem;
    letter-spacing: 0.05rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    /* Darker shadow */
    transition: var(--transition-medium);
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    /* Aligned to the left context */
    position: relative;
    opacity: 0;
}

.hero.ready .hero-image {
    animation: fadeIn 1.5s 0.3s forwards;
}

.image-mask-container {
    width: 100%;
    max-width: 1000px;
    /* Signficantly increased */
    aspect-ratio: 4/5;
    position: relative;
    margin-left: -30px;
    margin-top: 10px;
    /* Significantly shifted left to be closer to letters */
}

.image-mask-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    /* Flip horizontally */
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}

/* Areas of Work */
.areas {
    background-color: transparent;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 5rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.blog-grid {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: rgba(255, 255, 255, 0.5);
    /* Semi-transparent */
    backdrop-filter: blur(10px);
    /* Glassmorphism effect */
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
    /* 5% darker alpha */
    transition: var(--transition-medium);
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    flex-direction: column;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.card-number {
    display: block;
    color: var(--color-accent);
    font-weight: 300;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    letter-spacing: 0.1rem;
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.card-price {
    margin-top: auto;
    font-weight: 500;
    color: #7BA36B;
}

/* Contact Page Styles */
.contact-container {
    display: flex;
    gap: 5%;
    margin-top: 4rem;
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 1;
    background: rgba(255, 255, 255, 0.6);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(1px);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #888;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #cfdbcd;
    border-radius: 4px;
    font-family: inherit;
}

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

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

.modal {
    display: none;
    position: fixed;
    z-index: 4000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--color-bg);
    margin: 10% auto;
    padding: 2.5rem;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);

    /* Animation: Opacity and Scale (3% smaller) over 400ms */
    animation: modalPop 400ms ease-out forwards;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animations */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsiveness */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        z-index: 4000;
        /* Ensure it's above the nav overlay */
    }

    .hamburger.active span {
        background-color: #7BA36B;
        /* Use brand green for the X icon */
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--color-bg);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        border-left: 1px solid rgba(0, 0, 0, 0.05);
    }

    nav.open {
        right: 0;
    }

    nav ul li a {
        color: #7BA36B;
        font-size: 1.5rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }

    .hero {
        flex-direction: column;
        /* Title first, then image */
        padding-top: 6rem;
        text-align: center;
        gap: 0;
    }

    .hero-content {
        margin-top: 0;
        margin-bottom: 2rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
        /* Smaller font for phones */
        margin-bottom: 1.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-image {
        width: 100%;
        justify-content: center;
    }

    .image-mask-container {
        margin-left: 0;
        margin-top: 0;
        max-width: 100%;
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .article-container {
        padding-left: 0;
        padding-right: 0;
    }

    .contact-info {
        text-align: center;
    }

    .contact-container {
        flex-direction: column;
        gap: 3rem;
    }

    .contact-info,
    .contact-form {
        width: 100%;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .article-section {
        padding: 4rem 5% !important;
    }

    .article-header h1 {
        font-size: 1.8rem !important;
    }

    .glass-modal {
        margin-top: 2rem !important;
        padding: 2rem !important;
    }
}

/* Glass Modal Styles */
.modal-overlay {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8rem 5% 5rem;
    position: relative;
    z-index: 3000;
}

.modal-overlay::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.04);
    z-index: -1;
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    animation: modalBlurIn 1s ease-in-out forwards;
    pointer-events: none;
}

.glass-modal {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    padding: 4rem 5rem;
    max-width: 900px;
    width: 100%;
    height: auto;
    margin-bottom: 4rem;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.04);
    transform: translateY(20px);
    opacity: 0;
    animation:
        cardFadeIn 1s ease-in-out forwards,
        cardSlideUp 1s cubic-bezier(0.33, 1, 0.68, 1) 0.2s forwards;
}

@keyframes modalBlurIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }
}

/* ДОБАВЛЕНО: Новая анимация только для прозрачности карточки */
@keyframes cardFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ЗАМЕНА ЗДЕСЬ: Убрали прозрачность, оставили только движение */
@keyframes cardSlideUp {
    from {
        transform: translateY(20px);
    }

    to {
        transform: translateY(0);
    }
}

/* Article Specific Styles */
.article-section {
    width: 100%;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    text-align: center;
    margin-bottom: 4rem;
}

.article-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    color: var(--color-text);
}

.article-meta {
    font-size: 0.9rem;
    color: var(--color-accent);
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: block;
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #444;
}

.article-content p {
    margin-bottom: 2.5rem;
}

.article-content h2 {
    font-size: 2.2rem;
    margin: 4rem 0 2rem;
    color: var(--color-text);
}

.article-content h3 {
    font-size: 1.6rem;
    margin: 3rem 0 1.5rem;
}

blockquote {
    border-left: 3px solid var(--color-accent);
    padding-left: 2rem;
    margin: 4rem 0;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--color-text);
    line-height: 1.6;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-top: 6rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    color: var(--color-accent);
    font-weight: 500;
}

.back-to-blog:hover {
    transform: translateX(-10px);
}

/* Page Layout */
.page-section {
    padding-top: 10rem;
}

.page-title {
    font-size: 3.5rem;
    margin-bottom: 3rem;
}

/* About Page */
.about-intro {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.2rem;
    line-height: 2;
    color: #555;
}

.about-cards {
    margin-top: 4rem;
}

/* Card Variants */
.card-desc {
    margin-top: 1rem;
    color: #666;
}

.card-link {
    display: block;
    margin-top: 2rem;
    color: var(--color-accent);
}

/* Contact Page */
.contact-intro {
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.contact-label {
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.contact-block {
    margin-bottom: 2rem;
}

.consent-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 2rem;
    width: 100%;
}

.consent-check {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
}

.consent-label {
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.8;
}

.contact-submit {
    width: 100%;
    border: none;
    cursor: pointer;
}

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

/* Modal Elements */
.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.5;
}

.modal-heading {
    margin-bottom: 1.5rem;
}

.modal-body {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.modal-body p + p {
    margin-top: 1rem;
}

/* Post Template */
.header-dimmed {
    opacity: 0.3;
    pointer-events: none;
}

.footer-dimmed {
    opacity: 0.3;
}

/* Privacy Policy Page */
.privacy-container {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 3rem;
}

.privacy-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    margin: 3rem 0 1.5rem;
    color: var(--color-accent);
}

.privacy-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.5rem;
}

.privacy-content ul {
    margin: 1rem 0 1.5rem 1.5rem;
    color: #555;
    line-height: 1.8;
}

.privacy-content li {
    margin-bottom: 0.5rem;
}

.privacy-content a {
    color: var(--color-accent);
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(242, 239, 233, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(123, 163, 107, 0.3);
    gap: 2rem;
}

.cookie-banner-text {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: var(--color-accent);
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-accept {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    background-color: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-medium);
}

.cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 163, 107, 0.3);
}

.cookie-decline {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    background-color: transparent;
    color: #888;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-medium);
}

.cookie-decline:hover {
    border-color: #999;
    color: #555;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem 4%;
    }
}

/* Footer */
.underline {
    text-decoration: underline;
    color: var(--color-accent);
}

.footer-content {
    text-align: center;
    padding: 4rem 5%;
    color: #999;
    font-size: 0.8rem;
    letter-spacing: 0.1rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-links {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

/* Fern shadow overlay — single layer, masked to card shapes via SVG */
.card {
    position: relative;
}

/* Тень папоротника (фоновый слой) */
.fern-shadow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.fern-shadow.ready {
    opacity: 0.25;
}

.fern-shadow.fade-out {
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.fern-shadow-image {
    position: absolute;
    width: 160vmax;
    height: 160vmax;
    top: 50%;
    left: 50%;
    background-image: url('../img/fern-shadow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    mix-blend-mode: multiply;
    animation: fern-sway 20s ease-in-out infinite;
}

@keyframes fern-sway {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    20% {
        transform: translate(calc(-50% + 20px), calc(-50% - 30px)) rotate(2deg);
    }

    45% {
        transform: translate(calc(-50% + 40px), calc(-50% + 35px)) rotate(-1.5deg);
    }

    70% {
        transform: translate(calc(-50% + 25px), calc(-50% - 20px)) rotate(1deg);
    }

    85% {
        transform: translate(calc(-50% + 10px), calc(-50% + 15px)) rotate(-0.5deg);
    }
}

/* Принудительное отображение карточек Сфер работы */
.areas .card,
.areas .area-card,
.area-card {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}