/* JME Industrial Controls — Company portal (VPS) */

:root {
    --bg: #f4f7f9;
    --bg-dark: #0a1219;
    --surface: #ffffff;
    --surface-2: #eef3f6;
    --surface-dark: #101821;
    --border: #d5e0e7;
    --border-dark: #263441;
    --text: #15232d;
    --text-on-dark: #edf3f7;
    --muted: #5c6f7a;
    --muted-on-dark: #8fa0ae;
    --green: #1fa873;
    --green-bright: #2fd18f;
    --green-soft: #e6f7f0;
    --blue: #2b6f9a;
    --blue-soft: #e7f1f7;
    --amber: #c4841d;
    --amber-soft: #f8efdf;
    --slate: #3d5160;
    --header-h: 72px;
    --max: 1140px;
    --font-display: "Barlow Condensed", "Segoe UI", sans-serif;
    --font-body: "Source Sans 3", "Segoe UI", sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --shadow: 0 12px 32px rgba(21, 35, 45, 0.08);
    --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3, p { margin-top: 0; }

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--green);
    color: #06130e;
    font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ——— Header ——— */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    border-bottom: 1px solid rgba(213, 224, 231, 0.85);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-header--dark {
    border-bottom-color: rgba(38, 52, 65, 0.8);
    background: rgba(10, 18, 25, 0.92);
}

.site-header__inner {
    max-width: var(--max);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 34px;
    height: 34px;
    padding: 6px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
    border-radius: 8px;
    color: #06130e;
    background: linear-gradient(145deg, var(--green-bright), var(--green));
    box-shadow: 0 0 18px rgba(31, 168, 115, 0.22);
}

.brand-mark span {
    width: 6px;
    display: block;
    background: currentColor;
    border-radius: 1px 1px 0 0;
}
.brand-mark span:nth-child(1) { height: 50%; }
.brand-mark span:nth-child(2) { height: 90%; }
.brand-mark span:nth-child(3) { height: 68%; }

