:root{
    --bg: #14150F;
    --bg-alt: #1B1D15;
    --ink: #F3F1E7;
    --ink-dim: #A9AD98;
    --moss: #8FBF5C;
    --moss-deep: #5C7A3B;
    --gold: #C79A4B;
    --line: rgba(243,241,231,0.14);
    --card: rgba(255,255,255,0.035);
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

html, body{
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Work Sans", sans-serif;
    font-weight: 400;
    line-height: 1.65;
}

body{
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Ambient dziļuma slāņi */
.field{
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 55% 40% at 12% 100%, rgba(143,191,92,0.10), transparent),
        radial-gradient(ellipse 45% 35% at 92% 0%, rgba(199,154,75,0.09), transparent);
}

.grain{
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 3px 3px;
}

/* Logotips - lietots navigācijā, herojā un footerī */
.logo{
    display: inline-flex;
    align-items: flex-end;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.blades{
    display: inline-flex;
    align-items: flex-end;
    gap: 4px;
    color: var(--moss);
}

.blades-svg{ display: block; }

.panicle{
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: sway 3.6s ease-in-out infinite;
}

.panicle-1{ animation-delay: 0s; }
.panicle-2{ animation-delay: 0.5s; }
.panicle-3{ animation-delay: 0.9s; }

@keyframes sway{
    0%, 100%{ transform: rotate(-6deg); }
    50%{ transform: rotate(5deg); }
}

.wordmark{
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1;
}

.suffix{
    color: var(--gold);
    font-weight: 500;
}

.logo-sm .wordmark{ font-size: 1.05rem; }

.logo-lg{ margin-bottom: 0.6rem; }
.logo-lg .wordmark{ font-size: clamp(2.6rem, 8vw, 4.2rem); }

/* Navigācija */
.nav{
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(to bottom, rgba(20,21,15,0.9), rgba(20,21,15,0));
    backdrop-filter: blur(6px);
    animation: fade-down 0.7s ease-out both;
}

.lang-switch{
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: "Work Sans", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.lang-switch a{
    color: var(--ink-dim);
    text-decoration: none;
    padding: 0.2rem 0.3rem;
    transition: color 0.2s ease;
}

.lang-switch a:hover{
    color: var(--ink);
}

.lang-switch a.active{
    color: var(--moss);
    font-weight: 600;
}

.lang-sep{
    color: var(--line);
}

@keyframes fade-down{
    from{ opacity: 0; transform: translateY(-10px); }
    to{ opacity: 1; transform: translateY(0); }
}

.page{
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 1.5rem 4rem;
}

.hero{
    text-align: center;
    margin-bottom: 3rem;
    animation: rise 0.8s ease-out both;
}

@keyframes rise{
    from{ opacity: 0; transform: translateY(16px); }
    to{ opacity: 1; transform: translateY(0); }
}

h1{
    font-family: "Lora", serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(2rem, 5.5vw, 2.8rem);
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.message{
    text-align: center;
    font-size: 1.1rem;
    color: var(--ink-dim);
    max-width: 480px;
    margin: 0 auto;
    animation: rise 0.9s ease-out 0.1s both;
}

.message p{ margin: 0 0 0.9rem; }

.message .wait{
    font-family: "Lora", serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--moss);
    margin-top: 1.6rem;
}

.divider{
    height: 1px;
    background: linear-gradient(to right, transparent, var(--line) 20%, var(--line) 80%, transparent);
    margin: 3.5rem auto;
    width: 100%;
    position: relative;
    transform: scaleX(0);
    animation: grow 1s ease-out 0.2s forwards;
}

@keyframes grow{
    to{ transform: scaleX(1); }
}

.divider::after{
    content: "";
    position: absolute;
    left: calc(50% - 3.5px);
    top: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse{
    0%, 100%{ opacity: 0.55; transform: scale(1); }
    50%{ opacity: 1; transform: scale(1.35); }
}

.cta-wrap{
    display: flex;
    justify-content: center;
    animation: rise 0.9s ease-out 0.2s both;
}

.cta-button{
    font-family: "Work Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--bg);
    background: var(--moss);
    border: none;
    padding: 0.95rem 2.6rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover{
    background: #A2D46B;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -8px rgba(143,191,92,0.5);
}

.cta-button:focus-visible{
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.contact{
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(6px);
    animation: rise 0.9s ease-out 0.2s both;
}

.contact h2{
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    text-align: center;
    margin: 0 0 1.8rem;
    color: var(--ink);
}

.notice{
    text-align: center;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.notice-ok{
    background: rgba(143,191,92,0.12);
    color: var(--moss);
    border: 1px solid rgba(143,191,92,0.25);
}

.notice-err{
    background: rgba(224,110,90,0.1);
    color: #E08E7E;
    border: 1px solid rgba(224,110,90,0.25);
}

.contact-form{
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.row{
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

label{
    font-size: 0.82rem;
    color: var(--ink-dim);
    letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"],
textarea{
    font-family: "Work Sans", sans-serif;
    font-size: 1rem;
    color: var(--ink);
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--line);
    padding: 0.55rem 0.1rem;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus{
    outline: none;
    border-bottom-color: var(--moss);
    box-shadow: 0 4px 14px -6px rgba(143,191,92,0.4);
}

input::placeholder,
textarea::placeholder{ color: rgba(169,173,152,0.5); }

/* Pretspama slazds - vizuāli paslēpts, bet pieejams robotiem */
.trap{
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

button[type="submit"]{
    align-self: center;
    margin-top: 0.6rem;
    font-family: "Work Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--bg);
    background: var(--moss);
    border: none;
    padding: 0.9rem 2.3rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button[type="submit"]:hover{
    background: #A2D46B;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -8px rgba(143,191,92,0.5);
}

button[type="submit"]:active{
    transform: translateY(0);
}

button[type="submit"]:focus-visible{
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.foot{
    display: flex;
    justify-content: center;
    margin-top: 4rem;
    opacity: 0.7;
}

.foot .wordmark{ font-size: 0.9rem; }

.confirm-card{
    max-width: 440px;
    margin: 4rem auto 0;
    position: relative;
}

.confirm-intro{
    text-align: center;
    color: var(--ink-dim);
    font-size: 0.98rem;
    margin: 0 0 1.8rem;
}

.confirm-timer{
    text-align: center;
    color: var(--ink-dim);
    font-size: 0.82rem;
    margin: 1.5rem 0 0;
}

.confirm-timer #countdown{
    color: var(--gold);
    font-weight: 600;
}

.thankyou{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 6rem;
    text-align: center;
    animation: rise 0.6s ease-out both;
    position: relative;
}

.thankyou .blades{
    justify-content: center;
}

.thankyou .notice{
    font-size: 1.05rem;
    padding: 1rem 1.5rem;
}

/* Pop-up kontaktforma */
dialog#contactModal{
    border: none;
    padding: 0;
    background: transparent;
    max-width: 460px;
    width: 90%;
    border-radius: 20px;
    overflow: visible;
}

dialog#contactModal::backdrop{
    background: rgba(10,11,7,0.72);
    backdrop-filter: blur(3px);
}

dialog#contactModal[open]{
    animation: modal-in 0.25s ease-out;
}

@keyframes modal-in{
    from{ opacity: 0; transform: scale(0.96); }
    to{ opacity: 1; transform: scale(1); }
}

.modal-inner{
    position: relative;
    animation: none;
}

.modal-close{
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    background: none;
    border: none;
    color: var(--ink-dim);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.4rem;
    transition: color 0.2s ease;
}

.modal-close:hover{ color: var(--ink); }

.page-close{
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (prefers-reduced-motion: reduce){
    html{ scroll-behavior: auto; }
    .panicle,
    .nav,
    .hero,
    .message,
    .divider,
    .divider::after,
    .contact,
    .cta-wrap,
    dialog#contactModal[open]{
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

@media (max-width: 480px){
    .page{ padding: 2.5rem 1.25rem 3rem; }
    .nav{ padding: 1rem 1.25rem; }
    .contact{ padding: 2rem 1.25rem; border-radius: 16px; }
    h1{ font-size: 1.9rem; }
}
