/* Small accessibility and form-state additions. Original design lives in style.css. */
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.form-honeypot { display: none !important; }
.form-status { font-size: 0.875rem; line-height: 1.6; }
.form-status:empty { display: none; }
.form-status:not(:empty) { margin-top: 1rem; }
.form-status[data-state="error"] { color: #a52b25; }
.form-status[data-state="success"] { color: #23633c; }
button:disabled { cursor: not-allowed; }
button.modal-close { background: transparent; border: 0; font-family: inherit; line-height: inherit; }
button.works-overlay-close, button.works-overlay-nav { border: 0; font-family: inherit; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
/* The source's 12-column footer creates 352px of grid gaps on narrow phones. */
@media (max-width: 374px) {
    .footer-contact__info, .footer-contact__form { grid-column: 1 / -1; min-width: 0; }
}

.form-group input:focus-visible, .form-group textarea:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

/* Replacement portrait: keep the original card frame and show the entire face. */
.team-card__photo--sofia {
    background-image: url('../images/sofia-bykova.webp');
    background-size: cover;
    background-position: center 20%;
}
.team-card__photo .sofia-portrait {
    width: 82%;
    height: 100%;
    margin-inline: auto;
    object-fit: cover;
    object-position: center 16%;
}

/* Estonian compound words need room on small screens; the copy stays unchanged. */
html[lang="et"] .hero h1,
html[lang="et"] .service-card__title { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 480px) {
    html[lang="et"] .hero h1 { font-size: clamp(2rem, 10vw, 3rem); }
}

/* A lightweight poster is visible before video starts and when playback is unavailable. */
.hero { background-image: url('../images/hero-home.webp'); background-size: cover; background-position: center; }
.hero-video { opacity: 0; }
.media-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7); background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 1rem; z-index: 5; }
.media-toggle:hover { background: rgba(0,0,0,.8); }
.hero-video-toggle { position: absolute; right: 1rem; bottom: 1rem; }
.about-autoplay-toggle { position: absolute; right: 1rem; bottom: 1rem; z-index: 5; }
.slider-slide { background-color: #292929; }
html { scroll-padding-top: 95px; }
@media (max-width: 360px) {
    nav .logo { font-size: 1rem; letter-spacing: .16em; white-space: nowrap; }
}
/* Long English copy must remain reachable even on a 320px-wide phone. */
@media (max-width: 480px) {
    body:not(.works-page) .hero { height: auto; min-height: 100vh; min-height: 100svh; }
}