.site-brand__copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-brand__copy strong {
    font-family: var(--font-display);
    font-size: 1.42rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.15;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-header--dark .site-brand__copy strong { color: var(--text-on-dark); }

.site-brand__copy small {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.site-header--dark .site-brand__copy small { color: var(--muted-on-dark); }

.site-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    border: 1px solid transparent;
    background: transparent;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.site-header--dark .site-nav a { color: var(--muted-on-dark); }

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
    color: var(--text);
    background: rgba(21, 35, 45, 0.05);
}

.site-header--dark .site-nav a:hover,
.site-header--dark .site-nav a:focus-visible,
.site-header--dark .site-nav a.is-active {
    color: var(--text-on-dark);
    background: rgba(255, 255, 255, 0.06);
}

.site-nav a.nav-login {
    margin-left: 0;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
}

.site-nav a.nav-logout {
    margin-left: 0;
    color: #b94040;
    background: transparent;
    border: 1px solid transparent;
}

.site-nav a.nav-logout:hover,
.site-nav a.nav-logout:focus-visible {
    color: #b94040;
    background: rgba(185, 64, 64, 0.06);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.site-header--dark .nav-toggle { border-color: var(--border-dark); }

.nav-toggle span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ——— Buttons ——— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
    color: #06130e;
    background: linear-gradient(145deg, var(--green-bright), var(--green));
    box-shadow: 0 10px 24px rgba(31, 168, 115, 0.22);
}
.btn--primary:hover { box-shadow: 0 14px 28px rgba(31, 168, 115, 0.3); }

.btn--ghost {
    color: var(--text);
    border-color: rgba(21, 35, 45, 0.18);
    background: transparent;
}
.btn--ghost:hover {
    border-color: var(--slate);
    background: rgba(21, 35, 45, 0.04);
}

.btn--outline {
    color: var(--text);
    border-color: var(--border);
    background: var(--surface);
}
.btn--outline:hover {
    border-color: var(--slate);
    box-shadow: var(--shadow);
}

.btn--blue {
    color: #fff;
    background: linear-gradient(145deg, #3a86b5, var(--blue));
}
.btn--amber {
    color: #1f1508;
    background: linear-gradient(145deg, #e0a84a, var(--amber));
}

/* ——— Hero ——— */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    color: var(--text);
    background: #ffffff;
}

.hero__atmosphere {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 65% 55% at 78% 30%, rgba(31, 168, 115, 0.10), transparent 55%),
        radial-gradient(ellipse 45% 40% at 12% 78%, rgba(43, 111, 154, 0.10), transparent 50%),
        linear-gradient(165deg, #ffffff 0%, #f7fafc 48%, #eef3f6 100%);
}

.hero__grid {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image:
        linear-gradient(rgba(61, 81, 96, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61, 81, 96, 0.12) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 75% 70% at 60% 45%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 75% 70% at 60% 45%, #000 20%, transparent 75%);
}

.hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}
.hero__glow--a {
    width: 280px; height: 280px; right: 12%; top: 18%;
    background: rgba(31, 168, 115, 0.12);
    animation: glow-drift 12s ease-in-out infinite alternate;
}
.hero__glow--b {
    width: 220px; height: 220px; left: 8%; bottom: 12%;
    background: rgba(43, 111, 154, 0.12);
    animation: glow-drift 14s ease-in-out infinite alternate-reverse;
}

.hero__layout {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 56px 24px 64px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px 48px;
    align-items: center;
}

.hero__eyebrow {
    margin: 0 0 14px;
    color: var(--green);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero__copy h1 {
    margin: 0 0 18px;
    max-width: 13ch;
    font-family: var(--font-display);
    font-size: clamp(2.55rem, 5.4vw, 4.1rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hero__lead {
    margin: 0 0 28px;
    max-width: 40ch;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__stage { display: flex; justify-content: center; align-items: center; }

.hardware-scene { position: relative; width: min(100%, 480px); }
.hardware-scene__svg { width: 100%; height: auto; overflow: visible; }

.ring--outer { transform-origin: 260px 260px; animation: spin-slow 48s linear infinite; }
.ring--mid { transform-origin: 260px 260px; animation: spin-slow 64s linear infinite reverse; }
.part--nut { transform-origin: 260px 218px; animation: nut-settle 7s ease-in-out infinite; }
.part--bolt { transform-origin: 380px 340px; animation: bolt-float 6.5s ease-in-out infinite; }
.part--washer { transform-origin: 118px 360px; animation: washer-pulse 5.5s ease-in-out infinite; }

/* ——— Sections ——— */
.section {
    padding: 88px 0;
    position: relative;
}

.section--light { background: var(--surface); color: var(--text); }
.section--mist { background: var(--surface-2); color: var(--text); }
.section--green { background: linear-gradient(160deg, #e8f7f1 0%, #f3fbf7 55%, #e6f4ee 100%); color: var(--text); }
.section--blue { background: linear-gradient(155deg, #e8f1f7 0%, #f3f7fa 50%, #e7eef4 100%); color: var(--text); }
.section--amber { background: linear-gradient(160deg, #f8efdf 0%, #fbf6ec 55%, #f4ead9 100%); color: var(--text); }
.section--slate { background: var(--surface-2); color: var(--text); }

.section__head {
    max-width: 640px;
    margin: 0 auto 48px;
    text-align: center;
}

.section__head--left {
    margin-left: 0;
    text-align: left;
}

.eyebrow {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green);
}

.section--green .eyebrow,
.section--blue .eyebrow,
.section--amber .eyebrow,
.section--slate .eyebrow { color: var(--green); }

.section__head h2 {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.6vw, 2.85rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.05;
}

.page-hero h1 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.1;
}

.section__head p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.page-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.page-hero .eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    letter-spacing: 0.14em;
}

.section--green .section__head p,
.section--blue .section__head p,
.section--amber .section__head p,
.section--slate .section__head p,
.section--green .lede,
.section--blue .lede { color: var(--muted); }

/* Intro split */
.split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: center;
}

.split--reverse { grid-template-columns: 0.95fr 1.05fr; }
.split--reverse .split__media { order: -1; }

.split__media {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 320px;
    box-shadow: var(--shadow);
}

.split__media img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.split:hover .split__media img { transform: scale(1.03); }

.split__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(10, 18, 25, 0.35));
    pointer-events: none;
}

.split__copy h2 {
    margin-bottom: 14px;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
}

.split__copy .lede {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 1.05rem;
}

.checklist {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.checklist li {
    position: relative;
    padding: 8px 0 8px 28px;
    color: var(--slate);
}

.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--green);
    box-shadow: 0 0 0 4px var(--green-soft);
}

/* Feature cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

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

.feature-card,
.product-card,
.price-card,
.app-card {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.feature-card:hover,
.product-card:hover,
.price-card:hover,
.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(21, 35, 45, 0.12);
}

.feature-card {
    padding: 28px 24px;
    background: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow);
    color: var(--text);
}

.feature-card:hover {
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(21, 35, 45, 0.12);
}

.feature-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
}

.feature-card h3,
.product-card h3,
.price-card h3,
.app-card h3 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 1.45rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.feature-card p,
.product-card p,
.price-card p,
.app-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.product-card p,
.price-card p,
.app-card p,
.product-card .meta { color: var(--muted); }

.product-card__media,
.app-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #d9e3ea;
}

.product-card__media img,
.app-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.product-card:hover .product-card__media img,
.app-card:hover .app-card__media img { transform: scale(1.05); }

.product-card__body,
.app-card__body,
.price-card__body {
    padding: 22px 20px 24px;
}

.product-card .meta {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
}

.app-card .meta { color: var(--amber); }

/* Solutions band */
.solutions-band {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 28px;
    align-items: stretch;
}

.solutions-band__panel {
    border-radius: var(--radius);
    padding: 36px 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.solutions-band__panel h2 {
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.solutions-band__panel p {
    margin: 0 0 22px;
    color: var(--muted);
}

.solutions-mosaic {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: 1fr 1fr;
    gap: 14px;
    min-height: 360px;
}

.solutions-mosaic figure {
    margin: 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.solutions-mosaic figure:first-child { grid-row: 1 / span 2; }

.solutions-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 160px;
}

.solutions-mosaic figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(10, 18, 25, 0.72);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* CTA */
.cta {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 28px;
    align-items: center;
    padding: 40px;
    border-radius: calc(var(--radius) + 4px);
    background:
        linear-gradient(120deg, rgba(31, 168, 115, 0.08), transparent 40%),
        var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.cta h2 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    text-transform: uppercase;
}

.cta p { margin: 0; color: var(--muted); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* Page hero (inner pages) */
.page-hero {
    padding: 28px 0 22px;
    background:
        radial-gradient(ellipse 60% 80% at 90% 0%, rgba(47, 209, 143, 0.12), transparent 50%),
        var(--bg-dark);
    color: var(--text-on-dark);
}

.page-hero p { color: var(--muted-on-dark); max-width: 52ch; }

/* Below black hero: same light page background as Home */
.page-hero + .section {
    background: var(--bg);
}

/* Pricing */
.price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 12px;
}

.price-card {
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    background: var(--surface);
}

.price-card--featured {
    border-color: rgba(31, 168, 115, 0.45);
    box-shadow: 0 16px 40px rgba(31, 168, 115, 0.12);
    position: relative;
}

.price-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.price-card .price-label {
    margin: 8px 0 18px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
}

.price-card ul {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    flex: 1;
}

.price-card li {
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.95rem;
}

.price-note {
    margin-top: 28px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Login */
.login-page {
    min-height: calc(100vh - var(--header-h) - 70px);
    display: grid;
    place-items: center;
    padding: 28px 24px;
    background:
        radial-gradient(ellipse 50% 40% at 20% 20%, rgba(47, 209, 143, 0.1), transparent 50%),
        radial-gradient(ellipse 45% 35% at 85% 75%, rgba(43, 111, 154, 0.1), transparent 50%),
        var(--bg);
}

.login-card {
    width: min(100%, 420px);
    padding: 18px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.login-card__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.login-card h1 {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.login-card .login-sub {
    margin: 0 0 12px;
    color: var(--muted);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.field span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--slate);
}

.field input {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font: inherit;
}

.field input:focus {
    outline: 2px solid rgba(31, 168, 115, 0.35);
    border-color: var(--green);
}

.login-show {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.login-card .btn { width: 100%; }
.login-back {
    display: block;
    margin-top: 10px;
    text-align: center;
    color: var(--blue);
    font-weight: 600;
    font-size: 0.92rem;
}
.login-back:hover { text-decoration: underline; }

.login-note {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

/* Contact / About helpers */
.content-panel {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.content-panel h2 {
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 1.7rem;
    text-transform: uppercase;
}

.content-panel p { color: var(--muted); }
.content-panel dl { margin: 20px 0 0; }
.content-panel dt {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate);
}
.content-panel dd {
    margin: 4px 0 14px;
    color: var(--text);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: #0f1821;
    color: var(--muted-on-dark);
}

.site-footer__grid {
    max-width: var(--max);
    margin: 0 auto;
    padding: 40px 24px 28px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.site-footer strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-on-dark);
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-footer p { margin: 0; font-size: 0.92rem; max-width: 36ch; }

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li { margin-top: 8px; }

.site-footer a {
    color: var(--muted-on-dark);
    font-size: 0.92rem;
    transition: color 0.2s;
}
.site-footer a:hover { color: var(--green-bright); }

.site-footer__bar {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 24px 22px;
    border-top: 1px solid rgba(38, 52, 65, 0.8);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.85rem;
    color: #647583;
}

/* ——— Devices nav link ——— */
.site-nav a.nav-devices {
    margin-left: 0;
    color: var(--muted);
    border: 1px solid transparent;
    background: transparent;
}

.site-nav a.nav-devices:hover,
.site-nav a.nav-devices:focus-visible {
    color: var(--text);
    background: rgba(21, 35, 45, 0.05);
    border-color: transparent;
}

.site-nav a.nav-login.is-logged-in {
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
}

.site-nav a.nav-login.is-logged-in:hover,
.site-nav a.nav-login.is-logged-in:focus-visible {
    color: var(--text);
    background: rgba(21, 35, 45, 0.05);
}

.site-header__inner .site-nav {
    margin-left: auto;
}

/* ——— Login tabs ——— */
.login-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.login-tabs button {
    flex: 1;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.login-tabs button.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 4px rgba(21, 35, 45, 0.1);
}

/* ——— My Devices page ——— */
.my-devices-page {
    min-height: calc(100vh - var(--header-h) - 80px);
    padding: 0 0 64px;
}

.devices-shell {
    display: block;
    min-height: calc(100vh - var(--header-h) - 70px);
    max-width: 1280px;
    margin: 0 auto;
}

.devices-shell__main { min-width: 0; }

.devices-empty {
    margin: 0 24px 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px dashed var(--border);
    color: var(--muted);
    font-weight: 600;
}

.devices-page-hero {
    padding: 18px 0 14px;
    background:
        radial-gradient(ellipse 60% 80% at 90% -10%, rgba(47, 209, 143, 0.1), transparent 50%),
        radial-gradient(ellipse 40% 60% at 10% 90%, rgba(43, 111, 154, 0.08), transparent 50%),
        var(--bg);
    border-bottom: 1px solid var(--border);
}

.devices-page-hero__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.devices-page-hero__title {
    margin: 0 0 2px;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.6vw, 1.9rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1;
}

.devices-page-hero__sub {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.devices-page-hero__eyebrow {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green);
}

.devices-page-hero__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.devices-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: 0.88rem;
}

.devices-user-pill .user-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--green-bright), var(--green));
    color: #06130e;
    font-size: 0.72rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.devices-user-pill strong {
    font-size: 0.88rem;
    font-weight: 600;
}

.btn--danger-ghost {
    color: #b94040;
    border-color: rgba(185, 64, 64, 0.3);
    background: transparent;
}

.btn--danger-ghost:hover {
    background: rgba(185, 64, 64, 0.06);
    border-color: #b94040;
}

/* ——— Device grid ——— */
.devices-section {
    max-width: var(--max);
    margin: 32px auto 0;
    padding: 0 24px;
}

/* ——— Plan Details (My Devices) ——— */
.devices-plan-card {
    margin-bottom: 16px;
    padding: 6px 12px;
    max-width: 720px;
    width: 100%;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.devices-plan-card__title {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.devices-plan-card__list {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px 14px;
}

.devices-plan-card__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    line-height: 1.25;
}

.devices-plan-card__row dt {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.devices-plan-card__row dd {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

@media (max-width: 900px) {
    .devices-plan-card__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .devices-plan-card__list {
        grid-template-columns: 1fr;
    }
}

.devices-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.devices-section-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.devices-section-head p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ——— Device card ——— */
.device-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.device-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(21, 35, 45, 0.12);
}

.device-card__head {
    padding: 10px 14px 8px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.device-card__id-block h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.15;
}

.device-card__id-line {
    margin: 4px 0 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.device-card__serial {
    font-family: "Courier New", monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: var(--surface-2);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
    display: inline-block;
}

.device-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}

.device-status-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.device-status-badge--online {
    background: #e2f7ef;
    color: #14785a;
}

.device-status-badge--online::before {
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(31, 168, 115, 0.22);
    animation: status-pulse 2.4s ease-in-out infinite;
}

.device-status-badge--offline {
    background: var(--surface-2);
    color: var(--muted);
}

.device-status-badge--offline::before { background: #8fa0ae; }

/* First-card machine table (replaces metrics on Production Line 1) */
.device-card__machines {
    padding: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.device-card__machines-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.device-card__machine-table {
    width: 100%;
    min-width: 260px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.device-card__machine-table th,
.device-card__machine-table td {
    padding: 5px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    vertical-align: middle;
}

.device-card__machine-table th {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: transparent;
}

.device-card__machine-table tbody tr:last-child td {
    border-bottom: none;
}

.device-card__machine-table td:nth-child(2) {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.device-machine-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.device-machine-status--running {
    color: #14785a;
}

.device-machine-status--stop {
    color: #b07a1a;
}

.device-machine-status--fault {
    color: #b94040;
}

.device-card .devices-plan-card {
    margin: 0;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--border);
    padding: 8px 12px 6px;
}

.device-card .devices-plan-card__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.device-card__metrics {
    padding: 12px 20px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.device-card__metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.device-card__metric small {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.device-card__metric strong {
    font-size: 1rem;
    font-weight: 600;
}

.device-card__metric strong em {
    font-style: normal;
    font-size: 0.78rem;
    color: var(--muted);
}

.device-card__foot {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
}

.device-card__foot .btn {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.device-card__foot .btn.is-disabled,
.device-card__foot .btn[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
    box-shadow: none;
}

.device-card__foot-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.device-card__edit {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 7px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.device-card__edit:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}

.device-card__remove {
    color: #b94040;
}

.device-card__remove:hover {
    background: rgba(185, 64, 64, 0.06);
    color: #b94040;
    border-color: rgba(185, 64, 64, 0.3);
}

/* ——— Add device placeholder card ——— */
.device-card--add {
    border-style: dashed;
    border-color: rgba(213, 224, 231, 0.6);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.device-card--add:hover {
    background: var(--surface-2);
    border-color: var(--blue);
    transform: none;
    box-shadow: none;
}

.device-card--add__inner {
    text-align: center;
    padding: 16px 20px;
    color: var(--muted);
}

.device-card--add__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 12px;
    border: 2px dashed var(--border);
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--muted);
}

.device-card--add h3 {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.device-card--add p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ——— Add Device modal ——— */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10, 18, 25, 0.55);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    padding: 24px;
}

/* Author display:grid overrides the UA [hidden] rule — force closed state. */
.modal-overlay[hidden] {
    display: none !important;
}

.modal-box {
    width: min(100%, 460px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: 0 24px 56px rgba(21, 35, 45, 0.22);
    overflow: hidden;
}

.modal-head {
    padding: 18px 20px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.modal-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    font-size: 1.1rem;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
    background: var(--surface-2);
    color: var(--text);
}

.modal-body {
    padding: 20px 20px 24px;
}

.modal-body .field + .field { margin-top: 0; }
.modal-body .btn { width: 100%; margin-top: 12px; }

.modal-note {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
    border: 1px solid var(--border);
}

/* ——— Empty state ——— */
.devices-empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--muted);
}

.devices-empty svg { margin: 0 auto 16px; }

/* ——— Animations ——— */
@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(31, 168, 115, 0.2); }
    50% { box-shadow: 0 0 0 5px rgba(31, 168, 115, 0.05); }
}

/* Motion */
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes nut-settle {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(2deg) translateY(-6px); }
}
@keyframes bolt-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-4px, -10px); }
}
@keyframes washer-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.04); opacity: 0.92; }
}
@keyframes glow-drift {
    from { transform: translate(0, 0); }
    to { transform: translate(18px, -12px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 980px) {
    .hero__layout,
    .split,
    .split--reverse,
    .solutions-band,
    .cta,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }
    .split--reverse .split__media { order: 0; }
    .card-grid,
    .card-grid--4,
    .price-grid { grid-template-columns: 1fr 1fr; }
    .cta__actions { justify-content: flex-start; }
    .solutions-mosaic { min-height: 280px; }
}

@media (max-width: 760px) {
    .nav-toggle { display: inline-flex; }

    .site-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        padding: 12px 16px 18px;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid var(--border);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
    }

    .site-header--dark .site-nav {
        background: rgba(10, 18, 25, 0.98);
        border-bottom-color: var(--border-dark);
    }

    .site-nav.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        visibility: visible;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .site-nav a { padding: 6px 10px; font-size: 12px; min-height: 32px; }
    .site-nav a.nav-login {
        margin-left: 0;
        justify-content: center;
        margin-top: 6px;
    }

    .hero { min-height: auto; }
    .hero__layout { padding: 36px 20px 48px; }
    .hero__copy h1 { max-width: none; }
    .section { padding: 64px 0; }
    .card-grid,
    .card-grid--4,
    .price-grid,
    .solutions-mosaic { grid-template-columns: 1fr; }
    .solutions-mosaic figure:first-child { grid-row: auto; }
    .site-brand__copy strong { font-size: 1.2rem; }
}
