:root {
    --color-primary: #1abc9c;
    --color-secondary: #16a085;
    --color-accent: #e67e22;
    --color-bg: #ecfdf9;
    --color-bg-alt: #d5f5ef;
    --color-text: #1a3a34;
    --color-text-light: #4a6b64;
    --color-border: #b8e6db;
    --color-surface: #f4fffb;
    --ems-header-h: 72px;
    --ems-page-w: 1120px;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.75rem;
    --space-xl: 3rem;
    --font-head: "Urbanist", sans-serif;
    --font-body: "Karla", sans-serif;
    --radius: 14px;
    --neu-light: #ffffff;
    --neu-dark: #c5e8df;
}

@media (max-width: 768px) {
    :root { --ems-header-h: 64px; }
}

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

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.65;
}

body {
    padding-top: var(--ems-header-h);
}

html { scroll-padding-top: var(--ems-header-h); }

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 12% 20%, rgba(26, 188, 156, 0.18), transparent 45%),
        radial-gradient(ellipse at 88% 10%, rgba(230, 126, 34, 0.12), transparent 40%),
        linear-gradient(180deg, transparent 0%, rgba(22, 160, 133, 0.04) 100%);
    opacity: 0.9;
}

main, .EmsHeader, .EmsFooter, .EmsDrawer, .EmsOverlay, .EmsCookie {
    position: relative;
    z-index: 1;
}

[hidden] { display: none !important; }

img, video, iframe {
    max-width: 100%;
    height: auto;
}

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

h1, h2, h3, .EmsSection-title, .EmsHero-title {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.EmsContainer {
    max-width: var(--ems-page-w);
    margin: 0 auto;
    padding: 0 20px;
}

.EmsMeasure { max-width: 760px; }

.EmsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .EmsGrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .EmsGrid { grid-template-columns: 1fr; }
}

.EmsHeader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: var(--ems-header-h);
    background: var(--color-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.EmsHeader a,
.EmsHeader a:visited {
    color: var(--color-text);
    text-decoration: none;
}

.EmsHeader-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--ems-header-h);
}

.EmsHeader-logo img {
    width: 180px;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .EmsHeader-logo img { width: 120px; }
}

.EmsNav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
}

.EmsNav-link {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
}

.EmsNav-link.is-active {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.EmsBurger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}

.EmsBurger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--color-text);
    border-radius: 1px;
}

.EmsOverlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}

.EmsDrawer {
    display: block;
    position: fixed;
    z-index: 210;
    background: var(--color-bg);
    overflow-y: auto;
    visibility: hidden;
    transition: transform .3s ease, opacity .3s ease, visibility .3s;
}

.EmsDrawer--narrow {
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(75vw, 320px);
    padding: 64px 0 20px;
    transform: translateX(100%);
}

.EmsDrawer--narrow a {
    display: block;
    padding: 10px 20px;
    font-size: 0.95rem;
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 600;
}

.EmsDrawer--narrow .EmsBtn {
    margin: 16px 20px;
    width: calc(100% - 40px);
    justify-content: center;
}

.EmsDrawer-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--color-text);
}

body.nav-open { overflow: hidden; }
body.nav-open .EmsOverlay { opacity: 1; visibility: visible; }
body.nav-open .EmsDrawer--narrow {
    transform: translateX(0);
    visibility: visible;
}

@media (max-width: 768px) {
    .EmsNav { display: none; }
}

.EmsBtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-secondary);
    background: transparent;
    border: 0;
    padding: 0.35rem 0;
    cursor: pointer;
    text-decoration: none;
    position: relative;
}

.EmsBtn::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.EmsBtn:hover::after,
.EmsBtn:focus-visible::after {
    transform: scaleX(1);
}

.EmsBtn--primary {
    color: var(--color-accent);
}

.EmsBleed {
    background: linear-gradient(135deg, #0d3d36 0%, #1abc9c 45%, #0a2f2a 100%);
    color: #ecfdf9;
    padding: var(--space-xl) 0;
}

.EmsBleed .EmsSection-title,
.EmsBleed .EmsHero-title,
.EmsBleed h2,
.EmsBleed h3 {
    color: #ecfdf9;
}

.EmsBleed p,
.EmsBleed .EmsLead {
    color: rgba(236, 253, 249, 0.92);
}

.EmsBleed-alt {
    background: var(--color-bg-alt);
    padding: var(--space-xl) 0;
}

.EmsHero {
    padding: calc(var(--space-xl) + 8px) 0 var(--space-xl);
}

.EmsHero-title {
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    max-width: 18ch;
    margin: 0 0 var(--space-md);
}

.EmsHero-text {
    max-width: 52ch;
    margin: 0 0 var(--space-lg);
}

.EmsHero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: var(--space-lg);
}

.EmsHero .EmsBtn {
    color: #ecfdf9;
}

.EmsHero .EmsBtn--primary {
    color: #ffd7a8;
}

.EmsHero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    list-style: none;
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(236, 253, 249, 0.25);
    font-size: 0.92rem;
}

.EmsHero-facts li {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.15), -3px -3px 8px rgba(255, 255, 255, 0.08);
}

.EmsNote,
.EmsShots,
.EmsArticles,
.EmsPage {
    padding: var(--space-xl) 0;
}

.EmsSection-title {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    margin: 0 0 var(--space-md);
}

.EmsLead {
    color: var(--color-text-light);
    margin: 0 0 var(--space-lg);
}

.EmsApp {
    padding: var(--space-xl) 0;
}

.EmsApp-badges {
    font-family: var(--font-head);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin: 0 0 var(--space-md);
}

.EmsApp-head {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: var(--space-md);
}

.EmsApp-icon {
    width: 96px;
    height: 96px;
    border-radius: 22%;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 8px 8px 16px var(--neu-dark), -6px -6px 14px var(--neu-light);
}

.EmsApp-name {
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.EmsApp-dev {
    margin: 0;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.EmsApp-facts {
    margin: 0 0 var(--space-md);
    padding-left: 1.2rem;
}

.EmsApp-facts li { margin-bottom: 0.35rem; }

.EmsApp-note,
.EmsApp-checked {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.EmsApp-checked {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--color-secondary);
}

.EmsShots-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 900px) {
    .EmsShots-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .EmsShots-strip { grid-template-columns: 1fr; }
}

.EmsShots-item {
    margin: 0;
    padding: 12px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: 6px 6px 14px var(--neu-dark), -5px -5px 12px var(--neu-light);
}

.EmsShots-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.EmsFeature {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.25);
}

.EmsFeature h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.EmsFeature p {
    margin: 0;
    font-size: 0.98rem;
}

.EmsCard {
    display: block;
    text-decoration: none;
    color: var(--color-text);
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 8px 8px 18px var(--neu-dark), -6px -6px 14px var(--neu-light);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.EmsCard:hover {
    transform: translateY(-4px);
    color: var(--color-text);
}

.EmsCard-band {
    height: 72px;
}

.EmsCard-band--a {
    background: linear-gradient(120deg, #1abc9c, #0d3d36);
}
.EmsCard-band--b {
    background: linear-gradient(120deg, #e67e22, #1abc9c);
}
.EmsCard-band--c {
    background: linear-gradient(120deg, #16a085, #e67e22);
}

.EmsCard h2,
.EmsCard h3 {
    margin: 14px 16px 8px;
    font-size: 1.15rem;
}

.EmsCard p {
    margin: 0 16px 18px;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.EmsCta {
    text-align: left;
}

.EmsPage h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 var(--space-md);
}

.EmsPage h2 {
    font-size: 1.25rem;
    margin: var(--space-lg) 0 var(--space-sm);
}

.EmsContact-card {
    padding: 18px;
    margin: 0 0 var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: 6px 6px 14px var(--neu-dark), -5px -5px 12px var(--neu-light);
}

.EmsForm {
    display: grid;
    gap: 10px;
}

.EmsForm-label {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
}

.EmsForm-input {
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: inset 4px 4px 8px var(--neu-dark), inset -3px -3px 6px var(--neu-light);
    font: inherit;
    color: var(--color-text);
}

.EmsFaq-item {
    margin-bottom: 10px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: 5px 5px 12px var(--neu-dark), -4px -4px 10px var(--neu-light);
    overflow: hidden;
}

.EmsFaq-q {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    cursor: pointer;
}

.EmsFaq-a {
    padding: 0 16px 14px;
    color: var(--color-text-light);
}

.EmsFaq-a:not([hidden]) { display: block; }

.EmsLog {
    padding-left: 1.2rem;
}

.EmsLog-date {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0 0 4px;
}

.EmsCrumb {
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    color: var(--color-text-light);
}

.EmsCrumb a { text-decoration: none; }

.EmsFooter {
    background: #0d3d36;
    color: #d5f5ef;
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: var(--space-xl);
}

.EmsFooter a,
.EmsFooter a:visited {
    color: #ecfdf9;
    text-decoration: none;
}

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

.EmsFooter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (max-width: 900px) {
    .EmsFooter-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .EmsFooter-grid { grid-template-columns: 1fr; }
}

.EmsFooter-heading {
    font-family: var(--font-head);
    font-weight: 700;
    margin: 0 0 10px;
    color: #fff;
}

.EmsFooter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.EmsFooter-list li { margin-bottom: 6px; }

.EmsFooter-link {
    background: none;
    border: 0;
    padding: 0;
    color: #ecfdf9;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.EmsFooter-disclaimer {
    font-size: 0.88rem;
    opacity: 0.85;
    margin: 0 0 12px;
}

.EmsFooter-copy {
    font-size: 0.88rem;
    opacity: 0.75;
    margin: 0;
}

.EmsCookie {
    display: none;
}

.EmsCookie:not([hidden]) {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 110;
    gap: 12px;
    bottom: 16px;
    right: 16px;
    max-width: 360px;
    padding: 16px;
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: var(--radius);
    box-shadow: 10px 10px 24px rgba(13, 61, 54, 0.25), -4px -4px 12px rgba(255, 255, 255, 0.8);
}

.EmsCookie p { margin: 0; font-size: 0.92rem; }

.EmsCookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

@media (max-width: 480px) {
    .EmsCookie:not([hidden]) {
        left: 12px;
        right: 12px;
        max-width: none;
    }
    .EmsCookie-actions .EmsBtn {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .EmsNote,
    .EmsApp,
    .EmsShots,
    .EmsFeatures,
    .EmsArticles,
    .EmsCta {
        animation: emsRise 0.55s ease both;
    }
}

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